Updated kernel/u-boot for MCIMX7SABRE board (#2906)

* Updated kernel/u-boot for MCIMX7SABRE board

Supporing 'current' and 'legacy' branches for MCIMX7SABRE board

current branch:
   u-boot: imx_v2020.04_5.4.70_2.3.0
   kernel: imx_5.4.70_2.3.0

legacy branch:
   u-boot: imx_v2018.03_4.14.98_2.0.0_ga
   kernel: imx_4.14.98_2.0.0_ga

* Update kernel config with few additional options like zram, bonding, ... just a few to keep minimum consistency over kernels.

Co-authored-by: Igor Pecovnik <igor.pecovnik@gmail.com>
This commit is contained in:
andpp
2021-06-20 01:06:29 -07:00
committed by GitHub
parent f3dd19f890
commit 27536347d9
10 changed files with 6832 additions and 3 deletions

View File

@@ -2,4 +2,4 @@
BOARD_NAME="MCIMX7SABRE"
BOARDFAMILY="imx7d"
BOOTCONFIG="imx_v7_defconfig"
KERNEL_TARGET="legacy"
KERNEL_TARGET="legacy,current"

File diff suppressed because it is too large Load Diff

View File

@@ -1,6 +1,5 @@
BOOTSOURCE='https://source.codeaurora.org/external/imx/uboot-imx'
BOOTDIR='u-boot-sabre'
BOOTBRANCH='branch:imx_v2018.03_4.14.98_2.0.0_ga'
BOOTCONFIG="mx7dsabresd_defconfig"
#BOOTSCRIPT='boot-imx7d.cmd:boot.cmd'
BOOTENV_FILE='imx7d.txt'
@@ -9,11 +8,20 @@ UBOOT_TARGET_MAP=";;u-boot-dtb.imx"
case $BRANCH in
legacy|default)
legacy)
KERNELSOURCE='https://source.codeaurora.org/external/imx/linux-imx'
KERNELBRANCH='branch:imx_4.14.98_2.0.0_ga'
KERNELDIR='linux-imx7'
BOOTBRANCH='branch:imx_v2018.03_4.14.98_2.0.0_ga'
BOOTPATCHDIR="u-boot-imx7d-legacy"
;;
current|default)
KERNELSOURCE='https://source.codeaurora.org/external/imx/linux-imx'
KERNELBRANCH='branch:imx_5.4.70_2.3.0'
KERNELDIR='linux-imx7-current'
BOOTBRANCH='branch:imx_v2020.04_5.4.70_2.3.0'
BOOTPATCHDIR="u-boot-imx7d-current"
;;
esac

View File

@@ -0,0 +1,73 @@
diff --git a/include/configs/mx7dsabresd.h b/include/configs/mx7dsabresd.h
index 5a2fef79..0df9d538 100644
--- a/include/configs/mx7dsabresd.h
+++ b/include/configs/mx7dsabresd.h
@@ -110,8 +110,8 @@
CONFIG_MFG_ENV_SETTINGS \
TEE_ENV \
CONFIG_DFU_ENV_SETTINGS \
- "script=boot.scr\0" \
- "image=zImage\0" \
+ "script=/boot/boot.scr\0" \
+ "image=/boot/zImage\0" \
"console=ttymxc0\0" \
"fdt_high=0xffffffff\0" \
"initrd_high=0xffffffff\0" \
@@ -124,17 +124,17 @@
"splashimage=0x8c000000\0" \
"mmcdev="__stringify(CONFIG_SYS_MMC_ENV_DEV)"\0" \
"mmcpart=" __stringify(CONFIG_SYS_MMC_IMG_LOAD_PART) "\0" \
- "mmcroot=" CONFIG_MMCROOT " rootwait rw\0" \
+ "mmcroot=/dev/mmcblk0p1 rootwait rw\0" \
"mmcautodetect=yes\0" \
"mmcargs=setenv bootargs console=${console},${baudrate} " \
"root=${mmcroot}\0" \
"loadbootscript=" \
- "fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
+ "ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${script};\0" \
"bootscript=echo Running bootscript from mmc ...; " \
"source\0" \
- "loadimage=fatload mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
- "loadfdt=fatload mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
- "loadtee=fatload mmc ${mmcdev}:${mmcpart} ${tee_addr} ${tee_file}\0" \
+ "loadimage=ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${image}\0" \
+ "loadfdt=ext4load mmc ${mmcdev}:${mmcpart} ${fdt_addr} ${fdt_file}\0" \
+ "loadtee=ext4load mmc ${mmcdev}:${mmcpart} ${tee_addr} ${tee_file}\0" \
"mmcboot=echo Booting from mmc ...; " \
"run mmcargs; " \
"if test ${tee} = yes; then " \
@@ -186,13 +186,18 @@
"fi;\0" \
"findfdt="\
"if test $fdt_file = undefined; then " \
- "setenv fdt_file imx7d-sdb.dtb; " \
+ "setenv fdt_file /boot/dtb/imx7d-sdb.dtb; " \
+ "fi;\0" \
+ "loadenv="\
+ "if ext4load mmc ${mmcdev}:${mmcpart} ${loadaddr} /boot/armbianEnv.txt; then " \
+ "env import -t ${load_addr} ${filesize};" \
"fi;\0" \
#define CONFIG_BOOTCOMMAND \
"run findfdt;" \
"mmc dev ${mmcdev};" \
"mmc dev ${mmcdev}; if mmc rescan; then " \
+ "run loadenv;"\
"if run loadbootscript; then " \
"run bootscript; " \
"else " \
@@ -258,11 +263,13 @@
#define CONFIG_SYS_FSL_USDHC_NUM 2
#endif
+#define AVB_AB_I_UNDERSTAND_LIBAVB_AB_IS_DEPRECATED
+
/* MMC Config*/
#define CONFIG_SYS_FSL_ESDHC_ADDR 0
#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC1 */
#define CONFIG_SYS_MMC_ENV_PART 0 /* user area */
-#define CONFIG_MMCROOT "/dev/mmcblk0p2" /* USDHC1 */
+#define CONFIG_MMCROOT "/dev/mmcblk0p1" /* USDHC1 */
/* USB Configs */
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)

View File

@@ -0,0 +1,13 @@
diff --git a/configs/mx7dsabresd_defconfig b/configs/mx7dsabresd_defconfig
index 18b02f4..e8d7105 100644
--- a/configs/mx7dsabresd_defconfig
+++ b/configs/mx7dsabresd_defconfig
@@ -15,7 +15,7 @@ CONFIG_CMD_BOOTZ=y
# CONFIG_CMD_IMLS is not set
# CONFIG_CMD_XIMG is not set
# CONFIG_CMD_EXPORTENV is not set
-# CONFIG_CMD_IMPORTENV is not set
+CONFIG_CMD_IMPORTENV=y
CONFIG_CMD_MEMTEST=y
CONFIG_CMD_DFU=y
CONFIG_CMD_GPIO=y

View File

@@ -0,0 +1,16 @@
diff --git a/board/freescale/common/mmc.c b/board/freescale/common/mmc.c
index 9fc3e68..f150892 100644
--- a/board/freescale/common/mmc.c
+++ b/board/freescale/common/mmc.c
@@ -40,11 +40,6 @@ void board_late_mmc_env_init(void)
env_set_ulong("mmcdev", dev_no);
- /* Set mmcblk env */
- sprintf(mmcblk, "/dev/mmcblk%dp2 rootwait rw",
- mmc_map_to_kernel_blk(dev_no));
- env_set("mmcroot", mmcblk);
-
sprintf(cmd, "mmc dev %d", dev_no);
run_command(cmd, 0);
}