Date: Thu, 26 Jan 2017 18:27:46 -0800 From: Oleksandr Tymoshenko <gonzo@bluezbox.com> To: =?iso-8859-1?Q?Otac=EDlio?= <otacilio.neto@bsd.com.br> Cc: "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org> Subject: Re: FreeBSD 12 r312227 dont boots on Beaglebone black Message-ID: <20170127022746.GA3433@bluezbox.com> In-Reply-To: <55637733-f4f5-6bcc-1d00-4c4b7d1b1b3d@bsd.com.br> References: <51d197a2-1332-617a-32a8-9901f474afa2@bsd.com.br> <20170125221350.GA92571@bluezbox.com> <3ad9c97c-e40c-0a37-f603-a08b5a72ebd3@bsd.com.br> <20170127013142.GA2921@bluezbox.com> <13aa921f-b65f-8bf6-f298-ccb286c7ed6e@bsd.com.br> <20170127020035.GA3187@bluezbox.com> <55637733-f4f5-6bcc-1d00-4c4b7d1b1b3d@bsd.com.br>
next in thread | previous in thread | raw e-mail | index | archive | help
Otacílio (otacilio.neto@bsd.com.br) wrote: > Em 26/01/2017 23:00, Oleksandr Tymoshenko escreveu: > > Otacílio (otacilio.neto@bsd.com.br) wrote: > >> Em 26/01/2017 22:31, Oleksandr Tymoshenko escreveu: > >>> Otacílio (otacilio.neto@bsd.com.br) wrote: > >>>> Em 25/01/2017 19:13, Oleksandr Tymoshenko escreveu: > >>>>> Otacílio (otacilio.neto@bsd.com.br) wrote: > >>>>>> Dears > >>>>>> > >>>>>> I'm trying boot a FreeBSD12-armv6-r312227 > >>>>>> (u-boot-beaglebone-2017.01.00.1) on a beaglebone black. The snapshot > >>>>>> FreeBSD-12.0-CURRENT-arm-armv6-BEAGLEBONE-20170105-r311461.img that I > >>>>>> downloaded from > >>>>>> ftp://ftp.freebsd.org/pub/FreeBSD/snapshots/arm/armv6/ISO-IMAGES/12.0/ > >>>>>> works fine, but when I try boot the image that I build on my machine > >>>>>> using crouchet I get: > >>>>>> > >>>>>> U-Boot SPL 2017.01-rc3 (Jan 22 2017 - 23:17:18) > >>>>>> Trying to boot from MMC1MMC partition switch failed > >>>>>> *** Warning - MMC partition switch failed, using default environment > >>>>>> > >>>>>> reading u-boot.img > >>>>>> reading u-boot.img > >>>>>> > >>>>>> And boot stops. Someone can confirm that the revision 312227 is working > >>>>>> fine? > >>>>> I did some digging at the breakage is caused by this commit in U-Boot: > >>>>> https://www.mail-archive.com/u-boot@lists.denx.de/msg234317.html > >>>>> > >>>>> Crochet is using FAT12 for Beaglebone Black. Switching to FAT16 fixes > >>>>> the problem. Try applying this patch to crochet and re-build image: > >>>>> > >>>>> https://people.freebsd.org/~gonzo/patches/crochet-bbb-fat16.diff > >>>>> > >>>> I have applied the patch and now I'm getting this error. Some hints? > >>> FreeBSD uses dtb names that do not match upstream ones. After updating > >>> to 2017.01 that change was lost in progress. Possible workaround (HACK > >>> ALERT!!!) would be to do something like this: > >>> > >>> => setenv findfdt 'setenv fdtfile beaglebone-black.dtb' > >>> => saveenv > >>> > >>> Copy-paste to U-Boot serial console does not work for me on BBB, so > >>> you'll have have to enter these commands > >>> > >>> I will submit update to u-boot ports so all these workarounds will > >>> not be required. > >>> > >> I'm getting this: > >> > >> Type '?' for a list of commands, 'help' for more detailed help. > >> loader> setenv findfdt 'setenv fdtfile beaglebone-black.dtb' > >> Error: stack underflow > >> loader> > > No, setenv/saveenv should be done in u-boot. But this gave me > > an idea. You can also mount root partition on SD card and > > add following line to /boot/loader.conf: > > > > fdt_file="beaglebone-black.dtb" > > > > That should do the trick as well > > > I have added > > fdt_file="bboneblk.dtb" > > (because this is the name that I found on fat partition) to > /boot/loader.conf but still getting No, in this case it's not about what's on FAT it's what in /boot/dtb/ on root partition. That's where loader looks for DTB files. I don't have crochet setup handy right now so can't check end-to-end procedure, but I'll do it tomorrow. > > DRAM: 512MB > Number of U-Boot devices: 3 > U-Boot env: loaderdev not set, will probe all devices. > Found U-Boot device: disk > Probing all disk devices... > Checking unit=0 slice=<auto> partition=<auto>... good. > Booting from disk0s2a: > /boot/kernel/kernel data=0x609624+0x1a29dc syms=[0x4+0x89070+0x4+0x9d363] > /boot/kernel/geom_label.ko text=0x4de8 data=0x870+0x4 > syms=[0x4+0x12c0+0x4+0x1061] > > Hit [Enter] to boot immediately, or any other key for command prompt. > Booting [/boot/kernel/kernel]... > No valid device tree blob found! -- gonzo
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20170127022746.GA3433>