Blame view

recipes-kernel/linux/linux-smarcimx8mq_5.4.bb 2.27 KB
6ab284bf2   Eric Lee   Yocto Zeus Suppor...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
  # Copyright (C) 2013-2016 Freescale Semiconductor
  # Copyright 2017-2019 NXP
  # Copyright 2018-2019 Embedian, Inc.
  # Released under the MIT license (see COPYING.MIT for the terms)
  
  SUMMARY = "Linux kernel provided and supported by Embedian"
  DESCRIPTION = "Linux kernel provided and supported by Embedian (based on the kernel imx_5.4.24_2.1.0 provided by NXP) \
  with focus on i.MX Family SOMs. It includes support for many IPs such as GPU, VPU and IPU."
  
  require recipes-kernel/linux/linux-imx.inc
  
  LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814"
  
  DEPENDS += "lzop-native bc-native"
  
  SRCBRANCH = "smarc_8mq_imx_5.4.24_2.1.0"
2a8153900   Eric Lee   Move some descrip...
17
  LOCALVERSION = "-2.1.0"
6ab284bf2   Eric Lee   Yocto Zeus Suppor...
18
19
20
21
  KERNEL_DEFCONFIG = "${S}/arch/arm64/configs/smarcimx8mq_defconfig"
  
  KERNEL_SRC ?= "git@git.embedian.com:developer/smarc-fsl-linux-kernel.git;protocol=git"
  SRC_URI = "${EMB_KERNEL_MIRROR};protocol=ssh;branch=${SRCBRANCH}"
d60e2320d   Eric Lee   Make changes to h...
22
  SRCREV = "30eca5d63c4bbc8f3b30ed6af714ea30819cee3e"
6ab284bf2   Eric Lee   Yocto Zeus Suppor...
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
  
  S = "${WORKDIR}/git"
  
  FILES_${KERNEL_PACKAGE_NAME}-base += "${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin.modinfo "
  
  KERNEL_CONFIG_COMMAND = "oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} olddefconfig"
  
  FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
  
  DEFAULT_PREFERENCE = "1"
  
  addtask copy_defconfig after do_patch before do_preconfigure
  
  do_copy_defconfig () {
      install -d ${B}
          # copy kernel defconfig smarcimx8mq_defconfig to use for mx8
          mkdir -p ${B}
          cp ${KERNEL_DEFCONFIG} ${B}/.config
          cp ${KERNEL_DEFCONFIG} ${B}/../defconfig
  }
  
  DELTA_KERNEL_DEFCONFIG ?= ""
  #DELTA_KERNEL_DEFCONFIG_prepend_mx8 = "sdk_imx.config "
  
  do_merge_delta_config[dirs] = "${B}"
  do_merge_delta_config() {
      for deltacfg in ${DELTA_KERNEL_DEFCONFIG}; do
          if [ -f ${S}/arch/${ARCH}/configs/${deltacfg} ]; then
              ${KERNEL_CONFIG_COMMAND}
              oe_runmake_call -C ${S} CC="${KERNEL_CC}" O=${B} ${deltacfg}
          elif [ -f "${WORKDIR}/${deltacfg}" ]; then
              ${S}/scripts/kconfig/merge_config.sh -m .config ${WORKDIR}/${deltacfg}
          elif [ -f "${deltacfg}" ]; then
              ${S}/scripts/kconfig/merge_config.sh -m .config ${deltacfg}
          fi
      done
      cp .config ${WORKDIR}/defconfig
  }
  addtask merge_delta_config before do_preconfigure after do_copy_defconfig
  
  COMPATIBLE_MACHINE = "(mx6|mx7|mx8)"