summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexandru Niculita <alexnick87@gmail.com>2013-11-12 17:28:33 +0200
committerAlexandru Niculita <alexnick87@gmail.com>2013-11-12 17:31:50 +0200
commit228f0a3ecb8040d7c60d4150f85acd26984a1c7b (patch)
tree8c783d313c547371abc526c4c80576e208e801af
parentc52d4b3da1e755f3fa9bd4cf2d1629a8015530f9 (diff)
downloadmeta-raspberrypi-228f0a3ecb8040d7c60d4150f85acd26984a1c7b.tar.gz
Refactor kernel recipes to reduce code duplication
From: Philipp Wagner <mail@philipp-wagner.com> Change-Id: Ie4bc0d5f3f3301a1955dd077a0d2c3e3286266e3 Signed-off-by: Philipp Wagner <mail@philipp-wagner.com> Signed-off-by: Alexandru Niculita <alexnick87@gmail.com>
-rw-r--r--recipes-kernel/linux/linux-raspberrypi.inc34
-rw-r--r--recipes-kernel/linux/linux-raspberrypi_3.2.27.bb33
-rw-r--r--recipes-kernel/linux/linux-raspberrypi_3.6.11.bb33
3 files changed, 38 insertions, 62 deletions
diff --git a/recipes-kernel/linux/linux-raspberrypi.inc b/recipes-kernel/linux/linux-raspberrypi.inc
new file mode 100644
index 0000000..e756b57
--- /dev/null
+++ b/recipes-kernel/linux/linux-raspberrypi.inc
@@ -0,0 +1,34 @@
1require linux.inc
2
3DESCRIPTION = "Linux Kernel for Raspberry Pi"
4SECTION = "kernel"
5LICENSE = "GPLv2"
6LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
7
8COMPATIBLE_MACHINE = "raspberrypi"
9
10PV_append = "+git${SRCREV}"
11
12S = "${WORKDIR}/git"
13
14# NOTE: For now we pull in the default config from the RPi kernel GIT tree.
15KERNEL_DEFCONFIG = "bcmrpi_defconfig"
16
17# CMDLINE for raspberrypi
18CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
19
20UDEV_GE_141 ?= "1"
21
22do_configure_prepend() {
23 install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
24}
25
26do_install_prepend() {
27 install -d ${D}/lib/firmware
28}
29
30do_deploy_append() {
31 # Deploy cmdline.txt
32 install -d ${DEPLOYDIR}/bcm2835-bootfiles
33 echo "${CMDLINE}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
34}
diff --git a/recipes-kernel/linux/linux-raspberrypi_3.2.27.bb b/recipes-kernel/linux/linux-raspberrypi_3.2.27.bb
index 263e0ce..cc4ee38 100644
--- a/recipes-kernel/linux/linux-raspberrypi_3.2.27.bb
+++ b/recipes-kernel/linux/linux-raspberrypi_3.2.27.bb
@@ -1,35 +1,6 @@
1require linux.inc
2
3DESCRIPTION = "Linux kernel for the RaspberryPi board"
4COMPATIBLE_MACHINE = "raspberrypi"
5
6PR = "r7"
7PV_append = "+git${SRCREV}"
8
9SRCREV = "ada8b4415ff44d535d63e4291a0eca733bc2ad0f" 1SRCREV = "ada8b4415ff44d535d63e4291a0eca733bc2ad0f"
10SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.2.27 \ 2SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.2.27 \
11 file://sl030raspberrypii2ckernel.patch \ 3 file://sl030raspberrypii2ckernel.patch \
12 " 4 "
13S = "${WORKDIR}/git"
14
15# NOTE: For now we pull in the default config from the RPi kernel GIT tree.
16KERNEL_DEFCONFIG = "bcmrpi_defconfig"
17
18# CMDLINE for raspberrypi
19CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
20
21UDEV_GE_141 ?= "1"
22
23do_configure_prepend() {
24 install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
25}
26
27do_install_prepend() {
28 install -d ${D}/lib/firmware
29}
30 5
31do_deploy_append() { 6require linux-raspberrypi.inc
32 # Deploy cmdline.txt
33 install -d ${DEPLOYDIR}/bcm2835-bootfiles
34 echo "${CMDLINE}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
35}
diff --git a/recipes-kernel/linux/linux-raspberrypi_3.6.11.bb b/recipes-kernel/linux/linux-raspberrypi_3.6.11.bb
index 48c99fd..5314f5d 100644
--- a/recipes-kernel/linux/linux-raspberrypi_3.6.11.bb
+++ b/recipes-kernel/linux/linux-raspberrypi_3.6.11.bb
@@ -1,35 +1,6 @@
1require linux.inc 1SRCREV = "cbd6672e7e1b2dc5026f5dc7929a13a9a68f2a62"
2
3DESCRIPTION = "Linux kernel for the RaspberryPi board"
4COMPATIBLE_MACHINE = "raspberrypi"
5
6PR = "r7"
7PV_append = "+git${SRCREV}"
8
9SRCREV = "63b69a8806ce1890711ff55280c90673ea415933"
10SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.6.y \ 2SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.6.y \
11 file://sl030raspberrypii2ckernel.patch \ 3 file://sl030raspberrypii2ckernel.patch \
12 " 4 "
13S = "${WORKDIR}/git"
14
15# NOTE: For now we pull in the default config from the RPi kernel GIT tree.
16KERNEL_DEFCONFIG = "bcmrpi_defconfig"
17
18# CMDLINE for raspberrypi
19CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait"
20
21UDEV_GE_141 ?= "1"
22
23do_configure_prepend() {
24 install -m 0644 ${S}/arch/${ARCH}/configs/${KERNEL_DEFCONFIG} ${WORKDIR}/defconfig || die "No default configuration for ${MACHINE} / ${KERNEL_DEFCONFIG} available."
25}
26
27do_install_prepend() {
28 install -d ${D}/lib/firmware
29}
30 5
31do_deploy_append() { 6require linux-raspberrypi.inc
32 # Deploy cmdline.txt
33 install -d ${DEPLOYDIR}/bcm2835-bootfiles
34 echo "${CMDLINE}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt
35}