Commit cdd14a8c authored by Guenter Roeck's avatar Guenter Roeck Committed by Aurelien Jarno
Browse files

sh4: Fix initramfs initialization for endiannes-mismatched targets



If host and target endianness does not match, loding an initramfs does not work.
Fix by writing boot parameters with appropriate endianness conversion.

Signed-off-by: default avatarGuenter Roeck <linux@roeck-us.net>
Signed-off-by: default avatarAurelien Jarno <aurelien@aurel32.net>
parent be654c83
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -338,9 +338,9 @@ static void r2d_init(MachineState *machine)
        }

        /* initialization which should be done by firmware */
        boot_params.loader_type = 1;
        boot_params.initrd_start = INITRD_LOAD_OFFSET;
        boot_params.initrd_size = initrd_size;
        boot_params.loader_type = tswap32(1);
        boot_params.initrd_start = tswap32(INITRD_LOAD_OFFSET);
        boot_params.initrd_size = tswap32(initrd_size);
    }

    if (kernel_cmdline) {