From 83f5195e328bf7dd3b0ad224a3437bd281788d13 Mon Sep 17 00:00:00 2001 From: Martyn Welch Date: Tue, 20 Dec 2022 18:38:19 +0000 Subject: configs: Enable distroboot on am625 TI boards use a custom (though faily common to TI boards) mechanism for booting Linux. We would like to use the "distroboot" approach. Enable distroboot as a further option to use for booting on am625 should the existing options fail. Signed-off-by: Martyn Welch --- include/configs/am62x_evm.h | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) (limited to 'include') diff --git a/include/configs/am62x_evm.h b/include/configs/am62x_evm.h index 809d89119c4..7fbefdece40 100644 --- a/include/configs/am62x_evm.h +++ b/include/configs/am62x_evm.h @@ -15,6 +15,29 @@ /* DDR Configuration */ #define CFG_SYS_SDRAM_BASE1 0x880000000 +#ifdef CONFIG_CMD_MMC +#define DISTRO_BOOT_DEV_MMC(func) func(MMC, mmc, 0) func(MMC, mmc, 1) +#else +#define DISTRO_BOOT_DEV_MMC(func) +#endif + +#ifdef CONFIG_CMD_PXE +#define DISTRO_BOOT_DEV_PXE(func) func(PXE, pxe, na) +#else +#define DISTRO_BOOT_DEV_PXE(func) +#endif + +#ifdef CONFIG_CMD_DHCP +#define DISTRO_BOOT_DEV_DHCP(func) func(DHCP, dhcp, na) +#else +#define DISTRO_BOOT_DEV_DHCP(func) +#endif + +#define BOOT_TARGET_DEVICES(func) \ + DISTRO_BOOT_DEV_MMC(func) \ + DISTRO_BOOT_DEV_PXE(func) \ + DISTRO_BOOT_DEV_DHCP(func) + #define PARTS_DEFAULT \ /* Linux partitions */ \ "name=rootfs,start=0,size=-,uuid=${uuid_gpt_rootfs}\0" @@ -59,7 +82,8 @@ DEFAULT_LINUX_BOOT_ENV \ DEFAULT_MMC_TI_ARGS \ EXTRA_ENV_AM625_BOARD_SETTINGS \ - EXTRA_ENV_AM625_BOARD_SETTINGS_MMC + EXTRA_ENV_AM625_BOARD_SETTINGS_MMC \ + BOOTENV /* Now for the remaining common defines */ #include -- cgit v1.2.3 From e625bfe5ad95ace782ed998f4c2b85b20d1923ad Mon Sep 17 00:00:00 2001 From: Bryan Brattlof Date: Fri, 23 Dec 2022 19:15:24 -0600 Subject: configs: am62a: convert bootcmd to distro_bootcmd We're currently using CONFIG_BOOTCOMMAND to run custom boot scripts to jump into linux. While this works, let's begin the transition to more distribution friendly jumps to linux by enabling distro_bootcmd. Convert the custom bootcmd to a distro_bootcmd Signed-off-by: Judith Mendez Signed-off-by: Bryan Brattlof --- include/configs/am62ax_evm.h | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/configs/am62ax_evm.h b/include/configs/am62ax_evm.h index 1bd900df7a9..ba67c98693b 100644 --- a/include/configs/am62ax_evm.h +++ b/include/configs/am62ax_evm.h @@ -9,7 +9,6 @@ #define __CONFIG_AM62AX_EVM_H #include -#include #include #include @@ -55,12 +54,36 @@ "${bootdir}/${name_fit}\0" \ "partitions=" PARTS_DEFAULT +#define BOOTENV_DEV_TI_MMC(devtypeu, devtypel, instance) \ + DEFAULT_MMC_TI_ARGS \ + EXTRA_ENV_AM62A7_BOARD_SETTINGS_MMC \ + "bootcmd_ti_mmc=" \ + "run findfdt; run envboot; run init_mmc;" \ + "run get_kern_mmc; run get_fdt_mmc;" \ + "run get_overlay_mmc;" \ + "run run_kern;\0" + +#define BOOTENV_DEV_NAME_TI_MMC(devtyeu, devtypel, instance) \ + "ti_mmc " + +#if CONFIG_IS_ENABLED(CMD_MMC) + #define BOOT_TARGET_MMC(func) \ + func(TI_MMC, ti_mmc, na) +#else + #define BOOT_TARGET_MMC(func) +#endif /* CONFIG_IS_ENABLED(CMD_MMC) */ + +#define BOOT_TARGET_DEVICES(func) \ + BOOT_TARGET_MMC(func) + +#include + /* Incorporate settings into the U-Boot environment */ #define CFG_EXTRA_ENV_SETTINGS \ DEFAULT_LINUX_BOOT_ENV \ - DEFAULT_MMC_TI_ARGS \ + DEFAULT_FIT_TI_ARGS \ EXTRA_ENV_AM62A7_BOARD_SETTINGS \ - EXTRA_ENV_AM62A7_BOARD_SETTINGS_MMC \ + BOOTENV /* Now for the remaining common defines */ #include -- cgit v1.2.3 From 221ae89bc8606d79c01a51acc30772e5892acc3d Mon Sep 17 00:00:00 2001 From: Bryan Brattlof Date: Fri, 23 Dec 2022 19:15:25 -0600 Subject: configs: am62a: use kernel fitImage when using secure bootflow In order to maintain the chain of trust, each stage of the boot process will first authenticate each binary it loads before continuing. To extend this to the kernal and its dtbs we can package the kernal and its dtbs into another fitImage for Uboot to authenticate and extend the chain of trust all the way to the kernel. When 'boot_fit' is set, indicating we're using the secure bootflow, look for and authenticate the kernel's fitImage. Signed-off-by: Judith Mendez Signed-off-by: Bryan Brattlof --- include/configs/am62ax_evm.h | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'include') diff --git a/include/configs/am62ax_evm.h b/include/configs/am62ax_evm.h index ba67c98693b..cdd639b9309 100644 --- a/include/configs/am62ax_evm.h +++ b/include/configs/am62ax_evm.h @@ -59,9 +59,14 @@ EXTRA_ENV_AM62A7_BOARD_SETTINGS_MMC \ "bootcmd_ti_mmc=" \ "run findfdt; run envboot; run init_mmc;" \ - "run get_kern_mmc; run get_fdt_mmc;" \ - "run get_overlay_mmc;" \ - "run run_kern;\0" + "if test ${boot_fit} -eq 1; then;" \ + "run get_fit_mmc; run get_overlaystring;" \ + "run run_fit;" \ + "else;" \ + "run get_kern_mmc; run get_fdt_mmc;" \ + "run get_overlay_mmc;" \ + "run run_kern;" \ + "fi;\0" #define BOOTENV_DEV_NAME_TI_MMC(devtyeu, devtypel, instance) \ "ti_mmc " -- cgit v1.2.3 From 40c69cc922c7874301bbb543508e5f591f4e30d4 Mon Sep 17 00:00:00 2001 From: Dzmitry Sankouski Date: Tue, 27 Dec 2022 22:47:08 +0300 Subject: board: starqltechn: enable serial console It was temporary disabled due to problem with boot. Issue was fixed in commit f5ed6c9ccf3e ("uart: sdm845: Fix debug UART pinmux") Signed-off-by: Dzmitry Sankouski --- include/configs/sdm845.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'include') diff --git a/include/configs/sdm845.h b/include/configs/sdm845.h index 9a4fe530a20..2211751b540 100644 --- a/include/configs/sdm845.h +++ b/include/configs/sdm845.h @@ -16,8 +16,9 @@ #define CFG_EXTRA_ENV_SETTINGS \ "bootm_size=0x4000000\0" \ "bootm_low=0x80000000\0" \ - "stdout=vidconsole\0" \ - "stderr=vidconsole\0" \ + "stdin=serial\0" \ + "stdout=serial,vidconsole\0" \ + "stderr=serial,vidconsole\0" \ "preboot=source $prevbl_initrd_start_addr:prebootscript\0" \ "bootcmd=source $prevbl_initrd_start_addr:bootscript\0" -- cgit v1.2.3