From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:44940) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbEfi-000090-IN for qemu-devel@nongnu.org; Sun, 13 Sep 2015 17:18:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZbEfh-0003rc-Gz for qemu-devel@nongnu.org; Sun, 13 Sep 2015 17:18:50 -0400 Received: from hall.aurel32.net ([2001:bc8:30d7:100::1]:33209) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZbEfh-0003r4-BV for qemu-devel@nongnu.org; Sun, 13 Sep 2015 17:18:49 -0400 From: Aurelien Jarno Date: Sun, 13 Sep 2015 23:18:45 +0200 Message-Id: <1442179125-29608-7-git-send-email-aurelien@aurel32.net> In-Reply-To: <1442179125-29608-1-git-send-email-aurelien@aurel32.net> References: <1442179125-29608-1-git-send-email-aurelien@aurel32.net> Subject: [Qemu-devel] [PULL 6/6] sh4: Fix initramfs initialization for endiannes-mismatched targets List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Aurelien Jarno , Guenter Roeck From: Guenter Roeck 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: Guenter Roeck Signed-off-by: Aurelien Jarno --- hw/sh4/r2d.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/hw/sh4/r2d.c b/hw/sh4/r2d.c index 5e22ed7..3b0b2ec 100644 --- a/hw/sh4/r2d.c +++ b/hw/sh4/r2d.c @@ -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) { -- 2.1.4