Hurricos / openwrt

This repository is a mirror of https://git.openwrt.org/openwrt/openwrt.git It is for reference only and is not active for check-ins or for reporting issues. We will continue to accept Pull Requests here. They will be merged via staging trees then into openwrt.git. All issues should be reported at: https://bugs.openwrt.org
Other
0 stars 1 forks source link

HiveAP 370: Replace platform-specific version of `nand.sh` with hacky build of dtb + initramfs #3

Closed Hurricos closed 2 years ago

Hurricos commented 2 years ago

Synopsis

There were concerns about making platform-wide nand.sh and sysupgrade-tar.sh changes. Since we can afford to patch u-boot now and problems like this can be surmounted, we should try gutting this code.

Tasks

Hurricos commented 2 years ago

FIT images are indeed bad:

=> bootm 0x1000000         
Wrong Image Format for bootm command
ERROR: can't get kernel image!
=> 

... for file:

$ head -c 128 openwrt-mpc85xx-p1020-aerohive_hiveap-370-initramfs-kernel.bin | xxd
00000000: d00d feed 00bf 72b0 0000 0038 00bf 6ec4  ......r....8..n.
00000010: 0000 0028 0000 0011 0000 0010 0000 0000  ...(............
00000020: 0000 006c 00bf 6e8c 0000 0000 0000 0000  ...l..n.........
00000030: 0000 0000 0000 0000 0000 0001 0000 0000  ................
00000040: 0000 0003 0000 0004 0000 005c 6199 a4b8  ...........\a...
00000050: 0000 0003 0000 002b 0000 0000 504f 5745  .......+....POWE
00000060: 5250 4320 4f70 656e 5772 7420 4649 5420  RPC OpenWrt FIT 
00000070: 2846 6c61 7474 656e 6564 2049 6d61 6765  (Flattened Image
Hurricos commented 2 years ago

I must include the rootfs in the sysupgrade image, but I cannot do so without knowing how the kernel is supposed to know where in a prospective 'firmware' partition the rootfs actually is.

Hurricos commented 2 years ago

This sysupgrade definition works:

  IMAGE/sysupgrade.bin := append-dtb | pad-to 256k | append-kernel | sysupgrade-tar kernel=$$$$@ | append-metadata
Hurricos commented 2 years ago

OK, this looks all a-ok. Closing.