Commit c1c1387b1926d6c66541ba857792ff6e3e7e6860

Authored by Eric Lee
1 parent 6375fa2366

Yocto warrior meta layter for Embedian i.MX8M Mini SMARC Module, Initial Release

Showing 17 changed files with 284 additions and 286 deletions Side-by-side Diff

... ... @@ -5,10 +5,10 @@
5 5 BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
6 6 ${LAYERDIR}/recipes-*/*/*.bbappend"
7 7  
8   -BBFILE_COLLECTIONS += "smarcimx8m"
9   -BBFILE_PATTERN_smarcimx8m := "^${LAYERDIR}/"
10   -BBFILE_PRIORITY_smarcimx8m = "12"
11   -LAYERSERIES_COMPAT_smarcimx8m = "warrior"
  8 +BBFILE_COLLECTIONS += "smarcimx8mm"
  9 +BBFILE_PATTERN_smarcimx8mm := "^${LAYERDIR}/"
  10 +BBFILE_PRIORITY_smarcimx8mm = "12"
  11 +LAYERSERIES_COMPAT_smarcimx8mm = "warrior"
12 12  
13 13 HOSTTOOLS_NONFATAL_append = " bc sha384sum xxd"
14 14  
conf/machine/smarcimx8m2g.conf
1   -#@TYPE: Machine
2   -#@NAME: EMBEDIAN SMARC-iMX8M COMPUTER ON MODULES with 2GB LPDDR4 MEMORY
3   -#@SOC: i.MX8MQ
4   -#@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8M
5   -#@MAINTAINER: Eric Lee <eric.lee@embedian.com>
6   -#
7   -# http://www.www.embedian.com
8   -
9   -MACHINEOVERRIDES =. "mx8:mx8m:mx8mq:"
10   -
11   -require conf/machine/include/imx-base.inc
12   -require conf/machine/include/arm/arch-arm64.inc
13   -
14   -MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth"
15   -
16   -IMAGE_FEATURES += "package-management"
17   -
18   -# Embedian BSP default providers
19   -PREFERRED_PROVIDER_virtual/kernel_smarcimx8m2g ?= "linux-smarcimx8m"
20   -PREFERRED_VERSION_linux-smarcimx8m2g_smarcimx8m2g = "4.19.35"
21   -
22   -KERNEL_DEVICETREE = " \
23   - embedian/fsl-smarcimx8mq.dtb \
24   - embedian/fsl-smarcimx8mq-dcss-lvds.dtb \
25   - embedian/fsl-smarcimx8mq-lcdif-lvds.dtb \
26   - embedian/fsl-smarcimx8mq-hdmi.dtb \
27   - embedian/fsl-smarcimx8mq-dp.dtb \
28   - embedian/fsl-smarcimx8mq-edp.dtb \
29   - embedian/fsl-smarcimx8mq-dual-display.dtb \
30   -"
31   -IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy"
32   -IMAGE_BOOT_FILES += "imx8mq_m4_TCM_hello_world.bin imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin"
33   -
34   -PREFERRED_PROVIDER_u-boot_smarcimx8m2g = "u-boot-smarcimx8m"
35   -PREFERRED_PROVIDER_virtual/bootloader_smarcimx8m2g = "u-boot-smarcimx8m"
36   -
37   -UBOOT_CONFIG ??= "sd"
38   -UBOOT_CONFIG[sd] = "smarcimx8mq_2g_ser3_defconfig,sdcard"
39   -SPL_BINARY = "spl/u-boot-spl.bin"
40   -
41   -# Set DDR FIRMWARE
42   -DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin"
43   -
44   -# Set U-Boot DTB
45   -UBOOT_DTB_NAME = "fsl-smarcimx8mq.dtb"
46   -
47   -# Set imx-mkimage boot target
48   -IMXBOOT_TARGETS = "flash_evk flash_evk_no_hdmi flash_dp_evk"
49   -
50   -SERIAL_CONSOLE = "115200 ttymxc0"
51   -
52   -IMAGE_BOOTLOADER = "imx-boot"
53   -
54   -LOADADDR = ""
55   -UBOOT_MAKE_TARGET = ""
56   -IMX_BOOT_SEEK = "33"
57   -
58   -MACHINE_EXTRA_RDEPENDS += " \
59   - imx-boot \
60   - packagegroup-tools-bluetooth \
61   - pm-utils \
62   - kmod \
63   - hdparm \
64   - gptfdisk \
65   - lftp \
66   - vim \
67   - ntp \
68   - boost \
69   - nodejs \
70   - networkmanager \
71   - imx-gpu-viv \
72   - "
73   -
74   -IMAGE_FSTYPES = "tar.bz2"
75   -
76   -# Ship all kernel modules by default
77   -MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
78   -
79   -MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k"
conf/machine/smarcimx8m4g.conf
1   -#@TYPE: Machine
2   -#@NAME: EMBEDIAN SMARC-iMX8M COMPUTER ON MODULES with 2GB LPDDR4 MEMORY
3   -#@SOC: i.MX8MQ
4   -#@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8M
5   -#@MAINTAINER: Eric Lee <eric.lee@embedian.com>
6   -#
7   -# http://www.www.embedian.com
8   -
9   -MACHINEOVERRIDES =. "mx8:mx8m:mx8mq:"
10   -
11   -require conf/machine/include/imx-base.inc
12   -require conf/machine/include/arm/arch-arm64.inc
13   -
14   -MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth"
15   -
16   -IMAGE_FEATURES += "package-management"
17   -
18   -# Embedian BSP default providers
19   -PREFERRED_PROVIDER_virtual/kernel_smarcimx8m4g ?= "linux-smarcimx8m"
20   -PREFERRED_VERSION_linux-smarcimx8m4g_smarcimx8m4g = "4.19.35"
21   -
22   -KERNEL_DEVICETREE = " \
23   - embedian/fsl-smarcimx8mq.dtb \
24   - embedian/fsl-smarcimx8mq-dcss-lvds.dtb \
25   - embedian/fsl-smarcimx8mq-lcdif-lvds.dtb \
26   - embedian/fsl-smarcimx8mq-hdmi.dtb \
27   - embedian/fsl-smarcimx8mq-dp.dtb \
28   - embedian/fsl-smarcimx8mq-edp.dtb \
29   - embedian/fsl-smarcimx8mq-dual-display.dtb \
30   -"
31   -IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy"
32   -IMAGE_BOOT_FILES += "imx8mq_m4_TCM_hello_world.bin imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin"
33   -
34   -PREFERRED_PROVIDER_u-boot_smarcimx8m4g = "u-boot-smarcimx8m"
35   -PREFERRED_PROVIDER_virtual/bootloader_smarcimx8m4g = "u-boot-smarcimx8m"
36   -
37   -UBOOT_CONFIG ??= "sd"
38   -UBOOT_CONFIG[sd] = "smarcimx8mq_4g_ser3_defconfig,sdcard"
39   -SPL_BINARY = "spl/u-boot-spl.bin"
40   -
41   -# Set DDR FIRMWARE
42   -DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin"
43   -
44   -# Set U-Boot DTB
45   -UBOOT_DTB_NAME = "fsl-smarcimx8mq.dtb"
46   -
47   -# Set imx-mkimage boot target
48   -IMXBOOT_TARGETS = "flash_evk flash_evk_no_hdmi flash_dp_evk"
49   -
50   -SERIAL_CONSOLE = "115200 ttymxc0"
51   -
52   -IMAGE_BOOTLOADER = "imx-boot"
53   -
54   -LOADADDR = ""
55   -UBOOT_MAKE_TARGET = ""
56   -IMX_BOOT_SEEK = "33"
57   -
58   -MACHINE_EXTRA_RDEPENDS += " \
59   - imx-boot \
60   - packagegroup-tools-bluetooth \
61   - pm-utils \
62   - kmod \
63   - hdparm \
64   - gptfdisk \
65   - lftp \
66   - vim \
67   - ntp \
68   - boost \
69   - nodejs \
70   - networkmanager \
71   - imx-gpu-viv \
72   - "
73   -
74   -IMAGE_FSTYPES = "tar.bz2"
75   -
76   -# Ship all kernel modules by default
77   -MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
78   -
79   -MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k"
conf/machine/smarcimx8mm2g.conf
  1 +#@TYPE: Machine
  2 +#@NAME: EMBEDIAN SMARC-iMX8MM COMPUTER ON MODULES with 2GB LPDDR4 MEMORY
  3 +#@SOC: i.MX8M Mini
  4 +#@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8MM
  5 +#@MAINTAINER: Eric Lee <eric.lee@embedian.com>
  6 +#
  7 +# http://www.www.embedian.com
  8 +
  9 +MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:"
  10 +
  11 +require conf/machine/include/imx-base.inc
  12 +require conf/machine/include/arm/arch-arm64.inc
  13 +
  14 +MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth"
  15 +
  16 +IMAGE_FEATURES += "package-management"
  17 +
  18 +# Embedian BSP default providers
  19 +PREFERRED_PROVIDER_virtual/kernel_smarcimx8mm2g ?= "linux-smarcimx8mm"
  20 +PREFERRED_VERSION_linux-smarcimx8mm2g_smarcimx8mm2g = "4.19.35"
  21 +
  22 +KERNEL_DEVICETREE = " \
  23 + embedian/fsl-smarcimx8mm.dtb \
  24 +"
  25 +IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy"
  26 +IMAGE_BOOT_FILES += "imx8mm_m4_TCM_hello_world.bin \
  27 + imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin \
  28 + imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin \
  29 + imx8mm_m4_TCM_sai_low_power_audio.bin \
  30 +"
  31 +PREFERRED_PROVIDER_u-boot_smarcimx8mm2g = "u-boot-smarcimx8mm"
  32 +PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mm2g = "u-boot-smarcimx8mm"
  33 +
  34 +UBOOT_CONFIG ??= "sd"
  35 +UBOOT_CONFIG[sd] = "smarcimx8mm_2g_ser3_defconfig,sdcard"
  36 +SPL_BINARY = "spl/u-boot-spl.bin"
  37 +
  38 +# Set DDR FIRMWARE
  39 +DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin"
  40 +
  41 +# Set U-Boot DTB
  42 +UBOOT_DTB_NAME = "fsl-smarcimx8mm.dtb"
  43 +
  44 +# Set imx-mkimage boot target
  45 +IMXBOOT_TARGETS = "flash_evk"
  46 +
  47 +SERIAL_CONSOLE = "115200 ttymxc1"
  48 +
  49 +IMAGE_BOOTLOADER = "imx-boot"
  50 +
  51 +LOADADDR = ""
  52 +UBOOT_MAKE_TARGET = ""
  53 +IMX_BOOT_SEEK = "33"
  54 +
  55 +MACHINE_EXTRA_RDEPENDS += " \
  56 + imx-boot \
  57 + packagegroup-tools-bluetooth \
  58 + pm-utils \
  59 + kmod \
  60 + hdparm \
  61 + gptfdisk \
  62 + lftp \
  63 + vim \
  64 + ntp \
  65 + boost \
  66 + nodejs \
  67 + networkmanager \
  68 + imx-gpu-viv \
  69 + "
  70 +
  71 +IMAGE_FSTYPES = "tar.bz2"
  72 +
  73 +# Ship all kernel modules by default
  74 +MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
  75 +
  76 +MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k"
conf/machine/smarcimx8mm4g.conf
  1 +#@TYPE: Machine
  2 +#@NAME: EMBEDIAN SMARC-iMX8MM COMPUTER ON MODULES with 2GB LPDDR4 MEMORY
  3 +#@SOC: i.MX8M Mini
  4 +#@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8MM
  5 +#@MAINTAINER: Eric Lee <eric.lee@embedian.com>
  6 +#
  7 +# http://www.www.embedian.com
  8 +
  9 +MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:"
  10 +
  11 +require conf/machine/include/imx-base.inc
  12 +require conf/machine/include/arm/arch-arm64.inc
  13 +
  14 +MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth"
  15 +
  16 +IMAGE_FEATURES += "package-management"
  17 +
  18 +# Embedian BSP default providers
  19 +PREFERRED_PROVIDER_virtual/kernel_smarcimx8mm4g ?= "linux-smarcimx8mm"
  20 +PREFERRED_VERSION_linux-smarcimx8mm4g_smarcimx8mm4g = "4.19.35"
  21 +
  22 +KERNEL_DEVICETREE = " \
  23 + embedian/fsl-smarcimx8mm.dtb \
  24 +"
  25 +IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy"
  26 +IMAGE_BOOT_FILES += "imx8mm_m4_TCM_hello_world.bin \
  27 + imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin \
  28 + imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin \
  29 + imx8mm_m4_TCM_sai_low_power_audio.bin \
  30 +"
  31 +PREFERRED_PROVIDER_u-boot_smarcimx8mm4g = "u-boot-smarcimx8mm"
  32 +PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mm4g = "u-boot-smarcimx8mm"
  33 +
  34 +UBOOT_CONFIG ??= "sd"
  35 +UBOOT_CONFIG[sd] = "smarcimx8mm_4g_ser3_defconfig,sdcard"
  36 +SPL_BINARY = "spl/u-boot-spl.bin"
  37 +
  38 +# Set DDR FIRMWARE
  39 +DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin"
  40 +
  41 +# Set U-Boot DTB
  42 +UBOOT_DTB_NAME = "fsl-smarcimx8mm.dtb"
  43 +
  44 +# Set imx-mkimage boot target
  45 +IMXBOOT_TARGETS = "flash_evk"
  46 +
  47 +SERIAL_CONSOLE = "115200 ttymxc1"
  48 +
  49 +IMAGE_BOOTLOADER = "imx-boot"
  50 +
  51 +LOADADDR = ""
  52 +UBOOT_MAKE_TARGET = ""
  53 +IMX_BOOT_SEEK = "33"
  54 +
  55 +MACHINE_EXTRA_RDEPENDS += " \
  56 + imx-boot \
  57 + packagegroup-tools-bluetooth \
  58 + pm-utils \
  59 + kmod \
  60 + hdparm \
  61 + gptfdisk \
  62 + lftp \
  63 + vim \
  64 + ntp \
  65 + boost \
  66 + nodejs \
  67 + networkmanager \
  68 + imx-gpu-viv \
  69 + "
  70 +
  71 +IMAGE_FSTYPES = "tar.bz2"
  72 +
  73 +# Ship all kernel modules by default
  74 +MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
  75 +
  76 +MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k"
recipes-bsp/imx-atf/imx-atf/imx8mm-atf-uart4.patch
  1 +diff --git a/plat/imx/imx8mm/imx8mm_bl31_setup.c b/plat/imx/imx8mm/imx8mm_bl31_setup.c
  2 +index aa1c336e2..7614b056a 100644
  3 +--- a/plat/imx/imx8mm/imx8mm_bl31_setup.c
  4 ++++ b/plat/imx/imx8mm/imx8mm_bl31_setup.c
  5 +@@ -310,7 +310,8 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
  6 +
  7 + /* Assign M4 to domain 1 */
  8 + mmio_write_32(IMX_RDC_BASE + 0x204, 0x1);
  9 +- mmio_write_32(IMX_RDC_BASE + 0x518, 0xfc);
  10 ++ /* Assign UART4 to domain 0 */
  11 ++ mmio_write_32(IMX_RDC_BASE + 0x518, 0xff);
  12 + mmio_write_32(IMX_RDC_BASE + 0x5A4, 0xf3);
  13 +
  14 + #if defined (CSU_RDC_TEST)
recipes-bsp/imx-atf/imx-atf_2.0.bbappend
... ... @@ -3,5 +3,6 @@
3 3 SRC_URI_append = " \
4 4 file://imx8m-atf-ddr-timing.patch \
5 5 file://imx8m-atf-fix-derate-enable.patch \
  6 + file://imx8mm-atf-uart4.patch \
6 7 "
recipes-bsp/imx-mkimage/imx-boot_0.2.bbappend
1   -# Workaround to fix do_compile() failure due to missing fsl-imx8mq-evk.dtb
  1 +# Workaround to fix do_compile() failure due to missing fsl-imx8mm-evk.dtb
2 2 do_compile_prepend() {
3 3 echo "Copying DTB"
4   - if [ -f ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/fsl-smarcimx8mq.dtb ]; then
5   - cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/fsl-smarcimx8mq.dtb ${S}/iMX8M/fsl-imx8mq-evk.dtb
  4 + if [ -f ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/fsl-smarcimx8mm.dtb ]; then
  5 + cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/fsl-smarcimx8mm.dtb ${S}/iMX8M/fsl-imx8mm-evk.dtb
6 6 fi
7 7 }
8 8  
... ... @@ -13,8 +13,6 @@
13 13 for ddr_firmware in ${DDR_FIRMWARE_NAME}; do
14 14 install -m 0644 ${DEPLOY_DIR_IMAGE}/${ddr_firmware} ${DEPLOYDIR}/${BOOT_TOOLS}
15 15 done
16   - install -m 0644 ${BOOT_STAGING}/signed_dp_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS}
17   - install -m 0644 ${BOOT_STAGING}/signed_hdmi_imx8m.bin ${DEPLOYDIR}/${BOOT_TOOLS}
18 16 install -m 0755 ${BOOT_STAGING}/${TOOLS_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
19 17 install -m 0755 ${BOOT_STAGING}/mkimage_fit_atf.sh ${DEPLOYDIR}/${BOOT_TOOLS}
20 18 }
recipes-bsp/u-boot/u-boot-smarcimx8m_2019.04.bb
1   -# Copyright (C) 2013-2016 Freescale Semiconductor
2   -# Copyright 2017-2019 NXP
3   -
4   -DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards."
5   -require recipes-bsp/u-boot/u-boot-common.inc
6   -require recipes-bsp/u-boot/u-boot.inc
7   -inherit pythonnative
8   -
9   -PROVIDES += "u-boot"
10   -DEPENDS_append = " python dtc-native"
11   -
12   -LICENSE = "GPLv2+"
13   -LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
14   -
15   -UBOOT_SRC ?= "${EMB_UBOOT_MIRROR};protocol=ssh"
16   -SRCBRANCH = "smarc_8m-imx_v2019.04_4.19.35_1.1.0"
17   -SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH}"
18   -SRCREV = "2fd847944db504558a62523462415531efd48898"
19   -
20   -S = "${WORKDIR}/git"
21   -
22   -inherit fsl-u-boot-localversion
23   -
24   -LOCALVERSION ?= "-${SRCBRANCH}"
25   -
26   -BOOT_TOOLS = "imx-boot-tools"
27   -
28   -do_deploy_append_mx8m () {
29   - # Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8mq-XX.dtb for mkimage to generate boot binary
30   - if [ -n "${UBOOT_CONFIG}" ]
31   - then
32   - for config in ${UBOOT_MACHINE}; do
33   - i=$(expr $i + 1);
34   - for type in ${UBOOT_CONFIG}; do
35   - j=$(expr $j + 1);
36   - if [ $j -eq $i ]
37   - then
38   - install -d ${DEPLOYDIR}/${BOOT_TOOLS}
39   - install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
40   - install -m 0777 ${B}/${config}/tools/mkimage ${DEPLOYDIR}/${BOOT_TOOLS}/mkimage_uboot
41   - install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG}
42   - fi
43   - done
44   - unset j
45   - done
46   - unset i
47   - fi
48   -
49   -}
50   -
51   -PACKAGE_ARCH = "${MACHINE_ARCH}"
52   -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
53   -
54   -UBOOT_NAME_mx6 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
55   -UBOOT_NAME_mx7 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
56   -UBOOT_NAME_mx8 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
recipes-bsp/u-boot/u-boot-smarcimx8mm_2019.04.bb
  1 +# Copyright (C) 2013-2016 Freescale Semiconductor
  2 +# Copyright 2017-2019 NXP
  3 +
  4 +DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards."
  5 +require recipes-bsp/u-boot/u-boot-common.inc
  6 +require recipes-bsp/u-boot/u-boot.inc
  7 +inherit pythonnative
  8 +
  9 +PROVIDES += "u-boot"
  10 +DEPENDS_append = " python dtc-native"
  11 +
  12 +LICENSE = "GPLv2+"
  13 +LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
  14 +
  15 +UBOOT_SRC ?= "${EMB_UBOOT_MIRROR};protocol=ssh"
  16 +SRCBRANCH = "smarc_8mm-imx_v2019.04_4.19.35_1.1.0"
  17 +SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH}"
  18 +SRCREV = "81e795041d21f231ba089b9f5f0376de26ae0784"
  19 +
  20 +S = "${WORKDIR}/git"
  21 +
  22 +inherit fsl-u-boot-localversion
  23 +
  24 +LOCALVERSION ?= "-${SRCBRANCH}"
  25 +
  26 +BOOT_TOOLS = "imx-boot-tools"
  27 +
  28 +do_deploy_append_mx8m () {
  29 + # Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8mm-XX.dtb for mkimage to generate boot binary
  30 + if [ -n "${UBOOT_CONFIG}" ]
  31 + then
  32 + for config in ${UBOOT_MACHINE}; do
  33 + i=$(expr $i + 1);
  34 + for type in ${UBOOT_CONFIG}; do
  35 + j=$(expr $j + 1);
  36 + if [ $j -eq $i ]
  37 + then
  38 + install -d ${DEPLOYDIR}/${BOOT_TOOLS}
  39 + install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
  40 + install -m 0777 ${B}/${config}/tools/mkimage ${DEPLOYDIR}/${BOOT_TOOLS}/mkimage_uboot
  41 + install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG}
  42 + fi
  43 + done
  44 + unset j
  45 + done
  46 + unset i
  47 + fi
  48 +
  49 +}
  50 +
  51 +PACKAGE_ARCH = "${MACHINE_ARCH}"
  52 +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
  53 +
  54 +UBOOT_NAME_mx6 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
  55 +UBOOT_NAME_mx7 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
  56 +UBOOT_NAME_mx8 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
recipes-kernel/linux/linux-smarcimx8m_4.19.35.bb
1   -# Copyright (C) 2013-2016 Freescale Semiconductor
2   -# Copyright 2017 NXP
3   -# Copyright 2018-2019 Embedian, Inc.
4   -# Released under the MIT license (see COPYING.MIT for the terms)
5   -
6   -SUMMARY = "Linux kernel provided and supported by Embedian"
7   -DESCRIPTION = "Linux kernel provided and supported by Embedian (based on the kernel imx_4.19.35_1.1.0 provided by NXP) \
8   -with focus on i.MX Family SOMs. It includes support for many IPs such as GPU, VPU and IPU."
9   -
10   -require recipes-kernel/linux/linux-imx.inc
11   -
12   -LICENSE = "GPLv2"
13   -LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
14   -DEPENDS += "lzop-native bc-native"
15   -
16   -DEFAULT_PREFERENCE = "1"
17   -
18   -SRCBRANCH = "smarc_8m_imx_4.19.35_1.1.0"
19   -
20   -LOCALVERSION = "-${SRCBRANCH}"
21   -KERNEL_DEFCONFIG = "${S}/arch/arm64/configs/smarcimx8m_defconfig"
22   -DEFAULT_DTB = "fsl-smarcimx8mq"
23   -
24   -KERNEL_SRC ?= "git@git.embedian.com:developer/smarc-fsl-linux-kernel.git;protocol=git"
25   -SRC_URI = "${EMB_KERNEL_MIRROR};protocol=ssh;branch=${SRCBRANCH}"
26   -SRCREV = "1cd5563826f7305acab8d4538cad38b396d89e79"
27   -
28   -S = "${WORKDIR}/git"
29   -
30   -addtask copy_defconfig after do_patch before do_preconfigure
31   -do_copy_defconfig () {
32   - cp ${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig
33   -}
34   -
35   -COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
36   -EXTRA_OEMAKE_append_mx8 = " ARCH=arm64"
recipes-kernel/linux/linux-smarcimx8mm_4.19.35.bb
  1 +# Copyright (C) 2013-2016 Freescale Semiconductor
  2 +# Copyright 2017 NXP
  3 +# Copyright 2018-2019 Embedian, Inc.
  4 +# Released under the MIT license (see COPYING.MIT for the terms)
  5 +
  6 +SUMMARY = "Linux kernel provided and supported by Embedian"
  7 +DESCRIPTION = "Linux kernel provided and supported by Embedian (based on the kernel imx_4.19.35_1.1.0 provided by NXP) \
  8 +with focus on i.MX Family SOMs. It includes support for many IPs such as GPU, VPU and IPU."
  9 +
  10 +require recipes-kernel/linux/linux-imx.inc
  11 +
  12 +LICENSE = "GPLv2"
  13 +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
  14 +DEPENDS += "lzop-native bc-native"
  15 +
  16 +DEFAULT_PREFERENCE = "1"
  17 +
  18 +SRCBRANCH = "smarc_8mm_imx_4.19.35_1.1.0"
  19 +
  20 +LOCALVERSION = "-${SRCBRANCH}"
  21 +KERNEL_DEFCONFIG = "${S}/arch/arm64/configs/smarcimx8mm_defconfig"
  22 +DEFAULT_DTB = "fsl-smarcimx8mm"
  23 +
  24 +KERNEL_SRC ?= "git@git.embedian.com:developer/smarc-fsl-linux-kernel.git;protocol=git"
  25 +SRC_URI = "${EMB_KERNEL_MIRROR};protocol=ssh;branch=${SRCBRANCH}"
  26 +SRCREV = "c9eeb2047bc129cb70d9384b89eba2287fca6061"
  27 +
  28 +S = "${WORKDIR}/git"
  29 +
  30 +addtask copy_defconfig after do_patch before do_preconfigure
  31 +do_copy_defconfig () {
  32 + cp ${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig
  33 +}
  34 +
  35 +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
  36 +EXTRA_OEMAKE_append_mx8 = " ARCH=arm64"
scripts/emb_mk_yocto_sdcard/README.txt
... ... @@ -11,7 +11,7 @@
11 11  
12 12  
13 13 Usage:
14   -sudo MACHINE=<smarcimx8m2g|smarcimx8m4g> ./emb-create-yocto-sdcard.sh [options] /dev/sdX
  14 +sudo MACHINE=<smarcimx8mm2g|smarcimx8mm4g> ./emb-create-yocto-sdcard.sh [options] /dev/sdX
15 15 (Change /dev/sdX to your device name)
16 16  
17 17 options:
scripts/emb_mk_yocto_sdcard/emb-create-yocto-emmc.sh
... ... @@ -31,8 +31,8 @@
31 31 check_board()
32 32 {
33 33 if grep -q "i.MX8M" /sys/devices/soc0/soc_id; then
34   - BOARD=smarc-imx8m
35   - DTB_PREFIX=fsl-smarcimx8mq
  34 + BOARD=smarc-imx8mm
  35 + DTB_PREFIX=fsl-smarcimx8mm
36 36 BLOCK=mmcblk0
37 37  
38 38 if [[ $DISPLAY != "-lvds" && $DISPLAY != "-hdmi" && \
... ... @@ -149,7 +149,7 @@
149 149 mount /dev/${BLOCK}${PART}${BOOTPART} ${MOUNTDIR}
150 150 mkdir -p ${MOUNTDIR}/dtbs/
151 151 cp -v ${IMGS_PATH}/${KERNEL_IMAGE} ${MOUNTDIR}
152   - cp -v ${IMGS_PATH}/${DTB_PREFIX}${DISPLAY}.dtb ${MOUNTDIR}/dtbs/fsl-smarcimx8mq.dtb
  152 + cp -v ${IMGS_PATH}/${DTB_PREFIX}${DISPLAY}.dtb ${MOUNTDIR}/dtbs/fsl-smarcimx8mm.dtb
153 153 cp -v ${IMGS_PATH}/uEnv.txt ${MOUNTDIR}
154 154  
155 155 echo
scripts/emb_mk_yocto_sdcard/emb-create-yocto-sdcard.sh
... ... @@ -21,9 +21,6 @@
21 21 readonly YOCTO_SCRIPTS_PATH=${SCRIPT_POINT}
22 22 readonly YOCTO_IMGS_PATH=${YOCTO_BUILD}/tmp/deploy/images/${MACHINE}
23 23  
24   -## display (one of "-hdmi", "-lcdif-lvds", "-dp", "-dcss-lvds", "-dual-display", "-edp")
25   -readonly DISPLAY="-hdmi"
26   -
27 24 # $1 -- block device
28 25 # $2 -- output images dir
29 26 readonly LPARAM_BLOCK_DEVICE=${1}
... ... @@ -100,7 +97,7 @@
100 97  
101 98 help() {
102 99 bn=`basename $0`
103   - echo " Usage: MACHINE=<smarcimx8m2g|smarcimx8m4g> $bn <options> device_node"
  100 + echo " Usage: MACHINE=<smarcimx8mm2g|smarcimx8mm4g> $bn <options> device_node"
104 101 echo
105 102 echo " options:"
106 103 echo " -h display this Help message"
... ... @@ -117,7 +114,7 @@
117 114 exit 1
118 115 fi
119 116  
120   -if [[ $MACHINE != "smarcimx8m2g" && $MACHINE != "smarcimx8m4g" ]] ; then
  117 +if [[ $MACHINE != "smarcimx8mm2g" && $MACHINE != "smarcimx8mm4g" ]] ; then
121 118 help
122 119 exit 1
123 120 fi
... ... @@ -262,7 +259,7 @@
262 259 echo "Flashing \"Image, device tree and uEnv.txt\" partition"
263 260 cp -v ${YOCTO_IMGS_PATH}/Image ${P1_MOUNT_DIR}/
264 261 mkdir -p ${P1_MOUNT_DIR}/dtbs/
265   - cp -v ${YOCTO_IMGS_PATH}/fsl-smarcimx8mq${DISPLAY}.dtb ${P1_MOUNT_DIR}/dtbs/fsl-smarcimx8mq.dtb
  262 + cp -v ${YOCTO_IMGS_PATH}/fsl-smarcimx8mm.dtb ${P1_MOUNT_DIR}/dtbs/fsl-smarcimx8mm.dtb
266 263 cp -v ${YOCTO_SCRIPTS_PATH}/uEnv.txt ${P1_MOUNT_DIR}/
267 264  
268 265 echo
... ... @@ -296,7 +293,7 @@
296 293 echo "Copying Kernel Parameter uEnv.txt to /opt/images/"
297 294 cp -v ${YOCTO_SCRIPTS_PATH}/uEnv_emmc.txt ${P2_MOUNT_DIR}/opt/images/Yocto/uEnv.txt
298 295  
299   - if [[ $MACHINE = "smarcimx8m2g" || ${MACHINE} = "smarcimx8m4g" ]]; then
  296 + if [[ $MACHINE = "smarcimx8mm2g" || ${MACHINE} = "smarcimx8mm4g" ]]; then
300 297 cp ${YOCTO_IMGS_PATH}/imx-boot-${MACHINE}-sd.bin-* ${P2_MOUNT_DIR}/opt/images/Yocto
301 298 (cd ${P2_MOUNT_DIR}/opt/images/Yocto; ln -fs imx-boot-${MACHINE}-sd.bin-flash_evk imx-boot-sd.bin)
302 299 else
scripts/emb_mk_yocto_sdcard/uEnv.txt
1   -optargs="video=HDMI-A-1:1920x1080-32@60 consoleblank=0"
2   -#optargs="video=HDMI-A-1:3840x2160-32@30 consoleblank=0"
3   -#optargs="video=HDMI-A-1:3840x2160-32@60 consoleblank=0"
4 1 #console port SER3
5   -console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200
  2 +console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200
6 3 #console port SER2
7   -#console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200
8   -#console port SER1
9 4 #console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200
  5 +#console port SER1
  6 +#console=ttymxc3,115200 earlycon=ec_imx6q,0x30a60000,115200
10 7 #console port SER0
11   -#console=ttymxc3,115200 earlycon=ec_imx6q,0x30A60000,115200
  8 +#console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200
12 9 mmcdev=1
13 10 mmcpart=1
14 11 image=Image
... ... @@ -22,7 +19,7 @@
22 19 ipaddr=192.168.1.150
23 20 serverip=192.168.1.53
24 21 gatewayip=192.168.1.254
25   -mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs}
  22 +mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs} cma=400M
26 23 uenvcmd=run loadimage; run loadfdt; run mmcboot
27 24 # USB Boot
28 25 #usbargs=setenv bootargs console=${console} root=${usbroot} rootfstype=${mmcrootfstype} ${optargs}
scripts/emb_mk_yocto_sdcard/uEnv_emmc.txt
1   -optargs="video=HDMI-A-1:1920x1080-32@60 consoleblank=0"
2   -#optargs="video=HDMI-A-1:3840x2160-32@30 consoleblank=0"
3   -#optargs="video=HDMI-A-1:3840x2160-32@60 consoleblank=0"
4 1 #console port SER3
5   -console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200
  2 +console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200
6 3 #console port SER2
7   -#console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200
8   -#console port SER1
9 4 #console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200
  5 +#console port SER1
  6 +#console=ttymxc3,115200 earlycon=ec_imx6q,0x30a60000,115200
10 7 #console port SER0
11   -#console=ttymxc3,115200 earlycon=ec_imx6q,0x30A60000,115200
  8 +#console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200
12 9 mmcdev=0
13 10 mmcpart=1
14 11 image=Image
... ... @@ -22,7 +19,7 @@
22 19 ipaddr=192.168.1.150
23 20 serverip=192.168.1.53
24 21 gatewayip=192.168.1.254
25   -mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs}
  22 +mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs} cma=400M
26 23 uenvcmd=run loadimage; run loadfdt; run mmcboot
27 24 # USB Boot
28 25 #usbargs=setenv bootargs console=${console} root=${usbroot} rootfstype=${mmcrootfstype} ${optargs}