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 <j...@jsg.id.au> 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 <matth...@herrb.eu> > 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 > > > >