Skip to content
Snippets Groups Projects
Forked from IOPSYS / IOWRT
Source project has a limited visibility.
  • Sergey Ryazanov's avatar
    1a51241c
    firmware-utils: mktplinkfw: fix JFFS2 EOF markers · 1a51241c
    Sergey Ryazanov authored and John Crispin's avatar John Crispin committed
    
    mktplinkfw/mktplinkfw2 utilities put JFFS2 EOF market only at 64KB
    boundary, this could lead to current device configuration lost during
    the sysupgrade on a device, which is equpped with flash with the 4KB
    erase block size (e.g. TP-Link Archer C20).
    
    This happens when 64KB and 4KB alignments do not match, so the JFFS2
    data is written not exactly at the partition beginnig and startup
    scripts can not find the JFFS2 during the first boot just after the
    sysupgrade.
    
    Fix this by placing additional JFFS2 EOF marker at a 4KB boundary. Also
    keep the marker at 64KB intact, so the utilities will produce images
    suitable for devices with both 4KB and 64KB erase blocks.
    
    Fixes: 29a2c2ea (add ability to put
    jffs2 eof marker into the image)
    
    Signed-off-by: default avatarSergey Ryazanov <ryazanov.s.a@gmail.com>
    1a51241c
    History
    firmware-utils: mktplinkfw: fix JFFS2 EOF markers
    Sergey Ryazanov authored and John Crispin's avatar John Crispin committed
    
    mktplinkfw/mktplinkfw2 utilities put JFFS2 EOF market only at 64KB
    boundary, this could lead to current device configuration lost during
    the sysupgrade on a device, which is equpped with flash with the 4KB
    erase block size (e.g. TP-Link Archer C20).
    
    This happens when 64KB and 4KB alignments do not match, so the JFFS2
    data is written not exactly at the partition beginnig and startup
    scripts can not find the JFFS2 during the first boot just after the
    sysupgrade.
    
    Fix this by placing additional JFFS2 EOF marker at a 4KB boundary. Also
    keep the marker at 64KB intact, so the utilities will produce images
    suitable for devices with both 4KB and 64KB erase blocks.
    
    Fixes: 29a2c2ea (add ability to put
    jffs2 eof marker into the image)
    
    Signed-off-by: default avatarSergey Ryazanov <ryazanov.s.a@gmail.com>