diff options
author | Alexandru Niculita <alexnick87@gmail.com> | 2013-11-12 17:28:33 +0200 |
---|---|---|
committer | Alexandru Niculita <alexnick87@gmail.com> | 2013-11-12 17:31:50 +0200 |
commit | 228f0a3ecb8040d7c60d4150f85acd26984a1c7b (patch) | |
tree | 8c783d313c547371abc526c4c80576e208e801af | |
parent | c52d4b3da1e755f3fa9bd4cf2d1629a8015530f9 (diff) | |
download | meta-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.inc | 34 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-raspberrypi_3.2.27.bb | 33 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-raspberrypi_3.6.11.bb | 33 |
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 @@ | |||
1 | require linux.inc | ||
2 | |||
3 | DESCRIPTION = "Linux Kernel for Raspberry Pi" | ||
4 | SECTION = "kernel" | ||
5 | LICENSE = "GPLv2" | ||
6 | LIC_FILES_CHKSUM = "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | ||
7 | |||
8 | COMPATIBLE_MACHINE = "raspberrypi" | ||
9 | |||
10 | PV_append = "+git${SRCREV}" | ||
11 | |||
12 | S = "${WORKDIR}/git" | ||
13 | |||
14 | # NOTE: For now we pull in the default config from the RPi kernel GIT tree. | ||
15 | KERNEL_DEFCONFIG = "bcmrpi_defconfig" | ||
16 | |||
17 | # CMDLINE for raspberrypi | ||
18 | CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" | ||
19 | |||
20 | UDEV_GE_141 ?= "1" | ||
21 | |||
22 | do_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 | |||
26 | do_install_prepend() { | ||
27 | install -d ${D}/lib/firmware | ||
28 | } | ||
29 | |||
30 | do_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 @@ | |||
1 | require linux.inc | ||
2 | |||
3 | DESCRIPTION = "Linux kernel for the RaspberryPi board" | ||
4 | COMPATIBLE_MACHINE = "raspberrypi" | ||
5 | |||
6 | PR = "r7" | ||
7 | PV_append = "+git${SRCREV}" | ||
8 | |||
9 | SRCREV = "ada8b4415ff44d535d63e4291a0eca733bc2ad0f" | 1 | SRCREV = "ada8b4415ff44d535d63e4291a0eca733bc2ad0f" |
10 | SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.2.27 \ | 2 | SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.2.27 \ |
11 | file://sl030raspberrypii2ckernel.patch \ | 3 | file://sl030raspberrypii2ckernel.patch \ |
12 | " | 4 | " |
13 | S = "${WORKDIR}/git" | ||
14 | |||
15 | # NOTE: For now we pull in the default config from the RPi kernel GIT tree. | ||
16 | KERNEL_DEFCONFIG = "bcmrpi_defconfig" | ||
17 | |||
18 | # CMDLINE for raspberrypi | ||
19 | CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" | ||
20 | |||
21 | UDEV_GE_141 ?= "1" | ||
22 | |||
23 | do_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 | |||
27 | do_install_prepend() { | ||
28 | install -d ${D}/lib/firmware | ||
29 | } | ||
30 | 5 | ||
31 | do_deploy_append() { | 6 | require 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 @@ | |||
1 | require linux.inc | 1 | SRCREV = "cbd6672e7e1b2dc5026f5dc7929a13a9a68f2a62" |
2 | |||
3 | DESCRIPTION = "Linux kernel for the RaspberryPi board" | ||
4 | COMPATIBLE_MACHINE = "raspberrypi" | ||
5 | |||
6 | PR = "r7" | ||
7 | PV_append = "+git${SRCREV}" | ||
8 | |||
9 | SRCREV = "63b69a8806ce1890711ff55280c90673ea415933" | ||
10 | SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.6.y \ | 2 | SRC_URI = "git://github.com/raspberrypi/linux.git;protocol=git;branch=rpi-3.6.y \ |
11 | file://sl030raspberrypii2ckernel.patch \ | 3 | file://sl030raspberrypii2ckernel.patch \ |
12 | " | 4 | " |
13 | S = "${WORKDIR}/git" | ||
14 | |||
15 | # NOTE: For now we pull in the default config from the RPi kernel GIT tree. | ||
16 | KERNEL_DEFCONFIG = "bcmrpi_defconfig" | ||
17 | |||
18 | # CMDLINE for raspberrypi | ||
19 | CMDLINE_raspberrypi = "dwc_otg.lpm_enable=0 console=ttyAMA0,115200 kgdboc=ttyAMA0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rootwait" | ||
20 | |||
21 | UDEV_GE_141 ?= "1" | ||
22 | |||
23 | do_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 | |||
27 | do_install_prepend() { | ||
28 | install -d ${D}/lib/firmware | ||
29 | } | ||
30 | 5 | ||
31 | do_deploy_append() { | 6 | require linux-raspberrypi.inc |
32 | # Deploy cmdline.txt | ||
33 | install -d ${DEPLOYDIR}/bcm2835-bootfiles | ||
34 | echo "${CMDLINE}" > ${DEPLOYDIR}/bcm2835-bootfiles/cmdline.txt | ||
35 | } | ||