mirror of
git://git.openwrt.org/openwrt/openwrt.git
synced 2025-10-26 19:44:27 -04:00
Current factory image sizes for Linksys devices are 256-byte aligned. This
is not an issue writing factory images from the OpenWrt or Linksys GUIs,
but can lead to failures using a TFTP client from the Linksys bootloader:
NAND write: device 1 offset 0x2800000, size 0xc00100
Attempt to write to non page aligned data
NAND write to offset 2800000 failed -22
0 bytes written: ERROR
Simplify Linksys footer creation by migrating to a makefile build recipe,
and pre-pad the footer (with 0xFF) to ensure the final image is $(PAGESIZE)
aligned. Finally, remove the old linksys-image.sh script no longer needed.
Linksys footer details are given below for future reference. The 256-byte
footer is appended to factory images and tested by both the Linksys
Upgrader (observed in EA6350v3) and OpenWrt sysupgrade.
Footer format:
.LINKSYS. Checked by Linksys upgrader before continuing. (9 bytes)
<VERSION> Upgrade version number, unchecked so arbitrary. (8 bytes)
<TYPE> Model of device, space padded (0x20). (15 bytes)
<CRC> CRC checksum of factory image to flash. (8 bytes)
<padding> Padding ('0' + 0x20 * 7) (8 bytes)
<signature> Signature of signer, unchecked so arbitrary. (16 bytes)
<padding> Padding with nulls (0x00) (192 bytes)
Link: https://github.com/openwrt/openwrt/pull/11405#issuecomment-1358510123
Link: https://github.com/openwrt/openwrt/pull/11405#issuecomment-1587517739
Reported-by: Stijn Segers <foss@volatilesystems.org>
Reported-by: Wyatt Martin <wawowl@gmail.com>
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
|
||
|---|---|---|
| .. | ||
| site | ||
| autotools.mk | ||
| bpf.mk | ||
| cmake.mk | ||
| debug.mk | ||
| depends.mk | ||
| device_table.txt | ||
| download.mk | ||
| feeds.mk | ||
| hardened-ld-pie.specs | ||
| hardening.mk | ||
| host-build.mk | ||
| image-commands.mk | ||
| image.mk | ||
| kernel-5.15 | ||
| kernel-6.1 | ||
| kernel-build.mk | ||
| kernel-defaults.mk | ||
| kernel-version.mk | ||
| kernel.mk | ||
| logo.png | ||
| logo.svg | ||
| meson.mk | ||
| netfilter.mk | ||
| nls.mk | ||
| openssl-module.mk | ||
| package-bin.mk | ||
| package-defaults.mk | ||
| package-dumpinfo.mk | ||
| package-ipkg.mk | ||
| package-seccomp.mk | ||
| package.mk | ||
| prereq-build.mk | ||
| prereq.mk | ||
| quilt.mk | ||
| rootfs.mk | ||
| scan.awk | ||
| scan.mk | ||
| shell.sh | ||
| subdir.mk | ||
| target.mk | ||
| toolchain-build.mk | ||
| toplevel.mk | ||
| trusted-firmware-a.mk | ||
| u-boot.mk | ||
| uclibc++.mk | ||
| unpack.mk | ||
| verbose.mk | ||
| version.mk | ||