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 via email to