openwrt/target/linux
Linus Walleij dc451a4b24 gemini: Enable flash boot on reference design type
The flash layout on the Storlink reference design for Gemini
is using 2 MB flash for the kernel, and it also insists on
overwriting the partition table with default values on every
boot. The same is true for the SQ201. This poses a problem
on recent OpenWrt firmware as the base zImage is bigger
than 2 MB.

At the same time there is a ramdisk partition of 6 MB that we
don't really need. The partition table looks like this:

Creating 7 MTD partitions on "30000000.flash":
0x000000000000-0x000000016000 : "BOOT"
0x000000120000-0x000000320000 : "Kern"
0x000000320000-0x000000920000 : "Ramdisk"
0x000000920000-0x000000f20000 : "Application"
0x000000f20000-0x000000f40000 : "VCTL"
0x000000f40000-0x000000fe0000 : "CurConf"
0x000000fe0000-0x000001000000 : "FIS directory"

On boot the "Kern" partition is copied to RAM @0x01600000
and the "Ramdisk" partition is copied to RAM @0x00800000.
Then the kernel is executed.

The idea with this patch is to extend the "Kern" partition
with the "Ramdisk" partition to get a full 8 MB to use
for the kernel. Then we put the OpenWrt JFFS2 rootfs
inside the "Application" partition.

We create a small assembly loop that we prepend to the
"Kern" image that will copy the "Kern" from 0x0160000
and the "Ramdisk" from 0x00800000 and put them in
consecutive space at 0x00400000 and execute it from
there, using "Application" as rootfs.

We generate 3 main files:
- zImage - contains the assembly bootstrap loop and
  the first part of the generated kernel image
- rd.gz - contains the second part of the generated
  kernel image
- hddapp.tgz - contains the root filesystem

On the SQ201 I flash these manually using the native boot
loader PLATO, "Y" alternative for the zImage, "R" for
the rd.gz image and "A" for hddapp.tgz.

This works fine and I can now boot to prompt on the SQ201
with nothing but flash.

Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
2019-08-17 16:57:32 +02:00
..
apm821xx treewide: convert WiFi caldata size and offset to hexadecimal 2019-08-14 12:36:37 +02:00
ar7 kernel: bump 4.9 to 4.9.186 2019-07-31 16:51:46 +02:00
ar71xx treewide: convert WiFi caldata size and offset to hexadecimal 2019-08-14 12:36:37 +02:00
arc770 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
archs38 treewide: use wpad-basic for not small flash targets 2018-10-16 15:07:41 +01:00
armvirt armvirt: fix overlay support by updating to f2fs/ext4 based overlays 2019-06-25 14:12:22 +00:00
at91 at91: split up DEVICE_TITLE 2019-08-02 22:45:33 +02:00
ath25 ath25: split up DEVICE_TITLE 2019-07-10 16:56:16 +02:00
ath79 ath79: remove SUPPORTED_DEVICES for TP-Link Archer D50 v1 2019-08-15 14:25:05 +02:00
bcm53xx bcm53xx: split up DEVICE_TITLE 2019-08-02 22:45:02 +02:00
brcm47xx kernel: bump 4.19 to 4.19.62 2019-07-31 16:51:46 +02:00
brcm63xx brcm63xx: do not build images for 16 MiB RAM devices by default 2019-08-16 12:40:26 +02:00
brcm2708 kernel: bump 4.19 to 4.19.66 2019-08-14 18:23:08 +02:00
cns3xxx treewide: sysupgrade: don't use $ARGV in platform_do_upgrade() 2019-07-17 08:05:38 +02:00
gemini gemini: Enable flash boot on reference design type 2019-08-17 16:57:32 +02:00
generic kernel: bump 4.19 to 4.19.66 2019-08-14 18:23:08 +02:00
imx6 imx6: bump SDMA firmware to 3.5 2019-07-31 16:51:46 +02:00
ipq40xx ipq40xx: fix AVM NAND caldata extraction 2019-08-15 00:33:12 +02:00
ipq806x treewide: convert WiFi caldata size and offset to hexadecimal 2019-08-14 12:36:37 +02:00
ixp4xx kernel: bump 4.9 to 4.9.187 2019-08-06 11:52:47 +02:00
kirkwood treewide: sysupgrade: don't use $ARGV in platform_do_upgrade() 2019-07-17 08:05:38 +02:00
lantiq lantiq: unify Fritz!Box LED mappings 2019-08-15 14:25:51 +02:00
layerscape kernel: bump 4.14 to 4.14.136 2019-08-06 11:52:47 +02:00
malta malta: fix overlay support by updating to f2fs/ext4 based overlays 2019-06-25 14:12:22 +00:00
mediatek kernel: bump 4.19 to 4.19.64 2019-08-06 11:52:47 +02:00
mpc85xx treewide: convert WiFi caldata size and offset to hexadecimal 2019-08-14 12:36:37 +02:00
mvebu mvebu: sysupgrade: sdcard: fix platform_do_upgrade_sdcard 2019-08-16 22:53:06 +02:00
mxs mxs: disable unused serial drivers 2019-03-11 19:35:43 +01:00
octeon octeon: split up DEVICE_TITLE 2019-08-02 22:45:02 +02:00
octeontx kernel: Remove CONFIG_COMPAT 2019-05-11 17:15:41 +02:00
omap kernel: Deactivate CONFIG_BINFMT_MISC 2019-05-11 17:15:41 +02:00
orion orion: sysupgrade: change platform_check_image() args validation 2019-07-16 13:58:26 +02:00
oxnas oxnas: convert DEVICE_TITLE to new variables 2019-07-10 16:56:16 +02:00
pistachio treewide: sysupgrade: get rid of platform_nand_pre_upgrade() 2019-07-22 14:27:37 +02:00
ramips treewide: convert WiFi caldata size and offset to hexadecimal 2019-08-14 12:36:37 +02:00
rb532 treewide: sysupgrade: get rid of platform_nand_pre_upgrade() 2019-07-22 14:27:37 +02:00
samsung kernel: Do not set CONFIG_DEVMEM or CONFIG_DEVKMEM 2019-05-11 17:15:41 +02:00
sunxi sunxi: convert to multi-variable device title 2019-07-10 17:01:13 +02:00
tegra tegra: split up DEVICE_TITLE 2019-07-15 19:28:55 +02:00
uml kernel: Deactivate CONFIG_BINFMT_MISC 2019-05-11 17:15:41 +02:00
x86 x86: add modern network modules to Generic target 2019-07-17 12:16:29 +02:00
zynq zynq: remove kernel 4.14 support 2019-08-17 16:57:32 +02:00
Makefile