Jonathan Gray([email protected]) on 2017.02.07 11:15:29 +1100:
> Can you include the output of "printenv" after booting into u-boot?
> It doesn't set fdtaddr or fdt_addr at all?
U-Boot 2017.01 (Feb 01 2017 - 14:07:51 -0700)
CPU: Freescale i.MX6Q rev1.2 at 792 MHz
Reset cause: WDOG
Board: SABRE Lite
I2C: ready
DRAM: 1 GiB
MMC: FSL_SDHC: 0, FSL_SDHC: 1
SF: Detected sst25vf016b with page size 256 Bytes, erase size 4 KiB, total 2
MiB
No panel detected: default to HDMI
Display: HDMI (1024x768)
In: serial
Out: serial
Err: serial
Net: using phy at 6
FEC [PRIME], usb_ether
Error: usb_ether address not set.
Hit any key to stop autoboot: 0
=> printenv
baudrate=115200
bootcmd=for dtype in ${bootdevs}; do if itest.s "xusb" == "x${dtype}" ; then
usb start ;fi; for disk in 0 1 ; do ${dtype} dev ${disk} ;load ${dtype}
${disk}:1 10008000 /6x_bootscript&& source 10008000 ; done ; done; setenv
stdout serial,vga ; echo ; echo 6x_bootscript not found ; echo ; echo serial
console at 115200, 8N1 ; echo ; echo details at
http://boundarydevices.com/6q_bootscript ; setenv stdout serial;setenv stdin
serial,usbkbd;for dtype in ${umsdevs} ; do if itest.s sata == ${dtype}; then
initcmd='sata init' ;else initcmd='mmc rescan' ;fi; for disk in 0 1 ; do if
$initcmd && $dtype dev $disk ; then setenv stdout serial,vga; echo expose
${dtype} ${disk} over USB; ums 0 $dtype $disk ;fi; done; done ;setenv
stdout serial,vga; echo no block devices found;
bootdelay=3
bootdevs=sata mmc usb
clearenv=if sf probe || sf probe || sf probe 1 ; then sf erase 0xc0000
0x2000 && echo restored environment to factory default ; fi
console=ttymxc1
ethact=FEC
ethaddr=00:19:b8:01:1b:58
ethprime=FEC
initrd_high=0xffffffff
loadaddr=0x12000000
reset_cause=10
umsdevs=sata mmc
upgradeu=for dtype in ${bootdevs}; do for disk in 0 1 ; do ${dtype} dev
${disk} ;load ${dtype} ${disk}:1 10008000 /6x_upgrade && source 10008000 ;
done ; done
Environment size: 1283/8188 bytes
i'm not sure how i got to this point - i tried to get it working 6 months
ago after the switch to efi, and Matthieu's mail prompted me to look at it
again. I probably did an environment reset back then. I also needed to
recover to a working u-boot back then, by doing
https://boundarydevices.com/unbricking-nitrogen6x-sabre-lite-i-mx6-board/
2 days ago i upgraded to the u-boot in snaps (u-boot-arm-2017.01).
> http://ftp.openbsd.org/pub/OpenBSD/snapshots/armv7/miniroot-nitrogen-60.fs
>
> currently includes a 6x_bootscript that does:
>
> setenv fdtfile imx6q-sabrelite.dtb ;
> load ${dtype} ${disk}:1 ${fdtaddr} ${fdtfile} ;
> load ${dtype} ${disk}:1 ${loadaddr} efi/boot/bootarm.efi ;
> bootefi ${loadaddr} ${fdtaddr} ;
>
> I've attached a port of boundary devices preliminary u-boot 2017.01
> update but have only tested that it builds.
>
> It fetches sources from
> https://github.com/boundarydevices/u-boot-imx6/commits/boundary-v2017.01-pass1
i build that and tried to flash it, and run into the same problem:
=> setenv uboot_defconfig nitrogen6q
=> printenv
baudrate=115200
bootcmd=for dtype in ${bootdevs}; do if itest.s "xusb" == "x${dtype}" ; then
usb start ;fi; for disk in 0 1 ; do ${dtype} dev ${disk} ;load ${dtype}
${disk}:1 10008000 /6x_bootscript&& source 10008000 ; done ; done; setenv
stdout serial,vga ; echo ; echo 6x_bootscript not found ; echo ; echo serial
console at 115200, 8N1 ; echo ; echo details at
http://boundarydevices.com/6q_bootscript ; setenv stdout serial;setenv stdin
serial,usbkbd;for dtype in ${umsdevs} ; do if itest.s sata == ${dtype}; then
initcmd='sata init' ;else initcmd='mmc rescan' ;fi; for disk in 0 1 ; do if
$initcmd && $dtype dev $disk ; then setenv stdout serial,vga; echo expose
${dtype} ${disk} over USB; ums 0 $dtype $disk ;fi; done; done ;setenv
stdout serial,vga; echo no block devices found;
bootdelay=3
bootdevs=sata mmc usb
clearenv=if sf probe || sf probe || sf probe 1 ; then sf erase 0xc0000
0x2000 && echo restored environment to factory default ; fi
console=ttymxc1
ethact=FEC
ethaddr=00:19:b8:01:1b:58
ethprime=FEC
fileaddr=10008000
filesize=c9e
initrd_high=0xffffffff
loadaddr=0x12000000
reset_cause=1
stdin=serial,usbkbd
stdout=serial,vga
uboot_defconfig=nitrogen6q
umsdevs=sata mmc
upgradeu=for dtype in ${bootdevs}; do for disk in 0 1 ; do ${dtype} dev
${disk} ;load ${dtype} ${disk}:1 10008000 /6x_upgrade && source 10008000 ;
done ; done
Environment size: 1431/8188 bytes
=>run upgradeu
AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part
No port device detected!
sata - SATA sub system
Usage:
sata init - init SATA sub system
sata stop - disable SATA sub system
sata info - show available SATA devices
sata device [dev] - show or set current device
sata part [dev] - print partition table
sata read addr blk# cnt
sata write addr blk# cnt
** Bad device size - sata 0 **
AHCI 0001.0300 32 slots 1 ports 3 Gbps 0x1 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part
No port device detected!
sata - SATA sub system
Usage:
sata init - init SATA sub system
sata stop - disable SATA sub system
sata info - show available SATA devices
sata device [dev] - show or set current device
sata part [dev] - print partition table
sata read addr blk# cnt
sata write addr blk# cnt
** Bad device sata 1 **
MMC: no card present
MMC: no card present
** Bad device mmc 0 **
switch to partitions #0, OK
mmc1 is current device
reading /6x_upgrade
3230 bytes read in 17 ms (185.5 KiB/s)
## Executing script at 10008000
SF: Detected sst25vf016b with page size 256 Bytes, erase size 4 KiB, total 2
MiB
probed SPI ROM
check U-Boot
reading u-boot.nitrogen6q
data abort
pc : [<4ff7ccec>] lr : [<4ff7cc70>]
reloc pc : [<1783ecec>] lr : [<1783ec70>]
sp : 4f53ae28 ip : 4f53c3d0 fp : 00000000
r10: 00003000 r9 : 4f53bed0 r8 : 4f53b908
r7 : 00000000 r6 : 4f53aec0 r5 : 00000800 r4 : 000000a5
r3 : 000000f7 r2 : 4f85bc40 r1 : 00000800 r0 : 00000000
Flags: nzCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
resetting ...
> >
> > /Benno
> >
> > Jonathan Gray([email protected]) on 2016.12.21 22:45:39 +1100:
> > > dtype and disk are set as part of the default bootcmd on nitrogen
> > >
> > > from the u-boot 2016.11 nitrogen6q u-boot.imx:
> > >
> > > bootcmd=for dtype in ${bootdevs}; do if itest.s "xusb" == "x${dtype}" ;
> > > then usb start ;fi; for disk in 0 1 ; do ${dtype} dev ${disk} ;load
> > > ${dtype} ${disk}:1 10008000 /6x_bootscript&& source 10008000 ; done ;
> > > done; setenv stdout serial,vga ; echo ; echo 6x_bootscript not found ;
> > > echo ; echo serial console at 115200, 8N1 ; echo ; echo details at
> > > http://boundarydevices.com/6q_bootscript ; setenv stdout serial;setenv
> > > stdin serial,usbkbd;for dtype in ${umsdevs} ; do if itest.s sata ==
> > > ${dtype}; then initcmd='sata init' ;else initcmd='mmc rescan' ;fi; for
> > > disk in 0 1 ; do if $initcmd && $dtype dev $disk ; then setenv stdout
> > > serial,vga; echo expose ${dtype} ${disk} over USB; ums 0 $dtype $disk
> > > ;fi; done; done ;setenv stdout serial,vga; echo no block devices found;
> > >
> > > On Wed, Dec 21, 2016 at 07:34:25PM +0800, CARL DONG wrote:
> > > > Jonathan,
> > > >
> > > > Thanks :-)
> > > > One problem that I experienced with the previous patches you sent after
> > > > upgradeing u-boot was that ${dtype}, ${disk} won't be defined on boot,
> > > > and
> > > > after a environment reset, ${fdt_addr} won't be either. That's why I
> > > > made
> > > > the change to my script and would love if you could take a look at that!
> > > >
> > > > Cheers,
> > > > Carl Dong
> > > >
> > > > On Wed, Dec 21, 2016 at 7:25 PM, Jonathan Gray <[email protected]> wrote:
> > > >
> > > > > On Wed, Dec 21, 2016 at 06:20:16PM +0800, CARL DONG wrote:
> > > > > > All,
> > > > > >
> > > > > > Here are the fruits of my experimentation. I'd love to help with the
> > > > > > patches and the documentation under INSTALL.armv7.
> > > > >
> > > > > Here is an 18MB install image that should include the patches I mailed
> > > > > earlier.
> > > > > It includes a 6x_bootscript and will create a new one on the drive you
> > > > > are installing to.
> > > > >
> > > > > http://jsg.id.au/openbsd/miniroot-nitrogen-60.fs
> > > > >
> > > > > SHA256 (miniroot-nitrogen-60.fs) = 26760f4f3cefb07f85705df20af5e9
> > > > > 25c7f74f3d52f030cf91bf7a719b992029
> > > > >
> > > > > As you already have a newer u-boot in flash this should just work.
> > > > >
> > >
> >