From owner-freebsd-arm@freebsd.org Sat Dec 30 07:33:10 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 5441EEAEEDA for ; Sat, 30 Dec 2017 07:33:10 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-115.reflexion.net [208.70.210.115]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 12EFF72929 for ; Sat, 30 Dec 2017 07:33:09 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 30279 invoked from network); 30 Dec 2017 07:33:02 -0000 Received: from unknown (HELO mail-cs-02.app.dca.reflexion.local) (10.81.19.2) by 0 (rfx-qmail) with SMTP; 30 Dec 2017 07:33:02 -0000 Received: by mail-cs-02.app.dca.reflexion.local (Reflexion email security v8.40.3) with SMTP; Sat, 30 Dec 2017 02:33:02 -0500 (EST) Received: (qmail 10451 invoked from network); 30 Dec 2017 07:33:01 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 30 Dec 2017 07:33:01 -0000 Received: from [192.168.1.25] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 38DF3EC94F3; Fri, 29 Dec 2017 23:33:01 -0800 (PST) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: crochet rpi2 boot won't play nice for me... From: Mark Millard In-Reply-To: Date: Fri, 29 Dec 2017 23:33:00 -0800 Cc: Freebsd-arm Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Ross Alexander X-Mailer: Apple Mail (2.3273) 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: Sat, 30 Dec 2017 07:33:10 -0000 [Turns out that head -r326914 broke ubldr.bin and ubldr . Fixed in head -r327351 .] On 2017-Dec-29, at 11:08 PM, Ross Alexander = wrote: > On Thu, 28 Dec 2017, Mark Millard wrote: >=20 >> [... :rwa:] >=20 >> Hmm. There is a bootcode.bin but these days it is from >> sysutils/rpi-firmware instead of from >> sysutils/u-boot-rpi2 : >>=20 >> # ls /usr/local/share/rpi-firmware/ >> LICENCE.broadcom config.txt fixup_cd.dat fixup_x.dat start_cd.elf = start_x.elf >> bootcode.bin fixup.dat fixup_db.dat start.elf start_db.elf >>=20 >> # ls /usr/local/share/u-boot/u-boot-rpi2/ >> README u-boot.bin >=20 > Oh, nice catch. I've twisted up a copy of sysutils/rpi-firmware. > Copying that stuff into what crochet built on da0s1 got me to a boot > prompt, as thus: >=20 > U-Boot 2017.09 (Dec 26 2017 - 11:11:20 -0700) >=20 > DRAM: 948 MiB > RPI 2 Model B (0xa21041) > MMC: sdhci@7e300000: 0 > reading uboot.env >=20 > ** Unable to read "uboot.env" from mmc0:1 ** >=20 > This can't be good ... uboot.env's message is normal. > Using default environment >=20 > In: serial > Out: vidconsole > Err: vidconsole > Net: No ethernet found. > starting USB... > USB0: Core Release: 2.80a > scanning bus 0 for devices... 3 USB Device(s) found > scanning usb for storage devices... 0 Storage Device(s) found > Hit any key to stop autoboot: 0 > switch to partitions #0, OK > mmc0 is current device > Scanning mmc 0:1... > Found FreeBSD U-Boot Loader (bin) > reading ubldr.bin > 232980 bytes read in 31 ms (7.2 MiB/s) > ## Starting application at 0x01000000 ... > Consoles: U-Boot console > Compatible U-Boot API signature found @0x3af5d988 >=20 > FreeBSD/armv6 U-Boot loader, Revision 1.2 > (Fri Dec 29 02:27:06 MST 2017 toor@augur2.bogons) >=20 > DRAM: 948MB > Number of U-Boot devices: 1 > U-Boot env: loaderdev not set, will probe all devices. > Found U-Boot device: disk > Probing all disk devices... > Checking unit=3D0 slice=3D partition=3D... good. > Booting from disk0: That should have listed something more specific, such as disk0p1: (USB drive context example). But ubldr.bin was broken for a while. See: = https://lists.freebsd.org/pipermail/svn-src-head/2017-December/107780.html= which says in part: Author: imp Date: Fri Dec 29 18:08:35 2017 New Revision: 327351 URL:=20 https://svnweb.freebsd.org/changeset/base/327351 Log: Fix ubldr. uboot/lib uses defines for the loader. It's part of the loader, but not compile as loader (it's building a library), so we can't just include loader.mk for the defines. Move LOADER_DISK_SUPPORT back to defs.mk for the moment. =20 Sponsored by: Netflix Modified: head/stand/defs.mk head/stand/loader.mk . . . I hit the same issue trying to use ubldr.bin from head -r327075 on an rpi2. I updated to -r327364 and used its ubldr.bin build and put it on the rpi2. I was again able to boot. > can't load 'kernel' This is also from the lack of LOADER_DISK_SUPPORT . > Type '?' for a list of commands, 'help' for more detailed help. > loader> >=20 > which is great, now all I have to do is remember the syntax for > the boot path. lsdev shows >=20 > loader> lsdev > disk devices: > disk0 (MMC) > disk0s1: DOS/Windows > disk0s2: FreeBSD > disk0s2a: FreeBSD UFS > net devices: > net0: >=20 > A naive "boot -s disk02a:/boot/kernel/kernel" doesn't work, and > ls isn't implemented. Nothing I can think of is a good path. > Mounting the mmscd on the devel box shows: >=20 > augur2:/root # mount -o ro /dev/da0s2a /mnt0 > augur2:/root # ls -l /mnt0/boot/kernel/kernel > -r-xr-xr-x 1 root wheel 10649356 Dec 29 02:27 = /mnt0/boot/kernel/kernel >=20 > augur2:/root # file /mnt0/boot/kernel/kernel > /mnt0/boot/kernel/kernel: ELF 32-bit LSB executable, ARM, EABI5 = version 1 \ > (FreeBSD), dynamically linked, interpreter /red/herring, for = FreeBSD 12.0 \ > (1200054), not stripped >=20 > Anyway I'm downloading an image from ftp.freebsd.org and will see > what I can learn from inspecting it. I'm surprised that crochet > has lost track of the pi2, though. Lots of them still out there. Use ubldr.bin from -r327351 or later. =3D=3D=3D Mark Millard markmi at dsl-only.net