Commit 26e037b1 authored by Angus Ainslie's avatar Angus Ainslie

Merge branch 'devkit-wip' into 'devkit-wip'

Enable distro boot

See merge request !5
parents db025004 269f8679
......@@ -10,6 +10,7 @@ CONFIG_OF_LIBFDT=y
CONFIG_CMD_CACHE=y
CONFIG_DEFAULT_DEVICE_TREE="librem5-evk"
CONFIG_OF_CONTROL=y
CONFIG_DISTRO_DEFAULTS=y
CONFIG_FASTBOOT=y
CONFIG_USB_FUNCTION_FASTBOOT=y
......
......@@ -99,9 +99,6 @@
/* ENET Config */
/* ENET1 */
#if defined(CONFIG_CMD_NET)
#define CONFIG_CMD_PING
#define CONFIG_CMD_DHCP
#define CONFIG_CMD_MII
#define CONFIG_MII
#define CONFIG_ETHPRIME "FEC"
......@@ -121,6 +118,22 @@
#endif
#define CONFIG_CMD_USB
#define CONFIG_CMD_MMC
#ifndef CONFIG_SPL_BUILD
#include <config_distro_defaults.h>
#define BOOT_TARGET_DEVICES(func) \
func(MMC, mmc, 0) \
func(MMC, mmc, 1) \
func(USB, usb, 0) \
func(PXE, pxe, na) \
func(DHCP, dhcp, na)
#include <config_distro_bootcmd.h>
#else
#define BOOTENV
#endif
#ifdef CONFIG_NAND_BOOT
#define MFG_NAND_PARTITION "mtdparts=gpmi-nand:64m(boot),16m(fit),32m(kernel),16m(dtb),8m(misc),-(rootfs) "
#else
......@@ -158,68 +171,17 @@
#else
#define CONFIG_EXTRA_ENV_SETTINGS \
CONFIG_MFG_ENV_SETTINGS \
"script=boot.scr\0" \
"image=Image\0" \
"fdt_file=dtbs/librem5-evk.dtb\0" \
"ip_dyn=no\0" \
"ipaddr=172.17.33.41\0" \
"serverip=172.17.0.1\0" \
"fdt_addr=0x43000000\0" \
"fdt_high=0xffffffffffffffff\0" \
"boot_fdt=try\0" \
"initrd_addr=0x43800000\0" \
"initrd_high=0xffffffffffffffff\0" \
"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
"mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
"mmcautodetect=yes\0" \
"args_common=console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200 " \
"video=HDMI-A-1:1920x1080-32@60\0" \
"args_quiet=setenv bootargs ${args_common} quiet=quiet\0" \
"args_verbose=setenv bootargs ${args_common} ignore_loglevel\0" \
"args=run args_verbose\0" \
"netargs=setenv bootargs ${bootargs} " \
"root=/dev/nfs nfsroot=${serverip}:${nfsroot},v3,tcp\0" \
"mmcargs=setenv bootargs ${bootargs} root=${mmcroot}\0 " \
"findmmcpart=if itest.s \"x\" == \"x$mmcpart\"; then part list mmc ${mmcdev} -bootable mmcpart; fi\0" \
"loadbootscript=run findmmcpart; ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
"loadimage=run findmmcpart; ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
"loadfdt=run findmmcpart; ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
"rtos_file=imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin\0" \
"rtos_bootaddr=0x7e0000\0" \
"rtosmmcboot=fatload mmc ${mmcdev}:${mmcpart} ${rtos_bootaddr} " \
"${rtos_file} && bootaux ${rtos_bootaddr}\0" \
"rtosnetboot=tftp ${rtos_bootaddr} ${rtos_file} && "\
"bootaux ${rtos_bootaddr}\0"\
"rtosboot=run rtosmmcboot\0" \
"mmcboot=echo Booting from mmc ...; " \
"mmc dev ${mmcdev}; if mmc rescan; then " \
"if run loadbootscript; then " \
"run bootscript; " \
"else " \
"run rtosboot; " \
"run args mmcargs addip loadfdt && run loadimage && " \
"booti ${loadaddr} - ${fdt_addr};" \
"fi;" \
"fi\0" \
"addip=setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:" \
"${netmask}:${hostname}:eth0:off\0" \
"netboot=echo Booting from net ...; " \
"run args mmcargs; " \
"if test ${ip_dyn} = yes; then " \
"setenv get_cmd dhcp; " \
"else " \
"setenv get_cmd tftp; " \
"fi; " \
"run rtosboot; " \
"${get_cmd} ${loadaddr} ${image} && " \
"${get_cmd} ${fdt_addr} ${fdt_file} && " \
"run addip && booti ${loadaddr} - ${fdt_addr};\0"
#define CONFIG_BOOTCOMMAND "run mmcboot"
"scriptaddr=0x80000000\0" \
"pxefile_addr_r=0x80100000\0" \
"kernel_addr_r=0x80800000\0" \
"fdt_addr_r=0x83000000\0" \
"ramdisk_addr_r=0x83800000\0" \
"console=ttymxc0,115200\0" \
BOOTENV
#endif
/* Link Definitions */
/* TODO: replace addresses with 0x8... definitions found used in practice? */
#define CONFIG_LOADADDR 0x40480000
#define CONFIG_SYS_TEXT_BASE 0x40200000
......@@ -285,18 +247,13 @@
#define CONFIG_IMX_BOOTAUX
#define CONFIG_CMD_MMC
#define CONFIG_FSL_ESDHC
#define CONFIG_FSL_USDHC
#define CONFIG_SYS_FSL_USDHC_NUM 2
#define CONFIG_SYS_FSL_ESDHC_ADDR 0
#define CONFIG_DOS_PARTITION
#define CONFIG_CMD_EXT2
#define CONFIG_CMD_EXT4
#define CONFIG_CMD_EXT4_WRITE
#define CONFIG_CMD_FAT
#define CONFIG_SUPPORT_EMMC_BOOT /* eMMC specific */
#define CONFIG_SYS_MMC_IMG_LOAD_PART 1
......@@ -336,9 +293,7 @@
#define CONFIG_SYS_USB_XHCI_MAX_ROOT_PORTS 2
#endif
#define CONFIG_CMD_USB
#define CONFIG_USB_STORAGE
#define CONFIG_CMD_EXT2
#define CONFIG_USBD_HS
......
Markdown is supported
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