uboot-tools/mx6-utilite-distro-boot.patch
2017-08-01 19:22:52 +01:00

155 lines
4.6 KiB
Diff

From af017eb82317dc88c1b23301d76466b389c2e007 Mon Sep 17 00:00:00 2001
From: Peter Robinson <pbrobinson@gmail.com>
Date: Tue, 13 Sep 2016 08:47:34 +0100
Subject: [PATCH] port utilite to distro generic boot commands
---
include/configs/cm_fx6.h | 115 ++++++++++++-----------------------------------
1 file changed, 29 insertions(+), 86 deletions(-)
diff --git a/include/configs/cm_fx6.h b/include/configs/cm_fx6.h
index c839b03..4dd501e 100644
--- a/include/configs/cm_fx6.h
+++ b/include/configs/cm_fx6.h
@@ -11,6 +11,7 @@
#ifndef __CONFIG_CM_FX6_H
#define __CONFIG_CM_FX6_H
+#include <config_distro_defaults.h>
#include "mx6_common.h"
/* Machine config */
@@ -78,101 +79,43 @@
#define CONFIG_ENV_SIZE (8 * 1024)
#define CONFIG_ENV_OFFSET (768 * 1024)
+#ifndef CONFIG_SPL_BUILD
+#include <config_distro_defaults.h>
+#include <config_distro_bootcmd.h>
+
+#ifdef CONFIG_AHCI
+#define BOOT_TARGET_DEVICES_SCSI(func) func(SCSI, scsi, 0)
+#else
+#define BOOT_TARGET_DEVICES_SCSI(func)
+#endif
+
+#define BOOT_TARGET_DEVICES(func) \
+ func(MMC, mmc, 2) \
+ BOOT_TARGET_DEVICES_SCSI(func) \
+ func(PXE, pxe, na) \
+ func(DHCP, dhcp, na)
+
#define CONFIG_EXTRA_ENV_SETTINGS \
"stdin=serial,usbkbd\0" \
"stdout=serial,vga\0" \
"stderr=serial,vga\0" \
"panel=HDMI\0" \
- "autoload=no\0" \
- "uImage=uImage-cm-fx6\0" \
- "zImage=zImage-cm-fx6\0" \
- "kernel=uImage-cm-fx6\0" \
- "script=boot.scr\0" \
- "dtb=cm-fx6.dtb\0" \
- "bootm_low=18000000\0" \
+ "dtb=imx6q-utilite-pro.dts\0" \
"loadaddr=0x10800000\0" \
"fdtaddr=0x11000000\0" \
+ "fdt_addr_r=0x18000000\0" \
+ "pxefile_addr_r=0x17f00000\0" \
+ "scriptaddr=0x17e00000\0" \
+ "kernel_addr_r=0x11000000\0" \
+ "ramdisk_addr_r=0x18100000\0" \
+ "bootm_size=0x20000000\0" \
"console=ttymxc3,115200\0" \
"ethprime=FEC0\0" \
- "video_hdmi=mxcfb0:dev=hdmi,1920x1080M-32@50,if=RGB32\0" \
- "video_dvi=mxcfb0:dev=dvi,1280x800M-32@50,if=RGB32\0" \
- "doboot=bootm ${loadaddr}\0" \
- "doloadfdt=false\0" \
- "mtdids=" MTDIDS_DEFAULT "\0" \
- "mtdparts=" MTDPARTS_DEFAULT "\0" \
- "setboottypez=setenv kernel ${zImage};" \
- "setenv doboot bootz ${loadaddr} - ${fdtaddr};" \
- "setenv doloadfdt true;\0" \
- "setboottypem=setenv kernel ${uImage};" \
- "setenv doboot bootm ${loadaddr};" \
- "setenv doloadfdt false;\0"\
- "mmcroot=/dev/mmcblk0p2 rw rootwait\0" \
- "sataroot=/dev/sda2 rw rootwait\0" \
- "nandroot=/dev/mtdblock4 rw\0" \
- "nandrootfstype=ubifs\0" \
- "mmcargs=setenv bootargs console=${console} root=${mmcroot} " \
- "${video} ${extrabootargs}\0" \
- "sataargs=setenv bootargs console=${console} root=${sataroot} " \
- "${video} ${extrabootargs}\0" \
- "nandargs=setenv bootargs console=${console} " \
- "root=${nandroot} " \
- "rootfstype=${nandrootfstype} " \
- "${video} ${extrabootargs}\0" \
- "nandboot=if run nandloadkernel; then " \
- "run nandloadfdt;" \
- "run setboottypem;" \
- "run storagebootcmd;" \
- "run setboottypez;" \
- "run storagebootcmd;" \
- "fi;\0" \
- "run_eboot=echo Starting EBOOT ...; "\
- "mmc dev 2 && " \
- "mmc rescan && mmc read 10042000 a 400 && go 10042000\0" \
- "loadscript=load ${storagetype} ${storagedev} ${loadaddr} ${script};\0"\
- "loadkernel=load ${storagetype} ${storagedev} ${loadaddr} ${kernel};\0"\
- "loadfdt=load ${storagetype} ${storagedev} ${fdtaddr} ${dtb};\0" \
- "bootscript=echo Running bootscript from ${storagetype} ...;" \
- "source ${loadaddr};\0" \
- "nandloadkernel=nand read ${loadaddr} 0 780000;\0" \
- "nandloadfdt=nand read ${fdtaddr} 780000 80000;\0" \
- "setupmmcboot=setenv storagetype mmc; setenv storagedev 2;\0" \
- "setupsataboot=setenv storagetype sata; setenv storagedev 0;\0" \
- "setupnandboot=setenv storagetype nand;\0" \
- "setupusbboot=setenv storagetype usb; setenv storagedev 0;\0" \
- "storagebootcmd=echo Booting from ${storagetype} ...;" \
- "run ${storagetype}args; run doboot;\0" \
- "trybootk=if run loadkernel; then " \
- "if ${doloadfdt}; then " \
- "run loadfdt;" \
- "fi;" \
- "run storagebootcmd;" \
- "fi;\0" \
- "trybootsmz=if run loadscript; then " \
- "run bootscript;" \
- "fi;" \
- "run setboottypem;" \
- "run trybootk;" \
- "run setboottypez;" \
- "run trybootk;\0"
-
-#define CONFIG_BOOTCOMMAND \
- "run setupmmcboot;" \
- "mmc dev ${storagedev};" \
- "if mmc rescan; then " \
- "run trybootsmz;" \
- "fi;" \
- "run setupusbboot;" \
- "if usb start; then "\
- "if run loadscript; then " \
- "run bootscript;" \
- "fi;" \
- "fi;" \
- "run setupsataboot;" \
- "if sata init; then " \
- "run trybootsmz;" \
- "fi;" \
- "run setupnandboot;" \
- "run nandboot;"
+ BOOTENV
+
+#else /* ifndef CONFIG_SPL_BUILD */
+#define CONFIG_EXTRA_ENV_SETTINGS
+#endif
#define CONFIG_PREBOOT "usb start;sf probe"
--
2.9.3