Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 1 | DESCRIPTION = "Linux Kernel" |
| 2 | SECTION = "kernel" |
Andrew Geissler | 9aee500 | 2022-03-30 16:27:02 +0000 | [diff] [blame] | 3 | LICENSE = "GPL-2.0-only" |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 4 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" |
| 5 | |
| 6 | INC_PR = "r0" |
| 7 | |
| 8 | inherit kernel siteinfo |
| 9 | |
| 10 | # Enable OABI compat for people stuck with obsolete userspace |
| 11 | ARM_KEEP_OABI ?= "0" |
| 12 | |
| 13 | # Set the verbosity of kernel messages during runtime |
| 14 | # You can define CMDLINE_DEBUG in your local.conf or distro.conf to override this behaviour |
| 15 | CMDLINE_DEBUG ?= "loglevel=3" |
| 16 | |
| 17 | # Kernel bootlogo is distro-specific (default is OE logo). |
| 18 | # Logo resolution (qvga, vga, ...) is machine-specific. |
Brad Bishop | 316dfdd | 2018-06-25 12:45:53 -0400 | [diff] [blame] | 19 | LOGO_SIZE ?= '${@oe.utils.conditional("MACHINE_GUI_CLASS", "bigscreen", "vga", "qvga", d)}' |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 20 | # To use this, add file://${LOGO_SIZE}/logo_linux_clut224.ppm.bz2 or similar |
| 21 | # to your kernel recipe, and then structure your logos for each resolution |
| 22 | # accordingly. |
| 23 | |
| 24 | LOCALVERSION ?= "" |
| 25 | |
| 26 | #kernel_conf_variable CMDLINE "\"${CMDLINE} ${CMDLINE_DEBUG}\"" |
| 27 | kernel_conf_variable() { |
| 28 | CONF_SED_SCRIPT="$CONF_SED_SCRIPT /CONFIG_$1[ =]/d;" |
| 29 | if test "$2" = "n" |
| 30 | then |
| 31 | echo "# CONFIG_$1 is not set" >> ${B}/.config |
| 32 | else |
| 33 | echo "CONFIG_$1=$2" >> ${B}/.config |
| 34 | fi |
| 35 | } |
| 36 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 37 | do_configure:prepend() { |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 38 | echo "" > ${B}/.config |
| 39 | CONF_SED_SCRIPT="" |
| 40 | |
| 41 | # |
| 42 | # logo support, if you supply logo_linux_clut224.ppm in SRC_URI, then it's going to be used |
| 43 | # |
| 44 | if [ -e ${WORKDIR}/logo_linux_clut224.ppm ]; then |
| 45 | install -m 0644 ${WORKDIR}/logo_linux_clut224.ppm drivers/video/logo/logo_linux_clut224.ppm |
| 46 | kernel_conf_variable LOGO y |
| 47 | kernel_conf_variable LOGO_LINUX_CLUT224 y |
| 48 | fi |
| 49 | |
| 50 | # |
| 51 | # oabi / eabi support |
| 52 | # |
| 53 | kernel_conf_variable AEABI y |
| 54 | if [ "${ARM_KEEP_OABI}" = "1" ] ; then |
| 55 | kernel_conf_variable OABI_COMPAT y |
| 56 | else |
| 57 | kernel_conf_variable OABI_COMPAT n |
| 58 | fi |
| 59 | |
| 60 | # When enabling thumb for userspace we also need thumb support in the kernel |
| 61 | if [ "${ARM_INSTRUCTION_SET}" = "thumb" ] ; then |
| 62 | kernel_conf_variable ARM_THUMB y |
| 63 | fi |
| 64 | |
| 65 | kernel_conf_variable CMDLINE "\"${CMDLINE} ${CMDLINE_DEBUG}\"" |
| 66 | |
| 67 | kernel_conf_variable LOCALVERSION "\"${LOCALVERSION}\"" |
| 68 | kernel_conf_variable LOCALVERSION_AUTO n |
| 69 | |
| 70 | kernel_conf_variable SYSFS_DEPRECATED n |
| 71 | kernel_conf_variable SYSFS_DEPRECATED_V2 n |
| 72 | kernel_conf_variable HOTPLUG y |
| 73 | kernel_conf_variable UEVENT_HELPER_PATH \"\" |
| 74 | kernel_conf_variable UNIX y |
| 75 | kernel_conf_variable SYSFS y |
| 76 | kernel_conf_variable PROC_FS y |
| 77 | kernel_conf_variable TMPFS y |
| 78 | kernel_conf_variable INOTIFY_USER y |
| 79 | kernel_conf_variable SIGNALFD y |
| 80 | kernel_conf_variable TMPFS_POSIX_ACL y |
| 81 | kernel_conf_variable BLK_DEV_BSG y |
| 82 | kernel_conf_variable DEVTMPFS y |
| 83 | kernel_conf_variable DEVTMPFS_MOUNT y |
| 84 | |
| 85 | # Newer inits like systemd need cgroup support |
| 86 | if [ "${KERNEL_ENABLE_CGROUPS}" = "1" ] ; then |
| 87 | kernel_conf_variable CGROUP_SCHED y |
| 88 | kernel_conf_variable CGROUPS y |
| 89 | kernel_conf_variable CGROUP_NS y |
| 90 | kernel_conf_variable CGROUP_FREEZER y |
| 91 | kernel_conf_variable CGROUP_DEVICE y |
| 92 | kernel_conf_variable CPUSETS y |
| 93 | kernel_conf_variable PROC_PID_CPUSET y |
| 94 | kernel_conf_variable CGROUP_CPUACCT y |
| 95 | kernel_conf_variable RESOURCE_COUNTERS y |
| 96 | fi |
| 97 | |
| 98 | # |
| 99 | # root-over-nfs-over-usb-eth support. Limited, but should cover some cases. |
| 100 | # Enable this by setting a proper CMDLINE_NFSROOT_USB. |
| 101 | # |
| 102 | if [ ! -z "${CMDLINE_NFSROOT_USB}" ]; then |
| 103 | bbnote "Configuring the kernel for root-over-nfs-over-usb-eth with CMDLINE ${CMDLINE_NFSROOT_USB}" |
| 104 | kernel_conf_variable INET y |
| 105 | kernel_conf_variable IP_PNP y |
| 106 | kernel_conf_variable USB_GADGET y |
| 107 | kernel_conf_variable USB_GADGET_SELECTED y |
| 108 | kernel_conf_variable USB_ETH y |
| 109 | kernel_conf_variable NFS_FS y |
| 110 | kernel_conf_variable ROOT_NFS y |
| 111 | kernel_conf_variable CMDLINE \"${CMDLINE_NFSROOT_USB} ${CMDLINE_DEBUG}\" |
| 112 | fi |
| 113 | |
| 114 | sed -e "${CONF_SED_SCRIPT}" \ |
| 115 | < '${WORKDIR}/defconfig' >>'${B}/.config' |
| 116 | |
| 117 | yes '' | oe_runmake -C ${S} O=${B} oldconfig |
| 118 | } |
| 119 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 120 | do_configure:append() { |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 121 | if test -e scripts/Makefile.fwinst ; then |
| 122 | sed -i -e "s:-m0644:-m 0644:g" scripts/Makefile.fwinst |
| 123 | fi |
| 124 | } |
| 125 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 126 | do_install:append() { |
Patrick Williams | b48b7b4 | 2016-08-17 15:04:38 -0500 | [diff] [blame] | 127 | oe_runmake headers_install INSTALL_HDR_PATH=${D}${exec_prefix}/src/linux-${KERNEL_VERSION} ARCH=$ARCH |
| 128 | } |
| 129 | |
| 130 | PACKAGES =+ "kernel-headers" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 131 | FILES:kernel-headers = "${exec_prefix}/src/linux*" |