459c8c9 added support for the Zyxel NBG6716 device. Unfortunately, I believe it made an error in the partition layout. Because the RAS image header is written to flash, the offsets for sub-partitions of //firmware// must be shifted down by the size of this header (i.e., 128KiB):
// There's a RAS image header inside the firmware partition,
// taking up one erase block (128KiB), so the kernel and ubi
// partitions are shifted by that amount.
// JFFS2 containing the compressed kernel
label = "kernel";
reg = <0x500000 0x400000>;
reg = <0x520000 0x400000>;
label = "ubi";
reg = <0x900000 0x7700000>;
reg = <0x920000 0x76C0000>;
Without this change, the bootloader finds the kernel inside its JFFS2 partition just fine, but then the kernel dies when it cannot find the UBI header at the indicated offset.
It is not clear to me whether this change should be applied to all NBG6716-equivalent devices or merely the one I have in hand.
Speaking of, that device calls itself a //AAVK-EMG2926Q10A// in its RAS header and refuses to flash anything not so labeled. Therefore, I have added a target for it by lightly extending the existing one:
diff --git a/target/linux/ath79/dts/qca9558_zyxel_aavk-emg2926q10a.dts b/target/linux/ath79/dts/qca9558_zyxel_aavk-emg2926q10a.dts
new file mode 100644
@@ -0,0 +1,2 @@
+/* This is just an alias, really */
diff --git a/target/linux/ath79/image/nand.mk b/target/linux/ath79/image/nand.mk
index ad79c487ad..7336dc45d7 100644
@@ -263,3 +263,9 @@ define Device/zyxel_nbg6716
UBINIZE_OPTS := -E 5
TARGET_DEVICES += zyxel_nbg6716
+ $(call Device/zyxel_nbg6716)
+ RAS_BOARD := AAVK-EMG2926Q10A
+TARGET_DEVICES += zyxel_aavk-emg2926q10a
The text was updated successfully, but these errors were encountered:
I now have another of these devices with which to experiment and I believe the confusion here is that the wiki's instructions do not account for the RAS header in the factory binary, while the zloader that runs in the TFTP recovery path does. While I do not have its source at hand, it does, from observation and from looking at strings, write the header and the rootfs components to flash separately.
I believe this issue can be closed once the wiki is updated to shave off the 0x20000 bytes from the start of the OpenWRT factory.bin image.