summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrea Ghittino <aghittino@gmail.com>2017-08-29 22:42:45 +0200
committerAndrei Gherzan <andrei@gherzan.com>2017-08-31 15:12:11 +0100
commit88478c38744e6a57361b438095fee1d808690a00 (patch)
tree0f742813ef9225eeeeff313b8bed9d8f2351278a
parentf70b24b1f1a66159bba1879dcc6a7f37d26085fc (diff)
downloadmeta-raspberrypi-88478c38744e6a57361b438095fee1d808690a00.tar.gz
linux-raspberrypi: fix kernel configuration using cfg files
In tree configurations are now used to build the kernel and it is possible to extend the config via bbappend and cfg fragments Fix issue 14 Signed-off-by: Andrea Ghittino <aghittino@gmail.com>
-rw-r--r--recipes-kernel/linux/linux-raspberrypi.inc17
-rw-r--r--recipes-kernel/linux/linux-raspberrypi/defconfig1
-rw-r--r--recipes-kernel/linux/linux-rpi.inc6
3 files changed, 8 insertions, 16 deletions
diff --git a/recipes-kernel/linux/linux-raspberrypi.inc b/recipes-kernel/linux/linux-raspberrypi.inc
index 4f5999d..f79aacb 100644
--- a/recipes-kernel/linux/linux-raspberrypi.inc
+++ b/recipes-kernel/linux/linux-raspberrypi.inc
@@ -6,19 +6,16 @@ SECTION = "kernel"
6LICENSE = "GPLv2" 6LICENSE = "GPLv2"
7LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" 7LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
8 8
9SRC_URI += " \
10 file://defconfig \
11 "
12
13COMPATIBLE_MACHINE = "^rpi$" 9COMPATIBLE_MACHINE = "^rpi$"
14 10
15PE = "1" 11PE = "1"
16PV = "${LINUX_VERSION}+git${SRCPV}" 12PV = "${LINUX_VERSION}+git${SRCPV}"
17 13
18# NOTE: For now we pull in the default config from the RPi kernel GIT tree. 14KCONFIG_MODE = "--alldefconfig"
19KERNEL_DEFCONFIG_raspberrypi ?= "bcmrpi_defconfig" 15KBUILD_DEFCONFIG_raspberrypi ?= "bcmrpi_defconfig"
20KERNEL_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig" 16KBUILD_DEFCONFIG_raspberrypi2 ?= "bcm2709_defconfig"
21KERNEL_DEFCONFIG_raspberrypi3-64 ?= "bcmrpi3_defconfig" 17KBUILD_DEFCONFIG_raspberrypi3 ?= "bcm2709_defconfig"
18KBUILD_DEFCONFIG_raspberrypi3-64 ?= "bcmrpi3_defconfig"
22 19
23# CMDLINE for raspberrypi 20# CMDLINE for raspberrypi
24CMDLINE ?= "dwc_otg.lpm_enable=0 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" 21CMDLINE ?= "dwc_otg.lpm_enable=0 console=serial0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
@@ -38,10 +35,6 @@ python __anonymous () {
38 d.setVar("KERNEL_DEVICETREE", kerneldt) 35 d.setVar("KERNEL_DEVICETREE", kerneldt)
39} 36}
40 37
41do_kernel_configme_prepend() {
42 install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
43}
44
45do_install_prepend() { 38do_install_prepend() {
46 install -d ${D}/lib/firmware 39 install -d ${D}/lib/firmware
47} 40}
diff --git a/recipes-kernel/linux/linux-raspberrypi/defconfig b/recipes-kernel/linux/linux-raspberrypi/defconfig
deleted file mode 100644
index ecbf32c..0000000
--- a/recipes-kernel/linux/linux-raspberrypi/defconfig
+++ /dev/null
@@ -1 +0,0 @@
1# Dummy file to get through do_kernel_configme.
diff --git a/recipes-kernel/linux/linux-rpi.inc b/recipes-kernel/linux/linux-rpi.inc
index 53383b0..ba47e31 100644
--- a/recipes-kernel/linux/linux-rpi.inc
+++ b/recipes-kernel/linux/linux-rpi.inc
@@ -35,8 +35,7 @@ kernel_configure_variable() {
35} 35}
36 36
37do_configure_prepend() { 37do_configure_prepend() {
38 # Clean .config 38 mv -f ${B}/.config ${B}/.config.patched
39 echo "" > ${B}/.config
40 CONF_SED_SCRIPT="" 39 CONF_SED_SCRIPT=""
41 40
42 # oabi / eabi support 41 # oabi / eabi support
@@ -123,7 +122,8 @@ do_configure_prepend() {
123 122
124 # Keep this the last line 123 # Keep this the last line
125 # Remove all modified configs and add the rest to .config 124 # Remove all modified configs and add the rest to .config
126 sed -e "${CONF_SED_SCRIPT}" < '${WORKDIR}/defconfig' >> '${B}/.config' 125 sed -e "${CONF_SED_SCRIPT}" < '${B}/.config.patched' >> '${B}/.config'
126 rm -f ${B}/.config.patched
127 127
128 yes '' | oe_runmake oldconfig 128 yes '' | oe_runmake oldconfig
129} 129}