diff options
author | Michael Pratt <mcpratt@pm.me> | 2021-02-24 22:55:09 -0500 |
---|---|---|
committer | Petr Štetiar <ynezz@true.cz> | 2021-04-08 09:20:59 +0200 |
commit | 4a0cc5d4ef29a11914850c72158aca1e2a170fb0 (patch) | |
tree | 4595a9c3115f558a600fda44aff98039837e85a2 /target/linux/ath79/dts | |
parent | 1b8bd17c2d07c7397015a86941db9e114e1d349a (diff) | |
download | upstream-4a0cc5d4ef29a11914850c72158aca1e2a170fb0.tar.gz upstream-4a0cc5d4ef29a11914850c72158aca1e2a170fb0.tar.bz2 upstream-4a0cc5d4ef29a11914850c72158aca1e2a170fb0.zip |
ath79: remove 'fakeroot' for Senao devices
By using the same custom kernel header magic
in both OKLI lzma-loader, DTS, and makefile
this hack is not necessary anymore
However, "rootfs" size and checksum
must now be supplied by the factory.bin image
through a script that is accepted by the OEM upgrade script.
This is because Senao OEM scripts assume a squashfs header exists
at the offset for the original "rootfs" partition
which is actually the kernel + rootfs in this implementation,
and takes size value from the header that would be there with hexdump,
but this offset is now the uImage header instead.
This frees up 1 eraseblock
previously used by the "fakeroot" partition
for bypassing the OEM image verification.
Also, these Senao devices with a 'failsafe' partition
and the tar-gz factory.bin platform would otherwise require
flashing the new tar-gz sysupgrade.bin afterward.
So this also prevents having to flash both images
when starting from OEM or 'failsafe'
the OEM upgrade script verifies the header magic numbers,
but only the first two bytes.
Example:
[ "${magic_word_kernel}" = "2705" ] &&
[ "${magic_word_rootfs}" = "7371" -o "${magic_word_rootfs}" = "6873" ] &&
errcode="0"
therefore picked the magic number
0x73714f4b
which is
'sqOK'
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Diffstat (limited to 'target/linux/ath79/dts')
-rw-r--r-- | target/linux/ath79/dts/ar724x_senao_loader.dtsi | 12 | ||||
-rw-r--r-- | target/linux/ath79/dts/ar934x_senao_loader.dtsi | 12 | ||||
-rw-r--r-- | target/linux/ath79/dts/qca955x_senao_loader.dtsi | 12 |
3 files changed, 9 insertions, 27 deletions
diff --git a/target/linux/ath79/dts/ar724x_senao_loader.dtsi b/target/linux/ath79/dts/ar724x_senao_loader.dtsi index fdc2726e6f..54dbec18b3 100644 --- a/target/linux/ath79/dts/ar724x_senao_loader.dtsi +++ b/target/linux/ath79/dts/ar724x_senao_loader.dtsi @@ -15,7 +15,7 @@ partition@0 { compatible = "openwrt,uimage", "denx,uimage"; - openwrt,ih-magic = <IH_MAGIC_OKLI>; + openwrt,ih-magic = <0x73714f4b>; label = "firmware"; reg = <0x0 0x0>; }; @@ -64,15 +64,9 @@ reg = <0xb0000 0xf0000>; }; - partition@1a0000 { - label = "fakeroot"; - reg = <0x1a0000 0x10000>; - read-only; - }; - - fwconcat0: partition@1b0000 { + fwconcat0: partition@1a0000 { label = "fwconcat0"; - reg = <0x1b0000 0x4c0000>; + reg = <0x1a0000 0x4d0000>; }; partition@670000 { diff --git a/target/linux/ath79/dts/ar934x_senao_loader.dtsi b/target/linux/ath79/dts/ar934x_senao_loader.dtsi index aa8a36d242..35e5f13535 100644 --- a/target/linux/ath79/dts/ar934x_senao_loader.dtsi +++ b/target/linux/ath79/dts/ar934x_senao_loader.dtsi @@ -15,7 +15,7 @@ partition@0 { compatible = "openwrt,uimage", "denx,uimage"; - openwrt,ih-magic = <IH_MAGIC_OKLI>; + openwrt,ih-magic = <0x73714f4b>; label = "firmware"; reg = <0x0 0x0>; }; @@ -68,15 +68,9 @@ reg = <0x0b0000 0x170000>; }; - partition@220000 { - label = "fakeroot"; - reg = <0x220000 0x010000>; - read-only; - }; - - fwconcat0: partition@230000 { + fwconcat0: partition@220000 { label = "fwconcat0"; - reg = <0x230000 0xbc0000>; + reg = <0x220000 0xbd0000>; }; partition@df0000 { diff --git a/target/linux/ath79/dts/qca955x_senao_loader.dtsi b/target/linux/ath79/dts/qca955x_senao_loader.dtsi index 3f5fc0e938..77eabde80a 100644 --- a/target/linux/ath79/dts/qca955x_senao_loader.dtsi +++ b/target/linux/ath79/dts/qca955x_senao_loader.dtsi @@ -17,7 +17,7 @@ partition@0 { compatible = "openwrt,uimage", "denx,uimage"; - openwrt,ih-magic = <IH_MAGIC_OKLI>; + openwrt,ih-magic = <0x73714f4b>; label = "firmware"; reg = <0x0 0x0>; }; @@ -66,15 +66,9 @@ reg = <0x0b0000 0x170000>; }; - partition@220000 { - label = "fakeroot"; - reg = <0x220000 0x010000>; - read-only; - }; - - fwconcat0: partition@230000 { + fwconcat0: partition@220000 { label = "fwconcat0"; - reg = <0x230000 0xb40000>; + reg = <0x220000 0xb50000>; }; partition@d70000 { |