Openwrt/scripts
Sven Eckelmann 3599ea5263 images: Fix sysupgrade.tar for devices with NOR flash
The NOR flash rootfs images stored in a sysupgrade.tar must end with the
JFFS2 marker. Otherwise, devices like OpenMesh A42/A62 are not able to
calculate the md5sum of the fixed squashfs part and store it inside the
u-boot-env.

But the commit ee76bd11bb ("images: fix boot failures on NAND with small
sub pages") adds up to 1020 0x00 bytes after the 0xdead0de EOF marker. The
calculated md5sum will be wrong due do this change and u-boot will fail to
boot the newly flashed device with a message like:

  Validating MD5Sum of 'vmlinux'...
  Passed!
  Validating MD5Sum of 'rootfs'...
  Failed!
      583a1b7b54b8601efa64ade42742459b != 8850ee812dfd7638e94083329d5d2781

  Data validation failed!

and boot the old image again.

Since the original change should not change the behavior of NOR images,
just check for the deadc0de marker at the end of the squashfs-jffs2 image
do avoid the problematic behavior for these images.

Fixes: ee76bd11bb ("images: fix boot failures on NAND with small sub pages")
Signed-off-by: Sven Eckelmann <sven@narfation.org>
2020-12-22 19:11:50 +01:00
..
config scripts: update SPDX license names 2020-09-22 20:36:04 +02:00
flashing
arm-magic.sh
brcmImage.pl
bundle-libraries.sh scripts: bundle-libraries.sh: fix broken SDK compiler 2020-11-02 08:39:49 +01:00
cfe-bin-header.py
cfe-partition-tag.py
cfe-wfi-tag.py
checkpatch.pl scripts: checkpatch.pl: suppress warnings about MAINTAINERS 2020-11-18 21:50:53 +01:00
clang-gcc-wrapper
clean-package.sh
cleanfile
cleanpatch
combined-ext-image.sh
combined-image.sh
config.guess
config.rpath
config.sub
const_structs.checkpatch scripts: add const_structs.checkpatch for checkpatch.pl 2020-11-18 21:50:58 +01:00
deptest.sh
diffconfig.sh
dl_cleanup.py
dl_github_archive.py
download.pl download.pl: properly cleanup intermediate .hash file 2020-11-27 22:27:08 +01:00
dump-target-info.pl
env
ext-toolchain.sh
feeds scripts/feeds: fix preference of package install 2020-12-09 23:25:05 -10:00
fixup-makefile.pl
functions.sh images: Fix sysupgrade.tar for devices with NOR flash 2020-12-22 19:11:50 +01:00
gen_image_generic.sh
gen-dependencies.sh
get_source_date_epoch.sh build: get_source_date_epoch allow external repos 2020-08-31 11:18:06 +01:00
getver.sh scripts/getver.sh: silence rev-list errors 2020-11-02 08:39:49 +01:00
ipkg-build scripts: ipkg-build: simplify uid/gid resolving 2020-09-14 17:11:04 +02:00
ipkg-make-index.sh
ipkg-remove
json_add_image_info.py build/json: add filesystem information 2020-12-13 22:07:52 -10:00
json_overview_image_info.py
kconfig.pl scripts/kconfig.pl: allow regex syntax in filtering out config entries 2020-11-13 13:17:53 +01:00
linksys-image.sh
make-ipkg-dir.sh
md5sum
metadata.pm
mkhash.c scripts: add -N option to mkhash for printing without newline 2020-12-22 19:11:50 +01:00
mkits-qsdk-ipq-image.sh
mkits.sh scripts: mkits.sh make it possible to specify fdt@# 2020-09-25 19:32:33 +02:00
om-fwupgradecfg-gen.sh scripts/om-fwupgradecfg-gen.sh: Generate checksum over whole squashfs 2020-12-22 19:11:50 +01:00
package-metadata.pl
pad_image
patch-kernel.sh
patch-specs.sh
portable_date.sh
qemustart scripts/qemustart: update malta to use MIPS64 R2 cpu 2020-10-11 16:16:24 +02:00
redboot-script.pl
relink-lib.sh
remote-gdb
rstrip.sh
sercomm-crypto.py
sercomm-partition-tag.py
sercomm-payload.py
sign_images.sh
size_compare.sh scripts: add size_compare.sh 2020-11-24 18:18:48 -10:00
slugimage.pl
spelling.txt scripts: add spelling.txt for checkpatch.pl 2020-11-12 18:21:55 +01:00
srecimage.pl
strip-kmod.sh
symlink-tree.sh
sysupgrade-tar.sh
target-metadata.pl build: define PWM_SUPPORT arch feature flag 2020-09-25 19:32:33 +02:00
time.pl
timestamp.pl
ubinize-image.sh