Commit 7325f8364cc21b43b2eedd20cc2f6ae82a8e1043

Authored by Eric Lee
1 parent 6ab284bf2e

Add Cortex-M4 support

Showing 4 changed files with 14 additions and 2 deletions Inline Diff

conf/machine/smarcimx8mq2g.conf
1 #@TYPE: Machine 1 #@TYPE: Machine
2 #@NAME: EMBEDIAN SMARC-iMX8M COMPUTER ON MODULES with 2GB LPDDR4 MEMORY 2 #@NAME: EMBEDIAN SMARC-iMX8M COMPUTER ON MODULES with 2GB LPDDR4 MEMORY
3 #@SOC: i.MX8MQ 3 #@SOC: i.MX8MQ
4 #@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8M 4 #@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8M
5 #@MAINTAINER: Eric Lee <eric.lee@embedian.com> 5 #@MAINTAINER: Eric Lee <eric.lee@embedian.com>
6 # 6 #
7 # http://www.www.embedian.com 7 # http://www.www.embedian.com
8 8
9 MACHINEOVERRIDES =. "mx8:mx8m:mx8mq:" 9 MACHINEOVERRIDES =. "mx8:mx8m:mx8mq:"
10 10
11 require conf/machine/include/imx-base.inc 11 require conf/machine/include/imx-base.inc
12 require conf/machine/include/tune-cortexa53.inc 12 require conf/machine/include/tune-cortexa53.inc
13 13
14 MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth" 14 MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth"
15 15
16 PACKAGE_CLASSES = "package_rpm" 16 PACKAGE_CLASSES = "package_rpm"
17 17
18 # Embedian BSP default providers 18 # Embedian BSP default providers
19 PREFERRED_PROVIDER_virtual/kernel_smarcimx8mq2g ?= "linux-smarcimx8mq" 19 PREFERRED_PROVIDER_virtual/kernel_smarcimx8mq2g ?= "linux-smarcimx8mq"
20 PREFERRED_VERSION_linux-smarcimx8mq4g_smarcimx8mq2g = "5.4" 20 PREFERRED_VERSION_linux-smarcimx8mq4g_smarcimx8mq2g = "5.4"
21 21
22 KERNEL_DEVICETREE = " \ 22 KERNEL_DEVICETREE = " \
23 embedian/imx8mq-smarc.dtb \ 23 embedian/imx8mq-smarc.dtb \
24 embedian/imx8mq-smarc-dcss-lvds.dtb \ 24 embedian/imx8mq-smarc-dcss-lvds.dtb \
25 embedian/imx8mq-smarc-lcdif-lvds.dtb \ 25 embedian/imx8mq-smarc-lcdif-lvds.dtb \
26 embedian/imx8mq-smarc-hdmi.dtb \ 26 embedian/imx8mq-smarc-hdmi.dtb \
27 embedian/imx8mq-smarc-dp.dtb \ 27 embedian/imx8mq-smarc-dp.dtb \
28 embedian/imx8mq-smarc-dual-display.dtb \ 28 embedian/imx8mq-smarc-dual-display.dtb \
29 embedian/imx8mq-smarc-m4.dtb \
30 embedian/imx8mq-smarc-m4-dcss-lvds.dtb \
31 embedian/imx8mq-smarc-m4-lcdif-lvds.dtb \
32 embedian/imx8mq-smarc-m4-hdmi.dtb \
33 embedian/imx8mq-smarc-m4-dp.dtb \
34 embedian/imx8mq-smarc-m4-dual-display.dtb \
29 " 35 "
30 MACHINE_EXTRA_RRECOMMENDS_append_mx8mq = " imx-m4-demos" 36 MACHINE_EXTRA_RRECOMMENDS_append_mx8mq = " imx-m4-demos"
31 IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy" 37 IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy"
32 IMAGE_BOOT_FILES += "imx8mq_m4_TCM_hello_world.bin imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin" 38 IMAGE_BOOT_FILES += "imx8mq_m4_TCM_hello_world.bin imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin"
33 39
34 PREFERRED_PROVIDER_u-boot_smarcimx8mq2g = "u-boot-smarcimx8mq" 40 PREFERRED_PROVIDER_u-boot_smarcimx8mq2g = "u-boot-smarcimx8mq"
35 PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mq2g = "u-boot-smarcimx8mq" 41 PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mq2g = "u-boot-smarcimx8mq"
36 42
37 UBOOT_CONFIG ??= "sd" 43 UBOOT_CONFIG ??= "sd"
38 UBOOT_CONFIG[sd] = "smarcimx8mq_2g_ser3_defconfig,sdcard" 44 UBOOT_CONFIG[sd] = "smarcimx8mq_2g_ser3_defconfig,sdcard"
39 SPL_BINARY = "spl/u-boot-spl.bin" 45 SPL_BINARY = "spl/u-boot-spl.bin"
40 46
41 # Set DDR FIRMWARE 47 # Set DDR FIRMWARE
42 DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin" 48 DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin"
43 49
44 # Set U-Boot DTB 50 # Set U-Boot DTB
45 UBOOT_DTB_NAME = "imx8mq-smarc.dtb" 51 UBOOT_DTB_NAME = "imx8mq-smarc.dtb"
46 52
47 # Set imx-mkimage boot target 53 # Set imx-mkimage boot target
48 IMXBOOT_TARGETS = "flash_evk flash_evk_no_hdmi flash_dp_evk" 54 IMXBOOT_TARGETS = "flash_evk flash_evk_no_hdmi flash_dp_evk"
49 55
50 SERIAL_CONSOLE = "115200 ttymxc0" 56 SERIAL_CONSOLE = "115200 ttymxc0"
51 57
52 IMAGE_BOOTLOADER = "imx-boot" 58 IMAGE_BOOTLOADER = "imx-boot"
53 59
54 LOADADDR = "" 60 LOADADDR = ""
55 UBOOT_MAKE_TARGET = "" 61 UBOOT_MAKE_TARGET = ""
56 IMX_BOOT_SEEK = "33" 62 IMX_BOOT_SEEK = "33"
57 63
58 MACHINE_EXTRA_RDEPENDS += " \ 64 MACHINE_EXTRA_RDEPENDS += " \
59 imx-boot \ 65 imx-boot \
60 packagegroup-tools-bluetooth \ 66 packagegroup-tools-bluetooth \
61 pm-utils \ 67 pm-utils \
62 kmod \ 68 kmod \
63 hdparm \ 69 hdparm \
64 gptfdisk \ 70 gptfdisk \
65 lftp \ 71 lftp \
66 vim \ 72 vim \
67 ntp \ 73 ntp \
68 boost \ 74 boost \
69 nodejs \ 75 nodejs \
70 networkmanager \ 76 networkmanager \
71 imx-gpu-viv \ 77 imx-gpu-viv \
72 " 78 "
73 79
74 # Packages added to all images (including core-image-minimal) 80 # Packages added to all images (including core-image-minimal)
75 81
76 # eIQ Machine Learning. Note that many of the features require Qt 5. Disable 82 # eIQ Machine Learning. Note that many of the features require Qt 5. Disable
77 # this when you build image without QT 5. 83 # this when you build image without QT 5.
78 IMAGE_INSTALL_append = " \ 84 IMAGE_INSTALL_append = " \
79 packagegroup-imx-ml \ 85 packagegroup-imx-ml \
80 fsl-rc-local \ 86 fsl-rc-local \
81 " 87 "
82 #IMAGE_INSTALL_append = " \ 88 #IMAGE_INSTALL_append = " \
83 # fsl-rc-local \ 89 # fsl-rc-local \
84 # " 90 # "
85 91
86 IMAGE_FSTYPES = "tar.bz2" 92 IMAGE_FSTYPES = "tar.bz2"
87 93
88 # Ship all kernel modules by default 94 # Ship all kernel modules by default
89 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules" 95 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
90 96
91 MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k firmware-imx-sdma firmware-imx-regulatory" 97 MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k firmware-imx-sdma firmware-imx-regulatory"
92 98
conf/machine/smarcimx8mq4g.conf
1 #@TYPE: Machine 1 #@TYPE: Machine
2 #@NAME: EMBEDIAN SMARC-iMX8M COMPUTER ON MODULES with 4GB LPDDR4 MEMORY 2 #@NAME: EMBEDIAN SMARC-iMX8M COMPUTER ON MODULES with 4GB LPDDR4 MEMORY
3 #@SOC: i.MX8MQ 3 #@SOC: i.MX8MQ
4 #@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8M 4 #@DESCRIPTION: Machine configuration for Embedian SMARC-iMX8M
5 #@MAINTAINER: Eric Lee <eric.lee@embedian.com> 5 #@MAINTAINER: Eric Lee <eric.lee@embedian.com>
6 # 6 #
7 # http://www.www.embedian.com 7 # http://www.www.embedian.com
8 8
9 MACHINEOVERRIDES =. "mx8:mx8m:mx8mq:" 9 MACHINEOVERRIDES =. "mx8:mx8m:mx8mq:"
10 10
11 require conf/machine/include/imx-base.inc 11 require conf/machine/include/imx-base.inc
12 require conf/machine/include/tune-cortexa53.inc 12 require conf/machine/include/tune-cortexa53.inc
13 13
14 MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth" 14 MACHINE_FEATURES += " usbgadget vfat ext2 alsa serial pci wifi bluetooth"
15 15
16 PACKAGE_CLASSES = "package_rpm" 16 PACKAGE_CLASSES = "package_rpm"
17 17
18 # Embedian BSP default providers 18 # Embedian BSP default providers
19 PREFERRED_PROVIDER_virtual/kernel_smarcimx8mq4g ?= "linux-smarcimx8mq" 19 PREFERRED_PROVIDER_virtual/kernel_smarcimx8mq4g ?= "linux-smarcimx8mq"
20 PREFERRED_VERSION_linux-smarcimx8mq4g_smarcimx8mq4g = "5.4" 20 PREFERRED_VERSION_linux-smarcimx8mq4g_smarcimx8mq4g = "5.4"
21 21
22 KERNEL_DEVICETREE = " \ 22 KERNEL_DEVICETREE = " \
23 embedian/imx8mq-smarc.dtb \ 23 embedian/imx8mq-smarc.dtb \
24 embedian/imx8mq-smarc-dcss-lvds.dtb \ 24 embedian/imx8mq-smarc-dcss-lvds.dtb \
25 embedian/imx8mq-smarc-lcdif-lvds.dtb \ 25 embedian/imx8mq-smarc-lcdif-lvds.dtb \
26 embedian/imx8mq-smarc-hdmi.dtb \ 26 embedian/imx8mq-smarc-hdmi.dtb \
27 embedian/imx8mq-smarc-dp.dtb \ 27 embedian/imx8mq-smarc-dp.dtb \
28 embedian/imx8mq-smarc-dual-display.dtb \ 28 embedian/imx8mq-smarc-dual-display.dtb \
29 embedian/imx8mq-smarc-m4.dtb \
30 embedian/imx8mq-smarc-m4-dcss-lvds.dtb \
31 embedian/imx8mq-smarc-m4-lcdif-lvds.dtb \
32 embedian/imx8mq-smarc-m4-hdmi.dtb \
33 embedian/imx8mq-smarc-m4-dp.dtb \
34 embedian/imx8mq-smarc-m4-dual-display.dtb \
29 " 35 "
30 MACHINE_EXTRA_RRECOMMENDS_append_mx8mq = " imx-m4-demos" 36 MACHINE_EXTRA_RRECOMMENDS_append_mx8mq = " imx-m4-demos"
31 IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy" 37 IMAGE_BOOTFILES_DEPENDS += "imx-m4-demos:do_deploy"
32 IMAGE_BOOT_FILES += "imx8mq_m4_TCM_hello_world.bin imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin" 38 IMAGE_BOOT_FILES += "imx8mq_m4_TCM_hello_world.bin imx8mq_m4_TCM_rpmsg_lite_pingpong_rtos_linux_remote.bin imx8mq_m4_TCM_rpmsg_lite_str_echo_rtos.bin"
33 39
34 PREFERRED_PROVIDER_u-boot_smarcimx8mq4g = "u-boot-smarcimx8mq" 40 PREFERRED_PROVIDER_u-boot_smarcimx8mq4g = "u-boot-smarcimx8mq"
35 PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mq4g = "u-boot-smarcimx8mq" 41 PREFERRED_PROVIDER_virtual/bootloader_smarcimx8mq4g = "u-boot-smarcimx8mq"
36 42
37 UBOOT_CONFIG ??= "sd" 43 UBOOT_CONFIG ??= "sd"
38 UBOOT_CONFIG[sd] = "smarcimx8mq_4g_ser3_defconfig,sdcard" 44 UBOOT_CONFIG[sd] = "smarcimx8mq_4g_ser3_defconfig,sdcard"
39 SPL_BINARY = "spl/u-boot-spl.bin" 45 SPL_BINARY = "spl/u-boot-spl.bin"
40 46
41 # Set DDR FIRMWARE 47 # Set DDR FIRMWARE
42 DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin" 48 DDR_FIRMWARE_NAME = "lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_2d_imem.bin lpddr4_pmu_train_2d_dmem.bin"
43 49
44 # Set U-Boot DTB 50 # Set U-Boot DTB
45 UBOOT_DTB_NAME = "imx8mq-smarc.dtb" 51 UBOOT_DTB_NAME = "imx8mq-smarc.dtb"
46 52
47 # Set imx-mkimage boot target 53 # Set imx-mkimage boot target
48 IMXBOOT_TARGETS = "flash_evk flash_evk_no_hdmi flash_dp_evk" 54 IMXBOOT_TARGETS = "flash_evk flash_evk_no_hdmi flash_dp_evk"
49 55
50 SERIAL_CONSOLE = "115200 ttymxc0" 56 SERIAL_CONSOLE = "115200 ttymxc0"
51 57
52 IMAGE_BOOTLOADER = "imx-boot" 58 IMAGE_BOOTLOADER = "imx-boot"
53 59
54 LOADADDR = "" 60 LOADADDR = ""
55 UBOOT_MAKE_TARGET = "" 61 UBOOT_MAKE_TARGET = ""
56 IMX_BOOT_SEEK = "33" 62 IMX_BOOT_SEEK = "33"
57 63
58 MACHINE_EXTRA_RDEPENDS += " \ 64 MACHINE_EXTRA_RDEPENDS += " \
59 imx-boot \ 65 imx-boot \
60 packagegroup-tools-bluetooth \ 66 packagegroup-tools-bluetooth \
61 pm-utils \ 67 pm-utils \
62 kmod \ 68 kmod \
63 hdparm \ 69 hdparm \
64 gptfdisk \ 70 gptfdisk \
65 lftp \ 71 lftp \
66 vim \ 72 vim \
67 ntp \ 73 ntp \
68 boost \ 74 boost \
69 nodejs \ 75 nodejs \
70 networkmanager \ 76 networkmanager \
71 imx-gpu-viv \ 77 imx-gpu-viv \
72 " 78 "
73 79
74 # Packages added to all images (including core-image-minimal) 80 # Packages added to all images (including core-image-minimal)
75 81
76 # eIQ Machine Learning. Note that many of the features require Qt 5. Disable 82 # eIQ Machine Learning. Note that many of the features require Qt 5. Disable
77 # this when you build image without QT 5. 83 # this when you build image without QT 5.
78 IMAGE_INSTALL_append = " \ 84 IMAGE_INSTALL_append = " \
79 packagegroup-imx-ml \ 85 packagegroup-imx-ml \
80 fsl-rc-local \ 86 fsl-rc-local \
81 " 87 "
82 #IMAGE_INSTALL_append = " \ 88 #IMAGE_INSTALL_append = " \
83 # fsl-rc-local \ 89 # fsl-rc-local \
84 # " 90 # "
85 91
86 IMAGE_FSTYPES = "tar.bz2" 92 IMAGE_FSTYPES = "tar.bz2"
87 93
88 # Ship all kernel modules by default 94 # Ship all kernel modules by default
89 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules" 95 MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"
90 96
91 MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k firmware-imx-sdma firmware-imx-regulatory" 97 MACHINE_FIRMWARE_append_mx8 = " linux-firmware-ath10k firmware-imx-sdma firmware-imx-regulatory"
92 98
recipes-bsp/u-boot/u-boot-smarcimx8mq_2020.04.bb
1 # Copyright (C) 2013-2016 Freescale Semiconductor 1 # Copyright (C) 2013-2016 Freescale Semiconductor
2 # Copyright 2017-2019 NXP 2 # Copyright 2017-2019 NXP
3 3
4 DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards." 4 DESCRIPTION = "i.MX U-Boot suppporting i.MX reference boards."
5 require recipes-bsp/u-boot/u-boot-common.inc 5 require recipes-bsp/u-boot/u-boot-common.inc
6 require recipes-bsp/u-boot/u-boot.inc 6 require recipes-bsp/u-boot/u-boot.inc
7 inherit pythonnative 7 inherit pythonnative
8 8
9 FILESEXTRAPATHS_prepend := "${THISDIR}/files:" 9 FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
10 10
11 PROVIDES += "u-boot" 11 PROVIDES += "u-boot"
12 DEPENDS_append = " dtc-native" 12 DEPENDS_append = " dtc-native"
13 13
14 LICENSE = "GPLv2+" 14 LICENSE = "GPLv2+"
15 LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263" 15 LIC_FILES_CHKSUM = "file://Licenses/gpl-2.0.txt;md5=b234ee4d69f5fce4486a80fdaf4a4263"
16 16
17 UBOOT_SRC ?= "${EMB_UBOOT_MIRROR};protocol=ssh" 17 UBOOT_SRC ?= "${EMB_UBOOT_MIRROR};protocol=ssh"
18 SRCBRANCH = "smarc_8mq-imx_v2020.04_5.4.24_2.1.0" 18 SRCBRANCH = "smarc_8mq-imx_v2020.04_5.4.24_2.1.0"
19 SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH}" 19 SRC_URI = "${UBOOT_SRC};branch=${SRCBRANCH}"
20 SRCREV = "e44dd05afd50171f1c89a5f4530e2e7cdfe4c23e" 20 SRCREV = "c2f85087ffef4f99b60d98622371af4ffc5372f9"
21 21
22 S = "${WORKDIR}/git" 22 S = "${WORKDIR}/git"
23 23
24 inherit fsl-u-boot-localversion 24 inherit fsl-u-boot-localversion
25 25
26 LOCALVERSION ?= "-${SRCBRANCH}" 26 LOCALVERSION ?= "-${SRCBRANCH}"
27 27
28 BOOT_TOOLS = "imx-boot-tools" 28 BOOT_TOOLS = "imx-boot-tools"
29 29
30 do_deploy_append_mx8m () { 30 do_deploy_append_mx8m () {
31 # Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8mq-XX.dtb for mkimage to generate boot binary 31 # Deploy the mkimage, u-boot-nodtb.bin and fsl-imx8mq-XX.dtb for mkimage to generate boot binary
32 if [ -n "${UBOOT_CONFIG}" ] 32 if [ -n "${UBOOT_CONFIG}" ]
33 then 33 then
34 for config in ${UBOOT_MACHINE}; do 34 for config in ${UBOOT_MACHINE}; do
35 i=$(expr $i + 1); 35 i=$(expr $i + 1);
36 for type in ${UBOOT_CONFIG}; do 36 for type in ${UBOOT_CONFIG}; do
37 j=$(expr $j + 1); 37 j=$(expr $j + 1);
38 if [ $j -eq $i ] 38 if [ $j -eq $i ]
39 then 39 then
40 install -d ${DEPLOYDIR}/${BOOT_TOOLS} 40 install -d ${DEPLOYDIR}/${BOOT_TOOLS}
41 install -m 0777 ${B}/${config}/arch/arm/dts/${UBOOT_DTB_NAME} ${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} 42 install -m 0777 ${B}/${config}/u-boot-nodtb.bin ${DEPLOYDIR}/${BOOT_TOOLS}/u-boot-nodtb.bin-${MACHINE}-${UBOOT_CONFIG}
43 fi 43 fi
44 done 44 done
45 unset j 45 unset j
46 done 46 done
47 unset i 47 unset i
48 fi 48 fi
49 49
50 } 50 }
51 51
52 PACKAGE_ARCH = "${MACHINE_ARCH}" 52 PACKAGE_ARCH = "${MACHINE_ARCH}"
53 COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" 53 COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
54 54
55 UBOOT_NAME_mx6 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}" 55 UBOOT_NAME_mx6 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
56 UBOOT_NAME_mx7 = "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}" 57 UBOOT_NAME_mx8 = "u-boot-${MACHINE}.bin-${UBOOT_CONFIG}"
58 58
recipes-kernel/linux/linux-smarcimx8mq_5.4.bb
1 # Copyright (C) 2013-2016 Freescale Semiconductor 1 # Copyright (C) 2013-2016 Freescale Semiconductor
2 # Copyright 2017-2019 NXP 2 # Copyright 2017-2019 NXP
3 # Copyright 2018-2019 Embedian, Inc. 3 # Copyright 2018-2019 Embedian, Inc.
4 # Released under the MIT license (see COPYING.MIT for the terms) 4 # Released under the MIT license (see COPYING.MIT for the terms)
5 5
6 SUMMARY = "Linux kernel provided and supported by Embedian" 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) \ 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." 8 with focus on i.MX Family SOMs. It includes support for many IPs such as GPU, VPU and IPU."
9 9
10 require recipes-kernel/linux/linux-imx.inc 10 require recipes-kernel/linux/linux-imx.inc
11 11
12 LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" 12 LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
13 13
14 DEPENDS += "lzop-native bc-native" 14 DEPENDS += "lzop-native bc-native"
15 15
16 SRCBRANCH = "smarc_8mq_imx_5.4.24_2.1.0" 16 SRCBRANCH = "smarc_8mq_imx_5.4.24_2.1.0"
17 #KERNEL_BRANCH ?= "smarc_8mq_imx_5.4.24_2.1.0" 17 #KERNEL_BRANCH ?= "smarc_8mq_imx_5.4.24_2.1.0"
18 LOCALVERSION = "-${SRCBRANCH}" 18 LOCALVERSION = "-${SRCBRANCH}"
19 KERNEL_DEFCONFIG = "${S}/arch/arm64/configs/smarcimx8mq_defconfig" 19 KERNEL_DEFCONFIG = "${S}/arch/arm64/configs/smarcimx8mq_defconfig"
20 20
21 KERNEL_SRC ?= "git@git.embedian.com:developer/smarc-fsl-linux-kernel.git;protocol=git" 21 KERNEL_SRC ?= "git@git.embedian.com:developer/smarc-fsl-linux-kernel.git;protocol=git"
22 SRC_URI = "${EMB_KERNEL_MIRROR};protocol=ssh;branch=${SRCBRANCH}" 22 SRC_URI = "${EMB_KERNEL_MIRROR};protocol=ssh;branch=${SRCBRANCH}"
23 SRCREV = "acd8a316f05af41aa051e50215b3e4e301767235" 23 SRCREV = "d0b156720daed973213a749162ac1d66d6c62ea8"
24 24
25 S = "${WORKDIR}/git" 25 S = "${WORKDIR}/git"
26 26
27 FILES_${KERNEL_PACKAGE_NAME}-base += "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin.modinfo " 27 FILES_${KERNEL_PACKAGE_NAME}-base += "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin.modinfo "
28 28
29 KERNEL_CONFIG_COMMAND = "oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} olddefconfig" 29 KERNEL_CONFIG_COMMAND = "oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} olddefconfig"
30 30
31 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:" 31 FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
32 32
33 DEFAULT_PREFERENCE = "1" 33 DEFAULT_PREFERENCE = "1"
34 34
35 addtask copy_defconfig after do_patch before do_preconfigure 35 addtask copy_defconfig after do_patch before do_preconfigure
36 36
37 do_copy_defconfig () { 37 do_copy_defconfig () {
38 install -d ${B} 38 install -d ${B}
39 # copy kernel defconfig smarcimx8mq_defconfig to use for mx8 39 # copy kernel defconfig smarcimx8mq_defconfig to use for mx8
40 mkdir -p ${B} 40 mkdir -p ${B}
41 cp ${KERNEL_DEFCONFIG} ${B}/.config 41 cp ${KERNEL_DEFCONFIG} ${B}/.config
42 cp ${KERNEL_DEFCONFIG} ${B}/../defconfig 42 cp ${KERNEL_DEFCONFIG} ${B}/../defconfig
43 } 43 }
44 44
45 DELTA_KERNEL_DEFCONFIG ?= "" 45 DELTA_KERNEL_DEFCONFIG ?= ""
46 #DELTA_KERNEL_DEFCONFIG_prepend_mx8 = "sdk_imx.config " 46 #DELTA_KERNEL_DEFCONFIG_prepend_mx8 = "sdk_imx.config "
47 47
48 do_merge_delta_config[dirs] = "${B}" 48 do_merge_delta_config[dirs] = "${B}"
49 do_merge_delta_config() { 49 do_merge_delta_config() {
50 for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do 50 for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do
51 if [ -f ${S}/arch/${ARCH}/configs/${deltacfg} ]; then 51 if [ -f ${S}/arch/${ARCH}/configs/${deltacfg} ]; then
52 ${KERNEL_CONFIG_COMMAND} 52 ${KERNEL_CONFIG_COMMAND}
53 oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} ${deltacfg} 53 oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} ${deltacfg}
54 elif [ -f "${WORKDIR}/${deltacfg}" ]; then 54 elif [ -f "${WORKDIR}/${deltacfg}" ]; then
55 ${S}/scripts/kconfig/merge_config.sh -m .config ${WORKDIR}/${deltacfg} 55 ${S}/scripts/kconfig/merge_config.sh -m .config ${WORKDIR}/${deltacfg}
56 elif [ -f "${deltacfg}" ]; then 56 elif [ -f "${deltacfg}" ]; then
57 ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg} 57 ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg}
58 fi 58 fi
59 done 59 done
60 cp .config ${WORKDIR}/defconfig 60 cp .config ${WORKDIR}/defconfig
61 } 61 }
62 addtask merge_delta_config before do_preconfigure after do_copy_defconfig 62 addtask merge_delta_config before do_preconfigure after do_copy_defconfig
63 63
64 COMPATIBLE_MACHINE = "(mx6|mx7|mx8)" 64 COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"
65 65