openrisc: Add support for external initrd images
authorStafford Horne <shorne@gmail.com>
Sat, 4 Jul 2020 20:53:49 +0000 (05:53 +0900)
committerStafford Horne <shorne@gmail.com>
Tue, 4 Aug 2020 01:59:45 +0000 (10:59 +0900)
commitff6c923dbec332dd6c6f649b754f4edd8f0a3c50
treeb415803785617bb8d754e05227a8f1452539b63c
parentd0b7213f895cd0e209ff5ba89998aeb09267bdc7
openrisc: Add support for external initrd images

In OpenRISC we set the initrd_start and initrd_end based on the symbols
we setup in vmlinux.lds.S.  However, this is not needed if we use the
generic linker description in INIT_DATA_SECTION.

Removing our own initrd setup reduces code, but also the generic code
supports loading external initrd images.  A bootloader can load a rootfs
image into memory and we can configure devicetree to load it with:

        chosen {
                bootargs = "earlycon";
                stdout-path = "uart0:115200";
                linux,initrd-start = < 0x08000100 >;
                linux,initrd-end = < 0x08200000 >;
        };

Reported-by: Mateusz Holenko <mholenko@antmicro.com>
Signed-off-by: Stafford Horne <shorne@gmail.com>
arch/openrisc/kernel/setup.c
arch/openrisc/kernel/vmlinux.lds.S