diff --git a/conf/machine/smarcimx8mm2g.conf b/conf/machine/smarcimx8mm2g.conf index df05570..0c972b2 100644 --- a/conf/machine/smarcimx8mm2g.conf +++ b/conf/machine/smarcimx8mm2g.conf @@ -11,6 +11,8 @@ MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:" require conf/machine/include/imx-base.inc require conf/machine/include/arm/arch-arm64.inc +MACHINE_FEATURES_append_smarcimx8mm2g = " jailhouse" + MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth" IMAGE_FEATURES += "package-management" @@ -68,6 +70,14 @@ MACHINE_EXTRA_RDEPENDS += " \ imx-gpu-viv \ " +# Packages added to all images (including core-image-minimal) +IMAGE_INSTALL_append = " \ + firmware-imx-sdma \ + firmware-imx-epdc \ + fsl-rc-local \ + android-tools \ + " + IMAGE_FSTYPES = "tar.bz2" # Ship all kernel modules by default diff --git a/conf/machine/smarcimx8mm4g.conf b/conf/machine/smarcimx8mm4g.conf index c3d793d..939f635 100644 --- a/conf/machine/smarcimx8mm4g.conf +++ b/conf/machine/smarcimx8mm4g.conf @@ -11,6 +11,8 @@ MACHINEOVERRIDES =. "mx8:mx8m:mx8mm:" require conf/machine/include/imx-base.inc require conf/machine/include/arm/arch-arm64.inc +MACHINE_FEATURES_append_smarcimx8mm4g = " jailhouse" + MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth" IMAGE_FEATURES += "package-management" @@ -68,6 +70,14 @@ MACHINE_EXTRA_RDEPENDS += " \ imx-gpu-viv \ " +# Packages added to all images (including core-image-minimal) +IMAGE_INSTALL_append = " \ + firmware-imx-sdma \ + firmware-imx-epdc \ + fsl-rc-local \ + android-tools \ + " + IMAGE_FSTYPES = "tar.bz2" # Ship all kernel modules by default diff --git a/recipes-bsp/u-boot/u-boot-smarcimx8mm_2019.04.bb b/recipes-bsp/u-boot/u-boot-smarcimx8mm_2019.04.bb index f671c44..d856fd6 100644 --- a/recipes-bsp/u-boot/u-boot-smarcimx8mm_2019.04.bb +++ b/recipes-bsp/u-boot/u-boot-smarcimx8mm_2019.04.bb @@ -15,7 +15,7 @@ LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a UBOOT_SRC ?= "${EMB_UBOOT_MIRROR};protocol=ssh" SRCBRANCH = "smarc_8mm-imx_v2019.04_4.19.35_1.1.0" SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH}" -SRCREV = "81e795041d21f231ba089b9f5f0376de26ae0784" +SRCREV = "5999439f6bef2790462bb0ec936f3a783e3ce4b7" S = "${WORKDIR}/git" diff --git a/recipes-core/systemd/systemd-serialgetty.bbappend b/recipes-core/systemd/systemd-serialgetty.bbappend new file mode 100644 index 0000000..fdb94d8 --- /dev/null +++ b/recipes-core/systemd/systemd-serialgetty.bbappend @@ -0,0 +1,39 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_smarcimx8mm2g = " \ + file://disable-serialgetty.sh \ + file://disable-serialgetty.service \ +" +FILES_${PN}_append_smarcimx8mm2g = " \ + /lib/systemd/system/* \ + /etc/systemd/system/* \ +" + +do_install_append_smarcimx8mm2g() { + install -d ${D}${systemd_unitdir}/system + install -d ${D}${sysconfdir}/systemd/system/sysinit.target.wants + install -m 0644 ${WORKDIR}/disable-serialgetty.service ${D}${systemd_unitdir}/system + install -m 0755 ${WORKDIR}/disable-serialgetty.sh ${D}${systemd_unitdir}/system + + ln -sf ${systemd_unitdir}/system/disable-serialgetty.service \ + ${D}${sysconfdir}/systemd/system/sysinit.target.wants/disable-serialgetty.service +} + +SRC_URI_append_smarcimx8mm4g = " \ + file://disable-serialgetty.sh \ + file://disable-serialgetty.service \ +" +FILES_${PN}_append_smarcimx8mm4g = " \ + /lib/systemd/system/* \ + /etc/systemd/system/* \ +" + +do_install_append_smarcimx8mm4g() { + install -d ${D}${systemd_unitdir}/system + install -d ${D}${sysconfdir}/systemd/system/sysinit.target.wants + install -m 0644 ${WORKDIR}/disable-serialgetty.service ${D}${systemd_unitdir}/system + install -m 0755 ${WORKDIR}/disable-serialgetty.sh ${D}${systemd_unitdir}/system + + ln -sf ${systemd_unitdir}/system/disable-serialgetty.service \ + ${D}${sysconfdir}/systemd/system/sysinit.target.wants/disable-serialgetty.service +} diff --git a/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.service b/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.service new file mode 100644 index 0000000..4c98261 --- /dev/null +++ b/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.service @@ -0,0 +1,11 @@ +[Unit] +Description=Disable redundant serial getty service +After=systemd-remount-fs.service +ConditionPathIsReadWrite=/etc + +[Service] +Type=oneshot +ExecStart=/lib/systemd/system/disable-serialgetty.sh + +[Install] +WantedBy=sysinit.target diff --git a/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.sh b/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.sh new file mode 100755 index 0000000..6dbc806 --- /dev/null +++ b/recipes-core/systemd/systemd-serialgetty/disable-serialgetty.sh @@ -0,0 +1,20 @@ +#!/bin/sh + +UART0_SERVICE=serial-getty@ttymxc0.service +UART1_SERVICE=serial-getty@ttymxc1.service +UART2_SERVICE=serial-getty@ttymxc2.service +UART3_SERVICE=serial-getty@ttymxc3.service + +tty_service_enabled() +{ + test -f /etc/systemd/system/getty.target.wants/$1 +} + +if tty_service_enabled ${UART0_SERVICE}; then + systemctl stop ${UART0_SERVICE} + systemctl disable ${UART0_SERVICE} + systemctl enable ${UART1_SERVICE} +fi + + + diff --git a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/0001-gpu-imx-Enable-GPU-driver-workaround-for-i.MX8M-Mini.patch b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/0001-gpu-imx-Enable-GPU-driver-workaround-for-i.MX8M-Mini.patch new file mode 100644 index 0000000..809f11d --- /dev/null +++ b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv/0001-gpu-imx-Enable-GPU-driver-workaround-for-i.MX8M-Mini.patch @@ -0,0 +1,22 @@ +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 +index ebfcc1990578..b593887d0a1d 100644 +--- 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 +@@ -1626,10 +1626,12 @@ _AdjustParam( + patch_param(Platform->device, Args); + + #if LINUX_VERSION_CODE >= KERNEL_VERSION(5,0,0) +- if (of_find_compatible_node(NULL, NULL, "fsl,imx8mq-gpu") && ++ if ((of_find_compatible_node(NULL, NULL, "fsl,imx8mq-gpu") || ++ of_find_compatible_node(NULL, NULL, "fsl,imx8mm-gpu")) && + ((Args->baseAddress + totalram_pages() * PAGE_SIZE) > 0x100000000)) + #else +- if (of_find_compatible_node(NULL, NULL, "fsl,imx8mq-gpu") && ++ if ((of_find_compatible_node(NULL, NULL, "fsl,imx8mq-gpu") || ++ of_find_compatible_node(NULL, NULL, "fsl,imx8mm-gpu")) && + ((Args->baseAddress + totalram_pages * PAGE_SIZE) > 0x100000000)) + #endif + { +-- +2.17.1 + diff --git a/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p1.0.bbappend b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p1.0.bbappend new file mode 100644 index 0000000..4df9497 --- /dev/null +++ b/recipes-kernel/kernel-modules/kernel-module-imx-gpu-viv_6.4.0.p1.0.bbappend @@ -0,0 +1,9 @@ +FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" + +SRC_URI_append_smarcimx8mm4g = " \ + file://0001-gpu-imx-Enable-GPU-driver-workaround-for-i.MX8M-Mini.patch \ +" + +SRC_URI_append_smarcimx8mm2g = " \ + file://0001-gpu-imx-Enable-GPU-driver-workaround-for-i.MX8M-Mini.patch \ +" diff --git a/recipes-kernel/linux/linux-smarcimx8mm_4.19.35.bb b/recipes-kernel/linux/linux-smarcimx8mm_4.19.35.bb index 82fa60d..c7a8345 100644 --- a/recipes-kernel/linux/linux-smarcimx8mm_4.19.35.bb +++ b/recipes-kernel/linux/linux-smarcimx8mm_4.19.35.bb @@ -23,7 +23,7 @@ DEFAULT_DTB = "fsl-smarcimx8mm" KERNEL_SRC ?= "git@git.embedian.com:developer/smarc-fsl-linux-kernel.git;protocol=git" SRC_URI = "${EMB_KERNEL_MIRROR};protocol=ssh;branch=${SRCBRANCH}" -SRCREV = "c9eeb2047bc129cb70d9384b89eba2287fca6061" +SRCREV = "2c05c9d42bd963a67f686e257a65acb0f7112c64" S = "${WORKDIR}/git"