From owner-freebsd-arm@freebsd.org Fri Mar 1 03:41:04 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 7692F1502221 for ; Fri, 1 Mar 2019 03:41:04 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [195.149.99.3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "raven.bwct.de", Issuer "raven.bwct.de" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id B35BB7210B; Fri, 1 Mar 2019 03:41:03 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.15.2/8.15.2) with ESMTPS id x213exsR023232 (version=TLSv1 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Fri, 1 Mar 2019 04:41:00 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=cicely.de; s=default; t=1551411661; bh=e1gezZRtsrzMWn/eSiJIGmrd5BSRneCq5DNrrOfaf1E=; h=Date:From:To:Cc:Subject:Reply-To:References:In-Reply-To; b=eIhSBXcGeAhilF3KKhp/LB91BEoLJeiGiVdedUP0kQHygsBX0hSW+vrvY//HO22T7 bg54o9mGAw4/n2/V1fp9L1hgETjkG2YJnZAUsQna4gCrnFJ+p+voCyllctrnOZ+LY8 pKIMb8bC5e36HWgkm92GBu4oputAhaC/UzgAZ9zo= Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id x213evei016083 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 1 Mar 2019 04:40:57 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.15.2/8.15.2) with ESMTP id x213euR7054589; Fri, 1 Mar 2019 04:40:56 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.15.2/8.15.2/Submit) id x213euMj054588; Fri, 1 Mar 2019 04:40:56 +0100 (CET) (envelope-from ticso) Date: Fri, 1 Mar 2019 04:40:56 +0100 From: Bernd Walter To: Ian Lepore Cc: freebsd-arm , ticso@cicely.de Subject: Re: about netbooting on armv6 [was: Fwd: SDIO Patch D4761.diff Not Building For Me] Message-ID: <20190301034056.GG23492@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <5432b449f37a481bc7099fbab25fbd2e@bakulin.de> <1458751414.1091.47.camel@freebsd.org> <20190301031213.GE23492@cicely7.cicely.de> <1797d7376b308236366305ad5ae18661b1d2a80c.camel@freebsd.org> <20190301032326.GF23492@cicely7.cicely.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190301032326.GF23492@cicely7.cicely.de> X-Operating-System: FreeBSD cicely7.cicely.de 12.0-STABLE amd64 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=4.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de X-Rspamd-Queue-Id: B35BB7210B X-Spamd-Bar: - Authentication-Results: mx1.freebsd.org; dkim=pass header.d=cicely.de header.s=default header.b=eIhSBXcG X-Spamd-Result: default: False [-1.22 / 15.00]; ARC_NA(0.00)[]; HAS_REPLYTO(0.00)[ticso@cicely.de]; R_DKIM_ALLOW(-0.20)[cicely.de:s=default]; RCVD_COUNT_FIVE(0.00)[5]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[3]; MV_CASE(0.50)[]; NEURAL_HAM_LONG(-0.97)[-0.971,0]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[cicely.de]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; TO_DN_SOME(0.00)[]; NEURAL_SPAM_SHORT(0.41)[0.407,0]; TO_MATCH_ENVRCPT_SOME(0.00)[]; DKIM_TRACE(0.00)[cicely.de:+]; MX_GOOD(-0.01)[cached: mx1.bwct.de]; RCVD_IN_DNSWL_NONE(0.00)[3.99.149.195.list.dnswl.org : 127.0.20.0]; NEURAL_HAM_MEDIUM(-0.85)[-0.847,0]; R_SPF_NA(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:21461, ipnet:195.149.99.0/24, country:DE]; MID_RHS_MATCH_FROM(0.00)[]; IP_SCORE(-0.00)[country: DE(-0.01)] 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: Fri, 01 Mar 2019 03:41:04 -0000 On Fri, Mar 01, 2019 at 04:23:26AM +0100, Bernd Walter wrote: > On Thu, Feb 28, 2019 at 08:14:49PM -0700, Ian Lepore wrote: > > On Fri, 2019-03-01 at 04:12 +0100, Bernd Walter wrote: > > > On Wed, Mar 23, 2016 at 10:43:34AM -0600, Ian Lepore wrote: > > > > > > > > The quick and easy config for netbooting armv6 these days is to set > > > > a > > > > few vars in your uboot env. This assumes that you let uboot load > > > > ubldr.bin from sdcard, and then have ubldr load the kernel and the > > > > kernel will mount nfsroot. > > > > > > > > If you have a dhcp server to provide an IP, this is all you need in > > > > uboot env: > > > > > > > > loaderdev=net > > > > rootpath=:/ > > > > > > > > If you manually configure the ip, add these: > > > > > > > > ipaddr= > > > > netmask=255.etc.etc.etc > > > > > > Ok - I'm lost with this. > > > > > > I've setup a card for a Pi1-B with just the DOS partition on it. > > > This is what I get: > > > MMC: mmc@7e300000: 1 > > > Loading Environment from FAT... In: serial > > > Out: vidconsole > > > Err: vidconsole > > > Net: No ethernet found. > > > starting USB... > > > USB0: 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 > > > MMC Device 0 not found > > > no mmc device at slot 0 > > > switch to partitions #0, OK > > > mmc1 is current device > > > Scanning mmc 1:1... > > > Found EFI removable media binary efi/boot/bootarm.efi > > > libfdt fdt_check_header(): FDT_ERR_BADMAGIC > > > Scanning disk mmc@7e300000.blk... > > > Found 2 disks > > > FDT memrsv map 0: Failed to add to map > > > 583472 bytes read in 56 ms (9.9 MiB/s) > > > libfdt fdt_check_header(): FDT_ERR_BADMAGIC > > > FDT memrsv map 0: Failed to add to map > > > ## Starting EFI application at 00080000 ... > > > Consoles: EFI console > > > FreeBSD/arm EFI loader, Revision 1.1 > > > > > > Command line arguments: l > > > EFI version: 2.70 > > > EFI Firmware: Das U-Boot (rev 8216.2304) > > > Console: efi (0) > > > Load Path: /\efi\boot\bootarm.efi > > > Load Device: /VenHw(e61d73b9-a384-4acc-aeab- > > > 82e828f3628b)/SD(1)/SD(0)/HD(1,0x01,0,0x800,0x19000) > > > Trying ESP: /VenHw(e61d73b9-a384-4acc-aeab- > > > 82e828f3628b)/SD(1)/SD(0)/HD(1,0x01,0,0x800,0x19000) > > > Setting currdev to disk0p1: > > > Failed to find bootable partition > > > Startup error in /boot/lua/loader.lua: seconds > > > LUA ERROR: cannot open /boot/lua/loader.lua: no such file or > > > directory. > > > > > > can't load 'kernel' > > > > > > Type '?' for a list of commands, 'help' for more detailed help. > > > OK > > > > > > So - ok it can't find its partition on the card. > > > But how can I setup those variables? > > > MMC: mmc@7e300000: 1 > > > Loading Environment from FAT... In: serial > > > Out: vidconsole > > > Err: vidconsole > > > Net: No ethernet found. > > > starting USB... > > > USB0: 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 > > > U-Boot> loaderdev=net > > > U-Boot> saveenv > > > Saving Environment to FAT... Failed (1) > > > > > > Same problem with saveenv not being functional on the original image > > > as well, > > > not just on mine. > > > I've tried uEnv.txt, but it is just as it isn't there. > > > > > > > All of what I said back then is valid only for ubldr. EFI is a whole > > 'nother story. I've never gotten netbooting to work with EFI. So > > mostly I just use old u-boot (from the 2015-2016 era) on all my boards. > > Oh - that's the difference. Just from the loader it looks good: ... Failed to find bootable partition Startup error in /boot/lua/loader.lua: seconds LUA ERROR: cannot open /boot/lua/loader.lua: no such file or directory. can't load 'kernel' Type '?' for a list of commands, 'help' for more detailed help. OK lsdev disk devices: disk0: 15523841 X 512 blocks (removable) disk0s1: DOS/Windows net devices: net0: OK show console=efi currdev=disk0p1: efi-version=2.70 interpret=OK loaddev=disk0p1: prompt=${interpret} script.lang=lua twiddle_divisor=1 OK set currdev=net0 OK ls Waiting for Ethernet connection... done. net0: cannot set rx. filters (status=3) / d dev d var d boot d tmp d mnt d root d proc d home .profile d rescue firstboot d lib COPYRIGHT d media d sbin d bin d usr .cshrc d libexec d net d .snap d etc OK And yes - it actually boots from that point. The question is how to get currdev properly into the loader. It is using the DOS partition, so maybe I can add a loader script onto that partition instead. I have to deal with something being on the card anyways. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm.