]> git.baikalelectronics.ru Git - kernel.git/commit
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)
commitd492d7e8519cc389275933b896f96a54b18bc555
treeb415803785617bb8d754e05227a8f1452539b63c
parente42211c6c88a2fcf3fdfe4bee93362b420a312ed
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