From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A1991C433EF for ; Tue, 8 Mar 2022 18:00:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id AEC9C83403; Tue, 8 Mar 2022 19:00:17 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="rIkGV5Ke"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id F14F5836A4; Tue, 8 Mar 2022 19:00:14 +0100 (CET) Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5A75A82099 for ; Tue, 8 Mar 2022 19:00:09 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=pali@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5D16561481; Tue, 8 Mar 2022 18:00:07 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id A0848C340EF; Tue, 8 Mar 2022 18:00:06 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1646762406; bh=QlVZpT5huKTIDvxOmloAJtKu7qlwGtWeEa3k+B9cH1U=; h=From:To:Cc:Subject:Date:From; b=rIkGV5KeHZeuaNdj9OlW03PhqsSKcZvcVvAA7dh5z6xLYOCouERyykKG+/vEFNRey mldTC1ag8B2+gCgdN9A3qvwLaUqewJO1aG+Mb/xsabyK874ARYxb/uyCMDeU2SGL0m x13o4vHuHgM3PTVQS5Y6M3rf6DjLX/RVJ7jM/cIZuLopJPNDTBZrBBnx3813GwL3PU XhqzzuGv+xXmXX4dfufd95OV7SPPXVpLKXGair5ZbnFreL5X7r6Z0PrKx4wsVHHGTs fTH68hovpCDdQqKD7+6Rr+LmFJ3shN0fkk08Lw1WkczN1/JTiWwykovo8oQGAY9g7A UcxJTaK4l3ERA== Received: by pali.im (Postfix) id 814591655; Tue, 8 Mar 2022 19:00:03 +0100 (CET) From: =?UTF-8?q?Pali=20Roh=C3=A1r?= To: Heinrich Schuchardt Cc: u-boot@lists.denx.de Subject: [PATCH] Nokia RX-51: Update documentation about QEMU Date: Tue, 8 Mar 2022 18:59:56 +0100 Message-Id: <20220308175956.4522-1-pali@kernel.org> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean Add section how to run U-Boot in n900 qemu machine. Signed-off-by: Pali Rohár --- doc/board/nokia/rx51.rst | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/doc/board/nokia/rx51.rst b/doc/board/nokia/rx51.rst index 941f78e777ee..b297e056c4e7 100644 --- a/doc/board/nokia/rx51.rst +++ b/doc/board/nokia/rx51.rst @@ -160,3 +160,50 @@ UBIFS support add following lines into file ``configs/nokia_rx51_defconfig``:: CONFIG_CMD_UBIFS=y CONFIG_MTD_UBI_FASTMAP=y CONFIG_MTD_UBI_FASTMAP_AUTOCONVERT=1 + +Run in QEMU +----------- + +Download and compile Linaro version of qemu which contains ``n900`` qemu +machine. Source code is available in qemu-linaro git repository and the +last working version is at commit 8f8d8e0796efe1a6f34cdd83fb798f3c41217ec1. + +Use following commands to compile ``qemu-system-arm`` binary with ``n900`` +qemu machine support:: + + git clone https://git.linaro.org/qemu/qemu-linaro.git + cd qemu-linaro + git checkout 8f8d8e0796efe1a6f34cdd83fb798f3c41217ec1 + ./configure --enable-system --target-list=arm-softmmu --disable-werror + make -j4 + cd .. + ln -s qemu-linaro/arm-softmmu/qemu-system-arm . + +Using ``n900`` qemu machine requires proprietary Nokia qemu ``qflasher`` tool +(in reality it is just generator of qemu MTD images) with first stage images +(``xloader-qemu.bin`` and ``secondary-qemu.bin``), similar what is required +on the real HW. License of flasher and images allows non-commercial +redistribution and it is available at maemo.org website:: + + wget -c http://repository.maemo.org/qemu-n900/qemu-n900.tar.gz + tar -xf qemu-n900.tar.gz + +To generate qemu bootable MTD image ``mtd.img`` from U-Boot binary +``u-boot.bin`` and unpacked first stage images, run following command:: + + ./qflasher -v -x xloader-qemu.bin -s secondary-qemu.bin -k u-boot.bin -m rx51 -o mtd.img + +Instead of ``u-boot.bin`` binary it is possible to also used combined +U-Boot + kernel binary ``combined.bin``. + +Finally, to boot ``mtd.img`` with graphics display and keyboard with optional +serial console on current terminal, run:: + + ./qemu-system-arm -M n900 -mtdblock mtd.img -serial /dev/tty + +Additionally it is possible to emulate also eMMC and uSD card by appending +qemu ``-sd`` arguments:: + + ./qemu-system-arm -M n900 -mtdblock mtd.img -sd emmc.img -sd sd.img -serial /dev/tty + +For more examples, look into the ``test/nokia_rx51_test.sh`` CI testing script. -- 2.20.1