Commit 632c1e3a66efe949ed0978f80d2aebccd0b17c93
1 parent
42b7ca7de6
Exists in
8mq_5.10.9_1.0.0_gatesgarth
Yocto Gatesgarth meta layer support for SMARC-iMX8MQ, Initial Release
Showing 15 changed files with 443 additions and 34 deletions Side-by-side Diff
- conf/layer.conf
- conf/machine/include/smarc-common.inc
- conf/machine/smarcimx8mq2g.conf
- conf/machine/smarcimx8mq4g.conf
- recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend
- recipes-bsp/imx-vpu-hantro-vc/imx-vpu-hantro-vc_1.3.0.bbappend
- recipes-bsp/u-boot/u-boot-smarcimx8mq_2020.04.bb
- recipes-core/base-files/base-files_%.bbappend
- recipes-core/udev/udev-rules-imx.bbappend
- recipes-kernel/linux/linux-smarcimx8mq_5.10.bb
- scripts/emb_mk_yocto_sdcard/README.txt
- scripts/emb_mk_yocto_sdcard/emb-create-yocto-emmc.sh
- scripts/emb_mk_yocto_sdcard/emb-create-yocto-sdcard.sh
- scripts/emb_mk_yocto_sdcard/uEnv.txt
- scripts/emb_mk_yocto_sdcard/uEnv_emmc.txt
conf/layer.conf
... | ... | @@ -5,10 +5,10 @@ |
5 | 5 | BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \ |
6 | 6 | ${LAYERDIR}/recipes-*/*/*.bbappend" |
7 | 7 | |
8 | -BBFILE_COLLECTIONS += "smarcimx8mp" | |
9 | -BBFILE_PATTERN_smarcimx8mp := "^${LAYERDIR}/" | |
10 | -BBFILE_PRIORITY_smarcimx8mp = "12" | |
11 | -LAYERSERIES_COMPAT_smarcimx8mp = "warrior zeus gatesgarth" | |
8 | +BBFILE_COLLECTIONS += "smarcimx8mq" | |
9 | +BBFILE_PATTERN_smarcimx8mq := "^${LAYERDIR}/" | |
10 | +BBFILE_PRIORITY_smarcimx8mq = "13" | |
11 | +LAYERSERIES_COMPAT_smarcimx8mq = "warrior zeus gatesgarth" | |
12 | 12 | |
13 | 13 | # Define new EULAs and add them to the list defined in meta-freescale. |
14 | 14 | # See fsl-eula-unpack.bbclass. |
conf/machine/include/smarc-common.inc
conf/machine/smarcimx8mq2g.conf
1 | +#@TYPE: Machine | |
2 | +#@NAME: EMBEDIAN SMARC-iMX8MQ CPU Module with 2GB LPDDR4 | |
3 | +#@SOC: i.MX8MQ | |
4 | +#@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8MQ | |
5 | +#@MAINTAINER: Eric Lee <eric.lee@embedian.com> | |
6 | + | |
7 | +MACHINEOVERRIDES =. "mx8:mx8m:mx8mq:" | |
8 | + | |
9 | +require conf/machine/include/imx-base.inc | |
10 | +require conf/machine/include/tune-cortexa53.inc | |
11 | +require conf/machine/include/smarc-common.inc | |
12 | + | |
13 | +MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth nxp8997" | |
14 | + | |
15 | +IMAGE_FEATURES += "package-management" | |
16 | + | |
17 | +# Embedian BSP default providers | |
18 | +PREFERRED_PROVIDER_virtual/kernel_smarcimx8mq2g ?= "linux-smarcimx8mq" | |
19 | +PREFERRED_VERSION_linux-smarcimx8mq2g_smarcimx8mq2g = "5.10" | |
20 | + | |
21 | +KERNEL_DEVICETREE = " \ | |
22 | + embedian/imx8mq-smarc.dtb \ | |
23 | + embedian/imx8mq-smarc-dcss-lvds.dtb \ | |
24 | + embedian/imx8mq-smarc-lcdif-lvds.dtb \ | |
25 | + embedian/imx8mq-smarc-hdmi.dtb \ | |
26 | + embedian/imx8mq-smarc-dp.dtb \ | |
27 | + embedian/imx8mq-smarc-dual-display.dtb \ | |
28 | + embedian/imx8mq-smarc-m4.dtb \ | |
29 | + embedian/imx8mq-smarc-m4-dcss-lvds.dtb \ | |
30 | + embedian/imx8mq-smarc-m4-lcdif-lvds.dtb \ | |
31 | + embedian/imx8mq-smarc-m4-hdmi.dtb \ | |
32 | + embedian/imx8mq-smarc-m4-dp.dtb \ | |
33 | + embedian/imx8mq-smarc-m4-dual-display.dtb \ | |
34 | +" | |
35 | + | |
36 | +MACHINE_FEATURES_remove_smarcimx8mq2g = "qca6174" | |
37 | +MACHINE_FEATURES_append_smarcimx8mq2g = " bcm43455 bcm4356 bcm4359 nxp8997" | |
38 | +WKS_FILE_DEPENDS_append_smarcimx8mq2g = " imx-m4-demos" | |
39 | +IMAGE_BOOT_FILES += " imx8mq_m4_TCM_hello_world.bin \ | |
40 | + imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin \ | |
41 | + imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin \ | |
42 | +" | |
43 | + | |
44 | +PREFERRED_PROVIDER_u-boot_smarcimx8mq2g = "u-boot-smarcimx8mq" | |
45 | +PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mq2g = "u-boot-smarcimx8mq" | |
46 | + | |
47 | +UBOOT_CONFIG ??= "sd" | |
48 | +UBOOT_CONFIG[sd] = "smarcimx8mq_2g_ser3_defconfig,sdcard" | |
49 | +SPL_BINARY = "spl/u-boot-spl.bin" | |
50 | + | |
51 | +# Set DDR FIRMWARE | |
52 | +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" | |
53 | + | |
54 | +# Set u-boot DTB | |
55 | +UBOOT_DTB_NAME = "imx8mq-smarc.dtb" | |
56 | + | |
57 | +# Set imx-mkimage boot target | |
58 | +IMXBOOT_TARGETS = "flash_evk flash_evk_no_hdmi flash_dp_evk" | |
59 | + | |
60 | +# Set Serial console | |
61 | +SERIAL_CONSOLES = "115200;ttymxc0" | |
62 | + | |
63 | +IMAGE_BOOTLOADER = "imx-boot" | |
64 | + | |
65 | +LOADADDR = "" | |
66 | +UBOOT_SUFFIX = "bin" | |
67 | +UBOOT_MAKE_TARGET = "" | |
68 | +IMX_BOOT_SEEK = "33" | |
69 | + | |
70 | +OPTEE_BIN_EXT = "8mq" | |
71 | + | |
72 | +MACHINE_EXTRA_RDEPENDS += " \ | |
73 | + imx-boot \ | |
74 | + packagegroup-tools-bluetooth \ | |
75 | + pm-utils \ | |
76 | + kmod \ | |
77 | + hdparm \ | |
78 | + gptfdisk \ | |
79 | + lftp \ | |
80 | + vim \ | |
81 | + ntp \ | |
82 | + boost \ | |
83 | + nodejs \ | |
84 | + networkmanager \ | |
85 | + imx-gpu-viv \ | |
86 | + android-tools \ | |
87 | + " | |
88 | + | |
89 | +# eIQ Machine Learning. Note that many of the features require Qt 5. Disable | |
90 | +# this when you build image without QT 5. | |
91 | +IMAGE_INSTALL_append = " \ | |
92 | + packagegroup-imx-ml \ | |
93 | + firmware-imx-sdma \ | |
94 | + firmware-imx-regulatory \ | |
95 | + fsl-rc-local \ | |
96 | + " | |
97 | +#IMAGE_INSTALL_append = " \ | |
98 | +# firmware-imx-sdma \ | |
99 | +# firmware-imx-regulatory \ | |
100 | +# fsl-rc-local \ | |
101 | +# " | |
102 | + | |
103 | +#TOOLCHAIN_TARGET_TASK_append += " tensorflow-lite-staticdev tensorflow-lite-dev armnn-dev onnxruntimedev" | |
104 | + | |
105 | +IMAGE_FSTYPES = "tar.bz2" | |
106 | + | |
107 | +# Ship all kernel modules by default | |
108 | +MACHINE_EXTRA_RRECOMMENDS = "kernel-modules" | |
109 | + | |
110 | +# Add additional firmware | |
111 | +MACHINE_FIRMWARE_append = " linux-firmware-ath10k" |
conf/machine/smarcimx8mq4g.conf
1 | +#@TYPE: Machine | |
2 | +#@NAME: EMBEDIAN SMARC-iMX8MQ CPU Module with 4GB LPDDR4 | |
3 | +#@SOC: i.MX8MQ | |
4 | +#@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8MQ | |
5 | +#@MAINTAINER: Eric Lee <eric.lee@embedian.com> | |
6 | + | |
7 | +MACHINEOVERRIDES =. "mx8:mx8m:mx8mq:" | |
8 | + | |
9 | +require conf/machine/include/imx-base.inc | |
10 | +require conf/machine/include/tune-cortexa53.inc | |
11 | +require conf/machine/include/smarc-common.inc | |
12 | + | |
13 | +MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth nxp8997" | |
14 | + | |
15 | +IMAGE_FEATURES += "package-management" | |
16 | + | |
17 | +# Embedian BSP default providers | |
18 | +PREFERRED_PROVIDER_virtual/kernel_smarcimx8mq4g ?= "linux-smarcimx8mq" | |
19 | +PREFERRED_VERSION_linux-smarcimx8mq4g_smarcimx8mq4g = "5.10" | |
20 | + | |
21 | +KERNEL_DEVICETREE = " \ | |
22 | + embedian/imx8mq-smarc.dtb \ | |
23 | + embedian/imx8mq-smarc-dcss-lvds.dtb \ | |
24 | + embedian/imx8mq-smarc-lcdif-lvds.dtb \ | |
25 | + embedian/imx8mq-smarc-hdmi.dtb \ | |
26 | + embedian/imx8mq-smarc-dp.dtb \ | |
27 | + embedian/imx8mq-smarc-dual-display.dtb \ | |
28 | + embedian/imx8mq-smarc-m4.dtb \ | |
29 | + embedian/imx8mq-smarc-m4-dcss-lvds.dtb \ | |
30 | + embedian/imx8mq-smarc-m4-lcdif-lvds.dtb \ | |
31 | + embedian/imx8mq-smarc-m4-hdmi.dtb \ | |
32 | + embedian/imx8mq-smarc-m4-dp.dtb \ | |
33 | + embedian/imx8mq-smarc-m4-dual-display.dtb \ | |
34 | +" | |
35 | + | |
36 | +MACHINE_FEATURES_remove_smarcimx8mq4g = "qca6174" | |
37 | +MACHINE_FEATURES_append_smarcimx8mq4g = " bcm43455 bcm4356 bcm4359 nxp8997" | |
38 | +WKS_FILE_DEPENDS_append_smarcimx8mq4g = " imx-m4-demos" | |
39 | +IMAGE_BOOT_FILES += " imx8mq_m4_TCM_hello_world.bin \ | |
40 | + imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin \ | |
41 | + imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin \ | |
42 | +" | |
43 | + | |
44 | +PREFERRED_PROVIDER_u-boot_smarcimx8mq4g = "u-boot-smarcimx8mq" | |
45 | +PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mq4g = "u-boot-smarcimx8mq" | |
46 | + | |
47 | +UBOOT_CONFIG ??= "sd" | |
48 | +UBOOT_CONFIG[sd] = "smarcimx8mq_4g_ser3_defconfig,sdcard" | |
49 | +SPL_BINARY = "spl/u-boot-spl.bin" | |
50 | + | |
51 | +# Set DDR FIRMWARE | |
52 | +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" | |
53 | + | |
54 | +# Set u-boot DTB | |
55 | +UBOOT_DTB_NAME = "imx8mq-smarc.dtb" | |
56 | + | |
57 | +# Set imx-mkimage boot target | |
58 | +IMXBOOT_TARGETS = "flash_evk flash_evk_no_hdmi flash_dp_evk" | |
59 | + | |
60 | +# Set Serial console | |
61 | +SERIAL_CONSOLES = "115200;ttymxc0" | |
62 | + | |
63 | +IMAGE_BOOTLOADER = "imx-boot" | |
64 | + | |
65 | +LOADADDR = "" | |
66 | +UBOOT_SUFFIX = "bin" | |
67 | +UBOOT_MAKE_TARGET = "" | |
68 | +IMX_BOOT_SEEK = "33" | |
69 | + | |
70 | +OPTEE_BIN_EXT = "8mq" | |
71 | + | |
72 | +MACHINE_EXTRA_RDEPENDS += " \ | |
73 | + imx-boot \ | |
74 | + packagegroup-tools-bluetooth \ | |
75 | + pm-utils \ | |
76 | + kmod \ | |
77 | + hdparm \ | |
78 | + gptfdisk \ | |
79 | + lftp \ | |
80 | + vim \ | |
81 | + ntp \ | |
82 | + boost \ | |
83 | + nodejs \ | |
84 | + networkmanager \ | |
85 | + imx-gpu-viv \ | |
86 | + android-tools \ | |
87 | + " | |
88 | + | |
89 | +# eIQ Machine Learning. Note that many of the features require Qt 5. Disable | |
90 | +# this when you build image without QT 5. | |
91 | +IMAGE_INSTALL_append = " \ | |
92 | + packagegroup-imx-ml \ | |
93 | + firmware-imx-sdma \ | |
94 | + firmware-imx-regulatory \ | |
95 | + fsl-rc-local \ | |
96 | + " | |
97 | +#IMAGE_INSTALL_append = " \ | |
98 | +# firmware-imx-sdma \ | |
99 | +# firmware-imx-regulatory \ | |
100 | +# fsl-rc-local \ | |
101 | +# " | |
102 | + | |
103 | +#TOOLCHAIN_TARGET_TASK_append += " tensorflow-lite-staticdev tensorflow-lite-dev armnn-dev onnxruntimedev" | |
104 | + | |
105 | +IMAGE_FSTYPES = "tar.bz2" | |
106 | + | |
107 | +# Ship all kernel modules by default | |
108 | +MACHINE_EXTRA_RRECOMMENDS = "kernel-modules" | |
109 | + | |
110 | +# Add additional firmware | |
111 | +MACHINE_FIRMWARE_append = " linux-firmware-ath10k" |
recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend
1 | 1 | # Workaround to fix do_compile() failure due to missing imx8mp-smarc.dtb |
2 | 2 | do_compile_prepend() { |
3 | 3 | echo "Copying DTB" |
4 | - if [ -f ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/imx8mp-smarc.dtb ]; then | |
5 | - cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/imx8mp-smarc.dtb ${S}/iMX8M/imx8mp-evk.dtb | |
4 | + if [ -f ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/imx8mq-smarc.dtb ]; then | |
5 | + cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/imx8mq-smarc.dtb ${S}/iMX8M/imx8mq-evk.dtb | |
6 | 6 | fi |
7 | 7 | } |
recipes-bsp/imx-vpu-hantro-vc/imx-vpu-hantro-vc_1.3.0.bbappend
1 | -COMPATIBLE_MACHINE = "(imx8mp)" |
recipes-bsp/u-boot/u-boot-smarcimx8mq_2020.04.bb
1 | +# Copyright (C) 2013-2016 Freescale Semiconductor | |
2 | +# Copyright 2017-2021 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 | +FILESEXTRAPATHS_prepend := "${THISDIR}/files:" | |
10 | + | |
11 | +PROVIDES += "u-boot" | |
12 | +DEPENDS_append = " dtc-native" | |
13 | + | |
14 | +LICENSE = "GPLv2+" | |
15 | +LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" | |
16 | + | |
17 | +UBOOT_SRC ?= "${EMB_UBOOT_MIRROR};protocol=ssh" | |
18 | +SRCBRANCH = "smarc_8mq_lf_v2020.04" | |
19 | +SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH}" | |
20 | +SRCREV = "312ec620f3557f27301ec51dec03d4c4154d161e" | |
21 | + | |
22 | +S = "${WORKDIR}/git" | |
23 | + | |
24 | +inherit fsl-u-boot-localversion | |
25 | + | |
26 | +LOCALVERSION ?= "-5.10.9-1.0.0" | |
27 | + | |
28 | +BOOT_TOOLS = "imx-boot-tools" | |
29 | + | |
30 | +do_deploy_append_mx8m () { | |
31 | + # Deploy u-boot-nodtb.bin and fsl-imx8mq-XX.dtb, to be packaged in boot binary by imx-boot | |
32 | + if [ -n "${UBOOT_CONFIG}" ] | |
33 | + then | |
34 | + for config in ${UBOOT_MACHINE}; do | |
35 | + i=$(expr $i + 1); | |
36 | + for type in ${UBOOT_CONFIG}; do | |
37 | + j=$(expr $j + 1); | |
38 | + if [ $j -eq $i ] | |
39 | + then | |
40 | + install -d ${DEPLOYDIR}/${BOOT_TOOLS} | |
41 | + install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS} | |
42 | + install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${type} | |
43 | + fi | |
44 | + done | |
45 | + unset j | |
46 | + done | |
47 | + unset i | |
48 | + fi | |
49 | + | |
50 | +} | |
51 | + | |
52 | +PACKAGE_ARCH = "${MACHINE_ARCH}" | |
53 | +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" | |
54 | + | |
55 | +UBOOT_NAME_mx6 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" | |
56 | +UBOOT_NAME_mx7 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" | |
57 | +UBOOT_NAME_mx8 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" |
recipes-core/base-files/base-files_%.bbappend
1 | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" |
2 | 2 | |
3 | +SRC_URI_append_smarcimx8mq2g = " \ | |
4 | + file://embedian-hdmi-audio.conf \ | |
5 | +" | |
6 | + | |
7 | +SRC_URI_append_smarcimx8mq4g = " \ | |
8 | + file://embedian-hdmi-audio.conf \ | |
9 | +" | |
10 | + | |
3 | 11 | SRC_URI_append_smarcimx8mp4g = " \ |
4 | 12 | file://embedian-hdmi-audio.conf \ |
5 | 13 | " |
... | ... | @@ -7,6 +15,13 @@ |
7 | 15 | SRC_URI_append_smarcimx8mp6g = " \ |
8 | 16 | file://embedian-hdmi-audio.conf \ |
9 | 17 | " |
18 | +do_install_append_smarcimx8mq2g() { | |
19 | + install -m 0644 ${WORKDIR}/embedian-hdmi-audio.conf ${D}${sysconfdir}/modprobe.d | |
20 | +} | |
21 | + | |
22 | +do_install_append_smarcimx8mq4g() { | |
23 | + install -m 0644 ${WORKDIR}/embedian-hdmi-audio.conf ${D}${sysconfdir}/modprobe.d | |
24 | +} | |
10 | 25 | |
11 | 26 | do_install_append_smarcimx8mp4g() { |
12 | 27 | install -m 0644 ${WORKDIR}/embedian-hdmi-audio.conf ${D}${sysconfdir}/modprobe.d |
recipes-core/udev/udev-rules-imx.bbappend
1 | 1 | FILESEXTRAPATHS_prepend := "${THISDIR}/files:" |
2 | 2 | |
3 | +SRC_URI_append_smarcimx8mq2g = " file://usb-power.rules" | |
4 | +SRC_URI_append_smarcimx8mq4g = " file://usb-power.rules" | |
3 | 5 | SRC_URI_append_smarcimx8mp4g = " file://usb-power.rules" |
4 | 6 | SRC_URI_append_smarcimx8mp6g = " file://usb-power.rules" |
7 | + | |
8 | +do_install_append_smarcimx8mq2g () { | |
9 | + install -d ${D}${sysconfdir}/udev/rules.d | |
10 | + install -m 0644 ${WORKDIR}/usb-power.rules ${D}${sysconfdir}/udev/rules.d/ | |
11 | +} | |
12 | + | |
13 | +do_install_append_smarcimx8mq4g () { | |
14 | + install -d ${D}${sysconfdir}/udev/rules.d | |
15 | + install -m 0644 ${WORKDIR}/usb-power.rules ${D}${sysconfdir}/udev/rules.d/ | |
16 | +} | |
5 | 17 | |
6 | 18 | do_install_append_smarcimx8mp4g () { |
7 | 19 | install -d ${D}${sysconfdir}/udev/rules.d |
recipes-kernel/linux/linux-smarcimx8mq_5.10.bb
1 | +# Copyright (C) 2013-2016 Freescale Semiconductor | |
2 | +# Copyright 2017-2021 NXP | |
3 | +# Released under the MIT license (see COPYING.MIT for the terms) | |
4 | + | |
5 | +SUMMARY = "Linux Kernel provided and supported by NXP" | |
6 | +DESCRIPTION = "Linux Kernel provided and supported by NXP with focus on \ | |
7 | +i.MX Family Reference Boards. It includes support for many IPs such as GPU, VPU and IPU." | |
8 | + | |
9 | +require recipes-kernel/linux/linux-imx.inc | |
10 | + | |
11 | +LIC_FILES_CHKSUM = "file://COPYING;md5=6bc538ed5bd9a7fc9398086aedcd7e46" | |
12 | + | |
13 | +DEPENDS += "lzop-native bc-native" | |
14 | + | |
15 | +SRCBRANCH = "smarc_8mq_lf-5.10.y" | |
16 | +LOCALVERSION = "-1.0.0" | |
17 | +KERNEL_DEFCONFIG = "${S}/arch/arm64/configs/smarcimx8mq_defconfig" | |
18 | + | |
19 | +KERNEL_SRC ?= "git@git.embedian.com:developer/smarc-fsl-linux-kernel.git;protocol=git" | |
20 | +SRC_URI = "${EMB_KERNEL_MIRROR};protocol=ssh;branch=${SRCBRANCH}" | |
21 | +SRCREV = "a2b178e1baa15b60f1547421ef6753a76b7059e4" | |
22 | + | |
23 | +LINUX_VERSION = "5.10.9" | |
24 | + | |
25 | +FILES_${KERNEL_PACKAGE_NAME}-base += "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin.modinfo " | |
26 | + | |
27 | +KERNEL_CONFIG_COMMAND = "oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} olddefconfig" | |
28 | + | |
29 | +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" | |
30 | + | |
31 | +DEFAULT_PREFERENCE = "1" | |
32 | + | |
33 | +DO_CONFIG_V7_COPY = "no" | |
34 | +DO_CONFIG_V7_COPY_mx6 = "yes" | |
35 | +DO_CONFIG_V7_COPY_mx7 = "yes" | |
36 | +DO_CONFIG_V7_COPY_mx8 = "no" | |
37 | + | |
38 | +# Add setting for LF Mainline build | |
39 | +IMX_KERNEL_CONFIG_AARCH32 = "imx_v7_defconfig" | |
40 | +IMX_KERNEL_CONFIG_AARCH64 = "smarcimx8mq_defconfig" | |
41 | +KBUILD_DEFCONFIG ?= "" | |
42 | +KBUILD_DEFCONFIG_mx6= "${IMX_KERNEL_CONFIG_AARCH32}" | |
43 | +KBUILD_DEFCONFIG_mx7= "${IMX_KERNEL_CONFIG_AARCH32}" | |
44 | +KBUILD_DEFCONFIG_mx8= "${IMX_KERNEL_CONFIG_AARCH64}" | |
45 | + | |
46 | + | |
47 | +# Use a verbatim copy of the defconfig from the linux-imx repo. | |
48 | +# IMPORTANT: This task effectively disables kernel config fragments | |
49 | +# since the config fragments applied in do_kernel_configme are replaced. | |
50 | +addtask copy_defconfig after do_kernel_configme before do_preconfigure | |
51 | +do_copy_defconfig () { | |
52 | + install -d ${B} | |
53 | + if [ ${DO_CONFIG_V7_COPY} = "yes" ]; then | |
54 | + # copy latest IMX_KERNEL_CONFIG_AARCH32 to use for mx6, mx6ul and mx7 | |
55 | + mkdir -p ${B} | |
56 | + cp ${S}/arch/arm/configs/${IMX_KERNEL_CONFIG_AARCH32} ${B}/.config | |
57 | + else | |
58 | + # copy latest IMX_KERNEL_CONFIG_AARCH64 to use for mx8 | |
59 | + mkdir -p ${B} | |
60 | + cp ${S}/arch/arm64/configs/${IMX_KERNEL_CONFIG_AARCH64} ${B}/.config | |
61 | + fi | |
62 | +} | |
63 | + | |
64 | +DELTA_KERNEL_DEFCONFIG ?= "" | |
65 | +#DELTA_KERNEL_DEFCONFIG_mx8 = "imx.config" | |
66 | + | |
67 | +do_merge_delta_config[dirs] = "${B}" | |
68 | +do_merge_delta_config[depends] += " \ | |
69 | + flex-native:do_populate_sysroot \ | |
70 | + bison-native:do_populate_sysroot \ | |
71 | +" | |
72 | +do_merge_delta_config() { | |
73 | + for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do | |
74 | + if [ -f ${S}/arch/${ARCH}/configs/${deltacfg} ]; then | |
75 | + ${KERNEL_CONFIG_COMMAND} | |
76 | + oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} ${deltacfg} | |
77 | + elif [ -f "${WORKDIR}/${deltacfg}" ]; then | |
78 | + ${S}/scripts/kconfig/merge_config.sh -m .config ${WORKDIR}/${deltacfg} | |
79 | + elif [ -f "${deltacfg}" ]; then | |
80 | + ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg} | |
81 | + fi | |
82 | + done | |
83 | + cp .config ${WORKDIR}/defconfig | |
84 | +} | |
85 | +addtask merge_delta_config before do_preconfigure after do_copy_defconfig | |
86 | + | |
87 | +COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" |
scripts/emb_mk_yocto_sdcard/README.txt
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | |
12 | 12 | |
13 | 13 | Usage: |
14 | -sudo MACHINE=<smarcimx8mp4g|smarcimx8mp6g> ./emb-create-yocto-sdcard.sh [options] /dev/sdX | |
14 | +sudo MACHINE=<smarcimx8mq2g|smarcimx8mq4g|smarcimx8mp4g|smarcimx8mp6g> ./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
... | ... | @@ -30,14 +30,15 @@ |
30 | 30 | |
31 | 31 | check_board() |
32 | 32 | { |
33 | - if grep -q "i.MX8MP" /sys/devices/soc0/soc_id; then | |
34 | - BOARD=smarc-imx8mp | |
35 | - DTB_PREFIX=imx8mp-smarc | |
36 | - BLOCK=mmcblk2 | |
33 | + if grep -q "i.MX8MQ" /sys/devices/soc0/soc_id; then | |
34 | + BOARD=smarc-imx8mq | |
35 | + DTB_PREFIX=imx8mq-smarc | |
36 | + BLOCK=mmcblk0 | |
37 | 37 | |
38 | - if [[ $DISPLAY != "-lvds" && $DISPLAY != "-hdmi" && \ | |
39 | - $DISPLAY != "-edp" && $DISPLAY != "" ]]; then | |
40 | - red_bold_echo "ERROR: invalid display, should be lvds, hdmi, dual-display or empty" | |
38 | + if [[ $DISPLAY != "-dcss-lvds" && $DISPLAY != "-hdmi" && \ | |
39 | + $DISPLAY != "-lcdif-lvds" && $DISPLAY != "-dp" && \ | |
40 | + $DISPLAY != "-dual-display" && $DISPLAY != "" ]]; then | |
41 | + red_bold_echo "ERROR: invalid display, should be dcss-lvds, hdmi, lcdif-lvds, dual-display or empty" | |
41 | 42 | exit 1 |
42 | 43 | fi |
43 | 44 | else |
... | ... | @@ -149,7 +150,7 @@ |
149 | 150 | mount /dev/${BLOCK}${PART}${BOOTPART} ${MOUNTDIR} |
150 | 151 | mkdir -p ${MOUNTDIR}/dtbs/ |
151 | 152 | cp -v ${IMGS_PATH}/${KERNEL_IMAGE} ${MOUNTDIR} |
152 | - cp -v ${IMGS_PATH}/${DTB_PREFIX}${DISPLAY}.dtb ${MOUNTDIR}/dtbs/imx8mp-smarc.dtb | |
153 | + cp -v ${IMGS_PATH}/${DTB_PREFIX}${DISPLAY}.dtb ${MOUNTDIR}/dtbs/imx8mq-smarc.dtb | |
153 | 154 | cp -v ${IMGS_PATH}/uEnv.txt ${MOUNTDIR} |
154 | 155 | |
155 | 156 | echo |
... | ... | @@ -198,7 +199,7 @@ |
198 | 199 | usage() |
199 | 200 | { |
200 | 201 | echo |
201 | - echo "This script installs Yocto Rootfs on the SMARC-iMX8MP's internal eMMC storage device" | |
202 | + echo "This script installs Yocto Rootfs on the SMARC-iMX8MQ's internal eMMC storage device" | |
202 | 203 | echo |
203 | 204 | echo " Usage: $(basename $0) <option>" |
204 | 205 | echo |
... | ... | @@ -224,7 +225,7 @@ |
224 | 225 | exit 1 |
225 | 226 | fi |
226 | 227 | |
227 | -blue_underlined_bold_echo "*** Embedian SMARC-iMX8MP on-module eMMC Recovery ***" | |
228 | +blue_underlined_bold_echo "*** Embedian SMARC-iMX8MQ on-module eMMC Recovery ***" | |
228 | 229 | echo |
229 | 230 | |
230 | 231 | while getopts d:h OPTION; |
scripts/emb_mk_yocto_sdcard/emb-create-yocto-sdcard.sh
... | ... | @@ -38,8 +38,16 @@ |
38 | 38 | readonly SPARE_SIZE=4 |
39 | 39 | |
40 | 40 | # Sizes are in MiB |
41 | +if [ "${MACHINE}" = "smarcimx8mq2g" ] || | |
42 | + [ "${MACHINE}" = "smarcimx8mq4g" ]; then | |
43 | +BOOTLOADER_OFFSET=33 | |
44 | +fi | |
45 | +if [ "${MACHINE}" = "smarcimx8mp4g" ] || | |
46 | + [ "${MACHINE}" = "smarcimx8mp6g" ]; then | |
41 | 47 | BOOTLOADER_OFFSET=32 |
48 | +fi | |
42 | 49 | |
50 | + | |
43 | 51 | AUTO_FILL_SD=0 |
44 | 52 | LOOP_MAJOR=7 |
45 | 53 | |
... | ... | @@ -100,7 +108,7 @@ |
100 | 108 | |
101 | 109 | help() { |
102 | 110 | bn=`basename $0` |
103 | - echo " Usage: MACHINE=<smarcimx8mp4g|smarcimx8mp6g> $bn <options> device_node" | |
111 | + echo " Usage: MACHINE=<smarcimx8mq2g|smarcimx8mq4g|smarcimx8mp4g|smarcimx8mp6g> $bn <options> device_node" | |
104 | 112 | echo |
105 | 113 | echo " options:" |
106 | 114 | echo " -h display this Help message" |
... | ... | @@ -117,7 +125,7 @@ |
117 | 125 | exit 1 |
118 | 126 | fi |
119 | 127 | |
120 | -if [[ $MACHINE != "smarcimx8mp4g" && $MACHINE != "smarcimx8mp6g" ]] ; then | |
128 | +if [[ $MACHINE != "smarcimx8mq2g" && $MACHINE != "smarcimx8mq4g" && $MACHINE != "smarcimx8mp4g" && $MACHINE != "smarcimx8mp6g" ]] ; then | |
121 | 129 | help |
122 | 130 | exit 1 |
123 | 131 | fi |
124 | 132 | |
... | ... | @@ -262,7 +270,14 @@ |
262 | 270 | echo "Flashing \"Image, device tree and uEnv.txt\" partition" |
263 | 271 | cp -v ${YOCTO_IMGS_PATH}/Image ${P1_MOUNT_DIR}/ |
264 | 272 | mkdir -p ${P1_MOUNT_DIR}/dtbs/ |
273 | + if [ "${MACHINE}" = "smarcimx8mq2g" ] || | |
274 | + [ "${MACHINE}" = "smarcimx8mq4g" ]; then | |
275 | + cp -v ${YOCTO_IMGS_PATH}/imx8mq-smarc${DISPLAY}.dtb ${P1_MOUNT_DIR}/dtbs/imx8mq-smarc.dtb | |
276 | + fi | |
277 | + if [ "${MACHINE}" = "smarcimx8mp4g" ] || | |
278 | + [ "${MACHINE}" = "smarcimx8mp6g" ]; then | |
265 | 279 | cp -v ${YOCTO_IMGS_PATH}/imx8mp-smarc${DISPLAY}.dtb ${P1_MOUNT_DIR}/dtbs/imx8mp-smarc.dtb |
280 | + fi | |
266 | 281 | cp -v ${YOCTO_SCRIPTS_PATH}/uEnv.txt ${P1_MOUNT_DIR}/ |
267 | 282 | |
268 | 283 | echo |
... | ... | @@ -296,7 +311,7 @@ |
296 | 311 | echo "Copying Kernel Parameter uEnv.txt to /opt/images/" |
297 | 312 | cp -v ${YOCTO_SCRIPTS_PATH}/uEnv_emmc.txt ${P2_MOUNT_DIR}/opt/images/Yocto/uEnv.txt |
298 | 313 | |
299 | - if [[ $MACHINE = "smarcimx8mp4g" || ${MACHINE} = "smarcimx8mp6g" ]]; then | |
314 | + if [[ $MACHINE = "smarcimx8mq2g" || ${MACHINE} = "smarcimx8mq4g" || $MACHINE = "smarcimx8mp4g" || ${MACHINE} = "smarcimx8mp6g" ]]; then | |
300 | 315 | cp ${YOCTO_IMGS_PATH}/imx-boot-${MACHINE}-sd.bin-* ${P2_MOUNT_DIR}/opt/images/Yocto |
301 | 316 | (cd ${P2_MOUNT_DIR}/opt/images/Yocto; ln -fs imx-boot-${MACHINE}-sd.bin-flash_evk imx-boot-sd.bin) |
302 | 317 | else |
scripts/emb_mk_yocto_sdcard/uEnv.txt
... | ... | @@ -2,13 +2,13 @@ |
2 | 2 | #optargs="video=HDMI-A-1:3840x2160-32@30 consoleblank=0" |
3 | 3 | #optargs="video=HDMI-A-1:3840x2160-32@60 consoleblank=0" |
4 | 4 | #console port SER3 |
5 | -console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200 | |
5 | +console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200 | |
6 | 6 | #console port SER2 |
7 | -#console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200 | |
7 | +#console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200 | |
8 | 8 | #console port SER1 |
9 | -#console=ttymxc3,115200 earlycon=ec_imx6q,0x30a60000,115200 | |
9 | +#console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200 | |
10 | 10 | #console port SER0 |
11 | -#console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200 | |
11 | +#console=ttymxc3,115200 earlycon=ec_imx6q,0x30A60000,115200 | |
12 | 12 | mmcdev=1 |
13 | 13 | mmcpart=1 |
14 | 14 | image=Image |
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | ipaddr=192.168.1.150 |
23 | 23 | serverip=192.168.1.53 |
24 | 24 | gatewayip=192.168.1.254 |
25 | -mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs} | |
25 | +mmcargs=setenv bootargs cma=1280M console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs} | |
26 | 26 | uenvcmd=run loadimage; run loadfdt; run mmcboot |
27 | 27 | # USB Boot |
28 | 28 | #usbargs=setenv bootargs console=${console} root=${usbroot} rootfstype=${mmcrootfstype} ${optargs} |
scripts/emb_mk_yocto_sdcard/uEnv_emmc.txt
... | ... | @@ -2,19 +2,19 @@ |
2 | 2 | #optargs="video=HDMI-A-1:3840x2160-32@30 consoleblank=0" |
3 | 3 | #optargs="video=HDMI-A-1:3840x2160-32@60 consoleblank=0" |
4 | 4 | #console port SER3 |
5 | -console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200 | |
5 | +console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200 | |
6 | 6 | #console port SER2 |
7 | -#console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200 | |
7 | +#console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200 | |
8 | 8 | #console port SER1 |
9 | -#console=ttymxc3,115200 earlycon=ec_imx6q,0x30a60000,115200 | |
9 | +#console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200 | |
10 | 10 | #console port SER0 |
11 | -#console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200 | |
12 | -mmcdev=2 | |
11 | +#console=ttymxc3,115200 earlycon=ec_imx6q,0x30A60000,115200 | |
12 | +mmcdev=0 | |
13 | 13 | mmcpart=1 |
14 | 14 | image=Image |
15 | 15 | loadaddr=0x40480000 |
16 | 16 | fdt_addr=0x43000000 |
17 | -mmcroot=/dev/mmcblk2p2 rw | |
17 | +mmcroot=/dev/mmcblk0p2 rw | |
18 | 18 | usbroot=/dev/sda2 rw |
19 | 19 | mmcrootfstype=ext4 rootwait fixrtc |
20 | 20 | netdev=eth0 |
... | ... | @@ -22,7 +22,7 @@ |
22 | 22 | ipaddr=192.168.1.150 |
23 | 23 | serverip=192.168.1.53 |
24 | 24 | gatewayip=192.168.1.254 |
25 | -mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs} | |
25 | +mmcargs=setenv bootargs cma=1280M console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs} | |
26 | 26 | uenvcmd=run loadimage; run loadfdt; run mmcboot |
27 | 27 | # USB Boot |
28 | 28 | #usbargs=setenv bootargs console=${console} root=${usbroot} rootfstype=${mmcrootfstype} ${optargs} |