]> git.ipfire.org Git - thirdparty/u-boot.git/commitdiff
riscv: sifive: unleashed: Set kernel_comp_addr_r for compressed kernel
authorBin Meng <bmeng.cn@gmail.com>
Tue, 24 May 2022 04:31:13 +0000 (12:31 +0800)
committerLeo Yu-Chi Liang <ycliang@andestech.com>
Thu, 26 May 2022 10:42:34 +0000 (18:42 +0800)
Set kernel_comp_addr_r and kernel_comp_size for compressed kernel.
Adjust existing addresses for ramdisk, so that kernel_comp_addr_r
comes before the ramdisk image, since the decompressed kernel size
is known to us. This way we can allow big ramdisk image to be loaded.

Update unleashed.rst to remove the manual environment configuration
for compressed kernel boot.

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Leo Yu-Chi Liang <ycliang@andestech.com>
doc/board/sifive/unleashed.rst
include/configs/sifive-unleashed.h

index c8a62068a77757d716fc2ac19e1b2355be096a02..ce38b701d78d8a910cb4c0e73f2676ccce9ebe5f 100644 (file)
@@ -216,8 +216,6 @@ Or if you want to use a compressed kernel image file such as Image.gz
             1.2 MiB/s
    done
    Bytes transferred = 4809458 (4962f2 hex)
-   =>setenv kernel_comp_addr_r 0x90000000
-   =>setenv kernel_comp_size 0x500000
 
 By this time, correct kernel image is loaded and required environment variables
 are set. You can proceed to load the ramdisk and device tree from the tftp server
index 920f3140f64fdeb337bbe7ecb8b32e7d1e5ad4fb..96e2eb67988179e1b901f8ed3177900575f6023e 100644 (file)
        "fdt_high=0xffffffffffffffff\0" \
        "initrd_high=0xffffffffffffffff\0" \
        "kernel_addr_r=0x84000000\0" \
-       "fdt_addr_r=0x88000000\0" \
-       "scriptaddr=0x88100000\0" \
+       "kernel_comp_addr_r=0x88000000\0" \
+       "kernel_comp_size=0x4000000\0" \
+       "fdt_addr_r=0x8c000000\0" \
+       "scriptaddr=0x8c100000\0" \
        "script_offset_f=0x1fff000\0" \
        "script_size_f=0x1000\0" \
-       "pxefile_addr_r=0x88200000\0" \
-       "ramdisk_addr_r=0x88300000\0" \
+       "pxefile_addr_r=0x8c200000\0" \
+       "ramdisk_addr_r=0x8c300000\0" \
        "type_guid_gpt_loader1=" TYPE_GUID_LOADER1 "\0" \
        "type_guid_gpt_loader2=" TYPE_GUID_LOADER2 "\0" \
        "type_guid_gpt_system=" TYPE_GUID_SYSTEM "\0" \