From owner-freebsd-arm@freebsd.org Tue Dec 19 16:58:31 2017 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 98E7EE900CE for ; Tue, 19 Dec 2017 16:58:31 +0000 (UTC) (envelope-from sylgar@gmail.com) Received: from mail-wr0-x234.google.com (mail-wr0-x234.google.com [IPv6:2a00:1450:400c:c0c::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2B2BB81592 for ; Tue, 19 Dec 2017 16:58:31 +0000 (UTC) (envelope-from sylgar@gmail.com) Received: by mail-wr0-x234.google.com with SMTP id a41so19877664wra.6 for ; Tue, 19 Dec 2017 08:58:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:content-transfer-encoding:mime-version:date:subject:message-id :cc:to; bh=Nh50I5qIAGZT0ajG7F42BI5dTYh+5egh/ceNnPkXuzA=; b=VCZuQcyaR6bpsPWVlmMN0/Dj6IwR7eOyAdiPftyj3yaFuVhUQAQHak9iCPyAyaA9OL YiOuBJk8/tDyNb2BmdopMDLCJjyThmQ017dWs67zSRSTmxK52eok7t/YRjfffRPReXiN 3jY6bE0H331yEZOUX/K1N/sJNdduycV/mw+Uwn3wNDpSBvEy+aYhJJy42jqU7oZ1n4+Y lC5rKglNNwGuUtqps965a0NupivhF5jY9X31/++Oo+s7a2kX8jEi0KHN5yBQ67a7sgLK 5pt2y58Px4ymFN7gspXUq9oO0H29Tuu8pUVDmg3p3YSD76HB6o92jcw0ygqyKHULGt53 Hf5g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:content-transfer-encoding:mime-version:date :subject:message-id:cc:to; bh=Nh50I5qIAGZT0ajG7F42BI5dTYh+5egh/ceNnPkXuzA=; b=n/HiyxQtLDJFl+fI0Is0RrLEKNaguLTnSpIWq8T7vVmdtSZe0/XO6k25+h4z35mqHY 5WXx+9y/cRBDvsYamYDM7pe2D2NxSiLQbx91WAHpMZ7xLLebwOaMywNSGvGDytqVan7G AxPpb3lzuwb2nVGlAUnp/F+pgJq9eHOrTwx1bc/iM1C91YMogcEHOKaCbomh4+veQaFK Y62TFuzJZWNgwsct3lTaw50mKtfDevpBzrtHtLkiQ/oLFFMTkGYDvPSWpMKbbpFN1UEr kX54nnEeRy0feotGi/xS3xK3nAlEk3xJ+MXha4sQDuG4YS889Zdwm1xwhgjCIRUHXj8X OivA== X-Gm-Message-State: AKGB3mIsKeAYPLDvrcBcr9x8SwbK1GWLuX5Mb64OSWeMz3c50t/yU5+E rWxGyNxVAKCddRxFEPSQssSKgPNU X-Google-Smtp-Source: ACJfBou+/C5oZ9gAsxPsNA5mPix9P72Oxl4ioiA3v13n99B2tNPWS+bYbJ69WUuxW8UzgAtMzFK1fg== X-Received: by 10.223.134.184 with SMTP id 53mr5472339wrx.17.1513702709074; Tue, 19 Dec 2017 08:58:29 -0800 (PST) Received: from [10.118.2.56] ([80.12.37.184]) by smtp.gmail.com with ESMTPSA id j77sm7299578wmf.36.2017.12.19.08.58.28 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 19 Dec 2017 08:58:28 -0800 (PST) From: Sylvain Garrigues Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Mime-Version: 1.0 (1.0) Date: Tue, 19 Dec 2017 17:58:27 +0100 Subject: Re: How to use our stock armv7-RPI2 images with QEMU? Message-Id: <07FDE656-3DBA-4EB6-80F5-A7E25051DB37@gmail.com> Cc: Alexey Dokuchaev , "freebsd-arm@freebsd.org" To: Warner Losh X-Mailer: iPhone Mail (15C153) X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Dec 2017 16:58:31 -0000 Hello, > Le 18 d=C3=A9c. 2017 =C3=A0 22:59, Warner Losh a =C3=A9cr= it : >=20 >> On Sat, Dec 16, 2017 at 8:32 AM, Alexey Dokuchaev wrote: >>=20 >> Hi there, >>=20 >> I've noticed (per qemu-system-arm -machine help) that it claims to suppor= t >> Raspberry Pi 2 (raspi2), so I wanted to boot one of our stock armv7-RPI2 >> images, but did not find recipe at https://wiki.freebsd.org/QemuRecipes, >> and my FreeBSD/arm knowledge is lacking. >>=20 >> Basically I look for a fast way to setup arm6/7 VM to do some ports work.= >>=20 >> Could someone give me a hand here, and possibly update that wiki page? >> (It covers arm64, but not arm). Thanks, >>=20 >=20 > OK. The answer is "It's complicated" and I'm not sure anybody has actually= > done it recently. The trick that make it work for me is to recompile qemu with one modificatio= n: change KERNEL_LOAD_ADDR to 0x100000 instead of 0x10000 in hw/arm/boot.c Then you can boot the GENERIC kernel with the -kernel kernel.bin option and y= ou may attach the RPI2 snapshot to the VM with the -sd command. You may have to type the boot root fs to mount it at the end of the kernel i= nitialization. Just list the available partitions and adjust.=20 It works pretty well, you even have the RPI framebuffer working.=20 Cheers, Sylvain.=20