Commit 31def42b authored by Thomas Schäfer's avatar Thomas Schäfer
Browse files

pitx-imx8m: enable distro_boot



- enable BOOT_TARGET_DEVICES mmc0, mmc1, usb0 and dhcp
- add missing environment variables for distro_boot
- fix bootcmd
- legacy bootcmd settings still available and executed before
  distro_boot targets
Signed-off-by: Thomas Schäfer's avatarThomas Schaefer <thomas.schaefer@kontron.com>
parent d00e48bd
......@@ -11,6 +11,7 @@ CONFIG_SPL_MMC_SUPPORT=y
CONFIG_SPL_SERIAL_SUPPORT=y
CONFIG_SPL_DRIVERS_MISC_SUPPORT=y
CONFIG_SPL=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_NR_DRAM_BANKS=2
CONFIG_FIT=y
CONFIG_FIT_EXTERNAL_OFFSET=0x3000
......@@ -18,6 +19,7 @@ CONFIG_SPL_LOAD_FIT=y
CONFIG_SPL_FIT_GENERATOR="arch/arm/mach-imx/mkimage_fit_atf.sh"
CONFIG_OF_BOARD_SETUP=y
CONFIG_SYS_EXTRA_OPTIONS="IMX_CONFIG=arch/arm/mach-imx/imx8m/imximage.cfg"
CONFIG_BOOTCOMMAND="run legacy_boot || run distro_bootcmd"
CONFIG_VERSION_VARIABLE=y
CONFIG_ARCH_MISC_INIT=y
CONFIG_SPL_BOARD_INIT=y
......@@ -25,10 +27,8 @@ CONFIG_SPL_I2C_SUPPORT=y
CONFIG_SPL_POWER_SUPPORT=y
CONFIG_SPL_USB_HOST_SUPPORT=y
CONFIG_SPL_WATCHDOG_SUPPORT=y
CONFIG_HUSH_PARSER=y
CONFIG_CMD_LICENSE=y
CONFIG_CMD_BOOTZ=y
# CONFIG_CMD_BOOTEFI is not set
CONFIG_CRC32_VERIFY=y
CONFIG_CMD_MD5SUM=y
CONFIG_MD5SUM_VERIFY=y
......@@ -41,16 +41,10 @@ CONFIG_CMD_READ=y
CONFIG_CMD_SF=y
CONFIG_CMD_USB=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_CMD_DHCP=y
CONFIG_CMD_MII=y
CONFIG_CMD_PING=y
CONFIG_CMD_CACHE=y
CONFIG_CMD_PMIC=y
CONFIG_CMD_REGULATOR=y
CONFIG_CMD_EXT2=y
CONFIG_CMD_EXT4=y
CONFIG_CMD_FAT=y
CONFIG_CMD_FS_GENERIC=y
# CONFIG_ISO_PARTITION is not set
CONFIG_OF_CONTROL=y
CONFIG_DEFAULT_DEVICE_TREE="pitx-imx8mq"
CONFIG_ENV_IS_IN_MMC=y
......@@ -97,7 +91,6 @@ CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y
CONFIG_USB_DWC3=y
CONFIG_USB_DWC3_GADGET=y
CONFIG_USB_STORAGE=y
CONFIG_USB_GADGET=y
CONFIG_USB_GADGET_MANUFACTURER="FSL"
CONFIG_USB_GADGET_VENDOR_NUM=0x0525
......
......@@ -133,25 +133,41 @@
* Default Environment Variables
*/
#ifndef CONFIG_SPL_BUILD
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
func(MMC, mmc, 1) \
func(USB, usb, 0) \
func(DHCP, dhcp, 0)
#include <config_distro_bootcmd.h>
#else
#define BOOTENV
#endif
#define CONFIG_EXTRA_ENV_SETTINGS \
"autoload=no\0" \
"image=Image\0" \
"splashpos=m,m\0" \
"console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000\0" \
"fdt_addr=0x43000000\0" \
"fdt_addr_r=0x43000000\0" \
"fdt_high=0xffffffffffffffff\0" \
"boot_fdt=try\0" \
"set_fdtfile=setenv fdtfile pitx-imx8m_hdmi.dtb;" "\0" \
"set_fdtfile=setenv fdtfile pitx-imx8m_hdmi.dtb\0" \
"initrd_addr=0x43800000\0" \
"initrd_high=0xffffffffffffffff\0" \
"bootfailed=echo Booting failed from all boot sources && false\0" \
"kernel_addr_r=" __stringify(CONFIG_LOADADDR) "\0" \
"script_addr=0x40400000\0" \
"legacy_boot=run sdboot || run mmcboot || run usbboot || " \
"run netboot || run bootfailed\0" \
"bootfailed=echo Booting failed from all legacy boot sources " \
"&& false\0" \
"bootos=run setbootargs && " \
"run loadimage && " \
"run loadfdt && " \
"booti ${loadaddr} - ${fdt_addr} || false\0" \
"booti ${loadaddr} - ${fdt_addr_r} || false\0" \
"loadimage=load ${intf} ${bdev}:${bpart} ${loadaddr} ${image}\0" \
"loadfdt=run set_fdtfile && " \
"load ${intf} ${bdev}:${bpart} ${fdt_addr} ${fdtfile}\0" \
"load ${intf} ${bdev}:${bpart} ${fdt_addr_r} ${fdtfile}\0" \
"setbootargs=setenv bootargs console=${console},${baudrate} " \
"root=${rootpath}\0" \
"mmcroot=/dev/mmcblk0p2 rootwait rw\0" \
......@@ -172,17 +188,16 @@
"netboot=echo Booting from net ...; " \
"run netsetbootargs && " \
"tftp ${loadaddr} ${image} && " \
"run set_fdtfile && tftp ${fdt_addr} ${fdtfile} && " \
"booti ${loadaddr} - ${fdt_addr} || false\0" \
"run set_fdtfile && tftp ${fdt_addr_r} ${fdtfile} && " \
"booti ${loadaddr} - ${fdt_addr_r} || false\0" \
"sdroot=/dev/mmcblk1p2 rootwait rw\0" \
"sdboot=echo Booting from SD card ... && " \
"setenv bdev 1 && setenv bpart 1 && setenv intf mmc && " \
"mmc dev ${bdev} && setenv rootpath ${sdroot} && " \
"run bootos\0"
"run bootos\0" \
BOOTENV
#define CONFIG_BOOTCOMMAND \
"run sdboot || run mmcboot || run usbboot || run netboot || run bootfailed"
/* Link Definitions */
#define CONFIG_LOADADDR 0x40480000
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment