diff options
author | Jun Nie <jun.nie@linaro.org> | 2021-03-11 17:03:30 +0800 |
---|---|---|
committer | Jun Nie <jun.nie@linaro.org> | 2021-03-11 22:19:14 +0800 |
commit | 98ffa6a022da3543589284787660b94cdfedb8c6 (patch) | |
tree | a3d567e0d0977074fdabb21153c9ebf3372e9205 /meta-lmp-bsp/recipes-bsp | |
parent | b8db1a8fb631dfb85b5fc1a0ec3e519f79c912b7 (diff) |
bsp: Add Advantech imx8mp rsb3720 platform
Signed-off-by: Jun Nie <jun.nie@linaro.org>
Diffstat (limited to 'meta-lmp-bsp/recipes-bsp')
10 files changed, 255 insertions, 2 deletions
diff --git a/meta-lmp-bsp/recipes-bsp/device-tree/lmp-device-tree.bbappend b/meta-lmp-bsp/recipes-bsp/device-tree/lmp-device-tree.bbappend index 95cca16..992a91c 100644 --- a/meta-lmp-bsp/recipes-bsp/device-tree/lmp-device-tree.bbappend +++ b/meta-lmp-bsp/recipes-bsp/device-tree/lmp-device-tree.bbappend @@ -17,3 +17,7 @@ SRC_URI_append_imx8mpevk = " \ file://freescale_fsl-imx8mp-evk.dts \ " COMPATIBLE_MACHINE_imx8mpevk = ".*" +SRC_URI_append_imx8mprsb3720 = " \ + file://freescale_fsl-imx8mprsb3720.dts \ +" +COMPATIBLE_MACHINE_imx8mprsb3720 = ".*" diff --git a/meta-lmp-bsp/recipes-bsp/device-tree/lmp-device-tree/freescale_fsl-imx8mprsb3720.dts b/meta-lmp-bsp/recipes-bsp/device-tree/lmp-device-tree/freescale_fsl-imx8mprsb3720.dts new file mode 100644 index 0000000..a1b702c --- /dev/null +++ b/meta-lmp-bsp/recipes-bsp/device-tree/lmp-device-tree/freescale_fsl-imx8mprsb3720.dts @@ -0,0 +1 @@ +#include "imx8mp-rsb3720-a1.dts" diff --git a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-base-scr/imx8mprsb3720/boot.cmd b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-base-scr/imx8mprsb3720/boot.cmd new file mode 100644 index 0000000..c932969 --- /dev/null +++ b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-base-scr/imx8mprsb3720/boot.cmd @@ -0,0 +1,3 @@ +fatload mmc ${emmc_dev}:1 ${loadaddr} /uEnv.txt +env import -t ${loadaddr} ${filesize} +run bootcmd diff --git a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-base-scr/imx8mprsb3720/uEnv.txt.in b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-base-scr/imx8mprsb3720/uEnv.txt.in new file mode 100644 index 0000000..8f07bf9 --- /dev/null +++ b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-base-scr/imx8mprsb3720/uEnv.txt.in @@ -0,0 +1,7 @@ +devnum=2 +devtype=mmc +bootcmd_args=setenv bootargs console=tty1 console=${console} root=/dev/mmcblk2p2 rootfstype=ext4 rootwait rw +bootcmd_dtb=fatload ${devtype} ${devnum}:1 ${fdt_addr} ${fdt_file} +bootcmd_load_k=fatload ${devtype} ${devnum}:1 ${loadaddr} ${image} +bootcmd_run=booti ${loadaddr} - ${fdt_addr} +bootcmd=run bootcmd_args; run bootcmd_dtb; run bootcmd_load_k; run bootcmd_run diff --git a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio-mfgtool/imx8mprsb3720/lmp.cfg b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio-mfgtool/imx8mprsb3720/lmp.cfg new file mode 100644 index 0000000..c39464d --- /dev/null +++ b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio-mfgtool/imx8mprsb3720/lmp.cfg @@ -0,0 +1,98 @@ +CONFIG_SPL_DM=y +CONFIG_SPL_FIT=y +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_LOAD_FIT=y +# CONFIG_SPL_FIT_IMAGE_TINY is not set +CONFIG_SPL_OF_CONTROL=y +CONFIG_SPL_CRYPTO_SUPPORT=y +CONFIG_SPL_HASH_SUPPORT=y +CONFIG_SPL_USB_HOST_SUPPORT=y +CONFIG_SPL_USB_GADGET=y +CONFIG_SPL_USB_SDP_SUPPORT=y +CONFIG_RSA=y +CONFIG_HASH=y +# CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set +# CONFIG_SPL_EFI_PARTITION is not set +# CONFIG_SPL_DM_USB is not set +# CONFIG_SPL_PARTITION_UUIDS is not set +# CONFIG_SPL_DOS_PARTITION is not set +# CONFIG_CMD_DEKBLOB is not set +CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_FIT=y +CONFIG_FIT_SIGNATURE=y +CONFIG_FIT_SIGNATURE_STRICT=y +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_FIT_SIGNATURE_STRICT=y +CONFIG_FIT_VERBOSE=y +# CONFIG_LEGACY_IMAGE_FORMAT is not set +CONFIG_IMX_HAB=y +# CONFIG_SPL_IMX_HAB is not set +CONFIG_PARTITION_UUIDS=y +CONFIG_TEE=y +CONFIG_OPTEE=y +CONFIG_FIOVB=y +CONFIG_CMD_FIOVB=y +CONFIG_CMD_XIMG=y +CONFIG_SUPPORT_EMMC_RPMB=y +CONFIG_USB=y +CONFIG_DM_USB=y +CONFIG_USB_FUNCTION_FASTBOOT=y +CONFIG_USB_GADGET_MASS_STORAGE=y +CONFIG_USB_GADGET_MANUFACTURER="FSL" +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 +CONFIG_FASTBOOT_FLASH=y +CONFIG_FASTBOOT_UUU_SUPPORT=y +CONFIG_FASTBOOT_BUF_ADDR=0x42800000 +CONFIG_FASTBOOT_BUF_SIZE=0x40000000 +CONFIG_FSL_FASTBOOT_BOOTLOADER2=y +CONFIG_FSL_FASTBOOT_BOOTLOADER2_OFFSET=0x300 +CONFIG_BOOTDELAY=-2 +CONFIG_USE_BOOTCOMMAND=y +CONFIG_BOOTCOMMAND="reset" +CONFIG_ENV_IS_NOWHERE=y +# CONFIG_ENV_IS_IN_MMC is not set +# CONFIG_ANDROID_BOOT_IMAGE is not set +# CONFIG_SPL_DM_MMC is not set +# CONFIG_SPL_MMC_SUPPORT is not set +# CONFIG_SPL_BLK is not set +# CONFIG_NET is not set +# CONFIG_CMD_NET is not set +# CONFIG_CMD_DHCP is not set +# CONFIG_CMD_BOOTP is not set +# CONFIG_CMD_TFTPBOOT is not set +# CONFIG_CMD_NFS is not set +# CONFIG_CMD_SYSBOOT is not set +# CONFIG_CMD_BDI is not set +# CONFIG_CMD_BMODE is not set +# CONFIG_CMD_PXE is not set +# CONFIG_CMD_SATA is not set +# CONFIG_CMD_USB_MASS_STORAGE is not set +# CONFIG_CMD_BOOTD is not set +# CONFIG_CMD_BOOTZ is not set +# CONFIG_CMD_SAVEENV is not set +# CONFIG_CMD_EXPORTENV is not set +# CONFIG_CMD_IMPORTENV is not set +# CONFIG_CMD_EDITENV is not set +# CONFIG_EFI_LOADER is not set +# CONFIG_SATA is not set +# CONFIG_DWC_AHSATA is not set +# CONFIG_DM_SCSI is not set +# CONFIG_USB_STORAGE is not set +# CONFIG_USB_KEYBOARD is not set +# CONFIG_USB_HOST_ETHER is not set +# CONFIG_BOOTM_NETBSD is not set +# CONFIG_BOOTM_PLAN9 is not set +# CONFIG_BOOTM_RTEMS is not set +# CONFIG_BOOTM_VXWORKS is not set +# CONFIG_DISTRO_DEFAULTS is not set +# CONFIG_CMD_ELF is not set +# CONFIG_CMD_IMI is not set +# CONFIG_CMD_LOADB is not set +# CONFIG_CMD_LOADS is not set +# CONFIG_CMD_FLASH is not set +# CONFIG_DM_VIDEO is not set +# CONFIG_VIDEO_BRIDGE is not set +# CONFIG_VIDEO_SEC_MIPI_DSI is not set +# CONFIG_VIDEO_IMX_SEC_DSI is not set +# CONFIG_VIDEO_LINK is not set diff --git a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio/imx8mprsb3720/fw_env.config b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio/imx8mprsb3720/fw_env.config new file mode 100644 index 0000000..60b4980 --- /dev/null +++ b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio/imx8mprsb3720/fw_env.config @@ -0,0 +1 @@ +/mnt/boot/uboot.env 0x0000 0x4000 diff --git a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio/imx8mprsb3720/lmp-base.cfg b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio/imx8mprsb3720/lmp-base.cfg new file mode 100644 index 0000000..a4e46f1 --- /dev/null +++ b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio/imx8mprsb3720/lmp-base.cfg @@ -0,0 +1,26 @@ +CONFIG_SPL_DM=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_SPL_FIT=y +CONFIG_SPL_LOAD_FIT=y +# CONFIG_SPL_FIT_IMAGE_TINY is not set +# CONFIG_CMD_DEKBLOB is not set +# CONFIG_SPL_DM_USB is not set +CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_FIT=y +CONFIG_FIT_SIGNATURE=y +CONFIG_FIT_VERBOSE=y +CONFIG_LEGACY_IMAGE_FORMAT=y +CONFIG_PARTITION_UUIDS=y +CONFIG_CMD_XIMG=y +CONFIG_SUPPORT_EMMC_RPMB=y +CONFIG_SUPPORT_EMMC_BOOT=y +# CONFIG_ENV_IS_IN_MMC is not set +CONFIG_ENV_IS_IN_FAT=y +CONFIG_ENV_FAT_INTERFACE="mmc" +CONFIG_ENV_FAT_DEVICE_AND_PART="2:1" +CONFIG_ENV_SIZE=0x4000 +CONFIG_CMD_IMPORTENV=y +CONFIG_CMD_EDITENV=y +CONFIG_CMD_SAVEENV=y +CONFIG_USE_BOOTCOMMAND=y +CONFIG_BOOTCOMMAND="fatload mmc ${emmc_dev}:1 ${loadaddr} /boot.scr; source ${loadaddr}; reset" diff --git a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio/imx8mprsb3720/lmp.cfg b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio/imx8mprsb3720/lmp.cfg new file mode 100644 index 0000000..5bf6561 --- /dev/null +++ b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio/imx8mprsb3720/lmp.cfg @@ -0,0 +1,92 @@ +CONFIG_SPL_DM=y +CONFIG_SPL_OF_CONTROL=y +CONFIG_SPL_FIT=y +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_LOAD_FIT=y +# CONFIG_SPL_FIT_IMAGE_TINY is not set +CONFIG_SPL_CRYPTO_SUPPORT=y +CONFIG_SPL_HASH_SUPPORT=y +CONFIG_RSA=y +CONFIG_HASH=y +# CONFIG_SPL_LEGACY_IMAGE_SUPPORT is not set +# CONFIG_SPL_EFI_PARTITION is not set +# CONFIG_SPL_PARTITION_UUIDS is not set +# CONFIG_SPL_DOS_PARTITION is not set +# CONFIG_SPL_DM_USB is not set +# CONFIG_SPL_USB_HOST_SUPPORT is not set +# CONFIG_SPL_USB_GADGET is not set +# CONFIG_SPL_USB_SDP_SUPPORT is not set +# CONFIG_CMD_DEKBLOB is not set +CONFIG_OF_LIBFDT_OVERLAY=y +CONFIG_FIT=y +CONFIG_FIT_SIGNATURE=y +CONFIG_FIT_SIGNATURE_STRICT=y +CONFIG_SPL_FIT_SIGNATURE=y +CONFIG_SPL_FIT_SIGNATURE_STRICT=y +CONFIG_FIT_VERBOSE=y +# CONFIG_LEGACY_IMAGE_FORMAT is not set +CONFIG_PARTITION_UUIDS=y +CONFIG_TEE=y +CONFIG_OPTEE=y +CONFIG_FIOVB=y +CONFIG_CMD_FIOVB=y +CONFIG_CMD_XIMG=y +CONFIG_SUPPORT_EMMC_RPMB=y +CONFIG_SUPPORT_EMMC_BOOT=y +# CONFIG_ENV_IS_IN_MMC is not set +CONFIG_ENV_IS_IN_FAT=y +CONFIG_ENV_FAT_INTERFACE="mmc" +CONFIG_ENV_FAT_DEVICE_AND_PART="2:1" +CONFIG_ENV_SIZE=0x4000 +CONFIG_CMD_IMPORTENV=y +CONFIG_CMD_EDITENV=y +CONFIG_CMD_SAVEENV=y +CONFIG_BOOTCOUNT_LIMIT=y +CONFIG_BOOTCOUNT_ENV=y +CONFIG_BOOTDELAY=-2 +CONFIG_USE_BOOTCOMMAND=y +CONFIG_BOOTCOMMAND="fatload mmc 2:1 ${loadaddr} /boot.itb; setenv verify 1; source ${loadaddr}; reset" +# CONFIG_SPL_DM_MMC is not set +# CONFIG_SPL_BLK is not set +# CONFIG_ANDROID_BOOT_IMAGE is not set +# CONFIG_CMD_NFS is not set +# CONFIG_CMD_SYSBOOT is not set +# CONFIG_CMD_BDI is not set +# CONFIG_CMD_BMODE is not set +# CONFIG_CMD_PXE is not set +# CONFIG_CMD_SATA is not set +# CONFIG_CMD_USB is not set +# CONFIG_CMD_USB_MASS_STORAGE is not set +# CONFIG_CMD_USB_SDP is not set +# CONFIG_CMD_BOOTD is not set +# CONFIG_CMD_BOOTZ is not set +# CONFIG_CMD_FUSE is not set +# CONFIG_CMD_GPIO is not set +# CONFIG_CMD_I2C is not set +# CONFIG_EFI_LOADER is not set +# CONFIG_EFI_PARTITION is not set +# CONFIG_EXT4_WRITE is not set +# CONFIG_SATA is not set +# CONFIG_DWC_AHSATA is not set +# CONFIG_DM_SCSI is not set +# CONFIG_USB_FUNCTION_FASTBOOT is not set +# CONFIG_FASTBOOT is not set +# CONFIG_USB is not set +# CONFIG_USB_STORAGE is not set +# CONFIG_USB_KEYBOARD is not set +# CONFIG_USB_HOST_ETHER is not set +# CONFIG_USB_TCPC is not set +# CONFIG_BOOTM_NETBSD is not set +# CONFIG_BOOTM_PLAN9 is not set +# CONFIG_BOOTM_RTEMS is not set +# CONFIG_BOOTM_VXWORKS is not set +# CONFIG_CMD_ELF is not set +# CONFIG_CMD_IMI is not set +# CONFIG_CMD_LOADB is not set +# CONFIG_CMD_LOADS is not set +# CONFIG_CMD_FLASH is not set +# CONFIG_DM_VIDEO is not set +# CONFIG_VIDEO_BRIDGE is not set +# CONFIG_VIDEO_SEC_MIPI_DSI is not set +# CONFIG_VIDEO_IMX_SEC_DSI is not set +# CONFIG_VIDEO_LINK is not set diff --git a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio_%.bbappend b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio_%.bbappend index 11329be..4b8bbbc 100644 --- a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio_%.bbappend +++ b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-fio_%.bbappend @@ -4,8 +4,8 @@ BOOT_TOOLS_mx8 = "imx-boot-tools" SRC_URI_remove_mx8mp = "git://github.com/foundriesio/u-boot.git;branch=${SRCBRANCH}" SRC_URI_prepend_mx8mp = "git://git.linaro.org/people/jun.nie/u-boot.git;protocol=https;branch=${SRCBRANCH} " -SRCREV_mx8mp = "ab3269e5f5210dd11f32ca8fabe78693d4c0998e" -SRCBRANCH_mx8mp = "rel_imx_5.4.70_2.3.0-imx8mp-2020.04+efi+fio" +SRCREV_mx8mp = "c872ea56226373dbfeb4a1ca7fb48aa5b53dcb5b" +SRCBRANCH_mx8mp = "rel_imx_5.4.70_2.3.0-imx8mp-2020.04+efi+fio+advant" # From u-boot-imx/meta-freescale do_deploy_append_mx8m() { diff --git a/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-ostree-scr-fit/imx8mprsb3720/boot.cmd b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-ostree-scr-fit/imx8mprsb3720/boot.cmd new file mode 100644 index 0000000..85ab4cf --- /dev/null +++ b/meta-lmp-bsp/recipes-bsp/u-boot/u-boot-ostree-scr-fit/imx8mprsb3720/boot.cmd @@ -0,0 +1,21 @@ +echo "Using freescale_${fdt_file}" + +# Default boot type and device +setenv bootlimit 3 +setenv devtype mmc +setenv devnum 2 + +setenv bootcmd_resetvars 'setenv kernel_image; setenv bootargs; setenv kernel_image2; setenv bootargs2' +setenv bootcmd_otenv 'run bootcmd_resetvars; ext4load ${devtype} ${devnum}:2 ${loadaddr} /boot/loader/uEnv.txt; env import -t ${loadaddr} ${filesize}' +setenv bootcmd_load_f 'ext4load ${devtype} ${devnum}:2 ${initrd_addr} "/boot"${kernel_image}' +setenv bootcmd_run 'bootm ${initrd_addr}#conf@freescale_${fdt_file}' +setenv bootcmd_rollbackenv 'setenv kernel_image ${kernel_image2}; setenv bootargs ${bootargs2}' +setenv bootcmd_set_rollback 'if test ! "${rollback}" = "1"; then setenv rollback 1; setenv upgrade_available 0; saveenv; fi' +setenv bootostree 'run bootcmd_load_f; run bootcmd_run' +setenv altbootcmd 'run bootcmd_otenv; run bootcmd_set_rollback; if test -n "${kernel_image2}"; then run bootcmd_rollbackenv; fi; run bootostree; reset' + +if test ! -e ${devtype} ${devnum}:1 uboot.env; then saveenv; fi + +if test "${rollback}" = "1"; then run altbootcmd; else run bootcmd_otenv; run bootostree; if test ! "${upgrade_available}" = "1"; then setenv upgrade_available 1; saveenv; fi; reset; fi + +reset |