From owner-freebsd-arm@freebsd.org Wed Apr 3 09:36:39 2019 Return-Path: Delivered-To: freebsd-arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 2701D15667DC for ; Wed, 3 Apr 2019 09:36:39 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 5E57A6F964 for ; Wed, 3 Apr 2019 09:36:38 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: by mailman.ysv.freebsd.org (Postfix) id 0C4BC15667DA; Wed, 3 Apr 2019 09:36:37 +0000 (UTC) Delivered-To: arm@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DDD2C15667D9 for ; Wed, 3 Apr 2019 09:36:36 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) Received: from kabab.cs.huji.ac.il (kabab.cs.huji.ac.il [132.65.116.210]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 71B8B6F922; Wed, 3 Apr 2019 09:36:36 +0000 (UTC) (envelope-from danny@cs.huji.ac.il) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=cs.huji.ac.il; s=57791128; h=To:References:Message-Id:Content-Transfer-Encoding:Cc:Date:In-Reply-To:From:Subject:Mime-Version:Content-Type; bh=4ZQmoHz/WLbpv7ux/x8wh+CzUhQudVZHY4aIsIq1HNE=; b=UtGq4MtgzIvmZTG59mTIT+CjIsluyW/0bkekm5XNtlTvfwGl/HznLS31fn8uLsbqLhqhS9y+mrzEc9eWJP3HQNhUKB5M4vL/K1R75VmDfY7BruY+DsovUOKaQOjK0qQnqgA1YVmfirOW+k9CnOYm5OlX2Yah65+5UZKPrr8YmLevUNwq9YKEBxwB9uF2/MQiHfL15+Qpqt9Txqe+PfzbCNRbm40Ori4tb442AztNEMZ8MjVcQ1VBFhq7y6cZfLUA+iG/8STOovtQdEAHWDvpeFuzIXEp/1NItUEF3orSFfu9/E1Gq4QRaHbFEnOeV3OC0lltZFIUHO0vVYv9vKKrOQ==; Received: from bach.cs.huji.ac.il ([132.65.80.20]) by kabab.cs.huji.ac.il with esmtp id 1hBcJo-000Om1-00; Wed, 03 Apr 2019 12:36:28 +0300 Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Subject: Re: network booting allwinner(nanopi) From: Daniel Braniss In-Reply-To: <201904030853.x338r2lm025916@gndrsh.dnsmgr.net> Date: Wed, 3 Apr 2019 12:36:27 +0300 Cc: Ian Lepore , ticso@cicely.de, "freebsd-arm@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: References: <201904030853.x338r2lm025916@gndrsh.dnsmgr.net> To: "Rodney W. Grimes" X-Mailer: Apple Mail (2.3445.9.1) X-Rspamd-Queue-Id: 71B8B6F922 X-Spamd-Bar: ------ Authentication-Results: mx1.freebsd.org X-Spamd-Result: default: False [-6.94 / 15.00]; NEURAL_HAM_MEDIUM(-1.00)[-1.000,0]; NEURAL_HAM_SHORT(-0.94)[-0.936,0]; REPLY(-4.00)[]; NEURAL_HAM_LONG(-1.00)[-1.000,0] X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Apr 2019 09:36:39 -0000 > On 3 Apr 2019, at 11:53, Rodney W. Grimes = wrote: >=20 >> On Mon, 2019-04-01 at 08:52 +0300, Daniel Braniss wrote: >>>> On 29 Mar 2019, at 22:36, Bernd Walter >>>> wrote: >>>>=20 >>>> On Fri, Mar 29, 2019 at 09:34:30AM +0300, Daniel Braniss wrote: >>>>> Hi, >>>>> with last weeks head (r345465), >>>>> I tried - again - to netboot and the old way no longer works >>>>> usb start >>>>> setenv loaderdev net >>>>> boot >>>>>=20 >>>>> now it complains allot:-) but no dice. >>>>> So, is there a way that netboot works? >>>>=20 >>>> On a Pi1 project I put the following in loader.conf: >>>> currdev=3D"net0" >>>> This requires the loader.conf to be on the SD card however. >>>> I used an UFS partition for that, but I assume that the msdosfs >>>> partition would work too as the loader can read that filesystem >>>> as well. >>>>=20 >>>> --=20 >>>> B.Walter http://www.bwct.de >>>> Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner >>>> uvm. >>>=20 >>> well, this is what I get: >>> U-Boot SPL 2019.01 (Mar 24 2019 - 10:15:37 +0200) >>> DRAM: 512 MiB >>> Trying to boot from MMC1 >>>=20 >>>=20 >>> U-Boot 2019.01 (Mar 24 2019 - 10:15:37 +0200) Allwinner Technology >>>=20 >>> CPU: Allwinner H3 (SUN8I 1680) >>> Model: FriendlyARM NanoPi NEO >>> DRAM: 512 MiB >>> MMC: SUNXI SD/MMC: 0 >>> Loading Environment from FAT... *** Warning - bad CRC, using default >>> environment >>>=20 >>> In: serial >>> Out: serial >>> Err: serial >>> Net: phy interface0 >>>=20 >>> Error: ethernet@1c30000 address not set. >>> eth-1: ethernet@1c30000 >>> starting USB... >>> USB0: USB EHCI 1.00 >>> USB1: USB OHCI 1.0 >>> USB2: USB EHCI 1.00 >>> USB3: USB OHCI 1.0 >>> scanning bus 0 for devices... 1 USB Device(s) found >>> scanning bus 2 for devices... 1 USB Device(s) found >>> scanning usb for storage devices... 0 Storage Device(s) found >>> Hit any key to stop autoboot: 2 =08=08=08 0 >>> =3D> usb start >>> =3D> boot=08 =08=08 =08=08 =08=08 =08setn=08 =08env loaderdev net >>> =3D> boot >>> switch to partitions #0, OK >>> mmc0 is current device >>> Scanning mmc 0:1... >>> Found U-Boot script /boot.scr >>> 199 bytes read in 1 ms (194.3 KiB/s) >>> ## Executing script at 43100000 >>> 375752 bytes read in 19 ms (18.9 MiB/s) >>> ## Starting application at 0x42000000 ... >>> Consoles: U-Boot console =20 >>> Compatible U-Boot API signature found @0x5bf595c8 >>>=20 >>> FreeBSD/armv7 U-Boot loader, Revision 1.2 >>>=20 >>> DRAM: 512MB >>> Number of U-Boot devices: 1 >>> U-Boot env: loaderdev=3D'net' >>> Found U-Boot device: disk >>> Found U-Boot device: net >>> Booting from net0: >>> net_probe: no network devices found, maybe not enumerated yet..? >>> netboot: couldn't probe uboot_eth0 >>> net_open: netif_open() failed >>> Startup error in /boot/lua/loader.lua: >>> LUA ERROR: cannot open /boot/lua/loader.lua: device not configured. >>>=20 >>> net_probe: no network devices found, maybe not enumerated yet..? >>> netboot: couldn't probe uboot_eth0 >>> net_open: netif_open() failed >>> net_probe: no network devices found, maybe not enumerated yet..? >>> netboot: couldn't probe uboot_eth0 >>> net_open: netif_open() failed >>> net_probe: no network devices found, maybe not enumerated yet..? >>> netboot: couldn't probe uboot_eth0 >>> net_open: netif_open() failed >>> net_probe: no network devices found, maybe not enumerated yet..? >>> netboot: couldn't probe uboot_eth0 >>> net_open: netif_open() failed >>> net_probe: no network devices found, maybe not enumerated yet..? >>> netboot: couldn't probe uboot_eth0 >>> net_open: netif_open() failed >>> net_probe: no network devices found, maybe not enumerated yet..? >>> netboot: couldn't probe uboot_eth0 >>> net_open: netif_open() failed >>> net_probe: no network devices found, maybe not enumerated yet..? >>> netboot: couldn't probe uboot_eth0 >>> net_open: netif_open() failed >>> net_probe: no network devices found, maybe not enumerated yet..? >>> netboot: couldn't probe uboot_eth0 >>> net_open: netif_open() failed >>> net_probe: no network devices found, maybe not enumerated yet..? >>> netboot: couldn't probe uboot_eth0 >>> net_open: netif_open() failed >>> can't load 'kernel' >>>=20 >>> Type '?' for a list of commands, 'help' for more detailed help. >>> loader> >>>=20 >>=20 >> Modern u-boot can only netboot using efi. Doing it with efi requires >> that all your config be set in the dhcpd, there is no way to define = the >> server or rootpath on a per-arm-system basis other than by hardcoding >> the mac address of each arm system in the dhcpd config on the server.=20= >> In the uboot env, 'setenv boot_targets dhcp', and your dhcpd.conf = needs >> an entry something like this: >>=20 >> host rpi2 { >> hardware ethernet b8:27:eb:e9:04:e8; >> option host-name "rpi2"; >> next-server 172.22.42.240; >> filename "/rpi2/boot/loader.efi"; >> option root-path "172.22.42.240:/rpi2/"; >> } >>=20 >> If your dhcpd and tftp servers are the same, you probably don't need >> the next-server option. If you're not using nfsroot, you probably >> don't need the root-path option. >>=20 >> -- Ian >=20 > What work needs to be done to take this to the next step > of supporting the iPXE style multiboot environment so you > do not have to do this per machine dhcpd hackery and can > set root-path via iPXE menu. I have this working in a > x86 platform situation, but would love to expand it into > the arm world. >=20 > Thanks for any insight, currently what I am missing is how to tel the loader to do the dhcp = request, and that=E2=80=99s not working because it can=E2=80=99t find the network = interface. in my case I have the PXE/iPXE stuff working. thanks, danny > --=20 > Rod Grimes = rgrimes@freebsd.org