Quantcast

OpenBSD on SABRE Lite/BD-SL-i.MX6

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

OpenBSD on SABRE Lite/BD-SL-i.MX6

CARL DONG
I see that "Boundary Devices SABRE Lite/BD-SL-i.MX6" is listed as supported
on the armv7 page, but I'm unable to get it working because of the EFI
interface requirement for the firmware.

1. `run findfdt` outputs `## Error: "findfdt" not defined`
2. `bootefi` is an unknown command

I believe this is because the device was shipped with U-Boot
2015.07-15072-g45cfc85, and the latest branch the vendor's released is
based on v2016.03 (
https://github.com/boundarydevices/u-boot-imx6/tree/boundary-v2016.03).
According to 'INSTALL.armv7', we need U-Boot 2016.07 or newer.

Would love to know if there are other ways to boot in.
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenBSD on SABRE Lite/BD-SL-i.MX6

Matthieu Herrb-7
On Tue, Dec 20, 2016 at 08:58:50PM +0800, CARL DONG wrote:

> I see that "Boundary Devices SABRE Lite/BD-SL-i.MX6" is listed as supported
> on the armv7 page, but I'm unable to get it working because of the EFI
> interface requirement for the firmware.
>
> 1. `run findfdt` outputs `## Error: "findfdt" not defined`
> 2. `bootefi` is an unknown command
>
> I believe this is because the device was shipped with U-Boot
> 2015.07-15072-g45cfc85, and the latest branch the vendor's released is
> based on v2016.03 (
> https://github.com/boundarydevices/u-boot-imx6/tree/boundary-v2016.03).
> According to 'INSTALL.armv7', we need U-Boot 2016.07 or newer.
>
> Would love to know if there are other ways to boot in.
Yes. You need to use the u-boot from ports. iirc there is no way on
the sabre lite to start u-boot from an SD card or from the the net;
you first need to flash it using the 'upgradeu' command from the
shipped U-Boot that will read a file called 'u-boot.imx' on the SD
card and flash it.

I have a sabre lite board running at home. My notes below are from
last july. I haven't tried to upgrade to a more recent u-boot. Things
may have changed a bit.

Once you have a working u-boot flashed, you will need to hack a
'6x_bootscript' boot script a bit to actually launch the EFI boot
program.

Here is my 6x_bootscript.txt:

---cut---
load ${dtype} ${disk}:1 0x13000000 imx6q-sabrelite.dtb
load ${dtype} ${disk}:1 0x10800000 efi/boot/bootarm.efi
bootefi 0x10800000 0x13000000
echo "Error loading uefi boot loader"
---cut---

I converted it to a u-boot script using the following command:

mkimage -A arm -T script -C none -n 'boot script' -d 6x_bootscript.txt 6x_bootscript

and copied it in the DOS partition of my hard-drive.


Note: If flashing U-boot fails, you need a windows or Linux machine to
unbrick it :
https://boundarydevices.com/unbricking-nitrogen6x-sabre-lite-i-mx6-board/ 
https://www.element14.com/community/community/designcenter/single-board-computers/sabrelite/blog/2014/04/01/getting-started-with-sabre-lite-imx6

I needed that unbrick procedure a number of times before I got u-boot
working. So make sure to get familiar with the procedure before
starting...

--
Matthieu Herrb

signature.asc (828 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenBSD on SABRE Lite/BD-SL-i.MX6

Jonathan Gray-11
On Tue, Dec 20, 2016 at 03:24:30PM +0100, Matthieu Herrb wrote:

> On Tue, Dec 20, 2016 at 08:58:50PM +0800, CARL DONG wrote:
> > I see that "Boundary Devices SABRE Lite/BD-SL-i.MX6" is listed as supported
> > on the armv7 page, but I'm unable to get it working because of the EFI
> > interface requirement for the firmware.
> >
> > 1. `run findfdt` outputs `## Error: "findfdt" not defined`
> > 2. `bootefi` is an unknown command
> >
> > I believe this is because the device was shipped with U-Boot
> > 2015.07-15072-g45cfc85, and the latest branch the vendor's released is
> > based on v2016.03 (
> > https://github.com/boundarydevices/u-boot-imx6/tree/boundary-v2016.03).
> > According to 'INSTALL.armv7', we need U-Boot 2016.07 or newer.
> >
> > Would love to know if there are other ways to boot in.
>
> Yes. You need to use the u-boot from ports. iirc there is no way on
> the sabre lite to start u-boot from an SD card or from the the net;
> you first need to flash it using the 'upgradeu' command from the
> shipped U-Boot that will read a file called 'u-boot.imx' on the SD
> card and flash it.
>
> I have a sabre lite board running at home. My notes below are from
> last july. I haven't tried to upgrade to a more recent u-boot. Things
> may have changed a bit.
>
> Once you have a working u-boot flashed, you will need to hack a
> '6x_bootscript' boot script a bit to actually launch the EFI boot
> program.
>
> Here is my 6x_bootscript.txt:
>
> ---cut---
> load ${dtype} ${disk}:1 0x13000000 imx6q-sabrelite.dtb
> load ${dtype} ${disk}:1 0x10800000 efi/boot/bootarm.efi
> bootefi 0x10800000 0x13000000
> echo "Error loading uefi boot loader"
> ---cut---
>
> I converted it to a u-boot script using the following command:
>
> mkimage -A arm -T script -C none -n 'boot script' -d 6x_bootscript.txt 6x_bootscript
>
> and copied it in the DOS partition of my hard-drive.

It is too bad it doesn't support the generic distro boot like
the others.  Can you show the u-boot environment?
We can make the nitrogen miniroot and installer create the 6x_bootscript
file again, but I'd prefer to use ${kernel_addr_r} {fdt_addr_r} ${fdtfile}
etc if they are set.

>
>
> Note: If flashing U-boot fails, you need a windows or Linux machine to
> unbrick it :
> https://boundarydevices.com/unbricking-nitrogen6x-sabre-lite-i-mx6-board/ 
> https://www.element14.com/community/community/designcenter/single-board-computers/sabrelite/blog/2014/04/01/getting-started-with-sabre-lite-imx6
>
> I needed that unbrick procedure a number of times before I got u-boot
> working. So make sure to get familiar with the procedure before
> starting...
>
> --
> Matthieu Herrb


Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenBSD on SABRE Lite/BD-SL-i.MX6

CARL DONG
Here's the output of `env print`:
http://pastebin.com/raw/68je2Wzh

What can we do with this? (Sorry I'm very new to u-boot)

On Wed, Dec 21, 2016 at 8:25 AM, Jonathan Gray <[hidden email]> wrote:

> On Tue, Dec 20, 2016 at 03:24:30PM +0100, Matthieu Herrb wrote:
> > On Tue, Dec 20, 2016 at 08:58:50PM +0800, CARL DONG wrote:
> > > I see that "Boundary Devices SABRE Lite/BD-SL-i.MX6" is listed as
> supported
> > > on the armv7 page, but I'm unable to get it working because of the EFI
> > > interface requirement for the firmware.
> > >
> > > 1. `run findfdt` outputs `## Error: "findfdt" not defined`
> > > 2. `bootefi` is an unknown command
> > >
> > > I believe this is because the device was shipped with U-Boot
> > > 2015.07-15072-g45cfc85, and the latest branch the vendor's released is
> > > based on v2016.03 (
> > > https://github.com/boundarydevices/u-boot-imx6/tree/boundary-v2016.03
> ).
> > > According to 'INSTALL.armv7', we need U-Boot 2016.07 or newer.
> > >
> > > Would love to know if there are other ways to boot in.
> >
> > Yes. You need to use the u-boot from ports. iirc there is no way on
> > the sabre lite to start u-boot from an SD card or from the the net;
> > you first need to flash it using the 'upgradeu' command from the
> > shipped U-Boot that will read a file called 'u-boot.imx' on the SD
> > card and flash it.
> >
> > I have a sabre lite board running at home. My notes below are from
> > last july. I haven't tried to upgrade to a more recent u-boot. Things
> > may have changed a bit.
> >
> > Once you have a working u-boot flashed, you will need to hack a
> > '6x_bootscript' boot script a bit to actually launch the EFI boot
> > program.
> >
> > Here is my 6x_bootscript.txt:
> >
> > ---cut---
> > load ${dtype} ${disk}:1 0x13000000 imx6q-sabrelite.dtb
> > load ${dtype} ${disk}:1 0x10800000 efi/boot/bootarm.efi
> > bootefi 0x10800000 0x13000000
> > echo "Error loading uefi boot loader"
> > ---cut---
> >
> > I converted it to a u-boot script using the following command:
> >
> > mkimage -A arm -T script -C none -n 'boot script' -d 6x_bootscript.txt
> 6x_bootscript
> >
> > and copied it in the DOS partition of my hard-drive.
>
> It is too bad it doesn't support the generic distro boot like
> the others.  Can you show the u-boot environment?
> We can make the nitrogen miniroot and installer create the 6x_bootscript
> file again, but I'd prefer to use ${kernel_addr_r} {fdt_addr_r} ${fdtfile}
> etc if they are set.
>
> >
> >
> > Note: If flashing U-boot fails, you need a windows or Linux machine to
> > unbrick it :
> > https://boundarydevices.com/unbricking-nitrogen6x-sabre-
> lite-i-mx6-board/
> > https://www.element14.com/community/community/designcenter/single-board-
> computers/sabrelite/blog/2014/04/01/getting-started-with-sabre-lite-imx6
> >
> > I needed that unbrick procedure a number of times before I got u-boot
> > working. So make sure to get familiar with the procedure before
> > starting...
> >
> > --
> > Matthieu Herrb
>
>
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenBSD on SABRE Lite/BD-SL-i.MX6

CARL DONG
In reply to this post by Matthieu Herrb-7
Matthieu! Thanks so much for your help! I'll try it out and let you know
how it goes.

Is there a certain flavor of `sysutils/u-boot` that I need to install? I
see on OpenPorts.se that there are 2 flavors:

1. 'aarch64', and
2. 'arm'.

Not sure if that's referring to the architecture of the compiling machine
or the machine we're compiling for.

Anyways, thanks so much for the help. Have a great day sir!

On Tue, Dec 20, 2016 at 10:24 PM, Matthieu Herrb <[hidden email]> wrote:

> On Tue, Dec 20, 2016 at 08:58:50PM +0800, CARL DONG wrote:
> > I see that "Boundary Devices SABRE Lite/BD-SL-i.MX6" is listed as
> supported
> > on the armv7 page, but I'm unable to get it working because of the EFI
> > interface requirement for the firmware.
> >
> > 1. `run findfdt` outputs `## Error: "findfdt" not defined`
> > 2. `bootefi` is an unknown command
> >
> > I believe this is because the device was shipped with U-Boot
> > 2015.07-15072-g45cfc85, and the latest branch the vendor's released is
> > based on v2016.03 (
> > https://github.com/boundarydevices/u-boot-imx6/tree/boundary-v2016.03).
> > According to 'INSTALL.armv7', we need U-Boot 2016.07 or newer.
> >
> > Would love to know if there are other ways to boot in.
>
> Yes. You need to use the u-boot from ports. iirc there is no way on
> the sabre lite to start u-boot from an SD card or from the the net;
> you first need to flash it using the 'upgradeu' command from the
> shipped U-Boot that will read a file called 'u-boot.imx' on the SD
> card and flash it.
>
> I have a sabre lite board running at home. My notes below are from
> last july. I haven't tried to upgrade to a more recent u-boot. Things
> may have changed a bit.
>
> Once you have a working u-boot flashed, you will need to hack a
> '6x_bootscript' boot script a bit to actually launch the EFI boot
> program.
>
> Here is my 6x_bootscript.txt:
>
> ---cut---
> load ${dtype} ${disk}:1 0x13000000 imx6q-sabrelite.dtb
> load ${dtype} ${disk}:1 0x10800000 efi/boot/bootarm.efi
> bootefi 0x10800000 0x13000000
> echo "Error loading uefi boot loader"
> ---cut---
>
> I converted it to a u-boot script using the following command:
>
> mkimage -A arm -T script -C none -n 'boot script' -d 6x_bootscript.txt
> 6x_bootscript
>
> and copied it in the DOS partition of my hard-drive.
>
>
> Note: If flashing U-boot fails, you need a windows or Linux machine to
> unbrick it :
> https://boundarydevices.com/unbricking-nitrogen6x-sabre-lite-i-mx6-board/
> https://www.element14.com/community/community/designcenter/single-board-
> computers/sabrelite/blog/2014/04/01/getting-started-with-sabre-lite-imx6
>
> I needed that unbrick procedure a number of times before I got u-boot
> working. So make sure to get familiar with the procedure before
> starting...
>
> --
> Matthieu Herrb
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenBSD on SABRE Lite/BD-SL-i.MX6

Jonathan Gray-11
In reply to this post by CARL DONG
On Wed, Dec 21, 2016 at 12:20:31PM +0800, CARL DONG wrote:
> Here's the output of `env print`:
> http://pastebin.com/raw/68je2Wzh
>
> What can we do with this? (Sorry I'm very new to u-boot)

The way u-boot works with almost all the other targets is
that if there is no boot script found it will search for
efi.  This is not the case with nitrogen6x/sabre lite.

There was a proposed patch for this but it wasn't committed:
http://lists.denx.de/pipermail/u-boot/2016-June/259025.html

So we likely want the following patch for now.

This will still require a version of u-boot that has
bootefi.

Index: distrib/armv7/miniroot/Makefile.inc
===================================================================
RCS file: /cvs/src/distrib/armv7/miniroot/Makefile.inc,v
retrieving revision 1.18
diff -u -p -r1.18 Makefile.inc
--- distrib/armv7/miniroot/Makefile.inc 5 Jun 2016 15:12:56 -0000 1.18
+++ distrib/armv7/miniroot/Makefile.inc 21 Dec 2016 06:06:21 -0000
@@ -56,6 +56,10 @@ do_files:
 .if ${PLATFORM} == "OMAP"
  cp ${PUBOOT}/${UBOOT}/{MLO,u-boot.img} ${MOUNT_POINT}/
 .endif
+.if ${BOARD} == "nitrogen"
+ ${MKUBOOT} -t script -a arm -o linux \
+    ${.CURDIR}/../boot.cmd ${MOUNT_POINT}/6x_bootscript
+.endif
 .if ${BOARD} == "cubox" || ${BOARD} == "wandboard"
  dd if=${PUBOOT}/${UBOOT}/SPL of=${VND_CDEV} bs=1024 seek=1
  dd if=${PUBOOT}/${UBOOT}/u-boot.img of=${VND_CDEV} bs=1024 seek=69
Index: distrib/armv7/miniroot/boot.cmd
===================================================================
RCS file: /cvs/src/distrib/armv7/miniroot/boot.cmd,v
retrieving revision 1.1
diff -u -p -r1.1 boot.cmd
--- distrib/armv7/miniroot/boot.cmd 22 May 2016 02:41:45 -0000 1.1
+++ distrib/armv7/miniroot/boot.cmd 21 Dec 2016 06:06:21 -0000
@@ -1,4 +1,4 @@
-run findfdt ;
-load mmc ${mmcdev}:1 ${loadaddr} bsd.umg ;
-load mmc ${mmcdev}:1 ${fdt_addr_r} ${fdtfile} ;
-bootm ${loadaddr} - ${fdt_addr_r} ;
+setenv fdtfile imx6q-sabrelite.dtb ;
+load ${dtype} ${disk}:1 ${fdt_addr} ${fdtfile} ;
+load ${dtype} ${disk}:1 ${loadaddr} efi/boot/bootarm.efi ;
+bootefi ${loadaddr} ${fdt_addr} ;
Index: distrib/armv7/ramdisk/install.md
===================================================================
RCS file: /cvs/src/distrib/armv7/ramdisk/install.md,v
retrieving revision 1.42
diff -u -p -r1.42 install.md
--- distrib/armv7/ramdisk/install.md 4 Sep 2016 10:06:11 -0000 1.42
+++ distrib/armv7/ramdisk/install.md 21 Dec 2016 06:06:22 -0000
@@ -73,6 +73,14 @@ md_installboot() {
  ;;
  nitrogen)
  cp $_mdec/*.dtb /mnt/mnt/
+ cat > /tmp/i/boot.cmd<<-__EOT
+ setenv fdtfile imx6q-sabrelite.dtb ;
+ load ${dtype} ${disk}:1 ${fdt_addr} ${fdtfile} ;
+ load ${dtype} ${disk}:1 ${loadaddr} efi/boot/bootarm.efi ;
+ bootefi ${loadaddr} ${fdt_addr} ;
+ __EOT
+ mkuboot -t script -a arm -o linux /tmp/i/boot.cmd \
+    /mnt/mnt/6x_bootscript
  ;;
  cubie)
  cp $_mdec/*.dtb /mnt/mnt/

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenBSD on SABRE Lite/BD-SL-i.MX6

Jonathan Gray-11
In reply to this post by CARL DONG
On Wed, Dec 21, 2016 at 12:08:34PM +0800, CARL DONG wrote:

> Matthieu! Thanks so much for your help! I'll try it out and let you know
> how it goes.
>
> Is there a certain flavor of `sysutils/u-boot` that I need to install? I
> see on OpenPorts.se that there are 2 flavors:
>
> 1. 'aarch64', and
> 2. 'arm'.
>
> Not sure if that's referring to the architecture of the compiling machine
> or the machine we're compiling for.

The architecture in the package name is the architecture the u-boot
images are built for.  You can install the packages themselves on any
architecture.

In this case you'd want u-boot-arm.

Note that there are two possible targets that apply here

one that uses 6x_bootscript
/usr/local/share/u-boot/nitrogen6q/u-boot.imx

and one that doesn't
/usr/local/share/u-boot/mx6qsabrelite/u-boot.imx

Given your current u-boot looks for 6x_bootscript, I'd try the nitrogen6q
one first.  That appears to be what matthieu is using as well.

If you can take notes when updating the version of u-boot in spi flash
then we could reuse them in INSTALL.armv7.  Almost all the other
systems load u-boot from an sd/mmc device.

>
> Anyways, thanks so much for the help. Have a great day sir!
>
> On Tue, Dec 20, 2016 at 10:24 PM, Matthieu Herrb <[hidden email]> wrote:
>
> > On Tue, Dec 20, 2016 at 08:58:50PM +0800, CARL DONG wrote:
> > > I see that "Boundary Devices SABRE Lite/BD-SL-i.MX6" is listed as
> > supported
> > > on the armv7 page, but I'm unable to get it working because of the EFI
> > > interface requirement for the firmware.
> > >
> > > 1. `run findfdt` outputs `## Error: "findfdt" not defined`
> > > 2. `bootefi` is an unknown command
> > >
> > > I believe this is because the device was shipped with U-Boot
> > > 2015.07-15072-g45cfc85, and the latest branch the vendor's released is
> > > based on v2016.03 (
> > > https://github.com/boundarydevices/u-boot-imx6/tree/boundary-v2016.03).
> > > According to 'INSTALL.armv7', we need U-Boot 2016.07 or newer.
> > >
> > > Would love to know if there are other ways to boot in.
> >
> > Yes. You need to use the u-boot from ports. iirc there is no way on
> > the sabre lite to start u-boot from an SD card or from the the net;
> > you first need to flash it using the 'upgradeu' command from the
> > shipped U-Boot that will read a file called 'u-boot.imx' on the SD
> > card and flash it.
> >
> > I have a sabre lite board running at home. My notes below are from
> > last july. I haven't tried to upgrade to a more recent u-boot. Things
> > may have changed a bit.
> >
> > Once you have a working u-boot flashed, you will need to hack a
> > '6x_bootscript' boot script a bit to actually launch the EFI boot
> > program.
> >
> > Here is my 6x_bootscript.txt:
> >
> > ---cut---
> > load ${dtype} ${disk}:1 0x13000000 imx6q-sabrelite.dtb
> > load ${dtype} ${disk}:1 0x10800000 efi/boot/bootarm.efi
> > bootefi 0x10800000 0x13000000
> > echo "Error loading uefi boot loader"
> > ---cut---
> >
> > I converted it to a u-boot script using the following command:
> >
> > mkimage -A arm -T script -C none -n 'boot script' -d 6x_bootscript.txt
> > 6x_bootscript
> >
> > and copied it in the DOS partition of my hard-drive.
> >
> >
> > Note: If flashing U-boot fails, you need a windows or Linux machine to
> > unbrick it :
> > https://boundarydevices.com/unbricking-nitrogen6x-sabre-lite-i-mx6-board/
> > https://www.element14.com/community/community/designcenter/single-board-
> > computers/sabrelite/blog/2014/04/01/getting-started-with-sabre-lite-imx6
> >
> > I needed that unbrick procedure a number of times before I got u-boot
> > working. So make sure to get familiar with the procedure before
> > starting...
> >
> > --
> > Matthieu Herrb
> >

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenBSD on SABRE Lite/BD-SL-i.MX6

CARL DONG
All,

Here are the fruits of my experimentation. I'd love to help with the
patches and the documentation under INSTALL.armv7.


Step 1: Compiled u-boot from ports without specifying any flavor on 6.0 for
amd64.

At the end of the compilation, there were a series of errors that didn't
seem to affect anything afterwards.
See the end of the output here:
https://www.dropbox.com/s/pg8fd256mwj0f3c/u-boot%20build?dl=1


Step 2: Copied built u-boot to microSD, along with the 6x_upgrade u-boot
script

The binary I copied was located at
`/usr/ports/pobj/u-boot-2016.07/u-boot-2016.07/build/nitrogen6q/u-boot.imx`
and I copied it onto the microSD as `u-boot.nitrogen6q`
The 6x_upgrade u-boot script can be found here:
https://boundarydevices.com/u-boot-v2016-03/


Step 2b: Write down your fdt_addr value: `env print fdt_addr`

This is required in writing the 6x_bootscript for Step 5


Step 3: Burn the built u-boot: `run upgradeu`

From the Boundary Devices website: This will run the 6x_upgrade script and
look for a file u-boot.{uboot_defconfig} and burn it.


Step 4: Clear my environment variables: `env default -a` then `savee`

Self-explanatory


Step 5: Compile your own 6x_bootscript

There's a great compiler provided by Boundary Devices here:
http://git.boundarydevices.com/bootscript.php
My script looks like this:
```
setenv fdt_addr 0x13000000
setenv fdtfile imx6q-sabrelite.dtb
for dtype in ${bootdevs}; do for disk in 0 1 ; do ${dtype} dev ${disk} ;
load ${dtype} ${disk}:1 ${fdt_addr} ${fdtfile} && load ${dtype} ${disk}:1
${loadaddr} efi/boot/bootarm.efi && bootefi ${loadaddr} ${fdt_addr} ; done
; done
```
I noticed through `env print` that my `fdt_addr` was erased (probably when
I did `env default -a`) so I have to add that line. The rest of the script
I adapted from 6x_upgrade and the scripts that you guys gave me. This one
checks all available dtype's and disks instead of being bound to one.


Step 6: Copy the compiled 6x_bootscript to your microSD card and boot!

Remember to have another empty storage device to install OpenBSD onto.


Thank you all for your wonderful help. Happy to be running my favorite OS
on my Sabre Lite. Tell me if anything else is needed for the patches and
docs!

Cheers,
Carl Dong


On Wed, Dec 21, 2016 at 2:55 PM, Jonathan Gray <[hidden email]> wrote:

> On Wed, Dec 21, 2016 at 12:08:34PM +0800, CARL DONG wrote:
> > Matthieu! Thanks so much for your help! I'll try it out and let you know
> > how it goes.
> >
> > Is there a certain flavor of `sysutils/u-boot` that I need to install? I
> > see on OpenPorts.se that there are 2 flavors:
> >
> > 1. 'aarch64', and
> > 2. 'arm'.
> >
> > Not sure if that's referring to the architecture of the compiling machine
> > or the machine we're compiling for.
>
> The architecture in the package name is the architecture the u-boot
> images are built for.  You can install the packages themselves on any
> architecture.
>
> In this case you'd want u-boot-arm.
>
> Note that there are two possible targets that apply here
>
> one that uses 6x_bootscript
> /usr/local/share/u-boot/nitrogen6q/u-boot.imx
>
> and one that doesn't
> /usr/local/share/u-boot/mx6qsabrelite/u-boot.imx
>
> Given your current u-boot looks for 6x_bootscript, I'd try the nitrogen6q
> one first.  That appears to be what matthieu is using as well.
>
> If you can take notes when updating the version of u-boot in spi flash
> then we could reuse them in INSTALL.armv7.  Almost all the other
> systems load u-boot from an sd/mmc device.
>
> >
> > Anyways, thanks so much for the help. Have a great day sir!
> >
> > On Tue, Dec 20, 2016 at 10:24 PM, Matthieu Herrb <[hidden email]>
> wrote:
> >
> > > On Tue, Dec 20, 2016 at 08:58:50PM +0800, CARL DONG wrote:
> > > > I see that "Boundary Devices SABRE Lite/BD-SL-i.MX6" is listed as
> > > supported
> > > > on the armv7 page, but I'm unable to get it working because of the
> EFI
> > > > interface requirement for the firmware.
> > > >
> > > > 1. `run findfdt` outputs `## Error: "findfdt" not defined`
> > > > 2. `bootefi` is an unknown command
> > > >
> > > > I believe this is because the device was shipped with U-Boot
> > > > 2015.07-15072-g45cfc85, and the latest branch the vendor's released
> is
> > > > based on v2016.03 (
> > > > https://github.com/boundarydevices/u-boot-imx6/
> tree/boundary-v2016.03).
> > > > According to 'INSTALL.armv7', we need U-Boot 2016.07 or newer.
> > > >
> > > > Would love to know if there are other ways to boot in.
> > >
> > > Yes. You need to use the u-boot from ports. iirc there is no way on
> > > the sabre lite to start u-boot from an SD card or from the the net;
> > > you first need to flash it using the 'upgradeu' command from the
> > > shipped U-Boot that will read a file called 'u-boot.imx' on the SD
> > > card and flash it.
> > >
> > > I have a sabre lite board running at home. My notes below are from
> > > last july. I haven't tried to upgrade to a more recent u-boot. Things
> > > may have changed a bit.
> > >
> > > Once you have a working u-boot flashed, you will need to hack a
> > > '6x_bootscript' boot script a bit to actually launch the EFI boot
> > > program.
> > >
> > > Here is my 6x_bootscript.txt:
> > >
> > > ---cut---
> > > load ${dtype} ${disk}:1 0x13000000 imx6q-sabrelite.dtb
> > > load ${dtype} ${disk}:1 0x10800000 efi/boot/bootarm.efi
> > > bootefi 0x10800000 0x13000000
> > > echo "Error loading uefi boot loader"
> > > ---cut---
> > >
> > > I converted it to a u-boot script using the following command:
> > >
> > > mkimage -A arm -T script -C none -n 'boot script' -d 6x_bootscript.txt
> > > 6x_bootscript
> > >
> > > and copied it in the DOS partition of my hard-drive.
> > >
> > >
> > > Note: If flashing U-boot fails, you need a windows or Linux machine to
> > > unbrick it :
> > > https://boundarydevices.com/unbricking-nitrogen6x-sabre-
> lite-i-mx6-board/
> > > https://www.element14.com/community/community/
> designcenter/single-board-
> > > computers/sabrelite/blog/2014/04/01/getting-started-with-
> sabre-lite-imx6
> > >
> > > I needed that unbrick procedure a number of times before I got u-boot
> > > working. So make sure to get familiar with the procedure before
> > > starting...
> > >
> > > --
> > > Matthieu Herrb
> > >
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenBSD on SABRE Lite/BD-SL-i.MX6

CARL DONG
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 <[hidden email]> 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.
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenBSD on SABRE Lite/BD-SL-i.MX6

Jonathan Gray-11
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 <[hidden email]> 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.
> >

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenBSD on SABRE Lite/BD-SL-i.MX6

Sebastian Benoit-3

Hi,

i tried to follow your instructions, but cant get get things to work:

i upgraded to the uboot in current ports. with that , i get this:

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=1
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: 1282/8188 bytes


=> setenv fdt_addr 0x13000000
=> setenv fdtfile imx6q-sabrelite.dtb
=> mmc dev 1
switch to partitions #0, OK
mmc1 is current device
=> ls
ls - list files in a directory (default /)

Usage:
ls <interface> [<dev[:part]> [directory]]
    - List files in directory 'directory' of partition 'part' on
      device type 'interface' instance 'dev'.
=> ls mmc 1:1 /
    35685   imx6dl-nitrogen6x.dtb
    34397   imx6dl-sabrelite.dtb
    40969   imx6q-nitrogen6_max.dtb
    38118   imx6q-nitrogen6x.dtb
    36834   imx6q-sabrelite.dtb
            efi/
     3230   6x_upgrade
      364   6x_bootscript
   465920   u-boot.nitrogen6q

8 file(s), 1 dir(s)

=> load mmc 1:1 ${fdt_addr} ${fdtfile}
reading imx6q-sabrelite.dtb
data abort
pc : [<4ff7ccec>]          lr : [<4ff7cc70>]
reloc pc : [<1783ecec>]    lr : [<1783ec70>]
sp : 4f53b168  ip : 4f53c3d0     fp : 00000000
r10: 00003000  r9 : 4f53bed0     r8 : 4f53bc48
r7 : 00000000  r6 : 4f53b200     r5 : 00000800  r4 : 000001a5
r3 : 00000277  r2 : 4f859180     r1 : 00000800  r0 : 00000000
Flags: nzCv  IRQs off  FIQs off  Mode SVC_32
Resetting CPU ...

resetting ...


U-Boot 2017.01 (Feb 01 2017 - 14:07:51 -0700)

any ideas?

/Benno

Jonathan Gray([hidden email]) 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 <[hidden email]> 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.
> > >
>

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenBSD on SABRE Lite/BD-SL-i.MX6

Jonathan Gray-11
On Mon, Feb 06, 2017 at 10:38:20PM +0100, Sebastian Benoit wrote:

>
> Hi,
>
> i tried to follow your instructions, but cant get get things to work:
>
> i upgraded to the uboot in current ports. with that , i get this:
>
> 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=1
> 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: 1282/8188 bytes
>
>
> => setenv fdt_addr 0x13000000
> => setenv fdtfile imx6q-sabrelite.dtb
> => mmc dev 1
> switch to partitions #0, OK
> mmc1 is current device
> => ls
> ls - list files in a directory (default /)
>
> Usage:
> ls <interface> [<dev[:part]> [directory]]
>     - List files in directory 'directory' of partition 'part' on
>       device type 'interface' instance 'dev'.
> => ls mmc 1:1 /
>     35685   imx6dl-nitrogen6x.dtb
>     34397   imx6dl-sabrelite.dtb
>     40969   imx6q-nitrogen6_max.dtb
>     38118   imx6q-nitrogen6x.dtb
>     36834   imx6q-sabrelite.dtb
>             efi/
>      3230   6x_upgrade
>       364   6x_bootscript
>    465920   u-boot.nitrogen6q
>
> 8 file(s), 1 dir(s)
>
> => load mmc 1:1 ${fdt_addr} ${fdtfile}
> reading imx6q-sabrelite.dtb
> data abort
> pc : [<4ff7ccec>]          lr : [<4ff7cc70>]
> reloc pc : [<1783ecec>]    lr : [<1783ec70>]
> sp : 4f53b168  ip : 4f53c3d0     fp : 00000000
> r10: 00003000  r9 : 4f53bed0     r8 : 4f53bc48
> r7 : 00000000  r6 : 4f53b200     r5 : 00000800  r4 : 000001a5
> r3 : 00000277  r2 : 4f859180     r1 : 00000800  r0 : 00000000
> Flags: nzCv  IRQs off  FIQs off  Mode SVC_32
> Resetting CPU ...
>
> resetting ...
>
>
> U-Boot 2017.01 (Feb 01 2017 - 14:07:51 -0700)
>
> any ideas?
Can you include the output of "printenv" after booting into u-boot?
It doesn't set fdtaddr or fdt_addr at all?

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

>
> /Benno
>
> Jonathan Gray([hidden email]) 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 <[hidden email]> 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.
> > > >
> >
>

u-boot-boundarydevices-imx6.tgz (2K) Download Attachment
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: OpenBSD on SABRE Lite/BD-SL-i.MX6

Sebastian Benoit-3
Jonathan Gray([hidden email]) 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([hidden email]) 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 <[hidden email]> 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.
> > > > >
> > >
> >


Loading...