openwrt/target/linux/gemini/patches-4.19
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
..
0001-pinctrl-gemini-Mask-and-set-properly.patch kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
0002-pinctrl-gemini-Fix-up-TVC-clock-group.patch kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
0003-pinctrl-gemini-Drop-noisy-debug-prints.patch kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
0004-boot-sq201-from-sda1.patch kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
0005-mtd-physmap_of-Move-custom-initialization.patch kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
0006-mtd-physmap_of_gemini-Handle-pin-control.patch kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
0008-ARM-dts-Enable-Gemini-flash-access.patch kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
0009-mtd-partitions-Add-RedBoot-FIS-DT-bindings.patch kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
0010-mtd-partitions-Add-second-compatible-for-redboot.patch kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
0011-ARM-dts-Fix-up-SQ201-flash-access.patch gemini: Enable flash boot on reference design type 2019-08-17 16:57:32 +02:00
0012-ARM-dts-Blank-D-Link-DIR-685-console.patch kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
0013-usb-host-fotg2-add-silicon-clock-handling.patch kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
0014-usb-host-add-DT-bindings-for-faraday-fotg2.patch kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
0015-usb-host-fotg2-add-device-tree-probing.patch kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
0016-usb-host-fotg2-add-Gemini-specific-handling.patch kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
0017-usb-host-fotg2-restart-hcd-after-port-reset.patch kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
0018-ARM-dts-Add-the-FOTG210-USB-host-to-Gemini-boards.patch kernel: bump 4.19 to 4.19.18 2019-01-28 18:17:32 +01:00
0019-ARM-dts-gemini-Indent-DIR-685-partition-table.patch kernel: bump 4.19 to 4.19.34 2019-04-08 14:53:39 +02:00
0020-ARM-dts-Augment-DIR-685-partition-table-for-OpenWrt.patch gemini: Make root filesystem writeable 2019-06-15 19:55:32 +02:00
0022-RM-dts-gemini-Switch-to-redboot-partition-parsing.patch gemini: Fix up flash accesses 2019-08-17 16:57:32 +02:00
0023-ARM-dts-gemini-Mount-root-from-mtdblock3.patch gemini: Fix up flash accesses 2019-08-17 16:57:32 +02:00
0024-ARM-dts-gemini-Fix-up-confused-pin-settings.patch gemini: Fix up some confused pin config on SL93512r 2019-08-17 16:57:32 +02:00