* [Buildroot] [PATCH 1/2] package/freescale-imx/imx-m4-firmware: new package @ 2019-10-29 17:01 Fabrice Goucem 2019-10-29 17:01 ` [Buildroot] [PATCH 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem 2019-10-30 13:40 ` [Buildroot] [PATCH v2 1/3] package/freescale-imx/imx-m4-firmware: new package Fabrice Goucem 0 siblings, 2 replies; 21+ messages in thread From: Fabrice Goucem @ 2019-10-29 17:01 UTC (permalink / raw) To: buildroot New package to download and install i.MX Cortex-M4 firmware for following SoCs: * i.MX7D * i.MX8M * i.MX8MM * i.MX8QXP Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> Tested-by: Julien Olivain <julien.olivain@nxp.com> --- DEVELOPERS | 3 + board/freescale/common/imx/post-image.sh | 14 ++++- package/freescale-imx/Config.in | 8 +++ .../freescale-imx/imx-m4-firmware/Config.in | 11 ++++ .../imx-m4-firmware/imx-m4-firmware.hash | 7 +++ .../imx-m4-firmware/imx-m4-firmware.mk | 61 +++++++++++++++++++ 6 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 package/freescale-imx/imx-m4-firmware/Config.in create mode 100644 package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash create mode 100644 package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk diff --git a/DEVELOPERS b/DEVELOPERS index 6f6b768e0d..47404057b4 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -878,6 +878,9 @@ F: package/tinydtls/ F: package/tinymembench/ F: package/whois/ +N: Fabrice Goucem <fabrice.goucem@nxp.com> +F: package/freescale-imx/imx-m4-firmware/ + N: Falco Hyfing <hyfinglists@gmail.com> F: package/python-pymodbus/ diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh index 19d8fffb63..f9851c2d3b 100755 --- a/board/freescale/common/imx/post-image.sh +++ b/board/freescale/common/imx/post-image.sh @@ -30,6 +30,18 @@ linux_image() fi } +# +# m4_image prints all available M4 firmware file names for the genimage +# configuration file +# +m4_image() +{ + if grep -Eq "^BR2_PACKAGE_IMX_M4_FIRMWARE=y$" ${BR2_CONFIG}; then + echo -n ", " + for f in $(ls ${BINARIES_DIR}/m4_*); do echo -n "$(basename $f), "; done + fi +} + genimage_type() { if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then @@ -75,7 +87,7 @@ uboot_image() main() { - local FILES="$(dtb_list) $(linux_image)" + local FILES="$(dtb_list) $(linux_image) $(m4_image)" local IMXOFFSET="$(imx_offset)" local UBOOTBIN="$(uboot_image)" local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in index f010aab87b..76694bc788 100644 --- a/package/freescale-imx/Config.in +++ b/package/freescale-imx/Config.in @@ -83,10 +83,18 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM +config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 + bool + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM + source "package/freescale-imx/imx-alsa-plugins/Config.in" source "package/freescale-imx/imx-codec/Config.in" source "package/freescale-imx/imx-kobs/Config.in" source "package/freescale-imx/imx-lib/Config.in" +source "package/freescale-imx/imx-m4-firmware/Config.in" source "package/freescale-imx/imx-m4fwloader/Config.in" source "package/freescale-imx/imx-parser/Config.in" source "package/freescale-imx/imx-uuc/Config.in" diff --git a/package/freescale-imx/imx-m4-firmware/Config.in b/package/freescale-imx/imx-m4-firmware/Config.in new file mode 100644 index 0000000000..2c318e5dfc --- /dev/null +++ b/package/freescale-imx/imx-m4-firmware/Config.in @@ -0,0 +1,11 @@ +comment "imx-m4-firmware needs an i.MX platform with Cortex-M4" + depends on !BR2_PACKAGE_FREESCALE_IMX_HAS_M4 + +config BR2_PACKAGE_IMX_M4_FIRMWARE + bool "imx-m4-firmware" + depends on BR2_PACKAGE_FREESCALE_IMX_HAS_M4 + help + Cortex-M4 firmware blobs for the Freescale i.MX SoCs. + + This library is provided by Freescale as-is and doesn't have + an upstream. diff --git a/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash new file mode 100644 index 0000000000..fdc2c23c9f --- /dev/null +++ b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash @@ -0,0 +1,7 @@ +# locally computed +sha256 cc00d3b936d49b2794a2a99e10129437e70caba3fd26b8379b8c50dd22f73254 imx7d-sabresd-m4-freertos-1.0.1.bin +sha256 4e41e270506870e0fd2d53e3d69afdcf6d613d099b0da5c516a512944c5c12c3 imx8mm-m4-demo-2.5.0.bin +sha256 fd441e75395b0c6f90626c883ee8a93406b14e7d55adc7925116254394bb7ad8 imx8mq-m4-demo-2.3.0.bin +sha256 4e83d60e27cd8ad67d4174ad3082a5f4a06b7df93571cfd2274615cbdf66eb6c imx8qx-m4-demo-2.5.0.bin + +# no hash for license file as it is different for each package listed above diff --git a/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk new file mode 100644 index 0000000000..435592afc0 --- /dev/null +++ b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# imx-m4-firmware +# +################################################################################ + +IMX_M4_FIRMWARE_SITE = $(FREESCALE_IMX_SITE) + +IMX_M4_FIRMWARE_LICENSE = NXP Semiconductor Software License Agreement +IMX_M4_FIRMWARE_LICENSE_FILES = COPYING +IMX_M4_FIRMWARE_REDISTRIBUTE = NO + +define IMX_M4_FIRMWARE_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_M4_FIRMWARE_DL_DIR)/$(IMX_M4_FIRMWARE_SOURCE)) +endef + +# Note: firmware names are copied to binaries directory with an "m4_" prefix, for easier post image scripting + +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7),y) +IMX_M4_FIRMWARE_VERSION = 1.0.1 +IMX_M4_FIRMWARE_SOURCE = imx7d-sabresd-m4-freertos-$(IMX_M4_FIRMWARE_VERSION).bin +IMX_M4_FIRMWARE_INSTALL_IMAGES = YES +define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS + cp $(@D)/imx7d_sabresd_m4_TCM_helloworld.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_helloworld.bin + cp $(@D)/imx7d_sabresd_m4_TCM_mcctty.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_mcctty.bin + cp $(@D)/imx7d_sabresd_m4_TCM_Pingpang.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_Pingpang.bin +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y) +IMX_M4_FIRMWARE_VERSION = 2.5.0 +IMX_M4_FIRMWARE_SOURCE = imx8qx-m4-demo-$(IMX_M4_FIRMWARE_VERSION).bin +IMX_M4_FIRMWARE_INSTALL_IMAGES = YES +define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS + cp $(@D)/imx8qx_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_hello_world.bin + cp $(@D)/imx8qx_m4_TCM_power_mode_switch.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_power_mode_switch.bin + cp $(@D)/imx8qx_m4_TCM_rear_view_camera.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rear_view_camera.bin + cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin + cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin + cp $(@D)/imx8qx_m4_TCM_srtm_demo.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_srtm_demo.bin +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M),y) +IMX_M4_FIRMWARE_VERSION = 2.3.0 +IMX_M4_FIRMWARE_SOURCE = imx8mq-m4-demo-$(IMX_M4_FIRMWARE_VERSION).bin +IMX_M4_FIRMWARE_INSTALL_IMAGES = YES +define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS + cp $(@D)/imx8mq_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_hello_world.bin + cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin + cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM),y) +IMX_M4_FIRMWARE_VERSION = 2.5.0 +IMX_M4_FIRMWARE_SOURCE = imx8mm-m4-demo-$(IMX_M4_FIRMWARE_VERSION).bin +IMX_M4_FIRMWARE_INSTALL_IMAGES = YES +define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS + cp $(@D)/imx8mm_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_hello_world.bin + cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin + cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin + cp $(@D)/imx8mm_m4_TCM_sai_low_power_audio.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_sai_low_power_audio.bin +endef +endif + +$(eval $(generic-package)) -- 2.23.0 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH 2/2] configs/freescale_imx7ulpevk: new defconfig 2019-10-29 17:01 [Buildroot] [PATCH 1/2] package/freescale-imx/imx-m4-firmware: new package Fabrice Goucem @ 2019-10-29 17:01 ` Fabrice Goucem 2019-10-29 18:09 ` Fabio Estevam 2019-10-30 13:40 ` [Buildroot] [PATCH v2 1/3] package/freescale-imx/imx-m4-firmware: new package Fabrice Goucem 1 sibling, 1 reply; 21+ messages in thread From: Fabrice Goucem @ 2019-10-29 17:01 UTC (permalink / raw) To: buildroot Add basic support for NXP's i.MX7 ULP EVK board: https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/evaluation-kit-for-the-i.mx-7ulp-applications-processor:MCIMX7ULP-EVK Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> --- .gitlab-ci.yml | 1 + DEVELOPERS | 2 + board/freescale/imx7ulpevk/readme.txt | 65 +++++++++++++++++++ configs/freescale_imx7ulpevk_defconfig | 28 ++++++++ package/freescale-imx/Config.in | 8 ++- .../imx-m4-firmware/imx-m4-firmware.hash | 1 + .../imx-m4-firmware/imx-m4-firmware.mk | 13 +++- 7 files changed, 116 insertions(+), 2 deletions(-) create mode 100644 board/freescale/imx7ulpevk/readme.txt create mode 100644 configs/freescale_imx7ulpevk_defconfig diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d71257a20..74ee5b732e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -177,6 +177,7 @@ freescale_imx6qsabreauto_defconfig: { extends: .defconfig } freescale_imx6qsabresd_defconfig: { extends: .defconfig } freescale_imx6sxsabresd_defconfig: { extends: .defconfig } freescale_imx7dsabresd_defconfig: { extends: .defconfig } +freescale_imx7ulpevk_defconfig: { extends: .defconfig } freescale_imx8mmevk_defconfig: { extends: .defconfig } freescale_imx8mqevk_defconfig: { extends: .defconfig } freescale_imx8qxpmek_defconfig: { extends: .defconfig } diff --git a/DEVELOPERS b/DEVELOPERS index 47404057b4..9735edd704 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -879,6 +879,8 @@ F: package/tinymembench/ F: package/whois/ N: Fabrice Goucem <fabrice.goucem@nxp.com> +F: board/freescale/imx7ulpevk/ +F: configs/freescale_imx7ulpevk_defconfig F: package/freescale-imx/imx-m4-firmware/ N: Falco Hyfing <hyfinglists@gmail.com> diff --git a/board/freescale/imx7ulpevk/readme.txt b/board/freescale/imx7ulpevk/readme.txt new file mode 100644 index 0000000000..6d4ddd86d1 --- /dev/null +++ b/board/freescale/imx7ulpevk/readme.txt @@ -0,0 +1,65 @@ +**************************** +Freescale i.MX7ULP EVK board +**************************** + +This file documents the Buildroot support for the Freescale i.MX7ULP EVK board. + +Build +===== + +First, configure Buildroot for your i.MX7ULP EVK board: + + make freescale_imx7ulpevk_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - boot.vfat + - imx7ulp-evkb.dtb + - m4_imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img + - m4_imx7ulp_m4_demo.img + - m4_imx7ulp_rpmsg_lite_pingpong_rtos.img + - m4_imx7ulp_rpmsg_lite_str_echo_rtos.img + - m4_imx7ulp_wireless_uart_bridge.img + - rootfs.ext2 + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot.imx + - zImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=./output/images/sdcard.img of=/dev/<your-sd-device> + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template. + +Boot the i.MX7ULP EVK board +=========================== + +To boot your newly created system (refer to the i.MX 7ULP EVK Quick Start Guide [1] for guidance): +- insert the SD card in the micro SD slot of the board; +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! + +References +========== +[1] https://www.nxp.com/docs/en/user-guide/IMX7ULPQSG.pdf diff --git a/configs/freescale_imx7ulpevk_defconfig b/configs/freescale_imx7ulpevk_defconfig new file mode 100644 index 0000000000..243a5c66f1 --- /dev/null +++ b/configs/freescale_imx7ulpevk_defconfig @@ -0,0 +1,28 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.0.0" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7ulp-evkb" +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP=y +BR2_PACKAGE_IMX_M4_FIRMWARE=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx7ulp_evk" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.0.0" +BR2_TARGET_UBOOT_NEEDS_DTC=y +# BR2_TARGET_UBOOT_FORMAT_BIN is not set +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in index 76694bc788..c4a22a2765 100644 --- a/package/freescale-imx/Config.in +++ b/package/freescale-imx/Config.in @@ -38,7 +38,10 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL bool "imx6ul/imx6ull" config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 - bool "imx7d/imx7ulp" + bool "imx7d" + +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP + bool "imx7ulp" config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M bool "imx8m" @@ -62,6 +65,7 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM default "IMX6S" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S default "IMX6UL" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL default "IMX7" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 + default "IMX7ULP" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP default "IMX8" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU @@ -80,12 +84,14 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 bool default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM diff --git a/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash index fdc2c23c9f..fdbf1ab608 100644 --- a/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash +++ b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash @@ -1,5 +1,6 @@ # locally computed sha256 cc00d3b936d49b2794a2a99e10129437e70caba3fd26b8379b8c50dd22f73254 imx7d-sabresd-m4-freertos-1.0.1.bin +sha256 e4efb9646b66df867f618bd8121e14afe17ebadea4a405a4df951d45d841e681 imx7ulp-m4-demo-2.6.0.bin sha256 4e41e270506870e0fd2d53e3d69afdcf6d613d099b0da5c516a512944c5c12c3 imx8mm-m4-demo-2.5.0.bin sha256 fd441e75395b0c6f90626c883ee8a93406b14e7d55adc7925116254394bb7ad8 imx8mq-m4-demo-2.3.0.bin sha256 4e83d60e27cd8ad67d4174ad3082a5f4a06b7df93571cfd2274615cbdf66eb6c imx8qx-m4-demo-2.5.0.bin diff --git a/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk index 435592afc0..3726d5c436 100644 --- a/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk +++ b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk @@ -16,7 +16,18 @@ endef # Note: firmware names are copied to binaries directory with an "m4_" prefix, for easier post image scripting -ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7),y) +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP),y) +IMX_M4_FIRMWARE_VERSION = 2.6.0 +IMX_M4_FIRMWARE_SOURCE = imx7ulp-m4-demo-$(IMX_M4_FIRMWARE_VERSION).bin +IMX_M4_FIRMWARE_INSTALL_IMAGES = YES +define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS + cp $(@D)/imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img $(BINARIES_DIR)/m4_imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img + cp $(@D)/imx7ulp_m4_demo.img $(BINARIES_DIR)/m4_imx7ulp_m4_demo.img + cp $(@D)/imx7ulp_rpmsg_lite_pingpong_rtos.img $(BINARIES_DIR)/m4_imx7ulp_rpmsg_lite_pingpong_rtos.img + cp $(@D)/imx7ulp_rpmsg_lite_str_echo_rtos.img $(BINARIES_DIR)/m4_imx7ulp_rpmsg_lite_str_echo_rtos.img + cp $(@D)/imx7ulp_wireless_uart_bridge.img $(BINARIES_DIR)/m4_imx7ulp_wireless_uart_bridge.img +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7),y) IMX_M4_FIRMWARE_VERSION = 1.0.1 IMX_M4_FIRMWARE_SOURCE = imx7d-sabresd-m4-freertos-$(IMX_M4_FIRMWARE_VERSION).bin IMX_M4_FIRMWARE_INSTALL_IMAGES = YES -- 2.23.0 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH 2/2] configs/freescale_imx7ulpevk: new defconfig 2019-10-29 17:01 ` [Buildroot] [PATCH 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem @ 2019-10-29 18:09 ` Fabio Estevam 2019-10-30 13:43 ` Fabrice Goucem 0 siblings, 1 reply; 21+ messages in thread From: Fabio Estevam @ 2019-10-29 18:09 UTC (permalink / raw) To: buildroot Hi Fabrice, On Tue, Oct 29, 2019 at 2:01 PM Fabrice Goucem <fabrice.goucem@nxp.com> wrote: > > Add basic support for NXP's i.MX7 ULP EVK board: > > https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/evaluation-kit-for-the-i.mx-7ulp-applications-processor:MCIMX7ULP-EVK > > Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> > --- > .gitlab-ci.yml | 1 + > DEVELOPERS | 2 + > board/freescale/imx7ulpevk/readme.txt | 65 +++++++++++++++++++ > configs/freescale_imx7ulpevk_defconfig | 28 ++++++++ > package/freescale-imx/Config.in | 8 ++- > .../imx-m4-firmware/imx-m4-firmware.hash | 1 + > .../imx-m4-firmware/imx-m4-firmware.mk | 13 +++- The M4 firmware changes should not be part of this patch. > +Boot the i.MX7ULP EVK board > +=========================== > + > +To boot your newly created system (refer to the i.MX 7ULP EVK Quick Start Guide [1] for guidance): > +- insert the SD card in the micro SD slot of the board; > +- put a micro USB cable into the Debug USB Port and connect using a terminal > + emulator at 115200 bps, 8n1; > +- power on the board. You should include some instructions to tell the user how to flash the QSPI flash with the M4 SDK binary. Thanks ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH 2/2] configs/freescale_imx7ulpevk: new defconfig 2019-10-29 18:09 ` Fabio Estevam @ 2019-10-30 13:43 ` Fabrice Goucem 0 siblings, 0 replies; 21+ messages in thread From: Fabrice Goucem @ 2019-10-30 13:43 UTC (permalink / raw) To: buildroot On Tue, 2019-10-29 at 15:09 -0300, Fabio Estevam wrote: > > .gitlab-ci.yml | 1 + > > DEVELOPERS | 2 + > > board/freescale/imx7ulpevk/readme.txt | 65 > > +++++++++++++++++++ > > configs/freescale_imx7ulpevk_defconfig | 28 ++++++++ > > package/freescale-imx/Config.in | 8 ++- > > .../imx-m4-firmware/imx-m4-firmware.hash | 1 + > > .../imx-m4-firmware/imx-m4-firmware.mk | 13 +++- > > The M4 firmware changes should not be part of this patch. > > > +Boot the i.MX7ULP EVK board > > +=========================== > > + > > +To boot your newly created system (refer to the i.MX 7ULP EVK > > Quick Start Guide [1] for guidance): > > +- insert the SD card in the micro SD slot of the board; > > +- put a micro USB cable into the Debug USB Port and connect using > > a terminal > > + emulator at 115200 bps, 8n1; > > +- power on the board. > > You should include some instructions to tell the user how to flash > the > QSPI flash with the M4 SDK binary. Thanks for your review Fabio. I've followed your comments and resubmitted the series of patches. Fabrice ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v2 1/3] package/freescale-imx/imx-m4-firmware: new package 2019-10-29 17:01 [Buildroot] [PATCH 1/2] package/freescale-imx/imx-m4-firmware: new package Fabrice Goucem 2019-10-29 17:01 ` [Buildroot] [PATCH 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem @ 2019-10-30 13:40 ` Fabrice Goucem 2019-10-30 13:40 ` [Buildroot] [PATCH v2 2/3] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem ` (2 more replies) 1 sibling, 3 replies; 21+ messages in thread From: Fabrice Goucem @ 2019-10-30 13:40 UTC (permalink / raw) To: buildroot New package to download and install i.MX Cortex-M4 firmware for following SoCs: * i.MX7D * i.MX8M * i.MX8MM * i.MX8QXP Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> Tested-by: Julien Olivain <julien.olivain@nxp.com> --- DEVELOPERS | 3 + board/freescale/common/imx/post-image.sh | 14 ++++- package/freescale-imx/Config.in | 8 +++ .../freescale-imx/imx-m4-firmware/Config.in | 11 ++++ .../imx-m4-firmware/imx-m4-firmware.hash | 7 +++ .../imx-m4-firmware/imx-m4-firmware.mk | 61 +++++++++++++++++++ 6 files changed, 103 insertions(+), 1 deletion(-) create mode 100644 package/freescale-imx/imx-m4-firmware/Config.in create mode 100644 package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash create mode 100644 package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk diff --git a/DEVELOPERS b/DEVELOPERS index cdd44be37c..81e144ead5 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -878,6 +878,9 @@ F: package/tinydtls/ F: package/tinymembench/ F: package/whois/ +N: Fabrice Goucem <fabrice.goucem@nxp.com> +F: package/freescale-imx/imx-m4-firmware/ + N: Falco Hyfing <hyfinglists@gmail.com> F: package/python-pymodbus/ diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh index 19d8fffb63..f9851c2d3b 100755 --- a/board/freescale/common/imx/post-image.sh +++ b/board/freescale/common/imx/post-image.sh @@ -30,6 +30,18 @@ linux_image() fi } +# +# m4_image prints all available M4 firmware file names for the genimage +# configuration file +# +m4_image() +{ + if grep -Eq "^BR2_PACKAGE_IMX_M4_FIRMWARE=y$" ${BR2_CONFIG}; then + echo -n ", " + for f in $(ls ${BINARIES_DIR}/m4_*); do echo -n "$(basename $f), "; done + fi +} + genimage_type() { if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then @@ -75,7 +87,7 @@ uboot_image() main() { - local FILES="$(dtb_list) $(linux_image)" + local FILES="$(dtb_list) $(linux_image) $(m4_image)" local IMXOFFSET="$(imx_offset)" local UBOOTBIN="$(uboot_image)" local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in index f010aab87b..76694bc788 100644 --- a/package/freescale-imx/Config.in +++ b/package/freescale-imx/Config.in @@ -83,10 +83,18 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM +config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 + bool + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM + source "package/freescale-imx/imx-alsa-plugins/Config.in" source "package/freescale-imx/imx-codec/Config.in" source "package/freescale-imx/imx-kobs/Config.in" source "package/freescale-imx/imx-lib/Config.in" +source "package/freescale-imx/imx-m4-firmware/Config.in" source "package/freescale-imx/imx-m4fwloader/Config.in" source "package/freescale-imx/imx-parser/Config.in" source "package/freescale-imx/imx-uuc/Config.in" diff --git a/package/freescale-imx/imx-m4-firmware/Config.in b/package/freescale-imx/imx-m4-firmware/Config.in new file mode 100644 index 0000000000..2c318e5dfc --- /dev/null +++ b/package/freescale-imx/imx-m4-firmware/Config.in @@ -0,0 +1,11 @@ +comment "imx-m4-firmware needs an i.MX platform with Cortex-M4" + depends on !BR2_PACKAGE_FREESCALE_IMX_HAS_M4 + +config BR2_PACKAGE_IMX_M4_FIRMWARE + bool "imx-m4-firmware" + depends on BR2_PACKAGE_FREESCALE_IMX_HAS_M4 + help + Cortex-M4 firmware blobs for the Freescale i.MX SoCs. + + This library is provided by Freescale as-is and doesn't have + an upstream. diff --git a/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash new file mode 100644 index 0000000000..fdc2c23c9f --- /dev/null +++ b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash @@ -0,0 +1,7 @@ +# locally computed +sha256 cc00d3b936d49b2794a2a99e10129437e70caba3fd26b8379b8c50dd22f73254 imx7d-sabresd-m4-freertos-1.0.1.bin +sha256 4e41e270506870e0fd2d53e3d69afdcf6d613d099b0da5c516a512944c5c12c3 imx8mm-m4-demo-2.5.0.bin +sha256 fd441e75395b0c6f90626c883ee8a93406b14e7d55adc7925116254394bb7ad8 imx8mq-m4-demo-2.3.0.bin +sha256 4e83d60e27cd8ad67d4174ad3082a5f4a06b7df93571cfd2274615cbdf66eb6c imx8qx-m4-demo-2.5.0.bin + +# no hash for license file as it is different for each package listed above diff --git a/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk new file mode 100644 index 0000000000..435592afc0 --- /dev/null +++ b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk @@ -0,0 +1,61 @@ +################################################################################ +# +# imx-m4-firmware +# +################################################################################ + +IMX_M4_FIRMWARE_SITE = $(FREESCALE_IMX_SITE) + +IMX_M4_FIRMWARE_LICENSE = NXP Semiconductor Software License Agreement +IMX_M4_FIRMWARE_LICENSE_FILES = COPYING +IMX_M4_FIRMWARE_REDISTRIBUTE = NO + +define IMX_M4_FIRMWARE_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_M4_FIRMWARE_DL_DIR)/$(IMX_M4_FIRMWARE_SOURCE)) +endef + +# Note: firmware names are copied to binaries directory with an "m4_" prefix, for easier post image scripting + +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7),y) +IMX_M4_FIRMWARE_VERSION = 1.0.1 +IMX_M4_FIRMWARE_SOURCE = imx7d-sabresd-m4-freertos-$(IMX_M4_FIRMWARE_VERSION).bin +IMX_M4_FIRMWARE_INSTALL_IMAGES = YES +define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS + cp $(@D)/imx7d_sabresd_m4_TCM_helloworld.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_helloworld.bin + cp $(@D)/imx7d_sabresd_m4_TCM_mcctty.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_mcctty.bin + cp $(@D)/imx7d_sabresd_m4_TCM_Pingpang.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_Pingpang.bin +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y) +IMX_M4_FIRMWARE_VERSION = 2.5.0 +IMX_M4_FIRMWARE_SOURCE = imx8qx-m4-demo-$(IMX_M4_FIRMWARE_VERSION).bin +IMX_M4_FIRMWARE_INSTALL_IMAGES = YES +define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS + cp $(@D)/imx8qx_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_hello_world.bin + cp $(@D)/imx8qx_m4_TCM_power_mode_switch.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_power_mode_switch.bin + cp $(@D)/imx8qx_m4_TCM_rear_view_camera.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rear_view_camera.bin + cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin + cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin + cp $(@D)/imx8qx_m4_TCM_srtm_demo.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_srtm_demo.bin +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M),y) +IMX_M4_FIRMWARE_VERSION = 2.3.0 +IMX_M4_FIRMWARE_SOURCE = imx8mq-m4-demo-$(IMX_M4_FIRMWARE_VERSION).bin +IMX_M4_FIRMWARE_INSTALL_IMAGES = YES +define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS + cp $(@D)/imx8mq_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_hello_world.bin + cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin + cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM),y) +IMX_M4_FIRMWARE_VERSION = 2.5.0 +IMX_M4_FIRMWARE_SOURCE = imx8mm-m4-demo-$(IMX_M4_FIRMWARE_VERSION).bin +IMX_M4_FIRMWARE_INSTALL_IMAGES = YES +define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS + cp $(@D)/imx8mm_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_hello_world.bin + cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin + cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin + cp $(@D)/imx8mm_m4_TCM_sai_low_power_audio.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_sai_low_power_audio.bin +endef +endif + +$(eval $(generic-package)) -- 2.23.0 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v2 2/3] configs/freescale_imx7ulpevk: new defconfig 2019-10-30 13:40 ` [Buildroot] [PATCH v2 1/3] package/freescale-imx/imx-m4-firmware: new package Fabrice Goucem @ 2019-10-30 13:40 ` Fabrice Goucem 2019-10-30 13:40 ` [Buildroot] [PATCH v2 3/3] package/freescale-imx/imx-m4-firmware: add support for i.MX7ULP Fabrice Goucem 2019-11-05 12:03 ` [Buildroot] [PATCH v3 1/2] package/freescale-imx/imx-m4-firmware: new package Fabrice Goucem 2 siblings, 0 replies; 21+ messages in thread From: Fabrice Goucem @ 2019-10-30 13:40 UTC (permalink / raw) To: buildroot Add basic support for NXP's i.MX7 ULP EVK board: https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/evaluation-kit-for-the-i.mx-7ulp-applications-processor:MCIMX7ULP-EVK Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> --- .gitlab-ci.yml | 1 + DEVELOPERS | 2 + board/freescale/imx7ulpevk/readme.txt | 60 ++++++++++++++++++++++++++ configs/freescale_imx7ulpevk_defconfig | 27 ++++++++++++ 4 files changed, 90 insertions(+) create mode 100644 board/freescale/imx7ulpevk/readme.txt create mode 100644 configs/freescale_imx7ulpevk_defconfig diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d71257a20..74ee5b732e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -177,6 +177,7 @@ freescale_imx6qsabreauto_defconfig: { extends: .defconfig } freescale_imx6qsabresd_defconfig: { extends: .defconfig } freescale_imx6sxsabresd_defconfig: { extends: .defconfig } freescale_imx7dsabresd_defconfig: { extends: .defconfig } +freescale_imx7ulpevk_defconfig: { extends: .defconfig } freescale_imx8mmevk_defconfig: { extends: .defconfig } freescale_imx8mqevk_defconfig: { extends: .defconfig } freescale_imx8qxpmek_defconfig: { extends: .defconfig } diff --git a/DEVELOPERS b/DEVELOPERS index 81e144ead5..c7f41ecf6f 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -879,6 +879,8 @@ F: package/tinymembench/ F: package/whois/ N: Fabrice Goucem <fabrice.goucem@nxp.com> +F: board/freescale/imx7ulpevk/ +F: configs/freescale_imx7ulpevk_defconfig F: package/freescale-imx/imx-m4-firmware/ N: Falco Hyfing <hyfinglists@gmail.com> diff --git a/board/freescale/imx7ulpevk/readme.txt b/board/freescale/imx7ulpevk/readme.txt new file mode 100644 index 0000000000..c7a2120f13 --- /dev/null +++ b/board/freescale/imx7ulpevk/readme.txt @@ -0,0 +1,60 @@ +**************************** +Freescale i.MX7ULP EVK board +**************************** + +This file documents the Buildroot support for the Freescale i.MX7ULP EVK board. + +Build +===== + +First, configure Buildroot for your i.MX7ULP EVK board: + + make freescale_imx7ulpevk_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - boot.vfat + - imx7ulp-evkb.dtb + - rootfs.ext2 + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot.imx + - zImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=./output/images/sdcard.img of=/dev/<your-sd-device> + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template. + +Boot the i.MX7ULP EVK board +=========================== + +To boot your newly created system (refer to the i.MX 7ULP EVK Quick Start Guide [1] for guidance): +- insert the SD card in the micro SD slot of the board; +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! + +References +========== +[1] https://www.nxp.com/docs/en/user-guide/IMX7ULPQSG.pdf diff --git a/configs/freescale_imx7ulpevk_defconfig b/configs/freescale_imx7ulpevk_defconfig new file mode 100644 index 0000000000..441ececa47 --- /dev/null +++ b/configs/freescale_imx7ulpevk_defconfig @@ -0,0 +1,27 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.0.0" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7ulp-evkb" +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx7ulp_evk" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.0.0" +BR2_TARGET_UBOOT_NEEDS_DTC=y +# BR2_TARGET_UBOOT_FORMAT_BIN is not set +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y -- 2.23.0 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v2 3/3] package/freescale-imx/imx-m4-firmware: add support for i.MX7ULP 2019-10-30 13:40 ` [Buildroot] [PATCH v2 1/3] package/freescale-imx/imx-m4-firmware: new package Fabrice Goucem 2019-10-30 13:40 ` [Buildroot] [PATCH v2 2/3] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem @ 2019-10-30 13:40 ` Fabrice Goucem 2019-10-31 22:52 ` Fabio Estevam 2019-11-05 12:03 ` [Buildroot] [PATCH v3 1/2] package/freescale-imx/imx-m4-firmware: new package Fabrice Goucem 2 siblings, 1 reply; 21+ messages in thread From: Fabrice Goucem @ 2019-10-30 13:40 UTC (permalink / raw) To: buildroot Create new flag BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP to differentiate i.MX7ULP from i.MX7D which has different Cortex-M4 firmware. Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> --- Changes v1 -> v2: - Split i.MX7ULP support into two commits: new defconfig and m4 support (suggested by Fabio Estevam) Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> --- board/freescale/imx7ulpevk/readme.txt | 16 ++++++++++++++++ configs/freescale_imx7ulpevk_defconfig | 1 + package/freescale-imx/Config.in | 8 +++++++- .../imx-m4-firmware/imx-m4-firmware.hash | 1 + .../imx-m4-firmware/imx-m4-firmware.mk | 13 ++++++++++++- 5 files changed, 37 insertions(+), 2 deletions(-) diff --git a/board/freescale/imx7ulpevk/readme.txt b/board/freescale/imx7ulpevk/readme.txt index c7a2120f13..a2aa68b46f 100644 --- a/board/freescale/imx7ulpevk/readme.txt +++ b/board/freescale/imx7ulpevk/readme.txt @@ -18,6 +18,11 @@ Build all components: You will find in output/images/ the following files: - boot.vfat - imx7ulp-evkb.dtb + - m4_imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img + - m4_imx7ulp_m4_demo.img + - m4_imx7ulp_rpmsg_lite_pingpong_rtos.img + - m4_imx7ulp_rpmsg_lite_str_echo_rtos.img + - m4_imx7ulp_wireless_uart_bridge.img - rootfs.ext2 - rootfs.ext4 - rootfs.tar @@ -44,6 +49,17 @@ command as root: For details about the medium image layout, see the definition in board/freescale/common/imx/genimage.cfg.template. +Flash QSPI with Cortex-M4 firmware +================================== + +Cortex-M4 firmware can be flashed onto QSPI NOR memory. +To do so, stop at u-boot prompt and run the following commands: + + sf probe + sf erase 0 30000 + fatload mmc 0 62000000 m4_imx7ulp_m4_demo.img + sf write 62000000 0 30000 + Boot the i.MX7ULP EVK board =========================== diff --git a/configs/freescale_imx7ulpevk_defconfig b/configs/freescale_imx7ulpevk_defconfig index 441ececa47..243a5c66f1 100644 --- a/configs/freescale_imx7ulpevk_defconfig +++ b/configs/freescale_imx7ulpevk_defconfig @@ -12,6 +12,7 @@ BR2_LINUX_KERNEL_DTS_SUPPORT=y BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7ulp-evkb" BR2_PACKAGE_FREESCALE_IMX=y BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP=y +BR2_PACKAGE_IMX_M4_FIRMWARE=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_UBOOT=y diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in index 76694bc788..c4a22a2765 100644 --- a/package/freescale-imx/Config.in +++ b/package/freescale-imx/Config.in @@ -38,7 +38,10 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL bool "imx6ul/imx6ull" config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 - bool "imx7d/imx7ulp" + bool "imx7d" + +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP + bool "imx7ulp" config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M bool "imx8m" @@ -62,6 +65,7 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM default "IMX6S" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S default "IMX6UL" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL default "IMX7" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 + default "IMX7ULP" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP default "IMX8" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU @@ -80,12 +84,14 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 bool default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM diff --git a/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash index fdc2c23c9f..fdbf1ab608 100644 --- a/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash +++ b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash @@ -1,5 +1,6 @@ # locally computed sha256 cc00d3b936d49b2794a2a99e10129437e70caba3fd26b8379b8c50dd22f73254 imx7d-sabresd-m4-freertos-1.0.1.bin +sha256 e4efb9646b66df867f618bd8121e14afe17ebadea4a405a4df951d45d841e681 imx7ulp-m4-demo-2.6.0.bin sha256 4e41e270506870e0fd2d53e3d69afdcf6d613d099b0da5c516a512944c5c12c3 imx8mm-m4-demo-2.5.0.bin sha256 fd441e75395b0c6f90626c883ee8a93406b14e7d55adc7925116254394bb7ad8 imx8mq-m4-demo-2.3.0.bin sha256 4e83d60e27cd8ad67d4174ad3082a5f4a06b7df93571cfd2274615cbdf66eb6c imx8qx-m4-demo-2.5.0.bin diff --git a/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk index 435592afc0..3726d5c436 100644 --- a/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk +++ b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk @@ -16,7 +16,18 @@ endef # Note: firmware names are copied to binaries directory with an "m4_" prefix, for easier post image scripting -ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7),y) +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP),y) +IMX_M4_FIRMWARE_VERSION = 2.6.0 +IMX_M4_FIRMWARE_SOURCE = imx7ulp-m4-demo-$(IMX_M4_FIRMWARE_VERSION).bin +IMX_M4_FIRMWARE_INSTALL_IMAGES = YES +define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS + cp $(@D)/imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img $(BINARIES_DIR)/m4_imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img + cp $(@D)/imx7ulp_m4_demo.img $(BINARIES_DIR)/m4_imx7ulp_m4_demo.img + cp $(@D)/imx7ulp_rpmsg_lite_pingpong_rtos.img $(BINARIES_DIR)/m4_imx7ulp_rpmsg_lite_pingpong_rtos.img + cp $(@D)/imx7ulp_rpmsg_lite_str_echo_rtos.img $(BINARIES_DIR)/m4_imx7ulp_rpmsg_lite_str_echo_rtos.img + cp $(@D)/imx7ulp_wireless_uart_bridge.img $(BINARIES_DIR)/m4_imx7ulp_wireless_uart_bridge.img +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7),y) IMX_M4_FIRMWARE_VERSION = 1.0.1 IMX_M4_FIRMWARE_SOURCE = imx7d-sabresd-m4-freertos-$(IMX_M4_FIRMWARE_VERSION).bin IMX_M4_FIRMWARE_INSTALL_IMAGES = YES -- 2.23.0 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v2 3/3] package/freescale-imx/imx-m4-firmware: add support for i.MX7ULP 2019-10-30 13:40 ` [Buildroot] [PATCH v2 3/3] package/freescale-imx/imx-m4-firmware: add support for i.MX7ULP Fabrice Goucem @ 2019-10-31 22:52 ` Fabio Estevam 0 siblings, 0 replies; 21+ messages in thread From: Fabio Estevam @ 2019-10-31 22:52 UTC (permalink / raw) To: buildroot Hi Fabrice, On Wed, Oct 30, 2019 at 10:40 AM Fabrice Goucem <fabrice.goucem@nxp.com> wrote: > > Create new flag BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP to > differentiate i.MX7ULP from i.MX7D which has different Cortex-M4 > firmware. > > Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> > > --- > Changes v1 -> v2: > - Split i.MX7ULP support into two commits: > new defconfig and m4 support (suggested by Fabio Estevam) > > Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> > --- > board/freescale/imx7ulpevk/readme.txt | 16 ++++++++++++++++ > configs/freescale_imx7ulpevk_defconfig | 1 + > package/freescale-imx/Config.in | 8 +++++++- > .../imx-m4-firmware/imx-m4-firmware.hash | 1 + > .../imx-m4-firmware/imx-m4-firmware.mk | 13 ++++++++++++- This is still touching imx-m4-firmware package and imx7ulp-evk files in the same patch. It is preferred not to touch them in the same patch. The patch that adds imx7ulp-evk support can be the last of the series and contain the complete readme.txt and defconfig options. ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 1/2] package/freescale-imx/imx-m4-firmware: new package 2019-10-30 13:40 ` [Buildroot] [PATCH v2 1/3] package/freescale-imx/imx-m4-firmware: new package Fabrice Goucem 2019-10-30 13:40 ` [Buildroot] [PATCH v2 2/3] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem 2019-10-30 13:40 ` [Buildroot] [PATCH v2 3/3] package/freescale-imx/imx-m4-firmware: add support for i.MX7ULP Fabrice Goucem @ 2019-11-05 12:03 ` Fabrice Goucem 2019-11-05 12:03 ` [Buildroot] [PATCH v3 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem ` (2 more replies) 2 siblings, 3 replies; 21+ messages in thread From: Fabrice Goucem @ 2019-11-05 12:03 UTC (permalink / raw) To: buildroot New package to download and install i.MX Cortex-M4 firmware for following SoCs: * i.MX7D * i.MX7ULP * i.MX8M * i.MX8MM * i.MX8QXP Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> Tested-by: Julien Olivain <julien.olivain@nxp.com> --- DEVELOPERS | 3 + board/freescale/common/imx/post-image.sh | 14 +++- package/freescale-imx/Config.in | 8 +++ .../freescale-imx/imx-m4-firmware/Config.in | 11 +++ .../imx-m4-firmware/imx-m4-firmware.hash | 8 +++ .../imx-m4-firmware/imx-m4-firmware.mk | 72 +++++++++++++++++++ 6 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 package/freescale-imx/imx-m4-firmware/Config.in create mode 100644 package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash create mode 100644 package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk diff --git a/DEVELOPERS b/DEVELOPERS index 24c57b25f7..93f395ed69 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -874,6 +874,9 @@ F: package/tinydtls/ F: package/tinymembench/ F: package/whois/ +N: Fabrice Goucem <fabrice.goucem@nxp.com> +F: package/freescale-imx/imx-m4-firmware/ + N: Falco Hyfing <hyfinglists@gmail.com> F: package/python-pymodbus/ diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh index 19d8fffb63..f9851c2d3b 100755 --- a/board/freescale/common/imx/post-image.sh +++ b/board/freescale/common/imx/post-image.sh @@ -30,6 +30,18 @@ linux_image() fi } +# +# m4_image prints all available M4 firmware file names for the genimage +# configuration file +# +m4_image() +{ + if grep -Eq "^BR2_PACKAGE_IMX_M4_FIRMWARE=y$" ${BR2_CONFIG}; then + echo -n ", " + for f in $(ls ${BINARIES_DIR}/m4_*); do echo -n "$(basename $f), "; done + fi +} + genimage_type() { if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then @@ -75,7 +87,7 @@ uboot_image() main() { - local FILES="$(dtb_list) $(linux_image)" + local FILES="$(dtb_list) $(linux_image) $(m4_image)" local IMXOFFSET="$(imx_offset)" local UBOOTBIN="$(uboot_image)" local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in index f010aab87b..76694bc788 100644 --- a/package/freescale-imx/Config.in +++ b/package/freescale-imx/Config.in @@ -83,10 +83,18 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM +config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 + bool + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM + source "package/freescale-imx/imx-alsa-plugins/Config.in" source "package/freescale-imx/imx-codec/Config.in" source "package/freescale-imx/imx-kobs/Config.in" source "package/freescale-imx/imx-lib/Config.in" +source "package/freescale-imx/imx-m4-firmware/Config.in" source "package/freescale-imx/imx-m4fwloader/Config.in" source "package/freescale-imx/imx-parser/Config.in" source "package/freescale-imx/imx-uuc/Config.in" diff --git a/package/freescale-imx/imx-m4-firmware/Config.in b/package/freescale-imx/imx-m4-firmware/Config.in new file mode 100644 index 0000000000..2c318e5dfc --- /dev/null +++ b/package/freescale-imx/imx-m4-firmware/Config.in @@ -0,0 +1,11 @@ +comment "imx-m4-firmware needs an i.MX platform with Cortex-M4" + depends on !BR2_PACKAGE_FREESCALE_IMX_HAS_M4 + +config BR2_PACKAGE_IMX_M4_FIRMWARE + bool "imx-m4-firmware" + depends on BR2_PACKAGE_FREESCALE_IMX_HAS_M4 + help + Cortex-M4 firmware blobs for the Freescale i.MX SoCs. + + This library is provided by Freescale as-is and doesn't have + an upstream. diff --git a/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash new file mode 100644 index 0000000000..fdbf1ab608 --- /dev/null +++ b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash @@ -0,0 +1,8 @@ +# locally computed +sha256 cc00d3b936d49b2794a2a99e10129437e70caba3fd26b8379b8c50dd22f73254 imx7d-sabresd-m4-freertos-1.0.1.bin +sha256 e4efb9646b66df867f618bd8121e14afe17ebadea4a405a4df951d45d841e681 imx7ulp-m4-demo-2.6.0.bin +sha256 4e41e270506870e0fd2d53e3d69afdcf6d613d099b0da5c516a512944c5c12c3 imx8mm-m4-demo-2.5.0.bin +sha256 fd441e75395b0c6f90626c883ee8a93406b14e7d55adc7925116254394bb7ad8 imx8mq-m4-demo-2.3.0.bin +sha256 4e83d60e27cd8ad67d4174ad3082a5f4a06b7df93571cfd2274615cbdf66eb6c imx8qx-m4-demo-2.5.0.bin + +# no hash for license file as it is different for each package listed above diff --git a/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk new file mode 100644 index 0000000000..3726d5c436 --- /dev/null +++ b/package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk @@ -0,0 +1,72 @@ +################################################################################ +# +# imx-m4-firmware +# +################################################################################ + +IMX_M4_FIRMWARE_SITE = $(FREESCALE_IMX_SITE) + +IMX_M4_FIRMWARE_LICENSE = NXP Semiconductor Software License Agreement +IMX_M4_FIRMWARE_LICENSE_FILES = COPYING +IMX_M4_FIRMWARE_REDISTRIBUTE = NO + +define IMX_M4_FIRMWARE_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_M4_FIRMWARE_DL_DIR)/$(IMX_M4_FIRMWARE_SOURCE)) +endef + +# Note: firmware names are copied to binaries directory with an "m4_" prefix, for easier post image scripting + +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP),y) +IMX_M4_FIRMWARE_VERSION = 2.6.0 +IMX_M4_FIRMWARE_SOURCE = imx7ulp-m4-demo-$(IMX_M4_FIRMWARE_VERSION).bin +IMX_M4_FIRMWARE_INSTALL_IMAGES = YES +define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS + cp $(@D)/imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img $(BINARIES_DIR)/m4_imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img + cp $(@D)/imx7ulp_m4_demo.img $(BINARIES_DIR)/m4_imx7ulp_m4_demo.img + cp $(@D)/imx7ulp_rpmsg_lite_pingpong_rtos.img $(BINARIES_DIR)/m4_imx7ulp_rpmsg_lite_pingpong_rtos.img + cp $(@D)/imx7ulp_rpmsg_lite_str_echo_rtos.img $(BINARIES_DIR)/m4_imx7ulp_rpmsg_lite_str_echo_rtos.img + cp $(@D)/imx7ulp_wireless_uart_bridge.img $(BINARIES_DIR)/m4_imx7ulp_wireless_uart_bridge.img +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7),y) +IMX_M4_FIRMWARE_VERSION = 1.0.1 +IMX_M4_FIRMWARE_SOURCE = imx7d-sabresd-m4-freertos-$(IMX_M4_FIRMWARE_VERSION).bin +IMX_M4_FIRMWARE_INSTALL_IMAGES = YES +define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS + cp $(@D)/imx7d_sabresd_m4_TCM_helloworld.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_helloworld.bin + cp $(@D)/imx7d_sabresd_m4_TCM_mcctty.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_mcctty.bin + cp $(@D)/imx7d_sabresd_m4_TCM_Pingpang.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_Pingpang.bin +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y) +IMX_M4_FIRMWARE_VERSION = 2.5.0 +IMX_M4_FIRMWARE_SOURCE = imx8qx-m4-demo-$(IMX_M4_FIRMWARE_VERSION).bin +IMX_M4_FIRMWARE_INSTALL_IMAGES = YES +define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS + cp $(@D)/imx8qx_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_hello_world.bin + cp $(@D)/imx8qx_m4_TCM_power_mode_switch.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_power_mode_switch.bin + cp $(@D)/imx8qx_m4_TCM_rear_view_camera.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rear_view_camera.bin + cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin + cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin + cp $(@D)/imx8qx_m4_TCM_srtm_demo.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_srtm_demo.bin +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M),y) +IMX_M4_FIRMWARE_VERSION = 2.3.0 +IMX_M4_FIRMWARE_SOURCE = imx8mq-m4-demo-$(IMX_M4_FIRMWARE_VERSION).bin +IMX_M4_FIRMWARE_INSTALL_IMAGES = YES +define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS + cp $(@D)/imx8mq_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_hello_world.bin + cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin + cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM),y) +IMX_M4_FIRMWARE_VERSION = 2.5.0 +IMX_M4_FIRMWARE_SOURCE = imx8mm-m4-demo-$(IMX_M4_FIRMWARE_VERSION).bin +IMX_M4_FIRMWARE_INSTALL_IMAGES = YES +define IMX_M4_FIRMWARE_INSTALL_IMAGES_CMDS + cp $(@D)/imx8mm_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_hello_world.bin + cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin + cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin + cp $(@D)/imx8mm_m4_TCM_sai_low_power_audio.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_sai_low_power_audio.bin +endef +endif + +$(eval $(generic-package)) -- 2.24.0.rc1 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 2/2] configs/freescale_imx7ulpevk: new defconfig 2019-11-05 12:03 ` [Buildroot] [PATCH v3 1/2] package/freescale-imx/imx-m4-firmware: new package Fabrice Goucem @ 2019-11-05 12:03 ` Fabrice Goucem 2019-11-06 17:23 ` [Buildroot] [PATCH v3 1/2] package/freescale-imx/imx-m4-firmware: new package Gary Bisson 2019-11-10 23:08 ` [Buildroot] [PATCH v4 1/2] package/freescale-imx/imx-m4-demos: " Fabrice Goucem 2 siblings, 0 replies; 21+ messages in thread From: Fabrice Goucem @ 2019-11-05 12:03 UTC (permalink / raw) To: buildroot Add basic support for NXP's i.MX7 ULP EVK board: https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/evaluation-kit-for-the-i.mx-7ulp-applications-processor:MCIMX7ULP-EVK Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> --- Changes v2 -> v3: - Resplit so that imx7ulp commit does not touch file from imx-m4-firmware package (suggested by Fabio Estevam) Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> --- .gitlab-ci.yml | 1 + DEVELOPERS | 2 + board/freescale/imx7ulpevk/readme.txt | 76 ++++++++++++++++++++++++++ configs/freescale_imx7ulpevk_defconfig | 28 ++++++++++ package/freescale-imx/Config.in | 8 ++- 5 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 board/freescale/imx7ulpevk/readme.txt create mode 100644 configs/freescale_imx7ulpevk_defconfig diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d71257a20..74ee5b732e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -177,6 +177,7 @@ freescale_imx6qsabreauto_defconfig: { extends: .defconfig } freescale_imx6qsabresd_defconfig: { extends: .defconfig } freescale_imx6sxsabresd_defconfig: { extends: .defconfig } freescale_imx7dsabresd_defconfig: { extends: .defconfig } +freescale_imx7ulpevk_defconfig: { extends: .defconfig } freescale_imx8mmevk_defconfig: { extends: .defconfig } freescale_imx8mqevk_defconfig: { extends: .defconfig } freescale_imx8qxpmek_defconfig: { extends: .defconfig } diff --git a/DEVELOPERS b/DEVELOPERS index 93f395ed69..4de86d0a36 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -875,6 +875,8 @@ F: package/tinymembench/ F: package/whois/ N: Fabrice Goucem <fabrice.goucem@nxp.com> +F: board/freescale/imx7ulpevk/ +F: configs/freescale_imx7ulpevk_defconfig F: package/freescale-imx/imx-m4-firmware/ N: Falco Hyfing <hyfinglists@gmail.com> diff --git a/board/freescale/imx7ulpevk/readme.txt b/board/freescale/imx7ulpevk/readme.txt new file mode 100644 index 0000000000..a2aa68b46f --- /dev/null +++ b/board/freescale/imx7ulpevk/readme.txt @@ -0,0 +1,76 @@ +**************************** +Freescale i.MX7ULP EVK board +**************************** + +This file documents the Buildroot support for the Freescale i.MX7ULP EVK board. + +Build +===== + +First, configure Buildroot for your i.MX7ULP EVK board: + + make freescale_imx7ulpevk_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - boot.vfat + - imx7ulp-evkb.dtb + - m4_imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img + - m4_imx7ulp_m4_demo.img + - m4_imx7ulp_rpmsg_lite_pingpong_rtos.img + - m4_imx7ulp_rpmsg_lite_str_echo_rtos.img + - m4_imx7ulp_wireless_uart_bridge.img + - rootfs.ext2 + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot.imx + - zImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=./output/images/sdcard.img of=/dev/<your-sd-device> + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template. + +Flash QSPI with Cortex-M4 firmware +================================== + +Cortex-M4 firmware can be flashed onto QSPI NOR memory. +To do so, stop at u-boot prompt and run the following commands: + + sf probe + sf erase 0 30000 + fatload mmc 0 62000000 m4_imx7ulp_m4_demo.img + sf write 62000000 0 30000 + +Boot the i.MX7ULP EVK board +=========================== + +To boot your newly created system (refer to the i.MX 7ULP EVK Quick Start Guide [1] for guidance): +- insert the SD card in the micro SD slot of the board; +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! + +References +========== +[1] https://www.nxp.com/docs/en/user-guide/IMX7ULPQSG.pdf diff --git a/configs/freescale_imx7ulpevk_defconfig b/configs/freescale_imx7ulpevk_defconfig new file mode 100644 index 0000000000..243a5c66f1 --- /dev/null +++ b/configs/freescale_imx7ulpevk_defconfig @@ -0,0 +1,28 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.0.0" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7ulp-evkb" +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP=y +BR2_PACKAGE_IMX_M4_FIRMWARE=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx7ulp_evk" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.0.0" +BR2_TARGET_UBOOT_NEEDS_DTC=y +# BR2_TARGET_UBOOT_FORMAT_BIN is not set +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in index 76694bc788..c4a22a2765 100644 --- a/package/freescale-imx/Config.in +++ b/package/freescale-imx/Config.in @@ -38,7 +38,10 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL bool "imx6ul/imx6ull" config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 - bool "imx7d/imx7ulp" + bool "imx7d" + +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP + bool "imx7ulp" config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M bool "imx8m" @@ -62,6 +65,7 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM default "IMX6S" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S default "IMX6UL" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL default "IMX7" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 + default "IMX7ULP" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP default "IMX8" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU @@ -80,12 +84,14 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 bool default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM -- 2.24.0.rc1 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v3 1/2] package/freescale-imx/imx-m4-firmware: new package 2019-11-05 12:03 ` [Buildroot] [PATCH v3 1/2] package/freescale-imx/imx-m4-firmware: new package Fabrice Goucem 2019-11-05 12:03 ` [Buildroot] [PATCH v3 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem @ 2019-11-06 17:23 ` Gary Bisson 2019-11-07 9:59 ` [Buildroot] [EXT] " Fabrice Goucem 2019-11-10 23:08 ` [Buildroot] [PATCH v4 1/2] package/freescale-imx/imx-m4-demos: " Fabrice Goucem 2 siblings, 1 reply; 21+ messages in thread From: Gary Bisson @ 2019-11-06 17:23 UTC (permalink / raw) To: buildroot Hi Fabrice, On Tue, Nov 05, 2019 at 12:03:55PM +0000, Fabrice Goucem wrote: > New package to download and install i.MX Cortex-M4 firmware > for following SoCs: > * i.MX7D > * i.MX7ULP > * i.MX8M > * i.MX8MM > * i.MX8QXP Any reason why there's no i.MX6SX package? > Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> > Tested-by: Julien Olivain <julien.olivain@nxp.com> > --- > DEVELOPERS | 3 + > board/freescale/common/imx/post-image.sh | 14 +++- > package/freescale-imx/Config.in | 8 +++ > .../freescale-imx/imx-m4-firmware/Config.in | 11 +++ > .../imx-m4-firmware/imx-m4-firmware.hash | 8 +++ > .../imx-m4-firmware/imx-m4-firmware.mk | 72 +++++++++++++++++++ > 6 files changed, 115 insertions(+), 1 deletion(-) > create mode 100644 package/freescale-imx/imx-m4-firmware/Config.in > create mode 100644 package/freescale-imx/imx-m4-firmware/imx-m4-firmware.hash > create mode 100644 package/freescale-imx/imx-m4-firmware/imx-m4-firmware.mk > > diff --git a/DEVELOPERS b/DEVELOPERS > index 24c57b25f7..93f395ed69 100644 > --- a/DEVELOPERS > +++ b/DEVELOPERS > @@ -874,6 +874,9 @@ F: package/tinydtls/ > F: package/tinymembench/ > F: package/whois/ > > +N: Fabrice Goucem <fabrice.goucem@nxp.com> > +F: package/freescale-imx/imx-m4-firmware/ > + > N: Falco Hyfing <hyfinglists@gmail.com> > F: package/python-pymodbus/ > > diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh > index 19d8fffb63..f9851c2d3b 100755 > --- a/board/freescale/common/imx/post-image.sh > +++ b/board/freescale/common/imx/post-image.sh > @@ -30,6 +30,18 @@ linux_image() > fi > } > > +# > +# m4_image prints all available M4 firmware file names for the genimage > +# configuration file > +# > +m4_image() > +{ > + if grep -Eq "^BR2_PACKAGE_IMX_M4_FIRMWARE=y$" ${BR2_CONFIG}; then > + echo -n ", " > + for f in $(ls ${BINARIES_DIR}/m4_*); do echo -n "$(basename $f), "; done > + fi > +} > + > genimage_type() > { > if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then > @@ -75,7 +87,7 @@ uboot_image() > > main() > { > - local FILES="$(dtb_list) $(linux_image)" > + local FILES="$(dtb_list) $(linux_image) $(m4_image)" > local IMXOFFSET="$(imx_offset)" > local UBOOTBIN="$(uboot_image)" > local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" > diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in > index f010aab87b..76694bc788 100644 > --- a/package/freescale-imx/Config.in > +++ b/package/freescale-imx/Config.in > @@ -83,10 +83,18 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM > > +config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 > + bool > + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM Same here. Regards, Gary ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [EXT] Re: [PATCH v3 1/2] package/freescale-imx/imx-m4-firmware: new package 2019-11-06 17:23 ` [Buildroot] [PATCH v3 1/2] package/freescale-imx/imx-m4-firmware: new package Gary Bisson @ 2019-11-07 9:59 ` Fabrice Goucem 0 siblings, 0 replies; 21+ messages in thread From: Fabrice Goucem @ 2019-11-07 9:59 UTC (permalink / raw) To: buildroot Hi Gary, On Wed, 2019-11-06 at 18:23 +0100, Gary Bisson wrote: > Caution: EXT Email > > Hi Fabrice, > > On Tue, Nov 05, 2019 at 12:03:55PM +0000, Fabrice Goucem wrote: > > New package to download and install i.MX Cortex-M4 firmware > > for following SoCs: > > * i.MX7D > > * i.MX7ULP > > * i.MX8M > > * i.MX8MM > > * i.MX8QXP > > Any reason why there's no i.MX6SX package? Simply because I could not locate an M4 demo image from NXP servers. I used the NXP Yocto recipes to locate the different M4 images and i.MX6SX is not a SoC supported by these recipes. Will gladly add an image if a reliable location is found. > > Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> > > Tested-by: Julien Olivain <julien.olivain@nxp.com> > > --- > > DEVELOPERS | 3 + > > board/freescale/common/imx/post-image.sh | 14 +++- > > package/freescale-imx/Config.in | 8 +++ > > .../freescale-imx/imx-m4-firmware/Config.in | 11 +++ > > .../imx-m4-firmware/imx-m4-firmware.hash | 8 +++ > > .../imx-m4-firmware/imx-m4-firmware.mk | 72 > > +++++++++++++++++++ > > 6 files changed, 115 insertions(+), 1 deletion(-) > > create mode 100644 package/freescale-imx/imx-m4-firmware/Config.in > > create mode 100644 package/freescale-imx/imx-m4-firmware/imx-m4- > > firmware.hash > > create mode 100644 package/freescale-imx/imx-m4-firmware/imx-m4- > > firmware.mk > > > > diff --git a/DEVELOPERS b/DEVELOPERS > > index 24c57b25f7..93f395ed69 100644 > > --- a/DEVELOPERS > > +++ b/DEVELOPERS > > @@ -874,6 +874,9 @@ F: package/tinydtls/ > > F: package/tinymembench/ > > F: package/whois/ > > > > +N: Fabrice Goucem <fabrice.goucem@nxp.com> > > +F: package/freescale-imx/imx-m4-firmware/ > > + > > N: Falco Hyfing <hyfinglists@gmail.com> > > F: package/python-pymodbus/ > > > > diff --git a/board/freescale/common/imx/post-image.sh > > b/board/freescale/common/imx/post-image.sh > > index 19d8fffb63..f9851c2d3b 100755 > > --- a/board/freescale/common/imx/post-image.sh > > +++ b/board/freescale/common/imx/post-image.sh > > @@ -30,6 +30,18 @@ linux_image() > > fi > > } > > > > +# > > +# m4_image prints all available M4 firmware file names for the > > genimage > > +# configuration file > > +# > > +m4_image() > > +{ > > + if grep -Eq "^BR2_PACKAGE_IMX_M4_FIRMWARE=y$" ${BR2_CONFIG}; > > then > > + echo -n ", " > > + for f in $(ls ${BINARIES_DIR}/m4_*); do echo -n > > "$(basename $f), "; done > > + fi > > +} > > + > > genimage_type() > > { > > if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" > > ${BR2_CONFIG}; then > > @@ -75,7 +87,7 @@ uboot_image() > > > > main() > > { > > - local FILES="$(dtb_list) $(linux_image)" > > + local FILES="$(dtb_list) $(linux_image) $(m4_image)" > > local IMXOFFSET="$(imx_offset)" > > local UBOOTBIN="$(uboot_image)" > > local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" > > diff --git a/package/freescale-imx/Config.in b/package/freescale- > > imx/Config.in > > index f010aab87b..76694bc788 100644 > > --- a/package/freescale-imx/Config.in > > +++ b/package/freescale-imx/Config.in > > @@ -83,10 +83,18 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU > > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ > > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM > > > > +config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 > > + bool > > + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ > > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ > > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ > > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM > > Same here. > > Regards, > Gary Regards, Fabrice ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v4 1/2] package/freescale-imx/imx-m4-demos: new package 2019-11-05 12:03 ` [Buildroot] [PATCH v3 1/2] package/freescale-imx/imx-m4-firmware: new package Fabrice Goucem 2019-11-05 12:03 ` [Buildroot] [PATCH v3 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem 2019-11-06 17:23 ` [Buildroot] [PATCH v3 1/2] package/freescale-imx/imx-m4-firmware: new package Gary Bisson @ 2019-11-10 23:08 ` Fabrice Goucem 2019-11-10 23:08 ` [Buildroot] [PATCH v4 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem ` (2 more replies) 2 siblings, 3 replies; 21+ messages in thread From: Fabrice Goucem @ 2019-11-10 23:08 UTC (permalink / raw) To: buildroot New package to download and install i.MX Cortex-M4 demos for following SoCs: * i.MX7D * i.MX7ULP * i.MX8M * i.MX8MM * i.MX8QXP Yocto recipes from where the demos location has been extracted: https://source.codeaurora.org/external/imx/meta-fsl-bsp-release/tree/imx/meta-sdk/recipes-fsl/m4-demos?h=imx-morty&id=bfb1e26798775f161b14218ac6f1d50069bea8ed Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> Tested-by: Julien Olivain <julien.olivain@nxp.com> --- DEVELOPERS | 3 + board/freescale/common/imx/post-image.sh | 14 +++- package/freescale-imx/Config.in | 8 +++ package/freescale-imx/imx-m4-demos/Config.in | 11 +++ .../imx-m4-demos/imx-m4-demos.hash | 8 +++ .../imx-m4-demos/imx-m4-demos.mk | 72 +++++++++++++++++++ 6 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 package/freescale-imx/imx-m4-demos/Config.in create mode 100644 package/freescale-imx/imx-m4-demos/imx-m4-demos.hash create mode 100644 package/freescale-imx/imx-m4-demos/imx-m4-demos.mk diff --git a/DEVELOPERS b/DEVELOPERS index c0863aabc6..194e5249d0 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -874,6 +874,9 @@ F: package/tinydtls/ F: package/tinymembench/ F: package/whois/ +N: Fabrice Goucem <fabrice.goucem@nxp.com> +F: package/freescale-imx/imx-m4-firmware/ + N: Falco Hyfing <hyfinglists@gmail.com> F: package/python-pymodbus/ diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh index 19d8fffb63..f9851c2d3b 100755 --- a/board/freescale/common/imx/post-image.sh +++ b/board/freescale/common/imx/post-image.sh @@ -30,6 +30,18 @@ linux_image() fi } +# +# m4_image prints all available M4 firmware file names for the genimage +# configuration file +# +m4_image() +{ + if grep -Eq "^BR2_PACKAGE_IMX_M4_FIRMWARE=y$" ${BR2_CONFIG}; then + echo -n ", " + for f in $(ls ${BINARIES_DIR}/m4_*); do echo -n "$(basename $f), "; done + fi +} + genimage_type() { if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then @@ -75,7 +87,7 @@ uboot_image() main() { - local FILES="$(dtb_list) $(linux_image)" + local FILES="$(dtb_list) $(linux_image) $(m4_image)" local IMXOFFSET="$(imx_offset)" local UBOOTBIN="$(uboot_image)" local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in index f010aab87b..55cd53aa37 100644 --- a/package/freescale-imx/Config.in +++ b/package/freescale-imx/Config.in @@ -83,10 +83,18 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM +config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 + bool + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM + source "package/freescale-imx/imx-alsa-plugins/Config.in" source "package/freescale-imx/imx-codec/Config.in" source "package/freescale-imx/imx-kobs/Config.in" source "package/freescale-imx/imx-lib/Config.in" +source "package/freescale-imx/imx-m4-demos/Config.in" source "package/freescale-imx/imx-m4fwloader/Config.in" source "package/freescale-imx/imx-parser/Config.in" source "package/freescale-imx/imx-uuc/Config.in" diff --git a/package/freescale-imx/imx-m4-demos/Config.in b/package/freescale-imx/imx-m4-demos/Config.in new file mode 100644 index 0000000000..fc2312d410 --- /dev/null +++ b/package/freescale-imx/imx-m4-demos/Config.in @@ -0,0 +1,11 @@ +comment "imx-m4-demos needs an i.MX platform with Cortex-M4" + depends on !BR2_PACKAGE_FREESCALE_IMX_HAS_M4 + +config BR2_PACKAGE_IMX_M4_DEMOS + bool "imx-m4-demos" + depends on BR2_PACKAGE_FREESCALE_IMX_HAS_M4 + help + Cortex-M4 firmware blobs for the Freescale i.MX SoCs. + + This library is provided by Freescale as-is and doesn't have + an upstream. diff --git a/package/freescale-imx/imx-m4-demos/imx-m4-demos.hash b/package/freescale-imx/imx-m4-demos/imx-m4-demos.hash new file mode 100644 index 0000000000..fdbf1ab608 --- /dev/null +++ b/package/freescale-imx/imx-m4-demos/imx-m4-demos.hash @@ -0,0 +1,8 @@ +# locally computed +sha256 cc00d3b936d49b2794a2a99e10129437e70caba3fd26b8379b8c50dd22f73254 imx7d-sabresd-m4-freertos-1.0.1.bin +sha256 e4efb9646b66df867f618bd8121e14afe17ebadea4a405a4df951d45d841e681 imx7ulp-m4-demo-2.6.0.bin +sha256 4e41e270506870e0fd2d53e3d69afdcf6d613d099b0da5c516a512944c5c12c3 imx8mm-m4-demo-2.5.0.bin +sha256 fd441e75395b0c6f90626c883ee8a93406b14e7d55adc7925116254394bb7ad8 imx8mq-m4-demo-2.3.0.bin +sha256 4e83d60e27cd8ad67d4174ad3082a5f4a06b7df93571cfd2274615cbdf66eb6c imx8qx-m4-demo-2.5.0.bin + +# no hash for license file as it is different for each package listed above diff --git a/package/freescale-imx/imx-m4-demos/imx-m4-demos.mk b/package/freescale-imx/imx-m4-demos/imx-m4-demos.mk new file mode 100644 index 0000000000..6d08dcc8f8 --- /dev/null +++ b/package/freescale-imx/imx-m4-demos/imx-m4-demos.mk @@ -0,0 +1,72 @@ +################################################################################ +# +# imx-m4-demos +# +################################################################################ + +IMX_M4_DEMOS_SITE = $(FREESCALE_IMX_SITE) + +IMX_M4_DEMOS_LICENSE = NXP Semiconductor Software License Agreement +IMX_M4_DEMOS_LICENSE_FILES = COPYING +IMX_M4_DEMOS_REDISTRIBUTE = NO + +define IMX_M4_DEMOS_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_M4_DEMOS_DL_DIR)/$(IMX_M4_DEMOS_SOURCE)) +endef + +# Note: firmware names are copied to binaries directory with an "m4_" prefix, for easier post image scripting + +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP),y) +IMX_M4_DEMOS_VERSION = 2.6.0 +IMX_M4_DEMOS_SOURCE = imx7ulp-m4-demo-$(IMX_M4_DEMOS_VERSION).bin +IMX_M4_DEMOS_INSTALL_IMAGES = YES +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS + cp $(@D)/imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img $(BINARIES_DIR)/m4_imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img + cp $(@D)/imx7ulp_m4_demo.img $(BINARIES_DIR)/m4_imx7ulp_m4_demo.img + cp $(@D)/imx7ulp_rpmsg_lite_pingpong_rtos.img $(BINARIES_DIR)/m4_imx7ulp_rpmsg_lite_pingpong_rtos.img + cp $(@D)/imx7ulp_rpmsg_lite_str_echo_rtos.img $(BINARIES_DIR)/m4_imx7ulp_rpmsg_lite_str_echo_rtos.img + cp $(@D)/imx7ulp_wireless_uart_bridge.img $(BINARIES_DIR)/m4_imx7ulp_wireless_uart_bridge.img +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7),y) +IMX_M4_DEMOS_VERSION = 1.0.1 +IMX_M4_DEMOS_SOURCE = imx7d-sabresd-m4-freertos-$(IMX_M4_DEMOS_VERSION).bin +IMX_M4_DEMOS_INSTALL_IMAGES = YES +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS + cp $(@D)/imx7d_sabresd_m4_TCM_helloworld.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_helloworld.bin + cp $(@D)/imx7d_sabresd_m4_TCM_mcctty.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_mcctty.bin + cp $(@D)/imx7d_sabresd_m4_TCM_Pingpang.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_Pingpang.bin +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y) +IMX_M4_DEMOS_VERSION = 2.5.0 +IMX_M4_DEMOS_SOURCE = imx8qx-m4-demo-$(IMX_M4_DEMOS_VERSION).bin +IMX_M4_DEMOS_INSTALL_IMAGES = YES +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS + cp $(@D)/imx8qx_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_hello_world.bin + cp $(@D)/imx8qx_m4_TCM_power_mode_switch.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_power_mode_switch.bin + cp $(@D)/imx8qx_m4_TCM_rear_view_camera.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rear_view_camera.bin + cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin + cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin + cp $(@D)/imx8qx_m4_TCM_srtm_demo.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_srtm_demo.bin +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M),y) +IMX_M4_DEMOS_VERSION = 2.3.0 +IMX_M4_DEMOS_SOURCE = imx8mq-m4-demo-$(IMX_M4_DEMOS_VERSION).bin +IMX_M4_DEMOS_INSTALL_IMAGES = YES +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS + cp $(@D)/imx8mq_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_hello_world.bin + cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin + cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM),y) +IMX_M4_DEMOS_VERSION = 2.5.0 +IMX_M4_DEMOS_SOURCE = imx8mm-m4-demo-$(IMX_M4_DEMOS_VERSION).bin +IMX_M4_DEMOS_INSTALL_IMAGES = YES +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS + cp $(@D)/imx8mm_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_hello_world.bin + cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin + cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin + cp $(@D)/imx8mm_m4_TCM_sai_low_power_audio.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_sai_low_power_audio.bin +endef +endif + +$(eval $(generic-package)) -- 2.24.0.rc1 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v4 2/2] configs/freescale_imx7ulpevk: new defconfig 2019-11-10 23:08 ` [Buildroot] [PATCH v4 1/2] package/freescale-imx/imx-m4-demos: " Fabrice Goucem @ 2019-11-10 23:08 ` Fabrice Goucem 2019-11-11 8:53 ` Gilles Talis 2019-11-11 8:50 ` [Buildroot] [PATCH v4 1/2] package/freescale-imx/imx-m4-demos: new package Gilles Talis 2019-11-11 10:15 ` [Buildroot] [PATCH v5 " Fabrice Goucem 2 siblings, 1 reply; 21+ messages in thread From: Fabrice Goucem @ 2019-11-10 23:08 UTC (permalink / raw) To: buildroot Add basic support for NXP's i.MX7 ULP EVK board: https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/evaluation-kit-for-the-i.mx-7ulp-applications-processor:MCIMX7ULP-EVK Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> --- Changes v3 -> v4: - Renamed M4 package to imx-m4-demos (suggested by Gary Bisson) - Added link to m4-demos Yocto recipes in commit log (suggested by Gary Bisson) Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> --- .gitlab-ci.yml | 1 + DEVELOPERS | 2 + board/freescale/imx7ulpevk/readme.txt | 76 ++++++++++++++++++++++++++ configs/freescale_imx7ulpevk_defconfig | 28 ++++++++++ package/freescale-imx/Config.in | 8 ++- 5 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 board/freescale/imx7ulpevk/readme.txt create mode 100644 configs/freescale_imx7ulpevk_defconfig diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d71257a20..74ee5b732e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -177,6 +177,7 @@ freescale_imx6qsabreauto_defconfig: { extends: .defconfig } freescale_imx6qsabresd_defconfig: { extends: .defconfig } freescale_imx6sxsabresd_defconfig: { extends: .defconfig } freescale_imx7dsabresd_defconfig: { extends: .defconfig } +freescale_imx7ulpevk_defconfig: { extends: .defconfig } freescale_imx8mmevk_defconfig: { extends: .defconfig } freescale_imx8mqevk_defconfig: { extends: .defconfig } freescale_imx8qxpmek_defconfig: { extends: .defconfig } diff --git a/DEVELOPERS b/DEVELOPERS index 194e5249d0..2205a49000 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -875,6 +875,8 @@ F: package/tinymembench/ F: package/whois/ N: Fabrice Goucem <fabrice.goucem@nxp.com> +F: board/freescale/imx7ulpevk/ +F: configs/freescale_imx7ulpevk_defconfig F: package/freescale-imx/imx-m4-firmware/ N: Falco Hyfing <hyfinglists@gmail.com> diff --git a/board/freescale/imx7ulpevk/readme.txt b/board/freescale/imx7ulpevk/readme.txt new file mode 100644 index 0000000000..a2aa68b46f --- /dev/null +++ b/board/freescale/imx7ulpevk/readme.txt @@ -0,0 +1,76 @@ +**************************** +Freescale i.MX7ULP EVK board +**************************** + +This file documents the Buildroot support for the Freescale i.MX7ULP EVK board. + +Build +===== + +First, configure Buildroot for your i.MX7ULP EVK board: + + make freescale_imx7ulpevk_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - boot.vfat + - imx7ulp-evkb.dtb + - m4_imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img + - m4_imx7ulp_m4_demo.img + - m4_imx7ulp_rpmsg_lite_pingpong_rtos.img + - m4_imx7ulp_rpmsg_lite_str_echo_rtos.img + - m4_imx7ulp_wireless_uart_bridge.img + - rootfs.ext2 + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot.imx + - zImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=./output/images/sdcard.img of=/dev/<your-sd-device> + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template. + +Flash QSPI with Cortex-M4 firmware +================================== + +Cortex-M4 firmware can be flashed onto QSPI NOR memory. +To do so, stop at u-boot prompt and run the following commands: + + sf probe + sf erase 0 30000 + fatload mmc 0 62000000 m4_imx7ulp_m4_demo.img + sf write 62000000 0 30000 + +Boot the i.MX7ULP EVK board +=========================== + +To boot your newly created system (refer to the i.MX 7ULP EVK Quick Start Guide [1] for guidance): +- insert the SD card in the micro SD slot of the board; +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! + +References +========== +[1] https://www.nxp.com/docs/en/user-guide/IMX7ULPQSG.pdf diff --git a/configs/freescale_imx7ulpevk_defconfig b/configs/freescale_imx7ulpevk_defconfig new file mode 100644 index 0000000000..7998eb04ad --- /dev/null +++ b/configs/freescale_imx7ulpevk_defconfig @@ -0,0 +1,28 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.0.0" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7ulp-evkb" +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP=y +BR2_PACKAGE_IMX_M4_DEMOS=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx7ulp_evk" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.0.0" +BR2_TARGET_UBOOT_NEEDS_DTC=y +# BR2_TARGET_UBOOT_FORMAT_BIN is not set +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in index 55cd53aa37..639b789ebe 100644 --- a/package/freescale-imx/Config.in +++ b/package/freescale-imx/Config.in @@ -38,7 +38,10 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL bool "imx6ul/imx6ull" config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 - bool "imx7d/imx7ulp" + bool "imx7d" + +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP + bool "imx7ulp" config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M bool "imx8m" @@ -62,6 +65,7 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM default "IMX6S" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S default "IMX6UL" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL default "IMX7" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 + default "IMX7ULP" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP default "IMX8" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU @@ -80,12 +84,14 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 bool default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM -- 2.24.0.rc1 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v4 2/2] configs/freescale_imx7ulpevk: new defconfig 2019-11-10 23:08 ` [Buildroot] [PATCH v4 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem @ 2019-11-11 8:53 ` Gilles Talis 0 siblings, 0 replies; 21+ messages in thread From: Gilles Talis @ 2019-11-11 8:53 UTC (permalink / raw) To: buildroot Hello Fabrice, Le lun. 11 nov. 2019 ? 02:42, Fabrice Goucem <fabrice.goucem@nxp.com> a ?crit : > > Add basic support for NXP's i.MX7 ULP EVK board: > > https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/evaluation-kit-for-the-i.mx-7ulp-applications-processor:MCIMX7ULP-EVK > > Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> > > --- > Changes v3 -> v4: > - Renamed M4 package to imx-m4-demos (suggested by Gary Bisson) > - Added link to m4-demos Yocto recipes in commit log (suggested by > Gary Bisson) > > Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> > --- > .gitlab-ci.yml | 1 + > DEVELOPERS | 2 + > board/freescale/imx7ulpevk/readme.txt | 76 ++++++++++++++++++++++++++ > configs/freescale_imx7ulpevk_defconfig | 28 ++++++++++ > package/freescale-imx/Config.in | 8 ++- > 5 files changed, 114 insertions(+), 1 deletion(-) > create mode 100644 board/freescale/imx7ulpevk/readme.txt > create mode 100644 configs/freescale_imx7ulpevk_defconfig > > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml > index 1d71257a20..74ee5b732e 100644 > --- a/.gitlab-ci.yml > +++ b/.gitlab-ci.yml > @@ -177,6 +177,7 @@ freescale_imx6qsabreauto_defconfig: { extends: .defconfig } > freescale_imx6qsabresd_defconfig: { extends: .defconfig } > freescale_imx6sxsabresd_defconfig: { extends: .defconfig } > freescale_imx7dsabresd_defconfig: { extends: .defconfig } > +freescale_imx7ulpevk_defconfig: { extends: .defconfig } > freescale_imx8mmevk_defconfig: { extends: .defconfig } > freescale_imx8mqevk_defconfig: { extends: .defconfig } > freescale_imx8qxpmek_defconfig: { extends: .defconfig } > diff --git a/DEVELOPERS b/DEVELOPERS > index 194e5249d0..2205a49000 100644 > --- a/DEVELOPERS > +++ b/DEVELOPERS > @@ -875,6 +875,8 @@ F: package/tinymembench/ > F: package/whois/ > > N: Fabrice Goucem <fabrice.goucem@nxp.com> > +F: board/freescale/imx7ulpevk/ > +F: configs/freescale_imx7ulpevk_defconfig > F: package/freescale-imx/imx-m4-firmware/ > > N: Falco Hyfing <hyfinglists@gmail.com> > diff --git a/board/freescale/imx7ulpevk/readme.txt b/board/freescale/imx7ulpevk/readme.txt > new file mode 100644 > index 0000000000..a2aa68b46f > --- /dev/null > +++ b/board/freescale/imx7ulpevk/readme.txt > @@ -0,0 +1,76 @@ > +**************************** > +Freescale i.MX7ULP EVK board > +**************************** > + > +This file documents the Buildroot support for the Freescale i.MX7ULP EVK board. > + > +Build > +===== > + > +First, configure Buildroot for your i.MX7ULP EVK board: > + > + make freescale_imx7ulpevk_defconfig > + > +Build all components: > + > + make > + > +You will find in output/images/ the following files: > + - boot.vfat > + - imx7ulp-evkb.dtb > + - m4_imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img > + - m4_imx7ulp_m4_demo.img > + - m4_imx7ulp_rpmsg_lite_pingpong_rtos.img > + - m4_imx7ulp_rpmsg_lite_str_echo_rtos.img > + - m4_imx7ulp_wireless_uart_bridge.img > + - rootfs.ext2 > + - rootfs.ext4 > + - rootfs.tar > + - sdcard.img > + - u-boot.imx > + - zImage > + > +Create a bootable SD card > +========================= > + > +To determine the device associated to the SD card have a look in the > +/proc/partitions file: > + > + cat /proc/partitions > + > +Buildroot prepares a bootable "sdcard.img" image in the output/images/ > +directory, ready to be dumped on a SD card. Launch the following > +command as root: > + > + dd if=./output/images/sdcard.img of=/dev/<your-sd-device> > + > +*** WARNING! This will destroy all the card content. Use with care! *** > + > +For details about the medium image layout, see the definition in > +board/freescale/common/imx/genimage.cfg.template. > + > +Flash QSPI with Cortex-M4 firmware firmware -> demos > +================================== > + > +Cortex-M4 firmware can be flashed onto QSPI NOR memory. firmware -> demos > +To do so, stop at u-boot prompt and run the following commands: > + > + sf probe > + sf erase 0 30000 > + fatload mmc 0 62000000 m4_imx7ulp_m4_demo.img > + sf write 62000000 0 30000 > + > +Boot the i.MX7ULP EVK board > +=========================== > + > +To boot your newly created system (refer to the i.MX 7ULP EVK Quick Start Guide [1] for guidance): > +- insert the SD card in the micro SD slot of the board; > +- put a micro USB cable into the Debug USB Port and connect using a terminal > + emulator at 115200 bps, 8n1; > +- power on the board. > + > +Enjoy! > + > +References > +========== > +[1] https://www.nxp.com/docs/en/user-guide/IMX7ULPQSG.pdf > diff --git a/configs/freescale_imx7ulpevk_defconfig b/configs/freescale_imx7ulpevk_defconfig > new file mode 100644 > index 0000000000..7998eb04ad > --- /dev/null > +++ b/configs/freescale_imx7ulpevk_defconfig > @@ -0,0 +1,28 @@ > +BR2_arm=y > +BR2_cortex_a7=y > +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y > +BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0" > +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" > +BR2_LINUX_KERNEL=y > +BR2_LINUX_KERNEL_CUSTOM_GIT=y > +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git" > +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.0.0" > +BR2_LINUX_KERNEL_DEFCONFIG="imx_v7" > +BR2_LINUX_KERNEL_DTS_SUPPORT=y > +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7ulp-evkb" > +BR2_PACKAGE_FREESCALE_IMX=y > +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP=y > +BR2_PACKAGE_IMX_M4_DEMOS=y > +BR2_TARGET_ROOTFS_EXT2=y > +BR2_TARGET_ROOTFS_EXT2_4=y > +BR2_TARGET_UBOOT=y > +BR2_TARGET_UBOOT_BOARDNAME="mx7ulp_evk" > +BR2_TARGET_UBOOT_CUSTOM_GIT=y > +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git" > +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.0.0" > +BR2_TARGET_UBOOT_NEEDS_DTC=y > +# BR2_TARGET_UBOOT_FORMAT_BIN is not set > +BR2_TARGET_UBOOT_FORMAT_IMX=y > +BR2_PACKAGE_HOST_DOSFSTOOLS=y > +BR2_PACKAGE_HOST_GENIMAGE=y > +BR2_PACKAGE_HOST_MTOOLS=y > diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in > index 55cd53aa37..639b789ebe 100644 > --- a/package/freescale-imx/Config.in > +++ b/package/freescale-imx/Config.in > @@ -38,7 +38,10 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL > bool "imx6ul/imx6ull" > > config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 > - bool "imx7d/imx7ulp" > + bool "imx7d" > + > +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP > + bool "imx7ulp" > > config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M > bool "imx8m" > @@ -62,6 +65,7 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM > default "IMX6S" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S > default "IMX6UL" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL > default "IMX7" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 > + default "IMX7ULP" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP > default "IMX8" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M > > config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU > @@ -80,12 +84,14 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU > default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM > > config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 > bool > default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM > -- > 2.24.0.rc1 The rest is OK with me. thanks Gilles. ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v4 1/2] package/freescale-imx/imx-m4-demos: new package 2019-11-10 23:08 ` [Buildroot] [PATCH v4 1/2] package/freescale-imx/imx-m4-demos: " Fabrice Goucem 2019-11-10 23:08 ` [Buildroot] [PATCH v4 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem @ 2019-11-11 8:50 ` Gilles Talis 2019-11-11 10:09 ` [Buildroot] [EXT] " Fabrice Goucem 2019-11-11 10:15 ` [Buildroot] [PATCH v5 " Fabrice Goucem 2 siblings, 1 reply; 21+ messages in thread From: Gilles Talis @ 2019-11-11 8:50 UTC (permalink / raw) To: buildroot Hello Fabrice, Le lun. 11 nov. 2019 ? 02:44, Fabrice Goucem <fabrice.goucem@nxp.com> a ?crit : > > New package to download and install i.MX Cortex-M4 demos > for following SoCs: > * i.MX7D > * i.MX7ULP > * i.MX8M > * i.MX8MM > * i.MX8QXP > > Yocto recipes from where the demos location has been extracted: > https://source.codeaurora.org/external/imx/meta-fsl-bsp-release/tree/imx/meta-sdk/recipes-fsl/m4-demos?h=imx-morty&id=bfb1e26798775f161b14218ac6f1d50069bea8ed > > Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> > Tested-by: Julien Olivain <julien.olivain@nxp.com> > --- > DEVELOPERS | 3 + > board/freescale/common/imx/post-image.sh | 14 +++- > package/freescale-imx/Config.in | 8 +++ > package/freescale-imx/imx-m4-demos/Config.in | 11 +++ > .../imx-m4-demos/imx-m4-demos.hash | 8 +++ > .../imx-m4-demos/imx-m4-demos.mk | 72 +++++++++++++++++++ > 6 files changed, 115 insertions(+), 1 deletion(-) > create mode 100644 package/freescale-imx/imx-m4-demos/Config.in > create mode 100644 package/freescale-imx/imx-m4-demos/imx-m4-demos.hash > create mode 100644 package/freescale-imx/imx-m4-demos/imx-m4-demos.mk > > diff --git a/DEVELOPERS b/DEVELOPERS > index c0863aabc6..194e5249d0 100644 > --- a/DEVELOPERS > +++ b/DEVELOPERS > @@ -874,6 +874,9 @@ F: package/tinydtls/ > F: package/tinymembench/ > F: package/whois/ > > +N: Fabrice Goucem <fabrice.goucem@nxp.com> > +F: package/freescale-imx/imx-m4-firmware/ You need to change the package name here: imx-m4-firmware -> imx-m4-demos > + > N: Falco Hyfing <hyfinglists@gmail.com> > F: package/python-pymodbus/ > > diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh > index 19d8fffb63..f9851c2d3b 100755 > --- a/board/freescale/common/imx/post-image.sh > +++ b/board/freescale/common/imx/post-image.sh > @@ -30,6 +30,18 @@ linux_image() > fi > } > > +# > +# m4_image prints all available M4 firmware file names for the genimage > +# configuration file > +# > +m4_image() > +{ > + if grep -Eq "^BR2_PACKAGE_IMX_M4_FIRMWARE=y$" ${BR2_CONFIG}; then > + echo -n ", " > + for f in $(ls ${BINARIES_DIR}/m4_*); do echo -n "$(basename $f), "; done > + fi > +} > + > genimage_type() > { > if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then > @@ -75,7 +87,7 @@ uboot_image() > > main() > { > - local FILES="$(dtb_list) $(linux_image)" > + local FILES="$(dtb_list) $(linux_image) $(m4_image)" > local IMXOFFSET="$(imx_offset)" > local UBOOTBIN="$(uboot_image)" > local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" > diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in > index f010aab87b..55cd53aa37 100644 > --- a/package/freescale-imx/Config.in > +++ b/package/freescale-imx/Config.in > @@ -83,10 +83,18 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM > > +config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 > + bool > + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM > + > source "package/freescale-imx/imx-alsa-plugins/Config.in" > source "package/freescale-imx/imx-codec/Config.in" > source "package/freescale-imx/imx-kobs/Config.in" > source "package/freescale-imx/imx-lib/Config.in" > +source "package/freescale-imx/imx-m4-demos/Config.in" > source "package/freescale-imx/imx-m4fwloader/Config.in" > source "package/freescale-imx/imx-parser/Config.in" > source "package/freescale-imx/imx-uuc/Config.in" > diff --git a/package/freescale-imx/imx-m4-demos/Config.in b/package/freescale-imx/imx-m4-demos/Config.in > new file mode 100644 > index 0000000000..fc2312d410 > --- /dev/null > +++ b/package/freescale-imx/imx-m4-demos/Config.in > @@ -0,0 +1,11 @@ > +comment "imx-m4-demos needs an i.MX platform with Cortex-M4" > + depends on !BR2_PACKAGE_FREESCALE_IMX_HAS_M4 > + > +config BR2_PACKAGE_IMX_M4_DEMOS > + bool "imx-m4-demos" > + depends on BR2_PACKAGE_FREESCALE_IMX_HAS_M4 > + help > + Cortex-M4 firmware blobs for the Freescale i.MX SoCs. > + > + This library is provided by Freescale as-is and doesn't have > + an upstream. > diff --git a/package/freescale-imx/imx-m4-demos/imx-m4-demos.hash b/package/freescale-imx/imx-m4-demos/imx-m4-demos.hash > new file mode 100644 > index 0000000000..fdbf1ab608 > --- /dev/null > +++ b/package/freescale-imx/imx-m4-demos/imx-m4-demos.hash > @@ -0,0 +1,8 @@ > +# locally computed > +sha256 cc00d3b936d49b2794a2a99e10129437e70caba3fd26b8379b8c50dd22f73254 imx7d-sabresd-m4-freertos-1.0.1.bin > +sha256 e4efb9646b66df867f618bd8121e14afe17ebadea4a405a4df951d45d841e681 imx7ulp-m4-demo-2.6.0.bin > +sha256 4e41e270506870e0fd2d53e3d69afdcf6d613d099b0da5c516a512944c5c12c3 imx8mm-m4-demo-2.5.0.bin > +sha256 fd441e75395b0c6f90626c883ee8a93406b14e7d55adc7925116254394bb7ad8 imx8mq-m4-demo-2.3.0.bin > +sha256 4e83d60e27cd8ad67d4174ad3082a5f4a06b7df93571cfd2274615cbdf66eb6c imx8qx-m4-demo-2.5.0.bin > + > +# no hash for license file as it is different for each package listed above > diff --git a/package/freescale-imx/imx-m4-demos/imx-m4-demos.mk b/package/freescale-imx/imx-m4-demos/imx-m4-demos.mk > new file mode 100644 > index 0000000000..6d08dcc8f8 > --- /dev/null > +++ b/package/freescale-imx/imx-m4-demos/imx-m4-demos.mk > @@ -0,0 +1,72 @@ > +################################################################################ > +# > +# imx-m4-demos > +# > +################################################################################ > + > +IMX_M4_DEMOS_SITE = $(FREESCALE_IMX_SITE) > + > +IMX_M4_DEMOS_LICENSE = NXP Semiconductor Software License Agreement > +IMX_M4_DEMOS_LICENSE_FILES = COPYING > +IMX_M4_DEMOS_REDISTRIBUTE = NO > + > +define IMX_M4_DEMOS_EXTRACT_CMDS > + $(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_M4_DEMOS_DL_DIR)/$(IMX_M4_DEMOS_SOURCE)) > +endef > + > +# Note: firmware names are copied to binaries directory with an "m4_" prefix, for easier post image scripting > + > +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP),y) > +IMX_M4_DEMOS_VERSION = 2.6.0 > +IMX_M4_DEMOS_SOURCE = imx7ulp-m4-demo-$(IMX_M4_DEMOS_VERSION).bin > +IMX_M4_DEMOS_INSTALL_IMAGES = YES > +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS > + cp $(@D)/imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img $(BINARIES_DIR)/m4_imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img > + cp $(@D)/imx7ulp_m4_demo.img $(BINARIES_DIR)/m4_imx7ulp_m4_demo.img > + cp $(@D)/imx7ulp_rpmsg_lite_pingpong_rtos.img $(BINARIES_DIR)/m4_imx7ulp_rpmsg_lite_pingpong_rtos.img > + cp $(@D)/imx7ulp_rpmsg_lite_str_echo_rtos.img $(BINARIES_DIR)/m4_imx7ulp_rpmsg_lite_str_echo_rtos.img > + cp $(@D)/imx7ulp_wireless_uart_bridge.img $(BINARIES_DIR)/m4_imx7ulp_wireless_uart_bridge.img > +endef > +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7),y) > +IMX_M4_DEMOS_VERSION = 1.0.1 > +IMX_M4_DEMOS_SOURCE = imx7d-sabresd-m4-freertos-$(IMX_M4_DEMOS_VERSION).bin > +IMX_M4_DEMOS_INSTALL_IMAGES = YES > +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS > + cp $(@D)/imx7d_sabresd_m4_TCM_helloworld.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_helloworld.bin > + cp $(@D)/imx7d_sabresd_m4_TCM_mcctty.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_mcctty.bin > + cp $(@D)/imx7d_sabresd_m4_TCM_Pingpang.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_Pingpang.bin > +endef > +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y) > +IMX_M4_DEMOS_VERSION = 2.5.0 > +IMX_M4_DEMOS_SOURCE = imx8qx-m4-demo-$(IMX_M4_DEMOS_VERSION).bin > +IMX_M4_DEMOS_INSTALL_IMAGES = YES > +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS > + cp $(@D)/imx8qx_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_hello_world.bin > + cp $(@D)/imx8qx_m4_TCM_power_mode_switch.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_power_mode_switch.bin > + cp $(@D)/imx8qx_m4_TCM_rear_view_camera.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rear_view_camera.bin > + cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin > + cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin > + cp $(@D)/imx8qx_m4_TCM_srtm_demo.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_srtm_demo.bin > +endef > +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M),y) > +IMX_M4_DEMOS_VERSION = 2.3.0 > +IMX_M4_DEMOS_SOURCE = imx8mq-m4-demo-$(IMX_M4_DEMOS_VERSION).bin > +IMX_M4_DEMOS_INSTALL_IMAGES = YES > +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS > + cp $(@D)/imx8mq_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_hello_world.bin > + cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin > + cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin > +endef > +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM),y) > +IMX_M4_DEMOS_VERSION = 2.5.0 > +IMX_M4_DEMOS_SOURCE = imx8mm-m4-demo-$(IMX_M4_DEMOS_VERSION).bin > +IMX_M4_DEMOS_INSTALL_IMAGES = YES > +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS > + cp $(@D)/imx8mm_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_hello_world.bin > + cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin > + cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin > + cp $(@D)/imx8mm_m4_TCM_sai_low_power_audio.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_sai_low_power_audio.bin > +endef > +endif > + > +$(eval $(generic-package)) Other than that, the rest is OK with me. thanks Gilles. ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [EXT] Re: [PATCH v4 1/2] package/freescale-imx/imx-m4-demos: new package 2019-11-11 8:50 ` [Buildroot] [PATCH v4 1/2] package/freescale-imx/imx-m4-demos: new package Gilles Talis @ 2019-11-11 10:09 ` Fabrice Goucem 0 siblings, 0 replies; 21+ messages in thread From: Fabrice Goucem @ 2019-11-11 10:09 UTC (permalink / raw) To: buildroot Hello Gilles, Thanks for the review. On Mon, 2019-11-11 at 09:50 +0100, Gilles Talis wrote: > Hello Fabrice, > > Le lun. 11 nov. 2019 ? 02:44, Fabrice Goucem <fabrice.goucem@nxp.com> > a ?crit : > > New package to download and install i.MX Cortex-M4 demos > > for following SoCs: > > * i.MX7D > > * i.MX7ULP > > * i.MX8M > > * i.MX8MM > > * i.MX8QXP > > > > Yocto recipes from where the demos location has been extracted: > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsource.codeaurora.org%2Fexternal%2Fimx%2Fmeta-fsl-bsp-release%2Ftree%2Fimx%2Fmeta-sdk%2Frecipes-fsl%2Fm4-demos%3Fh%3Dimx-morty%26id%3Dbfb1e26798775f161b14218ac6f1d50069bea8ed&data=02%7C01%7Cfabrice.goucem%40nxp.com%7Cc21a49595bba4a98f54e08d7668440b0%7C686ea1d3bc2b4c6fa92cd99c5c301635%7C0%7C0%7C637090590525363574&sdata=Y8DTYqGNj6tjGOMShOhjmcSUvquwygc2SWik1JLvf1c%3D&reserved=0 > > > > Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> > > Tested-by: Julien Olivain <julien.olivain@nxp.com> > > --- > > DEVELOPERS | 3 + > > board/freescale/common/imx/post-image.sh | 14 +++- > > package/freescale-imx/Config.in | 8 +++ > > package/freescale-imx/imx-m4-demos/Config.in | 11 +++ > > .../imx-m4-demos/imx-m4-demos.hash | 8 +++ > > .../imx-m4-demos/imx-m4-demos.mk | 72 > > +++++++++++++++++++ > > 6 files changed, 115 insertions(+), 1 deletion(-) > > create mode 100644 package/freescale-imx/imx-m4-demos/Config.in > > create mode 100644 package/freescale-imx/imx-m4-demos/imx-m4- > > demos.hash > > create mode 100644 package/freescale-imx/imx-m4-demos/imx-m4- > > demos.mk > > > > diff --git a/DEVELOPERS b/DEVELOPERS > > index c0863aabc6..194e5249d0 100644 > > --- a/DEVELOPERS > > +++ b/DEVELOPERS > > @@ -874,6 +874,9 @@ F: package/tinydtls/ > > F: package/tinymembench/ > > F: package/whois/ > > > > +N: Fabrice Goucem <fabrice.goucem@nxp.com> > > +F: package/freescale-imx/imx-m4-firmware/ > You need to change the package name here: imx-m4-firmware -> imx-m4- > demos Thanks for spotting that one. > > > + > > N: Falco Hyfing <hyfinglists@gmail.com> > > F: package/python-pymodbus/ > > > > diff --git a/board/freescale/common/imx/post-image.sh > > b/board/freescale/common/imx/post-image.sh > > index 19d8fffb63..f9851c2d3b 100755 > > --- a/board/freescale/common/imx/post-image.sh > > +++ b/board/freescale/common/imx/post-image.sh > > @@ -30,6 +30,18 @@ linux_image() > > fi > > } > > > > +# > > +# m4_image prints all available M4 firmware file names for the > > genimage > > +# configuration file > > +# > > +m4_image() > > +{ > > + if grep -Eq "^BR2_PACKAGE_IMX_M4_FIRMWARE=y$" There's this as well, which I'm fixing in v5. > > ${BR2_CONFIG}; then > > + echo -n ", " > > + for f in $(ls ${BINARIES_DIR}/m4_*); do echo -n > > "$(basename $f), "; done > > + fi > > +} > > + > > genimage_type() > > { > > if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" > > ${BR2_CONFIG}; then > > @@ -75,7 +87,7 @@ uboot_image() > > > > main() > > { > > - local FILES="$(dtb_list) $(linux_image)" > > + local FILES="$(dtb_list) $(linux_image) $(m4_image)" > > local IMXOFFSET="$(imx_offset)" > > local UBOOTBIN="$(uboot_image)" > > local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" > > diff --git a/package/freescale-imx/Config.in b/package/freescale- > > imx/Config.in > > index f010aab87b..55cd53aa37 100644 > > --- a/package/freescale-imx/Config.in > > +++ b/package/freescale-imx/Config.in > > @@ -83,10 +83,18 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU > > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ > > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM > > > > +config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 > > + bool > > + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ > > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ > > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ > > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM > > + > > source "package/freescale-imx/imx-alsa-plugins/Config.in" > > source "package/freescale-imx/imx-codec/Config.in" > > source "package/freescale-imx/imx-kobs/Config.in" > > source "package/freescale-imx/imx-lib/Config.in" > > +source "package/freescale-imx/imx-m4-demos/Config.in" > > source "package/freescale-imx/imx-m4fwloader/Config.in" > > source "package/freescale-imx/imx-parser/Config.in" > > source "package/freescale-imx/imx-uuc/Config.in" > > diff --git a/package/freescale-imx/imx-m4-demos/Config.in > > b/package/freescale-imx/imx-m4-demos/Config.in > > new file mode 100644 > > index 0000000000..fc2312d410 > > --- /dev/null > > +++ b/package/freescale-imx/imx-m4-demos/Config.in > > @@ -0,0 +1,11 @@ > > +comment "imx-m4-demos needs an i.MX platform with Cortex-M4" > > + depends on !BR2_PACKAGE_FREESCALE_IMX_HAS_M4 > > + > > +config BR2_PACKAGE_IMX_M4_DEMOS > > + bool "imx-m4-demos" > > + depends on BR2_PACKAGE_FREESCALE_IMX_HAS_M4 > > + help > > + Cortex-M4 firmware blobs for the Freescale i.MX SoCs. > > + > > + This library is provided by Freescale as-is and doesn't > > have > > + an upstream. > > diff --git a/package/freescale-imx/imx-m4-demos/imx-m4-demos.hash > > b/package/freescale-imx/imx-m4-demos/imx-m4-demos.hash > > new file mode 100644 > > index 0000000000..fdbf1ab608 > > --- /dev/null > > +++ b/package/freescale-imx/imx-m4-demos/imx-m4-demos.hash > > @@ -0,0 +1,8 @@ > > +# locally computed > > +sha256 cc00d3b936d49b2794a2a99e10129437e70caba3fd26b8379b8c50dd22 > > f73254 imx7d-sabresd-m4-freertos-1.0.1.bin > > +sha256 e4efb9646b66df867f618bd8121e14afe17ebadea4a405a4df951d45d8 > > 41e681 imx7ulp-m4-demo-2.6.0.bin > > +sha256 4e41e270506870e0fd2d53e3d69afdcf6d613d099b0da5c516a512944c > > 5c12c3 imx8mm-m4-demo-2.5.0.bin > > +sha256 fd441e75395b0c6f90626c883ee8a93406b14e7d55adc7925116254394 > > bb7ad8 imx8mq-m4-demo-2.3.0.bin > > +sha256 4e83d60e27cd8ad67d4174ad3082a5f4a06b7df93571cfd2274615cbdf > > 66eb6c imx8qx-m4-demo-2.5.0.bin > > + > > +# no hash for license file as it is different for each package > > listed above > > diff --git a/package/freescale-imx/imx-m4-demos/imx-m4-demos.mk > > b/package/freescale-imx/imx-m4-demos/imx-m4-demos.mk > > new file mode 100644 > > index 0000000000..6d08dcc8f8 > > --- /dev/null > > +++ b/package/freescale-imx/imx-m4-demos/imx-m4-demos.mk > > @@ -0,0 +1,72 @@ > > +################################################################## > > ############## > > +# > > +# imx-m4-demos > > +# > > +################################################################## > > ############## > > + > > +IMX_M4_DEMOS_SITE = $(FREESCALE_IMX_SITE) > > + > > +IMX_M4_DEMOS_LICENSE = NXP Semiconductor Software License > > Agreement > > +IMX_M4_DEMOS_LICENSE_FILES = COPYING > > +IMX_M4_DEMOS_REDISTRIBUTE = NO > > + > > +define IMX_M4_DEMOS_EXTRACT_CMDS > > + $(call > > FREESCALE_IMX_EXTRACT_HELPER,$(IMX_M4_DEMOS_DL_DIR)/$(IMX_M4_DEMOS_ > > SOURCE)) > > +endef > > + > > +# Note: firmware names are copied to binaries directory with an > > "m4_" prefix, for easier post image scripting > > + > > +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP),y) > > +IMX_M4_DEMOS_VERSION = 2.6.0 > > +IMX_M4_DEMOS_SOURCE = imx7ulp-m4-demo-$(IMX_M4_DEMOS_VERSION).bin > > +IMX_M4_DEMOS_INSTALL_IMAGES = YES > > +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS > > + cp $(@D)/imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img > > $(BINARIES_DIR)/m4_imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.i > > mg > > + cp $(@D)/imx7ulp_m4_demo.img > > $(BINARIES_DIR)/m4_imx7ulp_m4_demo.img > > + cp $(@D)/imx7ulp_rpmsg_lite_pingpong_rtos.img > > $(BINARIES_DIR)/m4_imx7ulp_rpmsg_lite_pingpong_rtos.img > > + cp $(@D)/imx7ulp_rpmsg_lite_str_echo_rtos.img > > $(BINARIES_DIR)/m4_imx7ulp_rpmsg_lite_str_echo_rtos.img > > + cp $(@D)/imx7ulp_wireless_uart_bridge.img > > $(BINARIES_DIR)/m4_imx7ulp_wireless_uart_bridge.img > > +endef > > +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7),y) > > +IMX_M4_DEMOS_VERSION = 1.0.1 > > +IMX_M4_DEMOS_SOURCE = imx7d-sabresd-m4-freertos- > > $(IMX_M4_DEMOS_VERSION).bin > > +IMX_M4_DEMOS_INSTALL_IMAGES = YES > > +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS > > + cp $(@D)/imx7d_sabresd_m4_TCM_helloworld.bin > > $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_helloworld.bin > > + cp $(@D)/imx7d_sabresd_m4_TCM_mcctty.bin > > $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_mcctty.bin > > + cp $(@D)/imx7d_sabresd_m4_TCM_Pingpang.bin > > $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_Pingpang.bin > > +endef > > +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y) > > +IMX_M4_DEMOS_VERSION = 2.5.0 > > +IMX_M4_DEMOS_SOURCE = imx8qx-m4-demo-$(IMX_M4_DEMOS_VERSION).bin > > +IMX_M4_DEMOS_INSTALL_IMAGES = YES > > +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS > > + cp $(@D)/imx8qx_m4_TCM_hello_world.bin > > $(BINARIES_DIR)/m4_imx8qx_m4_TCM_hello_world.bin > > + cp $(@D)/imx8qx_m4_TCM_power_mode_switch.bin > > $(BINARIES_DIR)/m4_imx8qx_m4_TCM_power_mode_switch.bin > > + cp $(@D)/imx8qx_m4_TCM_rear_view_camera.bin > > $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rear_view_camera.bin > > + cp > > $(@D)/imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin > > $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_rem > > ote.bin > > + cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin > > $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin > > + cp $(@D)/imx8qx_m4_TCM_srtm_demo.bin > > $(BINARIES_DIR)/m4_imx8qx_m4_TCM_srtm_demo.bin > > +endef > > +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M),y) > > +IMX_M4_DEMOS_VERSION = 2.3.0 > > +IMX_M4_DEMOS_SOURCE = imx8mq-m4-demo-$(IMX_M4_DEMOS_VERSION).bin > > +IMX_M4_DEMOS_INSTALL_IMAGES = YES > > +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS > > + cp $(@D)/imx8mq_m4_TCM_hello_world.bin > > $(BINARIES_DIR)/m4_imx8mq_m4_TCM_hello_world.bin > > + cp > > $(@D)/imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin > > $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_rem > > ote.bin > > + cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin > > $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin > > +endef > > +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM),y) > > +IMX_M4_DEMOS_VERSION = 2.5.0 > > +IMX_M4_DEMOS_SOURCE = imx8mm-m4-demo-$(IMX_M4_DEMOS_VERSION).bin > > +IMX_M4_DEMOS_INSTALL_IMAGES = YES > > +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS > > + cp $(@D)/imx8mm_m4_TCM_hello_world.bin > > $(BINARIES_DIR)/m4_imx8mm_m4_TCM_hello_world.bin > > + cp > > $(@D)/imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin > > $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_rem > > ote.bin > > + cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin > > $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin > > + cp $(@D)/imx8mm_m4_TCM_sai_low_power_audio.bin > > $(BINARIES_DIR)/m4_imx8mm_m4_TCM_sai_low_power_audio.bin > > +endef > > +endif > > + > > +$(eval $(generic-package)) > Other than that, the rest is OK with me. > > thanks > Gilles. Fixed all (plus the board/freescale/common/imx/post-image.sh one) in a coming v5. Regards, Fabrice ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v5 1/2] package/freescale-imx/imx-m4-demos: new package 2019-11-10 23:08 ` [Buildroot] [PATCH v4 1/2] package/freescale-imx/imx-m4-demos: " Fabrice Goucem 2019-11-10 23:08 ` [Buildroot] [PATCH v4 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem 2019-11-11 8:50 ` [Buildroot] [PATCH v4 1/2] package/freescale-imx/imx-m4-demos: new package Gilles Talis @ 2019-11-11 10:15 ` Fabrice Goucem 2019-11-11 10:15 ` [Buildroot] [PATCH v5 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem 2019-11-11 15:29 ` [Buildroot] [PATCH v5 1/2] package/freescale-imx/imx-m4-demos: new package Gilles Talis 2 siblings, 2 replies; 21+ messages in thread From: Fabrice Goucem @ 2019-11-11 10:15 UTC (permalink / raw) To: buildroot New package to download and install i.MX Cortex-M4 demos for following SoCs: * i.MX7D * i.MX7ULP * i.MX8M * i.MX8MM * i.MX8QXP Yocto recipes from where the demos location has been extracted: https://source.codeaurora.org/external/imx/meta-fsl-bsp-release/tree/imx/meta-sdk/recipes-fsl/m4-demos?h=imx-morty&id=bfb1e26798775f161b14218ac6f1d50069bea8ed Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> Tested-by: Julien Olivain <julien.olivain@nxp.com> --- DEVELOPERS | 3 + board/freescale/common/imx/post-image.sh | 14 +++- package/freescale-imx/Config.in | 8 +++ package/freescale-imx/imx-m4-demos/Config.in | 11 +++ .../imx-m4-demos/imx-m4-demos.hash | 8 +++ .../imx-m4-demos/imx-m4-demos.mk | 72 +++++++++++++++++++ 6 files changed, 115 insertions(+), 1 deletion(-) create mode 100644 package/freescale-imx/imx-m4-demos/Config.in create mode 100644 package/freescale-imx/imx-m4-demos/imx-m4-demos.hash create mode 100644 package/freescale-imx/imx-m4-demos/imx-m4-demos.mk diff --git a/DEVELOPERS b/DEVELOPERS index c0863aabc6..b2519ca2c2 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -874,6 +874,9 @@ F: package/tinydtls/ F: package/tinymembench/ F: package/whois/ +N: Fabrice Goucem <fabrice.goucem@nxp.com> +F: package/freescale-imx/imx-m4-demos/ + N: Falco Hyfing <hyfinglists@gmail.com> F: package/python-pymodbus/ diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh index 19d8fffb63..1aba516d9c 100755 --- a/board/freescale/common/imx/post-image.sh +++ b/board/freescale/common/imx/post-image.sh @@ -30,6 +30,18 @@ linux_image() fi } +# +# m4_image prints all available M4 demo file names for the genimage +# configuration file +# +m4_image() +{ + if grep -Eq "^BR2_PACKAGE_IMX_M4_DEMOS=y$" ${BR2_CONFIG}; then + echo -n ", " + for f in $(ls ${BINARIES_DIR}/m4_*); do echo -n "$(basename $f), "; done + fi +} + genimage_type() { if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then @@ -75,7 +87,7 @@ uboot_image() main() { - local FILES="$(dtb_list) $(linux_image)" + local FILES="$(dtb_list) $(linux_image) $(m4_image)" local IMXOFFSET="$(imx_offset)" local UBOOTBIN="$(uboot_image)" local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in index f010aab87b..55cd53aa37 100644 --- a/package/freescale-imx/Config.in +++ b/package/freescale-imx/Config.in @@ -83,10 +83,18 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM +config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 + bool + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM + source "package/freescale-imx/imx-alsa-plugins/Config.in" source "package/freescale-imx/imx-codec/Config.in" source "package/freescale-imx/imx-kobs/Config.in" source "package/freescale-imx/imx-lib/Config.in" +source "package/freescale-imx/imx-m4-demos/Config.in" source "package/freescale-imx/imx-m4fwloader/Config.in" source "package/freescale-imx/imx-parser/Config.in" source "package/freescale-imx/imx-uuc/Config.in" diff --git a/package/freescale-imx/imx-m4-demos/Config.in b/package/freescale-imx/imx-m4-demos/Config.in new file mode 100644 index 0000000000..b1cbebb74f --- /dev/null +++ b/package/freescale-imx/imx-m4-demos/Config.in @@ -0,0 +1,11 @@ +comment "imx-m4-demos needs an i.MX platform with Cortex-M4" + depends on !BR2_PACKAGE_FREESCALE_IMX_HAS_M4 + +config BR2_PACKAGE_IMX_M4_DEMOS + bool "imx-m4-demos" + depends on BR2_PACKAGE_FREESCALE_IMX_HAS_M4 + help + Cortex-M4 demo blobs for the Freescale i.MX SoCs. + + This library is provided by Freescale as-is and doesn't have + an upstream. diff --git a/package/freescale-imx/imx-m4-demos/imx-m4-demos.hash b/package/freescale-imx/imx-m4-demos/imx-m4-demos.hash new file mode 100644 index 0000000000..fdbf1ab608 --- /dev/null +++ b/package/freescale-imx/imx-m4-demos/imx-m4-demos.hash @@ -0,0 +1,8 @@ +# locally computed +sha256 cc00d3b936d49b2794a2a99e10129437e70caba3fd26b8379b8c50dd22f73254 imx7d-sabresd-m4-freertos-1.0.1.bin +sha256 e4efb9646b66df867f618bd8121e14afe17ebadea4a405a4df951d45d841e681 imx7ulp-m4-demo-2.6.0.bin +sha256 4e41e270506870e0fd2d53e3d69afdcf6d613d099b0da5c516a512944c5c12c3 imx8mm-m4-demo-2.5.0.bin +sha256 fd441e75395b0c6f90626c883ee8a93406b14e7d55adc7925116254394bb7ad8 imx8mq-m4-demo-2.3.0.bin +sha256 4e83d60e27cd8ad67d4174ad3082a5f4a06b7df93571cfd2274615cbdf66eb6c imx8qx-m4-demo-2.5.0.bin + +# no hash for license file as it is different for each package listed above diff --git a/package/freescale-imx/imx-m4-demos/imx-m4-demos.mk b/package/freescale-imx/imx-m4-demos/imx-m4-demos.mk new file mode 100644 index 0000000000..6d08dcc8f8 --- /dev/null +++ b/package/freescale-imx/imx-m4-demos/imx-m4-demos.mk @@ -0,0 +1,72 @@ +################################################################################ +# +# imx-m4-demos +# +################################################################################ + +IMX_M4_DEMOS_SITE = $(FREESCALE_IMX_SITE) + +IMX_M4_DEMOS_LICENSE = NXP Semiconductor Software License Agreement +IMX_M4_DEMOS_LICENSE_FILES = COPYING +IMX_M4_DEMOS_REDISTRIBUTE = NO + +define IMX_M4_DEMOS_EXTRACT_CMDS + $(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_M4_DEMOS_DL_DIR)/$(IMX_M4_DEMOS_SOURCE)) +endef + +# Note: firmware names are copied to binaries directory with an "m4_" prefix, for easier post image scripting + +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP),y) +IMX_M4_DEMOS_VERSION = 2.6.0 +IMX_M4_DEMOS_SOURCE = imx7ulp-m4-demo-$(IMX_M4_DEMOS_VERSION).bin +IMX_M4_DEMOS_INSTALL_IMAGES = YES +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS + cp $(@D)/imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img $(BINARIES_DIR)/m4_imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img + cp $(@D)/imx7ulp_m4_demo.img $(BINARIES_DIR)/m4_imx7ulp_m4_demo.img + cp $(@D)/imx7ulp_rpmsg_lite_pingpong_rtos.img $(BINARIES_DIR)/m4_imx7ulp_rpmsg_lite_pingpong_rtos.img + cp $(@D)/imx7ulp_rpmsg_lite_str_echo_rtos.img $(BINARIES_DIR)/m4_imx7ulp_rpmsg_lite_str_echo_rtos.img + cp $(@D)/imx7ulp_wireless_uart_bridge.img $(BINARIES_DIR)/m4_imx7ulp_wireless_uart_bridge.img +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7),y) +IMX_M4_DEMOS_VERSION = 1.0.1 +IMX_M4_DEMOS_SOURCE = imx7d-sabresd-m4-freertos-$(IMX_M4_DEMOS_VERSION).bin +IMX_M4_DEMOS_INSTALL_IMAGES = YES +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS + cp $(@D)/imx7d_sabresd_m4_TCM_helloworld.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_helloworld.bin + cp $(@D)/imx7d_sabresd_m4_TCM_mcctty.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_mcctty.bin + cp $(@D)/imx7d_sabresd_m4_TCM_Pingpang.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_Pingpang.bin +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y) +IMX_M4_DEMOS_VERSION = 2.5.0 +IMX_M4_DEMOS_SOURCE = imx8qx-m4-demo-$(IMX_M4_DEMOS_VERSION).bin +IMX_M4_DEMOS_INSTALL_IMAGES = YES +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS + cp $(@D)/imx8qx_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_hello_world.bin + cp $(@D)/imx8qx_m4_TCM_power_mode_switch.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_power_mode_switch.bin + cp $(@D)/imx8qx_m4_TCM_rear_view_camera.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rear_view_camera.bin + cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin + cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin + cp $(@D)/imx8qx_m4_TCM_srtm_demo.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_srtm_demo.bin +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M),y) +IMX_M4_DEMOS_VERSION = 2.3.0 +IMX_M4_DEMOS_SOURCE = imx8mq-m4-demo-$(IMX_M4_DEMOS_VERSION).bin +IMX_M4_DEMOS_INSTALL_IMAGES = YES +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS + cp $(@D)/imx8mq_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_hello_world.bin + cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin + cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin +endef +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM),y) +IMX_M4_DEMOS_VERSION = 2.5.0 +IMX_M4_DEMOS_SOURCE = imx8mm-m4-demo-$(IMX_M4_DEMOS_VERSION).bin +IMX_M4_DEMOS_INSTALL_IMAGES = YES +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS + cp $(@D)/imx8mm_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_hello_world.bin + cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin + cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin + cp $(@D)/imx8mm_m4_TCM_sai_low_power_audio.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_sai_low_power_audio.bin +endef +endif + +$(eval $(generic-package)) -- 2.24.0.rc1 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v5 2/2] configs/freescale_imx7ulpevk: new defconfig 2019-11-11 10:15 ` [Buildroot] [PATCH v5 " Fabrice Goucem @ 2019-11-11 10:15 ` Fabrice Goucem 2019-11-11 15:30 ` Gilles Talis 2019-11-11 15:29 ` [Buildroot] [PATCH v5 1/2] package/freescale-imx/imx-m4-demos: new package Gilles Talis 1 sibling, 1 reply; 21+ messages in thread From: Fabrice Goucem @ 2019-11-11 10:15 UTC (permalink / raw) To: buildroot Add basic support for NXP's i.MX7 ULP EVK board: https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/evaluation-kit-for-the-i.mx-7ulp-applications-processor:MCIMX7ULP-EVK Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> --- Changes v4 -> v5: - Changed all occurences of m4-firmware to m4-demos (suggested by Gilles Talis) - Changed wrong flag name in post-image.sh (indirectly suggested by Gilles Talis) Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> --- .gitlab-ci.yml | 1 + DEVELOPERS | 2 + board/freescale/imx7ulpevk/readme.txt | 76 ++++++++++++++++++++++++++ configs/freescale_imx7ulpevk_defconfig | 28 ++++++++++ package/freescale-imx/Config.in | 8 ++- 5 files changed, 114 insertions(+), 1 deletion(-) create mode 100644 board/freescale/imx7ulpevk/readme.txt create mode 100644 configs/freescale_imx7ulpevk_defconfig diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1d71257a20..74ee5b732e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -177,6 +177,7 @@ freescale_imx6qsabreauto_defconfig: { extends: .defconfig } freescale_imx6qsabresd_defconfig: { extends: .defconfig } freescale_imx6sxsabresd_defconfig: { extends: .defconfig } freescale_imx7dsabresd_defconfig: { extends: .defconfig } +freescale_imx7ulpevk_defconfig: { extends: .defconfig } freescale_imx8mmevk_defconfig: { extends: .defconfig } freescale_imx8mqevk_defconfig: { extends: .defconfig } freescale_imx8qxpmek_defconfig: { extends: .defconfig } diff --git a/DEVELOPERS b/DEVELOPERS index b2519ca2c2..ccd331e364 100644 --- a/DEVELOPERS +++ b/DEVELOPERS @@ -875,6 +875,8 @@ F: package/tinymembench/ F: package/whois/ N: Fabrice Goucem <fabrice.goucem@nxp.com> +F: board/freescale/imx7ulpevk/ +F: configs/freescale_imx7ulpevk_defconfig F: package/freescale-imx/imx-m4-demos/ N: Falco Hyfing <hyfinglists@gmail.com> diff --git a/board/freescale/imx7ulpevk/readme.txt b/board/freescale/imx7ulpevk/readme.txt new file mode 100644 index 0000000000..c18f901010 --- /dev/null +++ b/board/freescale/imx7ulpevk/readme.txt @@ -0,0 +1,76 @@ +**************************** +Freescale i.MX7ULP EVK board +**************************** + +This file documents the Buildroot support for the Freescale i.MX7ULP EVK board. + +Build +===== + +First, configure Buildroot for your i.MX7ULP EVK board: + + make freescale_imx7ulpevk_defconfig + +Build all components: + + make + +You will find in output/images/ the following files: + - boot.vfat + - imx7ulp-evkb.dtb + - m4_imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img + - m4_imx7ulp_m4_demo.img + - m4_imx7ulp_rpmsg_lite_pingpong_rtos.img + - m4_imx7ulp_rpmsg_lite_str_echo_rtos.img + - m4_imx7ulp_wireless_uart_bridge.img + - rootfs.ext2 + - rootfs.ext4 + - rootfs.tar + - sdcard.img + - u-boot.imx + - zImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Buildroot prepares a bootable "sdcard.img" image in the output/images/ +directory, ready to be dumped on a SD card. Launch the following +command as root: + + dd if=./output/images/sdcard.img of=/dev/<your-sd-device> + +*** WARNING! This will destroy all the card content. Use with care! *** + +For details about the medium image layout, see the definition in +board/freescale/common/imx/genimage.cfg.template. + +Flash QSPI with Cortex-M4 demo +============================== + +Cortex-M4 demo can be flashed onto QSPI NOR memory. +To do so, stop at u-boot prompt and run the following commands: + + sf probe + sf erase 0 30000 + fatload mmc 0 62000000 m4_imx7ulp_m4_demo.img + sf write 62000000 0 30000 + +Boot the i.MX7ULP EVK board +=========================== + +To boot your newly created system (refer to the i.MX 7ULP EVK Quick Start Guide [1] for guidance): +- insert the SD card in the micro SD slot of the board; +- put a micro USB cable into the Debug USB Port and connect using a terminal + emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! + +References +========== +[1] https://www.nxp.com/docs/en/user-guide/IMX7ULPQSG.pdf diff --git a/configs/freescale_imx7ulpevk_defconfig b/configs/freescale_imx7ulpevk_defconfig new file mode 100644 index 0000000000..7998eb04ad --- /dev/null +++ b/configs/freescale_imx7ulpevk_defconfig @@ -0,0 +1,28 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0" +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_CUSTOM_GIT=y +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git" +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.0.0" +BR2_LINUX_KERNEL_DEFCONFIG="imx_v7" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7ulp-evkb" +BR2_PACKAGE_FREESCALE_IMX=y +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP=y +BR2_PACKAGE_IMX_M4_DEMOS=y +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="mx7ulp_evk" +BR2_TARGET_UBOOT_CUSTOM_GIT=y +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git" +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.0.0" +BR2_TARGET_UBOOT_NEEDS_DTC=y +# BR2_TARGET_UBOOT_FORMAT_BIN is not set +BR2_TARGET_UBOOT_FORMAT_IMX=y +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in index 55cd53aa37..639b789ebe 100644 --- a/package/freescale-imx/Config.in +++ b/package/freescale-imx/Config.in @@ -38,7 +38,10 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL bool "imx6ul/imx6ull" config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 - bool "imx7d/imx7ulp" + bool "imx7d" + +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP + bool "imx7ulp" config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M bool "imx8m" @@ -62,6 +65,7 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM default "IMX6S" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S default "IMX6UL" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL default "IMX7" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 + default "IMX7ULP" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP default "IMX8" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU @@ -80,12 +84,14 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 bool default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM -- 2.24.0.rc1 ^ permalink raw reply related [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v5 2/2] configs/freescale_imx7ulpevk: new defconfig 2019-11-11 10:15 ` [Buildroot] [PATCH v5 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem @ 2019-11-11 15:30 ` Gilles Talis 0 siblings, 0 replies; 21+ messages in thread From: Gilles Talis @ 2019-11-11 15:30 UTC (permalink / raw) To: buildroot Hi Fabrice, all, Le lun. 11 nov. 2019 ? 11:15, Fabrice Goucem <fabrice.goucem@nxp.com> a ?crit : > > Add basic support for NXP's i.MX7 ULP EVK board: > > https://www.nxp.com/design/development-boards/i.mx-evaluation-and-development-boards/evaluation-kit-for-the-i.mx-7ulp-applications-processor:MCIMX7ULP-EVK > > Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> > > --- > Changes v4 -> v5: > - Changed all occurences of m4-firmware to m4-demos (suggested by > Gilles Talis) > - Changed wrong flag name in post-image.sh (indirectly suggested by > Gilles Talis) > > Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> > --- > .gitlab-ci.yml | 1 + > DEVELOPERS | 2 + > board/freescale/imx7ulpevk/readme.txt | 76 ++++++++++++++++++++++++++ > configs/freescale_imx7ulpevk_defconfig | 28 ++++++++++ > package/freescale-imx/Config.in | 8 ++- > 5 files changed, 114 insertions(+), 1 deletion(-) > create mode 100644 board/freescale/imx7ulpevk/readme.txt > create mode 100644 configs/freescale_imx7ulpevk_defconfig > > diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml > index 1d71257a20..74ee5b732e 100644 > --- a/.gitlab-ci.yml > +++ b/.gitlab-ci.yml > @@ -177,6 +177,7 @@ freescale_imx6qsabreauto_defconfig: { extends: .defconfig } > freescale_imx6qsabresd_defconfig: { extends: .defconfig } > freescale_imx6sxsabresd_defconfig: { extends: .defconfig } > freescale_imx7dsabresd_defconfig: { extends: .defconfig } > +freescale_imx7ulpevk_defconfig: { extends: .defconfig } > freescale_imx8mmevk_defconfig: { extends: .defconfig } > freescale_imx8mqevk_defconfig: { extends: .defconfig } > freescale_imx8qxpmek_defconfig: { extends: .defconfig } > diff --git a/DEVELOPERS b/DEVELOPERS > index b2519ca2c2..ccd331e364 100644 > --- a/DEVELOPERS > +++ b/DEVELOPERS > @@ -875,6 +875,8 @@ F: package/tinymembench/ > F: package/whois/ > > N: Fabrice Goucem <fabrice.goucem@nxp.com> > +F: board/freescale/imx7ulpevk/ > +F: configs/freescale_imx7ulpevk_defconfig > F: package/freescale-imx/imx-m4-demos/ > > N: Falco Hyfing <hyfinglists@gmail.com> > diff --git a/board/freescale/imx7ulpevk/readme.txt b/board/freescale/imx7ulpevk/readme.txt > new file mode 100644 > index 0000000000..c18f901010 > --- /dev/null > +++ b/board/freescale/imx7ulpevk/readme.txt > @@ -0,0 +1,76 @@ > +**************************** > +Freescale i.MX7ULP EVK board > +**************************** > + > +This file documents the Buildroot support for the Freescale i.MX7ULP EVK board. > + > +Build > +===== > + > +First, configure Buildroot for your i.MX7ULP EVK board: > + > + make freescale_imx7ulpevk_defconfig > + > +Build all components: > + > + make > + > +You will find in output/images/ the following files: > + - boot.vfat > + - imx7ulp-evkb.dtb > + - m4_imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img > + - m4_imx7ulp_m4_demo.img > + - m4_imx7ulp_rpmsg_lite_pingpong_rtos.img > + - m4_imx7ulp_rpmsg_lite_str_echo_rtos.img > + - m4_imx7ulp_wireless_uart_bridge.img > + - rootfs.ext2 > + - rootfs.ext4 > + - rootfs.tar > + - sdcard.img > + - u-boot.imx > + - zImage > + > +Create a bootable SD card > +========================= > + > +To determine the device associated to the SD card have a look in the > +/proc/partitions file: > + > + cat /proc/partitions > + > +Buildroot prepares a bootable "sdcard.img" image in the output/images/ > +directory, ready to be dumped on a SD card. Launch the following > +command as root: > + > + dd if=./output/images/sdcard.img of=/dev/<your-sd-device> > + > +*** WARNING! This will destroy all the card content. Use with care! *** > + > +For details about the medium image layout, see the definition in > +board/freescale/common/imx/genimage.cfg.template. > + > +Flash QSPI with Cortex-M4 demo > +============================== > + > +Cortex-M4 demo can be flashed onto QSPI NOR memory. > +To do so, stop at u-boot prompt and run the following commands: > + > + sf probe > + sf erase 0 30000 > + fatload mmc 0 62000000 m4_imx7ulp_m4_demo.img > + sf write 62000000 0 30000 > + > +Boot the i.MX7ULP EVK board > +=========================== > + > +To boot your newly created system (refer to the i.MX 7ULP EVK Quick Start Guide [1] for guidance): > +- insert the SD card in the micro SD slot of the board; > +- put a micro USB cable into the Debug USB Port and connect using a terminal > + emulator at 115200 bps, 8n1; > +- power on the board. > + > +Enjoy! > + > +References > +========== > +[1] https://www.nxp.com/docs/en/user-guide/IMX7ULPQSG.pdf > diff --git a/configs/freescale_imx7ulpevk_defconfig b/configs/freescale_imx7ulpevk_defconfig > new file mode 100644 > index 0000000000..7998eb04ad > --- /dev/null > +++ b/configs/freescale_imx7ulpevk_defconfig > @@ -0,0 +1,28 @@ > +BR2_arm=y > +BR2_cortex_a7=y > +BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y > +BR2_TARGET_GENERIC_GETTY_PORT="ttyLP0" > +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/common/imx/post-image.sh" > +BR2_LINUX_KERNEL=y > +BR2_LINUX_KERNEL_CUSTOM_GIT=y > +BR2_LINUX_KERNEL_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/linux-imx.git" > +BR2_LINUX_KERNEL_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.0.0" > +BR2_LINUX_KERNEL_DEFCONFIG="imx_v7" > +BR2_LINUX_KERNEL_DTS_SUPPORT=y > +BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx7ulp-evkb" > +BR2_PACKAGE_FREESCALE_IMX=y > +BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP=y > +BR2_PACKAGE_IMX_M4_DEMOS=y > +BR2_TARGET_ROOTFS_EXT2=y > +BR2_TARGET_ROOTFS_EXT2_4=y > +BR2_TARGET_UBOOT=y > +BR2_TARGET_UBOOT_BOARDNAME="mx7ulp_evk" > +BR2_TARGET_UBOOT_CUSTOM_GIT=y > +BR2_TARGET_UBOOT_CUSTOM_REPO_URL="https://source.codeaurora.org/external/imx/uboot-imx.git" > +BR2_TARGET_UBOOT_CUSTOM_REPO_VERSION="rel_imx_4.19.35_1.0.0" > +BR2_TARGET_UBOOT_NEEDS_DTC=y > +# BR2_TARGET_UBOOT_FORMAT_BIN is not set > +BR2_TARGET_UBOOT_FORMAT_IMX=y > +BR2_PACKAGE_HOST_DOSFSTOOLS=y > +BR2_PACKAGE_HOST_GENIMAGE=y > +BR2_PACKAGE_HOST_MTOOLS=y > diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in > index 55cd53aa37..639b789ebe 100644 > --- a/package/freescale-imx/Config.in > +++ b/package/freescale-imx/Config.in > @@ -38,7 +38,10 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL > bool "imx6ul/imx6ull" > > config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 > - bool "imx7d/imx7ulp" > + bool "imx7d" > + > +config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP > + bool "imx7ulp" > > config BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M > bool "imx8m" > @@ -62,6 +65,7 @@ config BR2_PACKAGE_FREESCALE_IMX_PLATFORM > default "IMX6S" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S > default "IMX6UL" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6UL > default "IMX7" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 > + default "IMX7ULP" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP > default "IMX8" if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M > > config BR2_PACKAGE_FREESCALE_IMX_HAS_VPU > @@ -80,12 +84,14 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU > default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6Q || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX6S || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM > > config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 > bool > default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM > -- > 2.24.0.rc1 > Reviewed-by: Gilles Talis <gilles.talis@gmail.com> ^ permalink raw reply [flat|nested] 21+ messages in thread
* [Buildroot] [PATCH v5 1/2] package/freescale-imx/imx-m4-demos: new package 2019-11-11 10:15 ` [Buildroot] [PATCH v5 " Fabrice Goucem 2019-11-11 10:15 ` [Buildroot] [PATCH v5 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem @ 2019-11-11 15:29 ` Gilles Talis 1 sibling, 0 replies; 21+ messages in thread From: Gilles Talis @ 2019-11-11 15:29 UTC (permalink / raw) To: buildroot Hi Fabrice, all, Le lun. 11 nov. 2019 ? 11:15, Fabrice Goucem <fabrice.goucem@nxp.com> a ?crit : > > New package to download and install i.MX Cortex-M4 demos > for following SoCs: > * i.MX7D > * i.MX7ULP > * i.MX8M > * i.MX8MM > * i.MX8QXP > > Yocto recipes from where the demos location has been extracted: > https://source.codeaurora.org/external/imx/meta-fsl-bsp-release/tree/imx/meta-sdk/recipes-fsl/m4-demos?h=imx-morty&id=bfb1e26798775f161b14218ac6f1d50069bea8ed > > Signed-off-by: Fabrice Goucem <fabrice.goucem@nxp.com> > Tested-by: Julien Olivain <julien.olivain@nxp.com> > --- > DEVELOPERS | 3 + > board/freescale/common/imx/post-image.sh | 14 +++- > package/freescale-imx/Config.in | 8 +++ > package/freescale-imx/imx-m4-demos/Config.in | 11 +++ > .../imx-m4-demos/imx-m4-demos.hash | 8 +++ > .../imx-m4-demos/imx-m4-demos.mk | 72 +++++++++++++++++++ > 6 files changed, 115 insertions(+), 1 deletion(-) > create mode 100644 package/freescale-imx/imx-m4-demos/Config.in > create mode 100644 package/freescale-imx/imx-m4-demos/imx-m4-demos.hash > create mode 100644 package/freescale-imx/imx-m4-demos/imx-m4-demos.mk > > diff --git a/DEVELOPERS b/DEVELOPERS > index c0863aabc6..b2519ca2c2 100644 > --- a/DEVELOPERS > +++ b/DEVELOPERS > @@ -874,6 +874,9 @@ F: package/tinydtls/ > F: package/tinymembench/ > F: package/whois/ > > +N: Fabrice Goucem <fabrice.goucem@nxp.com> > +F: package/freescale-imx/imx-m4-demos/ > + > N: Falco Hyfing <hyfinglists@gmail.com> > F: package/python-pymodbus/ > > diff --git a/board/freescale/common/imx/post-image.sh b/board/freescale/common/imx/post-image.sh > index 19d8fffb63..1aba516d9c 100755 > --- a/board/freescale/common/imx/post-image.sh > +++ b/board/freescale/common/imx/post-image.sh > @@ -30,6 +30,18 @@ linux_image() > fi > } > > +# > +# m4_image prints all available M4 demo file names for the genimage > +# configuration file > +# > +m4_image() > +{ > + if grep -Eq "^BR2_PACKAGE_IMX_M4_DEMOS=y$" ${BR2_CONFIG}; then > + echo -n ", " > + for f in $(ls ${BINARIES_DIR}/m4_*); do echo -n "$(basename $f), "; done > + fi > +} > + > genimage_type() > { > if grep -Eq "^BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M=y$" ${BR2_CONFIG}; then > @@ -75,7 +87,7 @@ uboot_image() > > main() > { > - local FILES="$(dtb_list) $(linux_image)" > + local FILES="$(dtb_list) $(linux_image) $(m4_image)" > local IMXOFFSET="$(imx_offset)" > local UBOOTBIN="$(uboot_image)" > local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" > diff --git a/package/freescale-imx/Config.in b/package/freescale-imx/Config.in > index f010aab87b..55cd53aa37 100644 > --- a/package/freescale-imx/Config.in > +++ b/package/freescale-imx/Config.in > @@ -83,10 +83,18 @@ config BR2_PACKAGE_FREESCALE_IMX_HAS_VIV_GPU > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ > BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM > > +config BR2_PACKAGE_FREESCALE_IMX_HAS_M4 > + bool > + default y if BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7 || \ > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X || \ > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M || \ > + BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM > + > source "package/freescale-imx/imx-alsa-plugins/Config.in" > source "package/freescale-imx/imx-codec/Config.in" > source "package/freescale-imx/imx-kobs/Config.in" > source "package/freescale-imx/imx-lib/Config.in" > +source "package/freescale-imx/imx-m4-demos/Config.in" > source "package/freescale-imx/imx-m4fwloader/Config.in" > source "package/freescale-imx/imx-parser/Config.in" > source "package/freescale-imx/imx-uuc/Config.in" > diff --git a/package/freescale-imx/imx-m4-demos/Config.in b/package/freescale-imx/imx-m4-demos/Config.in > new file mode 100644 > index 0000000000..b1cbebb74f > --- /dev/null > +++ b/package/freescale-imx/imx-m4-demos/Config.in > @@ -0,0 +1,11 @@ > +comment "imx-m4-demos needs an i.MX platform with Cortex-M4" > + depends on !BR2_PACKAGE_FREESCALE_IMX_HAS_M4 > + > +config BR2_PACKAGE_IMX_M4_DEMOS > + bool "imx-m4-demos" > + depends on BR2_PACKAGE_FREESCALE_IMX_HAS_M4 > + help > + Cortex-M4 demo blobs for the Freescale i.MX SoCs. > + > + This library is provided by Freescale as-is and doesn't have > + an upstream. > diff --git a/package/freescale-imx/imx-m4-demos/imx-m4-demos.hash b/package/freescale-imx/imx-m4-demos/imx-m4-demos.hash > new file mode 100644 > index 0000000000..fdbf1ab608 > --- /dev/null > +++ b/package/freescale-imx/imx-m4-demos/imx-m4-demos.hash > @@ -0,0 +1,8 @@ > +# locally computed > +sha256 cc00d3b936d49b2794a2a99e10129437e70caba3fd26b8379b8c50dd22f73254 imx7d-sabresd-m4-freertos-1.0.1.bin > +sha256 e4efb9646b66df867f618bd8121e14afe17ebadea4a405a4df951d45d841e681 imx7ulp-m4-demo-2.6.0.bin > +sha256 4e41e270506870e0fd2d53e3d69afdcf6d613d099b0da5c516a512944c5c12c3 imx8mm-m4-demo-2.5.0.bin > +sha256 fd441e75395b0c6f90626c883ee8a93406b14e7d55adc7925116254394bb7ad8 imx8mq-m4-demo-2.3.0.bin > +sha256 4e83d60e27cd8ad67d4174ad3082a5f4a06b7df93571cfd2274615cbdf66eb6c imx8qx-m4-demo-2.5.0.bin > + > +# no hash for license file as it is different for each package listed above > diff --git a/package/freescale-imx/imx-m4-demos/imx-m4-demos.mk b/package/freescale-imx/imx-m4-demos/imx-m4-demos.mk > new file mode 100644 > index 0000000000..6d08dcc8f8 > --- /dev/null > +++ b/package/freescale-imx/imx-m4-demos/imx-m4-demos.mk > @@ -0,0 +1,72 @@ > +################################################################################ > +# > +# imx-m4-demos > +# > +################################################################################ > + > +IMX_M4_DEMOS_SITE = $(FREESCALE_IMX_SITE) > + > +IMX_M4_DEMOS_LICENSE = NXP Semiconductor Software License Agreement > +IMX_M4_DEMOS_LICENSE_FILES = COPYING > +IMX_M4_DEMOS_REDISTRIBUTE = NO > + > +define IMX_M4_DEMOS_EXTRACT_CMDS > + $(call FREESCALE_IMX_EXTRACT_HELPER,$(IMX_M4_DEMOS_DL_DIR)/$(IMX_M4_DEMOS_SOURCE)) > +endef > + > +# Note: firmware names are copied to binaries directory with an "m4_" prefix, for easier post image scripting > + > +ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7ULP),y) > +IMX_M4_DEMOS_VERSION = 2.6.0 > +IMX_M4_DEMOS_SOURCE = imx7ulp-m4-demo-$(IMX_M4_DEMOS_VERSION).bin > +IMX_M4_DEMOS_INSTALL_IMAGES = YES > +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS > + cp $(@D)/imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img $(BINARIES_DIR)/m4_imx7ulp_erpc_matrix_multiply_rpmsg_rtos_imxcm4.img > + cp $(@D)/imx7ulp_m4_demo.img $(BINARIES_DIR)/m4_imx7ulp_m4_demo.img > + cp $(@D)/imx7ulp_rpmsg_lite_pingpong_rtos.img $(BINARIES_DIR)/m4_imx7ulp_rpmsg_lite_pingpong_rtos.img > + cp $(@D)/imx7ulp_rpmsg_lite_str_echo_rtos.img $(BINARIES_DIR)/m4_imx7ulp_rpmsg_lite_str_echo_rtos.img > + cp $(@D)/imx7ulp_wireless_uart_bridge.img $(BINARIES_DIR)/m4_imx7ulp_wireless_uart_bridge.img > +endef > +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX7),y) > +IMX_M4_DEMOS_VERSION = 1.0.1 > +IMX_M4_DEMOS_SOURCE = imx7d-sabresd-m4-freertos-$(IMX_M4_DEMOS_VERSION).bin > +IMX_M4_DEMOS_INSTALL_IMAGES = YES > +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS > + cp $(@D)/imx7d_sabresd_m4_TCM_helloworld.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_helloworld.bin > + cp $(@D)/imx7d_sabresd_m4_TCM_mcctty.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_mcctty.bin > + cp $(@D)/imx7d_sabresd_m4_TCM_Pingpang.bin $(BINARIES_DIR)/m4_imx7d_sabresd_m4_TCM_Pingpang.bin > +endef > +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8X),y) > +IMX_M4_DEMOS_VERSION = 2.5.0 > +IMX_M4_DEMOS_SOURCE = imx8qx-m4-demo-$(IMX_M4_DEMOS_VERSION).bin > +IMX_M4_DEMOS_INSTALL_IMAGES = YES > +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS > + cp $(@D)/imx8qx_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_hello_world.bin > + cp $(@D)/imx8qx_m4_TCM_power_mode_switch.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_power_mode_switch.bin > + cp $(@D)/imx8qx_m4_TCM_rear_view_camera.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rear_view_camera.bin > + cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin > + cp $(@D)/imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_rpmsg_lite_str_echo_rtos.bin > + cp $(@D)/imx8qx_m4_TCM_srtm_demo.bin $(BINARIES_DIR)/m4_imx8qx_m4_TCM_srtm_demo.bin > +endef > +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8M),y) > +IMX_M4_DEMOS_VERSION = 2.3.0 > +IMX_M4_DEMOS_SOURCE = imx8mq-m4-demo-$(IMX_M4_DEMOS_VERSION).bin > +IMX_M4_DEMOS_INSTALL_IMAGES = YES > +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS > + cp $(@D)/imx8mq_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_hello_world.bin > + cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin > + cp $(@D)/imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin > +endef > +else ifeq ($(BR2_PACKAGE_FREESCALE_IMX_PLATFORM_IMX8MM),y) > +IMX_M4_DEMOS_VERSION = 2.5.0 > +IMX_M4_DEMOS_SOURCE = imx8mm-m4-demo-$(IMX_M4_DEMOS_VERSION).bin > +IMX_M4_DEMOS_INSTALL_IMAGES = YES > +define IMX_M4_DEMOS_INSTALL_IMAGES_CMDS > + cp $(@D)/imx8mm_m4_TCM_hello_world.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_hello_world.bin > + cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin > + cp $(@D)/imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin > + cp $(@D)/imx8mm_m4_TCM_sai_low_power_audio.bin $(BINARIES_DIR)/m4_imx8mm_m4_TCM_sai_low_power_audio.bin > +endef > +endif > + > +$(eval $(generic-package)) > -- > 2.24.0.rc1 > Reviewed-by: Gilles Talis <gilles.talis@gmail.com> ^ permalink raw reply [flat|nested] 21+ messages in thread
end of thread, other threads:[~2019-11-11 15:30 UTC | newest] Thread overview: 21+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2019-10-29 17:01 [Buildroot] [PATCH 1/2] package/freescale-imx/imx-m4-firmware: new package Fabrice Goucem 2019-10-29 17:01 ` [Buildroot] [PATCH 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem 2019-10-29 18:09 ` Fabio Estevam 2019-10-30 13:43 ` Fabrice Goucem 2019-10-30 13:40 ` [Buildroot] [PATCH v2 1/3] package/freescale-imx/imx-m4-firmware: new package Fabrice Goucem 2019-10-30 13:40 ` [Buildroot] [PATCH v2 2/3] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem 2019-10-30 13:40 ` [Buildroot] [PATCH v2 3/3] package/freescale-imx/imx-m4-firmware: add support for i.MX7ULP Fabrice Goucem 2019-10-31 22:52 ` Fabio Estevam 2019-11-05 12:03 ` [Buildroot] [PATCH v3 1/2] package/freescale-imx/imx-m4-firmware: new package Fabrice Goucem 2019-11-05 12:03 ` [Buildroot] [PATCH v3 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem 2019-11-06 17:23 ` [Buildroot] [PATCH v3 1/2] package/freescale-imx/imx-m4-firmware: new package Gary Bisson 2019-11-07 9:59 ` [Buildroot] [EXT] " Fabrice Goucem 2019-11-10 23:08 ` [Buildroot] [PATCH v4 1/2] package/freescale-imx/imx-m4-demos: " Fabrice Goucem 2019-11-10 23:08 ` [Buildroot] [PATCH v4 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem 2019-11-11 8:53 ` Gilles Talis 2019-11-11 8:50 ` [Buildroot] [PATCH v4 1/2] package/freescale-imx/imx-m4-demos: new package Gilles Talis 2019-11-11 10:09 ` [Buildroot] [EXT] " Fabrice Goucem 2019-11-11 10:15 ` [Buildroot] [PATCH v5 " Fabrice Goucem 2019-11-11 10:15 ` [Buildroot] [PATCH v5 2/2] configs/freescale_imx7ulpevk: new defconfig Fabrice Goucem 2019-11-11 15:30 ` Gilles Talis 2019-11-11 15:29 ` [Buildroot] [PATCH v5 1/2] package/freescale-imx/imx-m4-demos: new package Gilles Talis
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox