Commit e0f0466e22d70a3467b1747d2ba6e5b46fc78073

Authored by Eric Lee
1 parent 24429fdecb

Yocto Zeus meta layer support for SMARC-iMX8MM, Initial Release

Showing 17 changed files with 1083 additions and 41 deletions Side-by-side Diff

  1 +diff --git a/conf/machine/include/smarc-common.inc b/conf/machine/include/smarc-common.inc
  2 +index b5c7db6..6606669 100644
  3 +--- a/conf/machine/include/smarc-common.inc
  4 ++++ b/conf/machine/include/smarc-common.inc
  5 +@@ -73,3 +73,8 @@ MACHINE_FEATURES_remove_smarcimx8mq2g = "qca6174"
  6 + MACHINE_FEATURES_append_smarcimx8mq2g = " mrvl8997 jailhouse"
  7 + MACHINE_FEATURES_remove_smarcimx8mq4g = "qca6174"
  8 + MACHINE_FEATURES_append_smarcimx8mq4g = " mrvl8997 jailhouse"
  9 ++
  10 ++MACHINE_FEATURES_remove_smarcimx8mm2g = "qca6174"
  11 ++MACHINE_FEATURES_append_smarcimx8mm2g = " mrvl8997 jailhouse"
  12 ++MACHINE_FEATURES_remove_smarcimx8mm4g = "qca6174"
  13 ++MACHINE_FEATURES_append_smarcimx8mm4g = " mrvl8997 jailhouse"
  14 +diff --git a/conf/machine/smarcimx8mm2g.conf b/conf/machine/smarcimx8mm2g.conf
  15 +new file mode 100644
  16 +index 0000000..bca4d4b
  17 +--- /dev/null
  18 ++++ b/conf/machine/smarcimx8mm2g.conf
  19 +@@ -0,0 +1,92 @@
  20 ++#@TYPE: Machine
  21 ++#@NAME: EMBEDIAN SMARC-iMX8MM COMPUTER ON MODULES with 4GB LPDDR4 MEMORY
  22 ++#@SOC: i.MX8MQ
  23 ++#@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8M
  24 ++#@MAINTAINER: Eric Lee <eric.lee@embedian.com>
  25 ++#
  26 ++# http://www.www.embedian.com
  27 ++
  28 ++MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:"
  29 ++
  30 ++require conf/machine/include/imx-base.inc
  31 ++require conf/machine/include/tune-cortexa53.inc
  32 ++require conf/machine/include/smarc-common.inc
  33 ++
  34 ++MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth"
  35 ++
  36 ++# Embedian BSP default providers
  37 ++PREFERRED_PROVIDER_virtual/kernel_smarcimx8mm2g ?= "linux-smarcimx8mm"
  38 ++PREFERRED_VERSION_linux-smarcimx8mm2g_smarcimx8mm2g = "5.4"
  39 ++
  40 ++KERNEL_DEVICETREE = " \
  41 ++ embedian/imx8mm-smarc.dtb \
  42 ++ embedian/imx8mm-smarc-m4.dtb \
  43 ++"
  44 ++MACHINE_EXTRA_RRECOMMENDS_append_mx8mm = " imx-m4-demos"
  45 ++IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy"
  46 ++IMAGE_BOOT_FILES += "imx8mm_m4_TCM_hello_world.bin imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin"
  47 ++
  48 ++PREFERRED_PROVIDER_u-boot_smarcimx8mm2g = "u-boot-smarcimx8mm"
  49 ++PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mm2g = "u-boot-smarcimx8mm"
  50 ++
  51 ++UBOOT_CONFIG ??= "sd"
  52 ++UBOOT_CONFIG[sd] = "smarcimx8mm_2g_ser3_defconfig,sdcard"
  53 ++SPL_BINARY = "spl/u-boot-spl.bin"
  54 ++
  55 ++# Set DDR FIRMWARE
  56 ++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"
  57 ++
  58 ++# Set U-Boot DTB
  59 ++UBOOT_DTB_NAME = "imx8mm-smarc.dtb"
  60 ++
  61 ++# Set imx-mkimage boot target
  62 ++IMXBOOT_TARGETS = "flash_evk"
  63 ++
  64 ++SERIAL_CONSOLE = "115200 ttymxc1"
  65 ++
  66 ++IMAGE_BOOTLOADER = "imx-boot"
  67 ++
  68 ++LOADADDR = ""
  69 ++UBOOT_MAKE_TARGET = ""
  70 ++IMX_BOOT_SEEK = "33"
  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 ++ "
  87 ++
  88 ++# Packages added to all images (including core-image-minimal)
  89 ++
  90 ++# eIQ Machine Learning. Note that many of the features require Qt 5. Disable
  91 ++# this when you build image without QT 5.
  92 ++IMAGE_INSTALL_append = " \
  93 ++ packagegroup-imx-ml \
  94 ++ firmware-imx-sdma \
  95 ++ firmware-imx-regulatory \
  96 ++ fsl-rc-local \
  97 ++ android-tools \
  98 ++ "
  99 ++#IMAGE_INSTALL_append = " \
  100 ++# firmware-imx-sdma \
  101 ++# firmware-imx-regulatory \
  102 ++# fsl-rc-local \
  103 ++# android-tools \
  104 ++# "
  105 ++
  106 ++IMAGE_FSTYPES = "tar.bz2"
  107 ++
  108 ++# Ship all kernel modules by default
  109 ++MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
  110 ++
  111 ++MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k"
  112 +diff --git a/conf/machine/smarcimx8mm4g.conf b/conf/machine/smarcimx8mm4g.conf
  113 +new file mode 100644
  114 +index 0000000..4640f62
  115 +--- /dev/null
  116 ++++ b/conf/machine/smarcimx8mm4g.conf
  117 +@@ -0,0 +1,92 @@
  118 ++#@TYPE: Machine
  119 ++#@NAME: EMBEDIAN SMARC-iMX8MM COMPUTER ON MODULES with 4GB LPDDR4 MEMORY
  120 ++#@SOC: i.MX8MQ
  121 ++#@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8M
  122 ++#@MAINTAINER: Eric Lee <eric.lee@embedian.com>
  123 ++#
  124 ++# http://www.www.embedian.com
  125 ++
  126 ++MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:"
  127 ++
  128 ++require conf/machine/include/imx-base.inc
  129 ++require conf/machine/include/tune-cortexa53.inc
  130 ++require conf/machine/include/smarc-common.inc
  131 ++
  132 ++MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth"
  133 ++
  134 ++# Embedian BSP default providers
  135 ++PREFERRED_PROVIDER_virtual/kernel_smarcimx8mm4g ?= "linux-smarcimx8mm"
  136 ++PREFERRED_VERSION_linux-smarcimx8mm4g_smarcimx8mm4g = "5.4"
  137 ++
  138 ++KERNEL_DEVICETREE = " \
  139 ++ embedian/imx8mm-smarc.dtb \
  140 ++ embedian/imx8mm-smarc-m4.dtb \
  141 ++"
  142 ++MACHINE_EXTRA_RRECOMMENDS_append_mx8mm = " imx-m4-demos"
  143 ++IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy"
  144 ++IMAGE_BOOT_FILES += "imx8mm_m4_TCM_hello_world.bin imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin"
  145 ++
  146 ++PREFERRED_PROVIDER_u-boot_smarcimx8mm4g = "u-boot-smarcimx8mm"
  147 ++PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mm4g = "u-boot-smarcimx8mm"
  148 ++
  149 ++UBOOT_CONFIG ??= "sd"
  150 ++UBOOT_CONFIG[sd] = "smarcimx8mm_4g_ser3_defconfig,sdcard"
  151 ++SPL_BINARY = "spl/u-boot-spl.bin"
  152 ++
  153 ++# Set DDR FIRMWARE
  154 ++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"
  155 ++
  156 ++# Set U-Boot DTB
  157 ++UBOOT_DTB_NAME = "imx8mm-smarc.dtb"
  158 ++
  159 ++# Set imx-mkimage boot target
  160 ++IMXBOOT_TARGETS = "flash_evk"
  161 ++
  162 ++SERIAL_CONSOLE = "115200 ttymxc1"
  163 ++
  164 ++IMAGE_BOOTLOADER = "imx-boot"
  165 ++
  166 ++LOADADDR = ""
  167 ++UBOOT_MAKE_TARGET = ""
  168 ++IMX_BOOT_SEEK = "33"
  169 ++
  170 ++MACHINE_EXTRA_RDEPENDS += " \
  171 ++ imx-boot \
  172 ++ packagegroup-tools-bluetooth \
  173 ++ pm-utils \
  174 ++ kmod \
  175 ++ hdparm \
  176 ++ gptfdisk \
  177 ++ lftp \
  178 ++ vim \
  179 ++ ntp \
  180 ++ boost \
  181 ++ nodejs \
  182 ++ networkmanager \
  183 ++ imx-gpu-viv \
  184 ++ "
  185 ++
  186 ++# Packages added to all images (including core-image-minimal)
  187 ++
  188 ++# eIQ Machine Learning. Note that many of the features require Qt 5. Disable
  189 ++# this when you build image without QT 5.
  190 ++IMAGE_INSTALL_append = " \
  191 ++ packagegroup-imx-ml \
  192 ++ firmware-imx-sdma \
  193 ++ firmware-imx-regulatory \
  194 ++ fsl-rc-local \
  195 ++ android-tools \
  196 ++ "
  197 ++#IMAGE_INSTALL_append = " \
  198 ++# firmware-imx-sdma \
  199 ++# firmware-imx-regulatory \
  200 ++# fsl-rc-local \
  201 ++# android-tools \
  202 ++# "
  203 ++
  204 ++IMAGE_FSTYPES = "tar.bz2"
  205 ++
  206 ++# Ship all kernel modules by default
  207 ++MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
  208 ++
  209 ++MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k"
  210 +diff --git a/recipes-bsp/imx-atf/imx-atf/imx8mm-atf-uart4.patch b/recipes-bsp/imx-atf/imx-atf/imx8mm-atf-uart4.patch
  211 +new file mode 100644
  212 +index 0000000..5a0a416
  213 +--- /dev/null
  214 ++++ b/recipes-bsp/imx-atf/imx-atf/imx8mm-atf-uart4.patch
  215 +@@ -0,0 +1,14 @@
  216 ++diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
  217 ++index 049192880..57c404675 100644
  218 ++--- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
  219 +++++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
  220 ++@@ -58,7 +58,8 @@ static const struct imx_rdc_cfg rdc[] = {
  221 ++ RDC_MDAn(RDC_MDA_M4, DID1),
  222 ++
  223 ++ /* peripherals domain permission */
  224 ++- RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
  225 +++ /*RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),*/
  226 +++ RDC_PDAPn(RDC_PDAP_UART4, D0R | D0W),
  227 ++ RDC_PDAPn(RDC_PDAP_UART2, D0R | D0W),
  228 ++
  229 ++ /* memory region */
  230 +diff --git a/recipes-bsp/imx-atf/imx-atf_2.2.bbappend b/recipes-bsp/imx-atf/imx-atf_2.2.bbappend
  231 +index 7e0f6f9..b8758c5 100644
  232 +--- a/recipes-bsp/imx-atf/imx-atf_2.2.bbappend
  233 ++++ b/recipes-bsp/imx-atf/imx-atf_2.2.bbappend
  234 +@@ -2,4 +2,5 @@ FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
  235 +
  236 + SRC_URI_append = " \
  237 + file://imx8m-atf-ddr-timing.patch \
  238 ++ file://imx8mm-atf-uart4.patch \
  239 + "
  240 +diff --git a/recipes-bsp/u-boot/u-boot-smarcimx8mm_2020.04.bb b/recipes-bsp/u-boot/u-boot-smarcimx8mm_2020.04.bb
  241 +new file mode 100644
  242 +index 0000000..b9b853b
  243 +--- /dev/null
  244 ++++ b/recipes-bsp/u-boot/u-boot-smarcimx8mm_2020.04.bb
  245 +@@ -0,0 +1,57 @@
  246 ++# Copyright (C) 2013-2016 Freescale Semiconductor
  247 ++# Copyright 2017-2019 NXP
  248 ++
  249 ++DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards."
  250 ++require recipes-bsp/u-boot/u-boot-common.inc
  251 ++require recipes-bsp/u-boot/u-boot.inc
  252 ++inherit pythonnative
  253 ++
  254 ++FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
  255 ++
  256 ++PROVIDES += "u-boot"
  257 ++DEPENDS_append = " dtc-native"
  258 ++
  259 ++LICENSE = "GPLv2+"
  260 ++LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
  261 ++
  262 ++UBOOT_SRC ?= "${EMB_UBOOT_MIRROR};protocol=ssh"
  263 ++SRCBRANCH = "smarc_8mm-imx_v2020.04_5.4.24_2.1.0"
  264 ++SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH}"
  265 ++SRCREV = "2d41934ee1ca738d6a2083dc43304fa55ff5e547"
  266 ++
  267 ++S = "${WORKDIR}/git"
  268 ++
  269 ++inherit fsl-u-boot-localversion
  270 ++
  271 ++LOCALVERSION ?= "-${SRCBRANCH}"
  272 ++
  273 ++BOOT_TOOLS = "imx-boot-tools"
  274 ++
  275 ++do_deploy_append_mx8m () {
  276 ++ # Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8mq-XX.dtb for mkimage to generate boot binary
  277 ++ if [ -n "${UBOOT_CONFIG}" ]
  278 ++ then
  279 ++ for config in ${UBOOT_MACHINE}; do
  280 ++ i=$(expr $i + 1);
  281 ++ for type in ${UBOOT_CONFIG}; do
  282 ++ j=$(expr $j + 1);
  283 ++ if [ $j -eq $i ]
  284 ++ then
  285 ++ install -d ${DEPLOYDIR}/${BOOT_TOOLS}
  286 ++ install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${DEPLOYDIR}/${BOOT_TOOLS}
  287 ++ install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG}
  288 ++ fi
  289 ++ done
  290 ++ unset j
  291 ++ done
  292 ++ unset i
  293 ++ fi
  294 ++
  295 ++}
  296 ++
  297 ++PACKAGE_ARCH = "${MACHINE_ARCH}"
  298 ++COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
  299 ++
  300 ++UBOOT_NAME_mx6 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
  301 ++UBOOT_NAME_mx7 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
  302 ++UBOOT_NAME_mx8 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
  303 +diff --git a/recipes-core/systemd/systemd-serialgetty.bbappend b/recipes-core/systemd/systemd-serialgetty.bbappend
  304 +new file mode 100644
  305 +index 0000000..fdb94d8
  306 +--- /dev/null
  307 ++++ b/recipes-core/systemd/systemd-serialgetty.bbappend
  308 +@@ -0,0 +1,39 @@
  309 ++FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
  310 ++
  311 ++SRC_URI_append_smarcimx8mm2g = " \
  312 ++ file://disable-serialgetty.sh \
  313 ++ file://disable-serialgetty.service \
  314 ++"
  315 ++FILES_${PN}_append_smarcimx8mm2g = " \
  316 ++ /lib/systemd/system/* \
  317 ++ /etc/systemd/system/* \
  318 ++"
  319 ++
  320 ++do_install_append_smarcimx8mm2g() {
  321 ++ install -d ${D}${systemd_unitdir}/system
  322 ++ install -d ${D}${sysconfdir}/systemd/system/sysinit.target.wants
  323 ++ install -m 0644 ${WORKDIR}/disable-serialgetty.service ${D}${systemd_unitdir}/system
  324 ++ install -m 0755 ${WORKDIR}/disable-serialgetty.sh ${D}${systemd_unitdir}/system
  325 ++
  326 ++ ln -sf ${systemd_unitdir}/system/disable-serialgetty.service \
  327 ++ ${D}${sysconfdir}/systemd/system/sysinit.target.wants/disable-serialgetty.service
  328 ++}
  329 ++
  330 ++SRC_URI_append_smarcimx8mm4g = " \
  331 ++ file://disable-serialgetty.sh \
  332 ++ file://disable-serialgetty.service \
  333 ++"
  334 ++FILES_${PN}_append_smarcimx8mm4g = " \
  335 ++ /lib/systemd/system/* \
  336 ++ /etc/systemd/system/* \
  337 ++"
  338 ++
  339 ++do_install_append_smarcimx8mm4g() {
  340 ++ install -d ${D}${systemd_unitdir}/system
  341 ++ install -d ${D}${sysconfdir}/systemd/system/sysinit.target.wants
  342 ++ install -m 0644 ${WORKDIR}/disable-serialgetty.service ${D}${systemd_unitdir}/system
  343 ++ install -m 0755 ${WORKDIR}/disable-serialgetty.sh ${D}${systemd_unitdir}/system
  344 ++
  345 ++ ln -sf ${systemd_unitdir}/system/disable-serialgetty.service \
  346 ++ ${D}${sysconfdir}/systemd/system/sysinit.target.wants/disable-serialgetty.service
  347 ++}
  348 +diff --git a/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.service b/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.service
  349 +new file mode 100644
  350 +index 0000000..4c98261
  351 +--- /dev/null
  352 ++++ b/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.service
  353 +@@ -0,0 +1,11 @@
  354 ++[Unit]
  355 ++Description=Disable redundant serial getty service
  356 ++After=systemd-remount-fs.service
  357 ++ConditionPathIsReadWrite=/etc
  358 ++
  359 ++[Service]
  360 ++Type=oneshot
  361 ++ExecStart=/lib/systemd/system/disable-serialgetty.sh
  362 ++
  363 ++[Install]
  364 ++WantedBy=sysinit.target
  365 +diff --git a/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.sh b/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.sh
  366 +new file mode 100755
  367 +index 0000000..6dbc806
  368 +--- /dev/null
  369 ++++ b/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.sh
  370 +@@ -0,0 +1,20 @@
  371 ++#!/bin/sh
  372 ++
  373 ++UART0_SERVICE=serial-getty@ttymxc0.service
  374 ++UART1_SERVICE=serial-getty@ttymxc1.service
  375 ++UART2_SERVICE=serial-getty@ttymxc2.service
  376 ++UART3_SERVICE=serial-getty@ttymxc3.service
  377 ++
  378 ++tty_service_enabled()
  379 ++{
  380 ++ test -f /etc/systemd/system/getty.target.wants/$1
  381 ++}
  382 ++
  383 ++if tty_service_enabled ${UART0_SERVICE}; then
  384 ++ systemctl stop ${UART0_SERVICE}
  385 ++ systemctl disable ${UART0_SERVICE}
  386 ++ systemctl enable ${UART1_SERVICE}
  387 ++fi
  388 ++
  389 ++
  390 ++
  391 +diff --git a/recipes-kernel/linux/linux-smarcimx8mm_5.4.bb b/recipes-kernel/linux/linux-smarcimx8mm_5.4.bb
  392 +new file mode 100644
  393 +index 0000000..94fe8c3
  394 +--- /dev/null
  395 ++++ b/recipes-kernel/linux/linux-smarcimx8mm_5.4.bb
  396 +@@ -0,0 +1,62 @@
  397 ++# Copyright (C) 2013-2016 Freescale Semiconductor
  398 ++# Copyright 2017-2019 NXP
  399 ++# Copyright 2018-2019 Embedian, Inc.
  400 ++# Released under the MIT license (see COPYING.MIT for the terms)
  401 ++
  402 ++SUMMARY = "Linux kernel provided and supported by Embedian"
  403 ++DESCRIPTION = "Linux kernel provided and supported by Embedian (based on the kernel imx_5.4.24_2.1.0 provided by NXP) \
  404 ++with focus on i.MX Family SOMs. It includes support for many IPs such as GPU, VPU and IPU."
  405 ++
  406 ++require recipes-kernel/linux/linux-imx.inc
  407 ++
  408 ++LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
  409 ++
  410 ++DEPENDS += "lzop-native bc-native"
  411 ++
  412 ++SRCBRANCH = "smarc_8mm_imx_5.4.24_2.1.0"
  413 ++LOCALVERSION = "-2.1.0"
  414 ++KERNEL_DEFCONFIG = "${S}/arch/arm64/configs/smarcimx8mm_defconfig"
  415 ++
  416 ++KERNEL_SRC ?= "git@git.embedian.com:developer/smarc-fsl-linux-kernel.git;protocol=git"
  417 ++SRC_URI = "${EMB_KERNEL_MIRROR};protocol=ssh;branch=${SRCBRANCH}"
  418 ++SRCREV = "8b44baa3bf3c4262181cfd1e77017ed58fbd4e3c"
  419 ++
  420 ++S = "${WORKDIR}/git"
  421 ++FILES_${KERNEL_PACKAGE_NAME}-base += "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin.modinfo "
  422 ++
  423 ++KERNEL_CONFIG_COMMAND = "oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} olddefconfig"
  424 ++
  425 ++FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
  426 ++
  427 ++DEFAULT_PREFERENCE = "1"
  428 ++
  429 ++addtask copy_defconfig after do_patch before do_preconfigure
  430 ++
  431 ++do_copy_defconfig () {
  432 ++ install -d ${B}
  433 ++ # copy kernel defconfig smarcimx8mm_defconfig to use for mx8
  434 ++ mkdir -p ${B}
  435 ++ cp ${KERNEL_DEFCONFIG} ${B}/.config
  436 ++ cp ${KERNEL_DEFCONFIG} ${B}/../defconfig
  437 ++}
  438 ++
  439 ++DELTA_KERNEL_DEFCONFIG ?= ""
  440 ++#DELTA_KERNEL_DEFCONFIG_prepend_mx8 = "sdk_imx.config "
  441 ++
  442 ++do_merge_delta_config[dirs] = "${B}"
  443 ++do_merge_delta_config() {
  444 ++ for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do
  445 ++ if [ -f ${S}/arch/${ARCH}/configs/${deltacfg} ]; then
  446 ++ ${KERNEL_CONFIG_COMMAND}
  447 ++ oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} ${deltacfg}
  448 ++ elif [ -f "${WORKDIR}/${deltacfg}" ]; then
  449 ++ ${S}/scripts/kconfig/merge_config.sh -m .config ${WORKDIR}/${deltacfg}
  450 ++ elif [ -f "${deltacfg}" ]; then
  451 ++ ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg}
  452 ++ fi
  453 ++ done
  454 ++ cp .config ${WORKDIR}/defconfig
  455 ++}
  456 ++addtask merge_delta_config before do_preconfigure after do_copy_defconfig
  457 ++
  458 ++COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
  459 +diff --git a/scripts/emb_mk_yocto_sdcard/README.txt b/scripts/emb_mk_yocto_sdcard/README.txt
  460 +index 8747d67..5f3d08c 100644
  461 +--- a/scripts/emb_mk_yocto_sdcard/README.txt
  462 ++++ b/scripts/emb_mk_yocto_sdcard/README.txt
  463 +@@ -11,7 +11,7 @@ Before running this script you need to bitbake fsl-image-gui.
  464 +
  465 +
  466 + Usage:
  467 +-sudo MACHINE=<smarcimx8m2g|smarcimx8m4g> ./emb-create-yocto-sdcard.sh [options] /dev/sdX
  468 ++sudo MACHINE=<smarcimx8mm2g|smarcimx8mm4g> ./emb-create-yocto-sdcard.sh [options] /dev/sdX
  469 + (Change /dev/sdX to your device name)
  470 +
  471 + options:
  472 +diff --git a/scripts/emb_mk_yocto_sdcard/emb-create-yocto-emmc.sh b/scripts/emb_mk_yocto_sdcard/emb-create-yocto-emmc.sh
  473 +index 59c2410..fbadf48 100755
  474 +--- a/scripts/emb_mk_yocto_sdcard/emb-create-yocto-emmc.sh
  475 ++++ b/scripts/emb_mk_yocto_sdcard/emb-create-yocto-emmc.sh
  476 +@@ -22,7 +22,6 @@ ROOTFS_IMAGE=rootfs.tar.bz2
  477 + BOOTLOADER_RESERVED_SIZE=2
  478 + PART1_SIZE=48
  479 + BOOTLOADER_OFFSET=33
  480 +-DISPLAY=-hdmi
  481 + PART=p
  482 + BOOTPART=1
  483 + ROOTFSPART=2
  484 +@@ -30,16 +29,11 @@ BOOTDIR=/boot
  485 +
  486 + check_board()
  487 + {
  488 +- if grep -q "i.MX8M" /sys/devices/soc0/soc_id; then
  489 +- BOARD=smarc-imx8m
  490 +- DTB_PREFIX=imx8mq-smarc
  491 ++ if grep -q "i.MX8MM" /sys/devices/soc0/soc_id; then
  492 ++ BOARD=smarc-imx8mm
  493 ++ DTB_PREFIX=imx8mm-smarc
  494 + BLOCK=mmcblk0
  495 +
  496 +- if [[ $DISPLAY != "-lvds" && $DISPLAY != "-hdmi" && \
  497 +- $DISPLAY != "-dual-display" && $DISPLAY != "" ]]; then
  498 +- red_bold_echo "ERROR: invalid display, should be lvds, hdmi, dual-display or empty"
  499 +- exit 1
  500 +- fi
  501 + else
  502 + red_bold_echo "ERROR: Unsupported board"
  503 + exit 1
  504 +@@ -65,8 +59,8 @@ check_images()
  505 + exit 1
  506 + fi
  507 +
  508 +- if [[ ! -f $IMGS_PATH/${DTB_PREFIX}${DISPLAY}.dtb ]] ; then
  509 +- red_bold_echo "ERROR: \"$IMGS_PATH/${DTB_PREFIX}${DISPLAY}.dtb\" does not exist"
  510 ++ if [[ ! -f $IMGS_PATH/${DTB_PREFIX}.dtb ]] ; then
  511 ++ red_bold_echo "ERROR: \"$IMGS_PATH/${DTB_PREFIX}.dtb\" does not exist"
  512 + exit 1
  513 + fi
  514 +
  515 +@@ -149,7 +143,7 @@ install_kernel_to_emmc()
  516 + mount /dev/${BLOCK}${PART}${BOOTPART} ${MOUNTDIR}
  517 + mkdir -p ${MOUNTDIR}/dtbs/
  518 + cp -v ${IMGS_PATH}/${KERNEL_IMAGE} ${MOUNTDIR}
  519 +- cp -v ${IMGS_PATH}/${DTB_PREFIX}${DISPLAY}.dtb ${MOUNTDIR}/dtbs/imx8mq-smarc.dtb
  520 ++ cp -v ${IMGS_PATH}/${DTB_PREFIX}.dtb ${MOUNTDIR}/dtbs/imx8mm-smarc.dtb
  521 + cp -v ${IMGS_PATH}/uEnv.txt ${MOUNTDIR}
  522 +
  523 + echo
  524 +@@ -171,7 +165,7 @@ install_rootfs_to_emmc()
  525 + tar --warning=no-timestamp -jxvf ${IMGS_PATH}/${ROOTFS_IMAGE} -C ${MOUNTDIR} --checkpoint=.1200
  526 +
  527 + # Create DTB symlink
  528 +- (cd ${MOUNTDIR}/${BOOTDIR}; ln -fs ${DTB_PREFIX}${DISPLAY}.dtb ${DTB_PREFIX}.dtb)
  529 ++ (cd ${MOUNTDIR}/${BOOTDIR}; ln -fs ${DTB_PREFIX}.dtb ${DTB_PREFIX}.dtb)
  530 +
  531 + echo
  532 + sync
  533 +@@ -198,7 +192,7 @@ start_udev()
  534 + usage()
  535 + {
  536 + echo
  537 +- echo "This script installs Yocto Rootfs on the SMARC-iMX8M's internal eMMC storage device"
  538 ++ echo "This script installs Yocto Rootfs on the SMARC-iMX8MM's internal eMMC storage device"
  539 + echo
  540 + echo " Usage: $(basename $0) <option>"
  541 + echo
  542 +@@ -224,7 +218,7 @@ if [[ $EUID != 0 ]] ; then
  543 + exit 1
  544 + fi
  545 +
  546 +-blue_underlined_bold_echo "*** Embedian SMARC-iMX8M on-module eMMC Recovery ***"
  547 ++blue_underlined_bold_echo "*** Embedian SMARC-iMX8MM on-module eMMC Recovery ***"
  548 + echo
  549 +
  550 + while getopts d:h OPTION;
  551 +diff --git a/scripts/emb_mk_yocto_sdcard/emb-create-yocto-sdcard.sh b/scripts/emb_mk_yocto_sdcard/emb-create-yocto-sdcard.sh
  552 +index 69b4522..9712e14 100755
  553 +--- a/scripts/emb_mk_yocto_sdcard/emb-create-yocto-sdcard.sh
  554 ++++ b/scripts/emb_mk_yocto_sdcard/emb-create-yocto-sdcard.sh
  555 +@@ -21,9 +21,6 @@ readonly YOCTO_DEFAULT_IMAGE=fsl-image-qt5-validation-imx
  556 + readonly YOCTO_SCRIPTS_PATH=${SCRIPT_POINT}
  557 + readonly YOCTO_IMGS_PATH=${YOCTO_BUILD}/tmp/deploy/images/${MACHINE}
  558 +
  559 +-## display (one of "-hdmi", "-lcdif-lvds", "-dp", "-dcss-lvds", "-dual-display", "-edp")
  560 +-readonly DISPLAY="-hdmi"
  561 +-
  562 + # $1 -- block device
  563 + # $2 -- output images dir
  564 + readonly LPARAM_BLOCK_DEVICE=${1}
  565 +@@ -100,7 +97,7 @@ echo "================================================"
  566 +
  567 + help() {
  568 + bn=`basename $0`
  569 +- echo " Usage: MACHINE=<smarcimx8mq2g|smarcimx8mq4g> $bn <options> device_node"
  570 ++ echo " Usage: MACHINE=<smarcimx8mm2g|smarcimx8mm4g> $bn <options> device_node"
  571 + echo
  572 + echo " options:"
  573 + echo " -h display this Help message"
  574 +@@ -117,7 +114,7 @@ if [[ $EUID -ne 0 ]] ; then
  575 + exit 1
  576 + fi
  577 +
  578 +-if [[ $MACHINE != "smarcimx8mq2g" && $MACHINE != "smarcimx8mq4g" ]] ; then
  579 ++if [[ $MACHINE != "smarcimx8mm2g" && $MACHINE != "smarcimx8mm4g" ]] ; then
  580 + help
  581 + exit 1
  582 + fi
  583 +@@ -262,7 +259,7 @@ function install_yocto
  584 + echo "Flashing \"Image, device tree and uEnv.txt\" partition"
  585 + cp -v ${YOCTO_IMGS_PATH}/Image ${P1_MOUNT_DIR}/
  586 + mkdir -p ${P1_MOUNT_DIR}/dtbs/
  587 +- cp -v ${YOCTO_IMGS_PATH}/imx8mq-smarc${DISPLAY}.dtb ${P1_MOUNT_DIR}/dtbs/imx8mq-smarc.dtb
  588 ++ cp -v ${YOCTO_IMGS_PATH}/imx8mm-smarc.dtb ${P1_MOUNT_DIR}/dtbs/imx8mm-smarc.dtb
  589 + cp -v ${YOCTO_SCRIPTS_PATH}/uEnv.txt ${P1_MOUNT_DIR}/
  590 +
  591 + echo
  592 +@@ -296,7 +293,7 @@ function copy_images
  593 + echo "Copying Kernel Parameter uEnv.txt to /opt/images/"
  594 + cp -v ${YOCTO_SCRIPTS_PATH}/uEnv_emmc.txt ${P2_MOUNT_DIR}/opt/images/Yocto/uEnv.txt
  595 +
  596 +- if [[ $MACHINE = "smarcimx8mq2g" || ${MACHINE} = "smarcimx8mq4g" ]]; then
  597 ++ if [[ $MACHINE = "smarcimx8mm2g" || ${MACHINE} = "smarcimx8mm4g" ]]; then
  598 + cp ${YOCTO_IMGS_PATH}/imx-boot-${MACHINE}-sd.bin-* ${P2_MOUNT_DIR}/opt/images/Yocto
  599 + (cd ${P2_MOUNT_DIR}/opt/images/Yocto; ln -fs imx-boot-${MACHINE}-sd.bin-flash_evk imx-boot-sd.bin)
  600 + else
  601 +diff --git a/scripts/emb_mk_yocto_sdcard/uEnv.txt b/scripts/emb_mk_yocto_sdcard/uEnv.txt
  602 +index fab33cb..080d766 100644
  603 +--- a/scripts/emb_mk_yocto_sdcard/uEnv.txt
  604 ++++ b/scripts/emb_mk_yocto_sdcard/uEnv.txt
  605 +@@ -1,14 +1,11 @@
  606 +-optargs="video=HDMI-A-1:1920x1080-32@60 consoleblank=0"
  607 +-#optargs="video=HDMI-A-1:3840x2160-32@30 consoleblank=0"
  608 +-#optargs="video=HDMI-A-1:3840x2160-32@60 consoleblank=0"
  609 + #console port SER3
  610 +-console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200
  611 ++console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200
  612 + #console port SER2
  613 +-#console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200
  614 +-#console port SER1
  615 + #console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200
  616 ++#console port SER1
  617 ++#console=ttymxc3,115200 earlycon=ec_imx6q,0x30a60000,115200
  618 + #console port SER0
  619 +-#console=ttymxc3,115200 earlycon=ec_imx6q,0x30A60000,115200
  620 ++#console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200
  621 + mmcdev=1
  622 + mmcpart=1
  623 + image=Image
  624 +@@ -22,7 +19,7 @@ ethact=FEC0
  625 + ipaddr=192.168.1.150
  626 + serverip=192.168.1.53
  627 + gatewayip=192.168.1.254
  628 +-mmcargs=setenv bootargs cma=960M console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs}
  629 ++mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs} cma=400M
  630 + uenvcmd=run loadimage; run loadfdt; run mmcboot
  631 + # USB Boot
  632 + #usbargs=setenv bootargs console=${console} root=${usbroot} rootfstype=${mmcrootfstype} ${optargs}
  633 +diff --git a/scripts/emb_mk_yocto_sdcard/uEnv_emmc.txt b/scripts/emb_mk_yocto_sdcard/uEnv_emmc.txt
  634 +index 64692b6..7650031 100644
  635 +--- a/scripts/emb_mk_yocto_sdcard/uEnv_emmc.txt
  636 ++++ b/scripts/emb_mk_yocto_sdcard/uEnv_emmc.txt
  637 +@@ -1,14 +1,11 @@
  638 +-optargs="video=HDMI-A-1:1920x1080-32@60 consoleblank=0"
  639 +-#optargs="video=HDMI-A-1:3840x2160-32@30 consoleblank=0"
  640 +-#optargs="video=HDMI-A-1:3840x2160-32@60 consoleblank=0"
  641 + #console port SER3
  642 +-console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200
  643 ++console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200
  644 + #console port SER2
  645 +-#console=ttymxc1,115200 earlycon=ec_imx6q,0x30890000,115200
  646 +-#console port SER1
  647 + #console=ttymxc2,115200 earlycon=ec_imx6q,0x30880000,115200
  648 ++#console port SER1
  649 ++#console=ttymxc3,115200 earlycon=ec_imx6q,0x30a60000,115200
  650 + #console port SER0
  651 +-#console=ttymxc3,115200 earlycon=ec_imx6q,0x30A60000,115200
  652 ++#console=ttymxc0,115200 earlycon=ec_imx6q,0x30860000,115200
  653 + mmcdev=0
  654 + mmcpart=1
  655 + image=Image
  656 +@@ -22,7 +19,7 @@ ethact=FEC0
  657 + ipaddr=192.168.1.150
  658 + serverip=192.168.1.53
  659 + gatewayip=192.168.1.254
  660 +-mmcargs=setenv bootargs cma=960M console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs}
  661 ++mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype} ${optargs} cma=400M
  662 + uenvcmd=run loadimage; run loadfdt; run mmcboot
  663 + # USB Boot
  664 + #usbargs=setenv bootargs console=${console} root=${usbroot} rootfstype=${mmcrootfstype} ${optargs}
conf/machine/include/smarc-common.inc
... ... @@ -73,4 +73,9 @@
73 73 MACHINE_FEATURES_append_smarcimx8mq2g = " mrvl8997 jailhouse"
74 74 MACHINE_FEATURES_remove_smarcimx8mq4g = "qca6174"
75 75 MACHINE_FEATURES_append_smarcimx8mq4g = " mrvl8997 jailhouse"
  76 +
  77 +MACHINE_FEATURES_remove_smarcimx8mm2g = "qca6174"
  78 +MACHINE_FEATURES_append_smarcimx8mm2g = " mrvl8997 jailhouse"
  79 +MACHINE_FEATURES_remove_smarcimx8mm4g = "qca6174"
  80 +MACHINE_FEATURES_append_smarcimx8mm4g = " mrvl8997 jailhouse"
conf/machine/smarcimx8mm2g.conf
  1 +#@TYPE: Machine
  2 +#@NAME: EMBEDIAN SMARC-iMX8MM COMPUTER ON MODULES with 4GB 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:mx8mm:"
  10 +
  11 +require conf/machine/include/imx-base.inc
  12 +require conf/machine/include/tune-cortexa53.inc
  13 +require conf/machine/include/smarc-common.inc
  14 +
  15 +MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth"
  16 +
  17 +# Embedian BSP default providers
  18 +PREFERRED_PROVIDER_virtual/kernel_smarcimx8mm2g ?= "linux-smarcimx8mm"
  19 +PREFERRED_VERSION_linux-smarcimx8mm2g_smarcimx8mm2g = "5.4"
  20 +
  21 +KERNEL_DEVICETREE = " \
  22 + embedian/imx8mm-smarc.dtb \
  23 + embedian/imx8mm-smarc-m4.dtb \
  24 +"
  25 +MACHINE_EXTRA_RRECOMMENDS_append_mx8mm = " imx-m4-demos"
  26 +IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy"
  27 +IMAGE_BOOT_FILES += "imx8mm_m4_TCM_hello_world.bin imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin"
  28 +
  29 +PREFERRED_PROVIDER_u-boot_smarcimx8mm2g = "u-boot-smarcimx8mm"
  30 +PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mm2g = "u-boot-smarcimx8mm"
  31 +
  32 +UBOOT_CONFIG ??= "sd"
  33 +UBOOT_CONFIG[sd] = "smarcimx8mm_2g_ser3_defconfig,sdcard"
  34 +SPL_BINARY = "spl/u-boot-spl.bin"
  35 +
  36 +# Set DDR FIRMWARE
  37 +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"
  38 +
  39 +# Set U-Boot DTB
  40 +UBOOT_DTB_NAME = "imx8mm-smarc.dtb"
  41 +
  42 +# Set imx-mkimage boot target
  43 +IMXBOOT_TARGETS = "flash_evk"
  44 +
  45 +SERIAL_CONSOLE = "115200 ttymxc1"
  46 +
  47 +IMAGE_BOOTLOADER = "imx-boot"
  48 +
  49 +LOADADDR = ""
  50 +UBOOT_MAKE_TARGET = ""
  51 +IMX_BOOT_SEEK = "33"
  52 +
  53 +MACHINE_EXTRA_RDEPENDS += " \
  54 + imx-boot \
  55 + packagegroup-tools-bluetooth \
  56 + pm-utils \
  57 + kmod \
  58 + hdparm \
  59 + gptfdisk \
  60 + lftp \
  61 + vim \
  62 + ntp \
  63 + boost \
  64 + nodejs \
  65 + networkmanager \
  66 + imx-gpu-viv \
  67 + "
  68 +
  69 +# Packages added to all images (including core-image-minimal)
  70 +
  71 +# eIQ Machine Learning. Note that many of the features require Qt 5. Disable
  72 +# this when you build image without QT 5.
  73 +IMAGE_INSTALL_append = " \
  74 + packagegroup-imx-ml \
  75 + firmware-imx-sdma \
  76 + firmware-imx-regulatory \
  77 + fsl-rc-local \
  78 + android-tools \
  79 + "
  80 +#IMAGE_INSTALL_append = " \
  81 +# firmware-imx-sdma \
  82 +# firmware-imx-regulatory \
  83 +# fsl-rc-local \
  84 +# android-tools \
  85 +# "
  86 +
  87 +IMAGE_FSTYPES = "tar.bz2"
  88 +
  89 +# Ship all kernel modules by default
  90 +MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
  91 +
  92 +MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k"
conf/machine/smarcimx8mm4g.conf
  1 +#@TYPE: Machine
  2 +#@NAME: EMBEDIAN SMARC-iMX8MM COMPUTER ON MODULES with 4GB 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:mx8mm:"
  10 +
  11 +require conf/machine/include/imx-base.inc
  12 +require conf/machine/include/tune-cortexa53.inc
  13 +require conf/machine/include/smarc-common.inc
  14 +
  15 +MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth"
  16 +
  17 +# Embedian BSP default providers
  18 +PREFERRED_PROVIDER_virtual/kernel_smarcimx8mm4g ?= "linux-smarcimx8mm"
  19 +PREFERRED_VERSION_linux-smarcimx8mm4g_smarcimx8mm4g = "5.4"
  20 +
  21 +KERNEL_DEVICETREE = " \
  22 + embedian/imx8mm-smarc.dtb \
  23 + embedian/imx8mm-smarc-m4.dtb \
  24 +"
  25 +MACHINE_EXTRA_RRECOMMENDS_append_mx8mm = " imx-m4-demos"
  26 +IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy"
  27 +IMAGE_BOOT_FILES += "imx8mm_m4_TCM_hello_world.bin imx8mm_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mm_m4_TCM_rpmsg_lite_str_echo_rtos.bin"
  28 +
  29 +PREFERRED_PROVIDER_u-boot_smarcimx8mm4g = "u-boot-smarcimx8mm"
  30 +PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mm4g = "u-boot-smarcimx8mm"
  31 +
  32 +UBOOT_CONFIG ??= "sd"
  33 +UBOOT_CONFIG[sd] = "smarcimx8mm_4g_ser3_defconfig,sdcard"
  34 +SPL_BINARY = "spl/u-boot-spl.bin"
  35 +
  36 +# Set DDR FIRMWARE
  37 +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"
  38 +
  39 +# Set U-Boot DTB
  40 +UBOOT_DTB_NAME = "imx8mm-smarc.dtb"
  41 +
  42 +# Set imx-mkimage boot target
  43 +IMXBOOT_TARGETS = "flash_evk"
  44 +
  45 +SERIAL_CONSOLE = "115200 ttymxc1"
  46 +
  47 +IMAGE_BOOTLOADER = "imx-boot"
  48 +
  49 +LOADADDR = ""
  50 +UBOOT_MAKE_TARGET = ""
  51 +IMX_BOOT_SEEK = "33"
  52 +
  53 +MACHINE_EXTRA_RDEPENDS += " \
  54 + imx-boot \
  55 + packagegroup-tools-bluetooth \
  56 + pm-utils \
  57 + kmod \
  58 + hdparm \
  59 + gptfdisk \
  60 + lftp \
  61 + vim \
  62 + ntp \
  63 + boost \
  64 + nodejs \
  65 + networkmanager \
  66 + imx-gpu-viv \
  67 + "
  68 +
  69 +# Packages added to all images (including core-image-minimal)
  70 +
  71 +# eIQ Machine Learning. Note that many of the features require Qt 5. Disable
  72 +# this when you build image without QT 5.
  73 +IMAGE_INSTALL_append = " \
  74 + packagegroup-imx-ml \
  75 + firmware-imx-sdma \
  76 + firmware-imx-regulatory \
  77 + fsl-rc-local \
  78 + android-tools \
  79 + "
  80 +#IMAGE_INSTALL_append = " \
  81 +# firmware-imx-sdma \
  82 +# firmware-imx-regulatory \
  83 +# fsl-rc-local \
  84 +# android-tools \
  85 +# "
  86 +
  87 +IMAGE_FSTYPES = "tar.bz2"
  88 +
  89 +# Ship all kernel modules by default
  90 +MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
  91 +
  92 +MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k"
recipes-bsp/imx-atf/imx-atf/imx8mm-atf-uart4.patch
  1 +diff --git a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
  2 +index 049192880..57c404675 100644
  3 +--- a/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
  4 ++++ b/plat/imx/imx8m/imx8mm/imx8mm_bl31_setup.c
  5 +@@ -58,7 +58,8 @@ static const struct imx_rdc_cfg rdc[] = {
  6 + RDC_MDAn(RDC_MDA_M4, DID1),
  7 +
  8 + /* peripherals domain permission */
  9 +- RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),
  10 ++ /*RDC_PDAPn(RDC_PDAP_UART4, D1R | D1W),*/
  11 ++ RDC_PDAPn(RDC_PDAP_UART4, D0R | D0W),
  12 + RDC_PDAPn(RDC_PDAP_UART2, D0R | D0W),
  13 +
  14 + /* memory region */
recipes-bsp/imx-atf/imx-atf_2.2.bbappend
... ... @@ -2,5 +2,6 @@
2 2  
3 3 SRC_URI_append = " \
4 4 file://imx8m-atf-ddr-timing.patch \
  5 + file://imx8mm-atf-uart4.patch \
5 6 "
recipes-bsp/imx-mkimage/imx-boot_1.0.bbappend
1 1 # Workaround to fix do_compile() failure due to missing fsl-imx8mq-evk.dtb
2 2 do_compile_prepend() {
3 3 echo "Copying 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
  4 + if [ -f ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/imx8mm-smarc.dtb ]; then
  5 + cp ${DEPLOY_DIR_IMAGE}/${BOOT_TOOLS}/imx8mm-smarc.dtb ${S}/iMX8M/imx8mm-evk.dtb
6 6 fi
7 7 }
recipes-bsp/u-boot/u-boot-smarcimx8mm_2020.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 +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_8mm-imx_v2020.04_5.4.24_2.1.0"
  19 +SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH}"
  20 +SRCREV = "2d41934ee1ca738d6a2083dc43304fa55ff5e547"
  21 +
  22 +S = "${WORKDIR}/git"
  23 +
  24 +inherit fsl-u-boot-localversion
  25 +
  26 +LOCALVERSION ?= "-${SRCBRANCH}"
  27 +
  28 +BOOT_TOOLS = "imx-boot-tools"
  29 +
  30 +do_deploy_append_mx8m () {
  31 + # Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8mq-XX.dtb for mkimage to generate boot binary
  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}-${UBOOT_CONFIG}
  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/systemd/systemd-serialgetty.bbappend
  1 +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
  2 +
  3 +SRC_URI_append_smarcimx8mm2g = " \
  4 + file://disable-serialgetty.sh \
  5 + file://disable-serialgetty.service \
  6 +"
  7 +FILES_${PN}_append_smarcimx8mm2g = " \
  8 + /lib/systemd/system/* \
  9 + /etc/systemd/system/* \
  10 +"
  11 +
  12 +do_install_append_smarcimx8mm2g() {
  13 + install -d ${D}${systemd_unitdir}/system
  14 + install -d ${D}${sysconfdir}/systemd/system/sysinit.target.wants
  15 + install -m 0644 ${WORKDIR}/disable-serialgetty.service ${D}${systemd_unitdir}/system
  16 + install -m 0755 ${WORKDIR}/disable-serialgetty.sh ${D}${systemd_unitdir}/system
  17 +
  18 + ln -sf ${systemd_unitdir}/system/disable-serialgetty.service \
  19 + ${D}${sysconfdir}/systemd/system/sysinit.target.wants/disable-serialgetty.service
  20 +}
  21 +
  22 +SRC_URI_append_smarcimx8mm4g = " \
  23 + file://disable-serialgetty.sh \
  24 + file://disable-serialgetty.service \
  25 +"
  26 +FILES_${PN}_append_smarcimx8mm4g = " \
  27 + /lib/systemd/system/* \
  28 + /etc/systemd/system/* \
  29 +"
  30 +
  31 +do_install_append_smarcimx8mm4g() {
  32 + install -d ${D}${systemd_unitdir}/system
  33 + install -d ${D}${sysconfdir}/systemd/system/sysinit.target.wants
  34 + install -m 0644 ${WORKDIR}/disable-serialgetty.service ${D}${systemd_unitdir}/system
  35 + install -m 0755 ${WORKDIR}/disable-serialgetty.sh ${D}${systemd_unitdir}/system
  36 +
  37 + ln -sf ${systemd_unitdir}/system/disable-serialgetty.service \
  38 + ${D}${sysconfdir}/systemd/system/sysinit.target.wants/disable-serialgetty.service
  39 +}
recipes-core/systemd/systemd-serialgetty/disable-serialgetty.service
  1 +[Unit]
  2 +Description=Disable redundant serial getty service
  3 +After=systemd-remount-fs.service
  4 +ConditionPathIsReadWrite=/etc
  5 +
  6 +[Service]
  7 +Type=oneshot
  8 +ExecStart=/lib/systemd/system/disable-serialgetty.sh
  9 +
  10 +[Install]
  11 +WantedBy=sysinit.target
recipes-core/systemd/systemd-serialgetty/disable-serialgetty.sh
  1 +#!/bin/sh
  2 +
  3 +UART0_SERVICE=serial-getty@ttymxc0.service
  4 +UART1_SERVICE=serial-getty@ttymxc1.service
  5 +UART2_SERVICE=serial-getty@ttymxc2.service
  6 +UART3_SERVICE=serial-getty@ttymxc3.service
  7 +
  8 +tty_service_enabled()
  9 +{
  10 + test -f /etc/systemd/system/getty.target.wants/$1
  11 +}
  12 +
  13 +if tty_service_enabled ${UART0_SERVICE}; then
  14 + systemctl stop ${UART0_SERVICE}
  15 + systemctl disable ${UART0_SERVICE}
  16 + systemctl enable ${UART1_SERVICE}
  17 +fi
recipes-kernel/linux/linux-smarcimx8mm_5.4.bb
  1 +# Copyright (C) 2013-2016 Freescale Semiconductor
  2 +# Copyright 2017-2019 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_5.4.24_2.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 +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
  13 +
  14 +DEPENDS += "lzop-native bc-native"
  15 +
  16 +SRCBRANCH = "smarc_8mm_imx_5.4.24_2.1.0"
  17 +LOCALVERSION = "-2.1.0"
  18 +KERNEL_DEFCONFIG = "${S}/arch/arm64/configs/smarcimx8mm_defconfig"
  19 +
  20 +KERNEL_SRC ?= "git@git.embedian.com:developer/smarc-fsl-linux-kernel.git;protocol=git"
  21 +SRC_URI = "${EMB_KERNEL_MIRROR};protocol=ssh;branch=${SRCBRANCH}"
  22 +SRCREV = "8b44baa3bf3c4262181cfd1e77017ed58fbd4e3c"
  23 +
  24 +S = "${WORKDIR}/git"
  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 +addtask copy_defconfig after do_patch before do_preconfigure
  34 +
  35 +do_copy_defconfig () {
  36 + install -d ${B}
  37 + # copy kernel defconfig smarcimx8mm_defconfig to use for mx8
  38 + mkdir -p ${B}
  39 + cp ${KERNEL_DEFCONFIG} ${B}/.config
  40 + cp ${KERNEL_DEFCONFIG} ${B}/../defconfig
  41 +}
  42 +
  43 +DELTA_KERNEL_DEFCONFIG ?= ""
  44 +#DELTA_KERNEL_DEFCONFIG_prepend_mx8 = "sdk_imx.config "
  45 +
  46 +do_merge_delta_config[dirs] = "${B}"
  47 +do_merge_delta_config() {
  48 + for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do
  49 + if [ -f ${S}/arch/${ARCH}/configs/${deltacfg} ]; then
  50 + ${KERNEL_CONFIG_COMMAND}
  51 + oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} ${deltacfg}
  52 + elif [ -f "${WORKDIR}/${deltacfg}" ]; then
  53 + ${S}/scripts/kconfig/merge_config.sh -m .config ${WORKDIR}/${deltacfg}
  54 + elif [ -f "${deltacfg}" ]; then
  55 + ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg}
  56 + fi
  57 + done
  58 + cp .config ${WORKDIR}/defconfig
  59 +}
  60 +addtask merge_delta_config before do_preconfigure after do_copy_defconfig
  61 +
  62 +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=<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
... ... @@ -22,7 +22,6 @@
22 22 BOOTLOADER_RESERVED_SIZE=2
23 23 PART1_SIZE=48
24 24 BOOTLOADER_OFFSET=33
25   -DISPLAY=-hdmi
26 25 PART=p
27 26 BOOTPART=1
28 27 ROOTFSPART=2
29 28  
... ... @@ -30,16 +29,11 @@
30 29  
31 30 check_board()
32 31 {
33   - if grep -q "i.MX8M" /sys/devices/soc0/soc_id; then
34   - BOARD=smarc-imx8m
35   - DTB_PREFIX=imx8mq-smarc
  32 + if grep -q "i.MX8MM" /sys/devices/soc0/soc_id; then
  33 + BOARD=smarc-imx8mm
  34 + DTB_PREFIX=imx8mm-smarc
36 35 BLOCK=mmcblk0
37 36  
38   - if [[ $DISPLAY != "-lvds" && $DISPLAY != "-hdmi" && \
39   - $DISPLAY != "-dual-display" && $DISPLAY != "" ]]; then
40   - red_bold_echo "ERROR: invalid display, should be lvds, hdmi, dual-display or empty"
41   - exit 1
42   - fi
43 37 else
44 38 red_bold_echo "ERROR: Unsupported board"
45 39 exit 1
... ... @@ -65,8 +59,8 @@
65 59 exit 1
66 60 fi
67 61  
68   - if [[ ! -f $IMGS_PATH/${DTB_PREFIX}${DISPLAY}.dtb ]] ; then
69   - red_bold_echo "ERROR: \"$IMGS_PATH/${DTB_PREFIX}${DISPLAY}.dtb\" does not exist"
  62 + if [[ ! -f $IMGS_PATH/${DTB_PREFIX}.dtb ]] ; then
  63 + red_bold_echo "ERROR: \"$IMGS_PATH/${DTB_PREFIX}.dtb\" does not exist"
70 64 exit 1
71 65 fi
72 66  
... ... @@ -149,7 +143,7 @@
149 143 mount /dev/${BLOCK}${PART}${BOOTPART} ${MOUNTDIR}
150 144 mkdir -p ${MOUNTDIR}/dtbs/
151 145 cp -v ${IMGS_PATH}/${KERNEL_IMAGE} ${MOUNTDIR}
152   - cp -v ${IMGS_PATH}/${DTB_PREFIX}${DISPLAY}.dtb ${MOUNTDIR}/dtbs/imx8mq-smarc.dtb
  146 + cp -v ${IMGS_PATH}/${DTB_PREFIX}.dtb ${MOUNTDIR}/dtbs/imx8mm-smarc.dtb
153 147 cp -v ${IMGS_PATH}/uEnv.txt ${MOUNTDIR}
154 148  
155 149 echo
... ... @@ -171,7 +165,7 @@
171 165 tar --warning=no-timestamp -jxvf ${IMGS_PATH}/${ROOTFS_IMAGE} -C ${MOUNTDIR} --checkpoint=.1200
172 166  
173 167 # Create DTB symlink
174   - (cd ${MOUNTDIR}/${BOOTDIR}; ln -fs ${DTB_PREFIX}${DISPLAY}.dtb ${DTB_PREFIX}.dtb)
  168 + (cd ${MOUNTDIR}/${BOOTDIR}; ln -fs ${DTB_PREFIX}.dtb ${DTB_PREFIX}.dtb)
175 169  
176 170 echo
177 171 sync
... ... @@ -198,7 +192,7 @@
198 192 usage()
199 193 {
200 194 echo
201   - echo "This script installs Yocto Rootfs on the SMARC-iMX8M's internal eMMC storage device"
  195 + echo "This script installs Yocto Rootfs on the SMARC-iMX8MM's internal eMMC storage device"
202 196 echo
203 197 echo " Usage: $(basename $0) <option>"
204 198 echo
... ... @@ -224,7 +218,7 @@
224 218 exit 1
225 219 fi
226 220  
227   -blue_underlined_bold_echo "*** Embedian SMARC-iMX8M on-module eMMC Recovery ***"
  221 +blue_underlined_bold_echo "*** Embedian SMARC-iMX8MM on-module eMMC Recovery ***"
228 222 echo
229 223  
230 224 while getopts d:h OPTION;
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=<smarcimx8mq2g|smarcimx8mq4g> $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 != "smarcimx8mq2g" && $MACHINE != "smarcimx8mq4g" ]] ; 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}/imx8mq-smarc${DISPLAY}.dtb ${P1_MOUNT_DIR}/dtbs/imx8mq-smarc.dtb
  262 + cp -v ${YOCTO_IMGS_PATH}/imx8mm-smarc.dtb ${P1_MOUNT_DIR}/dtbs/imx8mm-smarc.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 = "smarcimx8mq2g" || ${MACHINE} = "smarcimx8mq4g" ]]; 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 cma=960M 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 cma=960M 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}