Commit 2df5f8cb7d957410d5468a56d0f1f77c1a205cca

Authored by Eric Lee
1 parent c1c1387b19

Fix 4GB LPDDR4 config and remove redundant console port

Showing 9 changed files with 123 additions and 2 deletions Side-by-side Diff

conf/machine/smarcimx8mm2g.conf
... ... @@ -11,6 +11,8 @@
11 11 require conf/machine/include/imx-base.inc
12 12 require conf/machine/include/arm/arch-arm64.inc
13 13  
  14 +MACHINE_FEATURES_append_smarcimx8mm2g = " jailhouse"
  15 +
14 16 MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth"
15 17  
16 18 IMAGE_FEATURES += "package-management"
... ... @@ -67,6 +69,14 @@
67 69 networkmanager \
68 70 imx-gpu-viv \
69 71 "
  72 +
  73 +# Packages added to all images (including core-image-minimal)
  74 +IMAGE_INSTALL_append = " \
  75 + firmware-imx-sdma \
  76 + firmware-imx-epdc \
  77 + fsl-rc-local \
  78 + android-tools \
  79 + "
70 80  
71 81 IMAGE_FSTYPES = "tar.bz2"
72 82  
conf/machine/smarcimx8mm4g.conf
... ... @@ -11,6 +11,8 @@
11 11 require conf/machine/include/imx-base.inc
12 12 require conf/machine/include/arm/arch-arm64.inc
13 13  
  14 +MACHINE_FEATURES_append_smarcimx8mm4g = " jailhouse"
  15 +
14 16 MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth"
15 17  
16 18 IMAGE_FEATURES += "package-management"
... ... @@ -67,6 +69,14 @@
67 69 networkmanager \
68 70 imx-gpu-viv \
69 71 "
  72 +
  73 +# Packages added to all images (including core-image-minimal)
  74 +IMAGE_INSTALL_append = " \
  75 + firmware-imx-sdma \
  76 + firmware-imx-epdc \
  77 + fsl-rc-local \
  78 + android-tools \
  79 + "
70 80  
71 81 IMAGE_FSTYPES = "tar.bz2"
72 82  
recipes-bsp/u-boot/u-boot-smarcimx8mm_2019.04.bb
... ... @@ -15,7 +15,7 @@
15 15 UBOOT_SRC ?= "${EMB_UBOOT_MIRROR};protocol=ssh"
16 16 SRCBRANCH = "smarc_8mm-imx_v2019.04_4.19.35_1.1.0"
17 17 SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH}"
18   -SRCREV = "81e795041d21f231ba089b9f5f0376de26ae0784"
  18 +SRCREV = "5999439f6bef2790462bb0ec936f3a783e3ce4b7"
19 19  
20 20 S = "${WORKDIR}/git"
21 21  
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/kernel-modules/kernel-module-imx-gpu-viv/0001-gpu-imx-Enable-GPU-driver-workaround-for-i.MX8M-Mini.patch
  1 +diff --git a/src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c b/src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c
  2 +index ebfcc1990578..b593887d0a1d 100644
  3 +--- a/src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c
  4 ++++ b/src/hal/os/linux/kernel/platform/freescale/gc_hal_kernel_platform_imx.c
  5 +@@ -1626,10 +1626,12 @@ _AdjustParam(
  6 + patch_param(Platform->device, Args);
  7 +
  8 + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0)
  9 +- if (of_find_compatible_node(NULL, NULL, "fsl,imx8mq-gpu") &&
  10 ++ if ((of_find_compatible_node(NULL, NULL, "fsl,imx8mq-gpu") ||
  11 ++ of_find_compatible_node(NULL, NULL, "fsl,imx8mm-gpu")) &&
  12 + ((Args->baseAddress + totalram_pages() * PAGE_SIZE) > 0x100000000))
  13 + #else
  14 +- if (of_find_compatible_node(NULL, NULL, "fsl,imx8mq-gpu") &&
  15 ++ if ((of_find_compatible_node(NULL, NULL, "fsl,imx8mq-gpu") ||
  16 ++ of_find_compatible_node(NULL, NULL, "fsl,imx8mm-gpu")) &&
  17 + ((Args->baseAddress + totalram_pages * PAGE_SIZE) > 0x100000000))
  18 + #endif
  19 + {
  20 +--
  21 +2.17.1
recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p1.0.bbappend
  1 +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
  2 +
  3 +SRC_URI_append_smarcimx8mm4g = " \
  4 + file://0001-gpu-imx-Enable-GPU-driver-workaround-for-i.MX8M-Mini.patch \
  5 +"
  6 +
  7 +SRC_URI_append_smarcimx8mm2g = " \
  8 + file://0001-gpu-imx-Enable-GPU-driver-workaround-for-i.MX8M-Mini.patch \
  9 +"
recipes-kernel/linux/linux-smarcimx8mm_4.19.35.bb
... ... @@ -23,7 +23,7 @@
23 23  
24 24 KERNEL_SRC ?= "git@git.embedian.com:developer/smarc-fsl-linux-kernel.git;protocol=git"
25 25 SRC_URI = "${EMB_KERNEL_MIRROR};protocol=ssh;branch=${SRCBRANCH}"
26   -SRCREV = "c9eeb2047bc129cb70d9384b89eba2287fca6061"
  26 +SRCREV = "2c05c9d42bd963a67f686e257a65acb0f7112c64"
27 27  
28 28 S = "${WORKDIR}/git"
29 29