From owner-freebsd-arm@FreeBSD.ORG Mon Feb 11 01:00:06 2013 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 9E92A355 for ; Mon, 11 Feb 2013 01:00:06 +0000 (UTC) (envelope-from tim@kientzle.com) Received: from monday.kientzle.com (99-115-135-74.uvs.sntcca.sbcglobal.net [99.115.135.74]) by mx1.freebsd.org (Postfix) with ESMTP id 81777C28 for ; Mon, 11 Feb 2013 01:00:06 +0000 (UTC) Received: (from root@localhost) by monday.kientzle.com (8.14.4/8.14.4) id r1B102N7009386; Mon, 11 Feb 2013 01:00:03 GMT (envelope-from tim@kientzle.com) Received: from [192.168.2.143] (CiscoE3000 [192.168.1.65]) by kientzle.com with SMTP id p5rp8jfbm2vwrdqcainzh4fu7e; Mon, 11 Feb 2013 01:00:02 +0000 (UTC) (envelope-from tim@kientzle.com) Subject: Re: add versatilepb support to tim's script Mime-Version: 1.0 (Apple Message framework v1283) Content-Type: text/plain; charset=iso-2022-jp From: Tim Kientzle In-Reply-To: <511790F3.7070806@ff.iij4u.or.jp> Date: Sun, 10 Feb 2013 17:00:02 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <511790F3.7070806@ff.iij4u.or.jp> To: Takeshi Taguchi X-Mailer: Apple Mail (2.1283) Cc: freebsd-arm@freebsd.org X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 11 Feb 2013 01:00:06 -0000 On Feb 10, 2013, at 4:22 AM, Takeshi Taguchi wrote: > Hi, all > Attached patch add support versatilepb to tim's script: > https://github.com/kientzle/freebsd-beaglebone >=20 > use: > board_setup VersatilePB > in config.sh. and try to run: > sh beaglebine/sh > then you will get following images: > FreeBSD-VERSATILEPB.flash : kernel image > FreeBSD-VERSATILEPB.img : userland image >=20 > and then try to exec: > qemu-system-arm -M versatilepb -m 128M \ > -kernel FreeBSD-VERSATILEPB.flash \ > -cpu arm1176 \ > -hda FreeBSD-VERSATILEPB.img >=20 > Thanks. > - > T.T Thank you! This is wonderful! I've merged this to the code on Github. I only have one suggestion for improving it: You use this code to get the kernel object file: KERNELBIN=3D${WORKDIR}/obj/arm.armv6`realpath = ${FREEBSD_SRC}`/sys/${KERNCONF}/kernel.bin then dd of=3D$FLASH =1B$B!D=1B(B. if=3D$KERNELBIN This approach is a little brittle. Elsewhere, I've used something similar to the following: mkdir ${WORKDIR}/kernel freebsd_kernel_install ${WORKDIR}/kernel dd .... if=3D${WORKDIR}/kernel/.../kernel.bin If this doesn't work, please consider adding a new function to lib/freebsd.sh to copy kernel.bin; that way, there will be only one place that knows about this kind of detail. (Rather than having copies of your code for every board.) Tim