From owner-freebsd-arm@freebsd.org Thu Aug 6 17:15:25 2015 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 2C5939B4A92 for ; Thu, 6 Aug 2015 17:15:25 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: from mail-la0-x235.google.com (mail-la0-x235.google.com [IPv6:2a00:1450:4010:c03::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 6B830E51 for ; Thu, 6 Aug 2015 17:15:24 +0000 (UTC) (envelope-from russ.haley@gmail.com) Received: by labkb6 with SMTP id kb6so31331329lab.2 for ; Thu, 06 Aug 2015 10:15:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=nPrM2LMJm4dxYL49NC10AsTIeRxcDGmAgisVsedlnCM=; b=htdfU42MxItoOnj+bV+FM51621mlNo/s69YGMlsZ4+pvutCBWz0CunLEpBGhOvnlTj hNqUjQsuHZRJCdRHp2afoZiIfpghbDjpQrXtRGRFsNlwxB6ZVGYsC1Gzce89nunaWhfN rb1bbhJD+2JyyV1uMFOaoMno/0t81TC0uV2XgF6HEOkuzlVZ/mu+uVDpe9FpP1hHuqKI AWJG1+Z37xWPJ0TUW8TsqhK9+1In9tnf8NRDI6erytIHdSFtvKqiz/iPY4r4ck9AXBXE NkKjhJApuxUnl0576QUSVmR290BtAT89DU8hL89lCzs8Lu0E1fjISSmRVWqNBRYxmFmC CYHg== MIME-Version: 1.0 X-Received: by 10.112.133.72 with SMTP id pa8mr3386146lbb.117.1438881322322; Thu, 06 Aug 2015 10:15:22 -0700 (PDT) Received: by 10.152.180.166 with HTTP; Thu, 6 Aug 2015 10:15:22 -0700 (PDT) In-Reply-To: <20150806100838.544bfaa7@planb.netng.org> References: <20150801182519.4886608.58781.1809@gmail.com> <20150804220401.4886608.77426.1917@gmail.com> <1438794143.70393.174.camel@freebsd.org> <20150806100838.544bfaa7@planb.netng.org> Date: Thu, 6 Aug 2015 10:15:22 -0700 Message-ID: Subject: Re: Hummingboard u-boot not loading? From: Russell Haley To: Vladimir Botka , freebsd-arm Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 06 Aug 2015 17:15:25 -0000 Yes, silly me, of course I do! I picked up the cable yesterday. ... That worked like a charm. I think this will be the only time I consider a kernel panic to be a unqualified success! Fatal kernel mode data abort: 'Translation Fault (L1)' on read trapframe: 0xc2813af8 FSR=3D00000005, FAR=3D00000004, spsr=3D600001d3 r0 =3D00000000, r1 =3Dc28600d0, r2 =3D00000000, r3 =3Dc2439390 r4 =3Dc2860080, r5 =3D00000001, r6 =3Dc286bdc0, r7 =3Dda2fffc8 r8 =3Dc286bdc0, r9 =3D00000000, r10=3D000000ff, r11=3Dc2813bc0 r12=3D00000200, ssp=3Dc2813b88, slr=3Dc243942c, pc =3Dc2439148 [ thread pid 0 tid 100000 ] Stopped at keg_fetch_slab+0x164: ldr r3, [r2, #0x004]! Thanks so much to everyone that helped me get here. I will be making a $100 donation to the FreeBSD Foundation in dedication to everyone on this mail thread. Sincerely, Russ On Thu, Aug 6, 2015 at 1:08 AM, Vladimir Botka wrote: > Hi Russ, > > you might want to set the serial console. It's pretty easy. Just > connect Hummingboard GPIO pin8->White(TX), pin9->Black(G), > pin10->Green(RX) > http://www.adafruit.com/product/954 > > Connection works fine for me with minicom in Ubuntu > Welcome to minicom 2.7 > OPTIONS: I18n > Compiled on Jan 1 2014, 17:13:22. > Port /dev/ttyUSB0, 18:49:12 > > Cheers, > > -vlado > > On Wed, 5 Aug 2015 23:56:34 -0700 > Russell Haley wrote: > > Thanks Ian, it worked!!! (sort of) > > First, thank you for the dtb correction. The wonky name was a > > placeholder from my notes. Second, I was able to run the following > > commands manually and boot: > > > > setenv fdt_file imx6dl-hummingboard.dtb; > > fatload mmc 0 10800000 ubldr.bin; > > go 10800000; > > > > However after ubldr started booting the kernel, the screen turned > > into a "coloured lattice". I have picture if anyone is so inclined=E2= =80=8B=E2=80=8B > > https://goo.gl/photos/YZDmoy6TJzpssovf6 > > > > I am wondering if that is due to the HDMI patch from Oleksandr that I > > applied? > > https://lists.freebsd.org/pipermail/freebsd-arm/2015-July/011912.html > > > > I saw on his profile what looks like a second revision to the patch. I > > wonder if I should back the original patch out with a fresh > > subversion get, or try the updated patch? Or is this possibly > > unrelated? > > > > Thanks guys! > > > > Russ > > > > > > > > On Wed, Aug 5, 2015 at 10:02 AM, Ian Lepore wrote: > > > > > If you've got enough control to type at u-boot prompts, maybe we can > > > wish away any ubldr-doesn't-match-uboot address problems by using > > > the new relocatable ubldr, like so... > > > > > > fatload mmc 0 ${loadaddr} ubldr.bin > > > go ${loadaddr} > > > > > > Depending on how you build your images, you may need to do something > > > extra to copy ubldr.bin to the fat partition. > > > > > > Next issue is "setenv fdt_file hummingboard-dual.dtb" -- where is > > > that name coming from? The right filename for a dual-core > > > hummingboard would be imx6dl-hummingboard.dtb, and that file > > > should exist in your /boot/dtb directory on the freebsd filesystem. > > > > > > Svata's comments about the load address changing are for the kernel > > > address, and only apply if you're launching the kernel directly from > > > u-boot (which nobody should be doing unless they're somehow forced > > > to use a vendor-supplied u-boot instead of building one with API > > > support for ubldr). Once ubldr is running it will read the kernel > > > headers and load the kernel correctly even if the entry point has > > > moved around. > > > > > > BTW... you can do "printenv varname" to see just one var, and > > > tab-completion should work if you don't know the exact spelling of > > > the var. > > > > > > -- Ian > > > > > > On Wed, 2015-08-05 at 00:41 -0700, Russell Haley wrote: > > > > Hello, > > > > > > > > From what I can see, the loadaddr from printenv is 0x10800000 > > > > which is consistent with the solid-run wiki. I can't tell what > > > > the boot command > > > used > > > > is. Nothing has been easy with this project. I was > > > > trying to go back and see what the u-boot environment variables > > > > told me but the > > > text > > > > rolls off the top of the screen. I can't pipe the printenv into > > > > less/more because the keyboard I am using just won't give me a > > > > pipe character. So there is something weird about the character > > > > codes it's sending (I get ~ > > > or > > > > # instead of the characters I'm supposed to get for that > > > > key). > > > herring> No big deal, I will replace this keyboard at my soonest > > > > convenience. > > > > > > > > So for kicks and giggles I ran this command at the u-boot prompt: > > > > > > > > *setenv fdt_file hummingboard-dual.dtb; fatload mmc 0 10800000 > > > > ubldr; bootelf 10800000;* > > > > > > > > and I get the same output: > > > > > > > > *260674 bytes read in 26 ms (9.6MiB/s)* > > > > > > > > > > > > I further boiled it down and ran > > > > > > > > *fatload 10800000 ubldr;* > > > > > > > > and then > > > > > > > > *bootelf 10800000;* > > > > > > > > With the same result. This combined with the lack of boot logs in > > > > the /mnt/var/log/messages folder seems to indicate bootelf hangs? > > > > > > > > Anyway, the suggestion about just loading the kernel and booting > > > > it a > > > good > > > > one - I did that with an older CCWMX53 board. However, that is a > > > > very > > > last > > > > ditch temporary solution. I want this to boot properly using > > > > ubldr, so it is worth the extra to get this working correctly. > > > > > > > > So here are some of the questions I am asking myself: > > > > - I have done alot of "thrashing around". Perhaps I should go > > > > back and > > > get > > > > u-boot to build properly? But that doesn't seem to matter: if I > > > > get the u-boot prompt, doesn't that mean it's working? > > > > - Do I need to further investigate the fdt files? > > > > - Do I need to look into the ubldr build and code? What is the > > > possibility > > > > of ubldr being broken? Is Svata correct that the start address > > > > changed > > > and > > > > I need to do something different? > > > > > > > > Thanks, > > > > > > > > Russ > > > > > > > > On Tue, Aug 4, 2015 at 3:04 PM, Russell Haley > > > > > > > wrote: > > > > > > > > > I'll check my load and starting addresses when I get home. I > > > > > have seen > > > two > > > > > different numbers around. > > > > > > > > > > Russ > > > > > > > > > > Sent from my BlackBerry 10 smartphone on the Koodo network. > > > > > Original Message > > > > > From: Svatopluk Kraus > > > > > Sent: Tuesday, August 4, 2015 2:52 AM > > > > > To: Russell Haley > > > > > Cc: Mika=C4=97l Urankar; Oleksandr Tymoshenko; Ian Lepore; > > > > > freebsd-arm Subject: Re: Hummingboard u-boot not loading? > > > > > > > > > > On Tue, Aug 4, 2015 at 6:57 AM, Russell Haley > > > > > wrote: > > > > > > Hello, > > > > > > > > > > > > Recap: I'm trying to get a Hummingboard with dual core pro > > > > > > SOM to > > > boot > > > > > > using only HDMI output (I don't have a FTDI cable yet) . I am > > > running a > > > > > > binary u-boot from Oleksandr. Successfullly built head > > > > > > yesterday. > > > > > > > > > > > > My SD Card looks like this: > > > > > > > > > > > > - 1Mb free space with uboot at 1k > > > > > > - 50Mb Fat32 partition with ubldr > > > > > > - 3.6Gb ufs partition > > > > > > > > > > > > I applied the patch for HDMI output: > > > > > > > > > https://lists.freebsd.org/pipermail/freebsd-arm/2015-July/011912.html > > > > > > (Oleksandr via Mikael). I then ran buildkernel with the > > > > > > -DNOCLEAN > > > option > > > > > > (thanks Ian!). I then mistakenly did a installkernel which > > > > > > takes > > > hours on > > > > > > an SD card and overwrote everything so I couldn't tell if the > > > > > > files I wanted were actually installed (i.e. imx6_hdmi.o). I > > > > > > can't find any > > > of > > > > > the > > > > > > files I think I should have been added, but that could be my > > > > > > feeble understanding of file searching. > > > > > > > > > > > > Anyway, I ran it and nothing changed. I get a u-boot auto > > > > > > config > > > counting > > > > > > down, I get the message *20647 bytes read in 26 ms (9.6MiB/s) > > > > > > *which > > > is > > > > > the > > > > > > size of ubldr, but nothing fires after that. It could the > > > > > > output is happening on a serial out, or it could be nothing > > > > > > is happening??? I > > > have > > > > > > toyed with the idea of adding something to loarder.conf, but > > > > > > the > > > defaults > > > > > > all seem sufficient, again, unless someone can suggest > > > > > > something? > > > > > > > > > > > > > > > > > > > > > Well, this just reminds me of something I dealt with recently. > > > > > I'm running FreeBSD kernel without ubldr, so u-boot loads > > > > > kernel and then jumps to kernel starting address. It turns out > > > > > that kernel starting address, which was always stable, was > > > > > changed suddently and the result was same like in your case. > > > > > Thus, maybe it's worth a try to find out how ubldr is run from > > > > > u-boot and which is its starting address. > > > > > > > > > > Svata > > > > > > > > > > > > > > > > I have no further actions I can think of until I get an FDTI > > > > > > cable. > > > All > > > > > > suggestions welcome. > > > > > > > > > > > > Russ > > > > > > > > > > > > On Mon, Aug 3, 2015 at 12:11 AM, Russell Haley > > > > > > > > > > > > > > wrote: > > > > > > > > > > > >> Just an FYI, > > > > > >> > > > > > >> I'm rebuilding the kernel after applying the IMX6 HDMI patch > > > provided > > > > > >> by Mika=C4=97l (but incidentally written by Oleksandr!). Will > > > > > >> know more > > > in > > > > > >> the morning > > > > > >> > > > > > >> Russ > > > > > >> > > > > > >> On Sun, Aug 2, 2015 at 9:53 PM, Russell Haley > > > > > >> > > > > > > > > >> wrote: > > > > > >> > Well I have seen what I think is ubldr get loaded by > > > > > >> > u-boot. I > > > see the > > > > > >> > following message: > > > > > >> > > > > > > >> > 20647 bytes read in 26 ms (9.6MiB/s) > > > > > >> > > > > > > >> > And then nothing. I am hoping this mean ubldr successfully > > > loaded. The > > > > > >> > lack of the rest of the output seems to make me think, > > > > > >> > well, I > > > don't > > > > > >> > know what to think. Is the output going to the serial > > > > > >> > console I > > > don't > > > > > >> > currently have? Just because it read the file doesn't mean > > > > > >> > that bootelf worked? I don't have anything in a > > > > > >> > loader.conf file yet so that may also be the problem. > > > > > >> > > > > > > >> > Ian, thanks for chiming in. I want to keep going with the > > > > > >> > binary > > > that > > > > > >> > Gonzo gave me but I will look back at the pkgng image once > > > > > >> > I get a full boot happening. > > > > > >> > > > > > > >> > As usual, all suggestions welcome. > > > > > >> > > > > > > >> > Thanks, > > > > > >> > Russ > > > > > >> > > > > > > >> > On Sun, Aug 2, 2015 at 10:26 AM, Russell Haley < > > > russ.haley@gmail.com> > > > > > >> wrote: > > > > > >> >> Hi guys, > > > > > >> >> > > > > > >> >> No, I don't have a serial cable yet. I have ordered an > > > > > >> >> FDTI > > > cable and > > > > > >> >> should have it this week. Oleksandr gave me a binary that > > > > > >> >> is > > > working > > > > > >> >> right now, I will try out the new patch as soon as I have > > > > > >> >> the > > > FDTI > > > > > >> >> cable and can get debug output. > > > > > >> >> > > > > > >> >> okay, on to the next problem... > > > > > >> >> > > > > > >> >> Russ > > > > > >> >> > > > > > >> >> On Sun, Aug 2, 2015 at 9:02 AM, Mika=C4=97l Urankar < > > > > > >> mikael.urankar@gmail.com> wrote: > > > > > >> >>> 2015-08-02 5:57 GMT+02:00 Russell Haley > > > > > >> >>> : > > > > > >> >>>> Thanks Mikael, > > > > > >> >>>> > > > > > >> >>>> I was able to build using the patches you provided and > > > > > >> >>>> the > > > binary > > > > > >> >>>> u-boot.imx is the exact same size as the one from pkgng. > > > However, > > > > > >> >>>> nothing happens when I boot it: > > > > > >> >>> > > > > > >> >>> I've updated my patch, it works on my cubox. > > > > > >> >>> > > > > > >> > > > > > > > > > http://mikael.urankar.free.fr/FreeBSD/arm/patches/sysutils_u-boot-cubox-h= ummingboard_gcc-5.2.patch > > > > > >> >>> > > > > > >> >>> The patches come from here: > > > > > >> >>> > > > > > >> > > > > > > > > > https://github.com/OpenELEC/OpenELEC.tv/tree/master/packages/tools/u-boot= /patches > > > > > >> >>> > > > > > >> > > > > > > > > > http://u-boot.denx.narkive.com/XoUw8ZsY/patch-arm-switch-to-mno-unaligned= -access-when-supported-by-the-compiler > > > > > >> > > > > > > _______________________________________________ > > > > > > freebsd-arm@freebsd.org mailing list > > > > > > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > > > > > > To unsubscribe, send any mail to " > > > freebsd-arm-unsubscribe@freebsd.org" > > > > > > > > > _______________________________________________ > > > > freebsd-arm@freebsd.org mailing list > > > > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > > > > To unsubscribe, send any mail to > > > > "freebsd-arm-unsubscribe@freebsd.org" > > > > > > > > > > > > > > > _______________________________________________ > > freebsd-arm@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" > > > -- > Vladim=C3=ADr Botka > >