diff options
author | Martin Jansa <Martin.Jansa@gmail.com> | 2017-11-20 19:35:47 +0000 |
---|---|---|
committer | Andrei Gherzan <andrei@gherzan.com> | 2018-07-16 16:54:32 +0100 |
commit | e8f9a4e8f80c44c6faf18af8d397d240e460b981 (patch) | |
tree | e4b56f74108889ee517212d638f22db53983f4e3 | |
parent | efa848ca84a5ed541d4a755d19e66855214bfa23 (diff) | |
download | meta-raspberrypi-e8f9a4e8f80c44c6faf18af8d397d240e460b981.tar.gz |
sdcard_image-rpi.bbclass: drop KERNEL_INITRAMFS variable
* use INITRAMFS_SYMLINK_NAME from new kernel-artifact-names.bbclass
instead of KERNEL_INITRAMFS
* the documentation says that KERNEL_INITRAMFS should be used to
define extension of initramfs, but in linux-raspberrypi.inc it's
defined only to 1 or empty based on INITRAMFS_IMAGE_BUNDLE variable
and I don't see any code in meta-raspberry or oe-core which would
use KERNEL_INITRAMFS to actualy name the initramfs artifact to create:
${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin
used in classes/sdcard_image-rpi.bbclass
* also fix the assumption that there is -${MACHINE} suffix in:
${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin
because that's defined as KERNEL_IMAGE_SYMLINK_NAME and some DISTROs
might use different value
* this depends on oe-core changes which were merged today:
http://git.openembedded.org/openembedded-core/commit/?id=7d0ef0eaa1bfe97015a774c26f5791622e7e8b12
* this is the last piece of previous pull-request:
https://github.com/agherzan/meta-raspberrypi/pull/159
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
-rw-r--r-- | classes/sdcard_image-rpi.bbclass | 18 | ||||
-rw-r--r-- | docs/extra-build-config.md | 3 | ||||
-rw-r--r-- | recipes-kernel/linux/linux-raspberrypi.inc | 6 |
3 files changed, 15 insertions, 12 deletions
diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass index e7c34c6..db02847 100644 --- a/classes/sdcard_image-rpi.bbclass +++ b/classes/sdcard_image-rpi.bbclass | |||
@@ -28,9 +28,6 @@ IMAGE_TYPEDEP_rpi-sdimg = "${SDIMG_ROOTFS_TYPE}" | |||
28 | # Set kernel and boot loader | 28 | # Set kernel and boot loader |
29 | IMAGE_BOOTLOADER ?= "bcm2835-bootfiles" | 29 | IMAGE_BOOTLOADER ?= "bcm2835-bootfiles" |
30 | 30 | ||
31 | # Set initramfs extension | ||
32 | KERNEL_INITRAMFS ?= "" | ||
33 | |||
34 | # Kernel image name | 31 | # Kernel image name |
35 | SDIMG_KERNELIMAGE_raspberrypi ?= "kernel.img" | 32 | SDIMG_KERNELIMAGE_raspberrypi ?= "kernel.img" |
36 | SDIMG_KERNELIMAGE_raspberrypi2 ?= "kernel7.img" | 33 | SDIMG_KERNELIMAGE_raspberrypi2 ?= "kernel7.img" |
@@ -49,6 +46,9 @@ IMAGE_ROOTFS_ALIGNMENT = "4096" | |||
49 | SDIMG_ROOTFS_TYPE ?= "ext3" | 46 | SDIMG_ROOTFS_TYPE ?= "ext3" |
50 | SDIMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${SDIMG_ROOTFS_TYPE}" | 47 | SDIMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${SDIMG_ROOTFS_TYPE}" |
51 | 48 | ||
49 | # For the names of kernel artifacts | ||
50 | inherit kernel-artifact-names | ||
51 | |||
52 | do_image_rpi_sdimg[depends] = " \ | 52 | do_image_rpi_sdimg[depends] = " \ |
53 | parted-native:do_populate_sysroot \ | 53 | parted-native:do_populate_sysroot \ |
54 | mtools-native:do_populate_sysroot \ | 54 | mtools-native:do_populate_sysroot \ |
@@ -135,10 +135,18 @@ IMAGE_CMD_rpi-sdimg () { | |||
135 | fi | 135 | fi |
136 | if [ "${RPI_USE_U_BOOT}" = "1" ]; then | 136 | if [ "${RPI_USE_U_BOOT}" = "1" ]; then |
137 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE} | 137 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.bin ::${SDIMG_KERNELIMAGE} |
138 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::${KERNEL_IMAGETYPE} | ||
139 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/boot.scr ::boot.scr | 138 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/boot.scr ::boot.scr |
139 | if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then | ||
140 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_SYMLINK_NAME}.bin ::${KERNEL_IMAGETYPE} | ||
141 | else | ||
142 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ::${KERNEL_IMAGETYPE} | ||
143 | fi | ||
140 | else | 144 | else |
141 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::${SDIMG_KERNELIMAGE} | 145 | if [ ! -z "${INITRAMFS_IMAGE}" -a "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then |
146 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${INITRAMFS_SYMLINK_NAME}.bin ::${SDIMG_KERNELIMAGE} | ||
147 | else | ||
148 | mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE} ::${SDIMG_KERNELIMAGE} | ||
149 | fi | ||
142 | fi | 150 | fi |
143 | 151 | ||
144 | if [ -n ${FATPAYLOAD} ] ; then | 152 | if [ -n ${FATPAYLOAD} ] ; then |
diff --git a/docs/extra-build-config.md b/docs/extra-build-config.md index 04314aa..79cf3c7 100644 --- a/docs/extra-build-config.md +++ b/docs/extra-build-config.md | |||
@@ -167,9 +167,6 @@ To build an initramfs image: | |||
167 | - `INITRAMFS_IMAGE = "<a name for your initramfs image>"` | 167 | - `INITRAMFS_IMAGE = "<a name for your initramfs image>"` |
168 | - `INITRAMFS_IMAGE_BUNDLE = "1"` | 168 | - `INITRAMFS_IMAGE_BUNDLE = "1"` |
169 | 169 | ||
170 | * Set the meta-rasberrypi variable (in raspberrypi.conf for example) | ||
171 | - `KERNEL_INITRAMFS = "-initramfs"` | ||
172 | |||
173 | ## Enable SPI bus | 170 | ## Enable SPI bus |
174 | 171 | ||
175 | When using device tree kernels, set this variable to enable the SPI bus: | 172 | When using device tree kernels, set this variable to enable the SPI bus: |
diff --git a/recipes-kernel/linux/linux-raspberrypi.inc b/recipes-kernel/linux/linux-raspberrypi.inc index 65c2ab7..586dabd 100644 --- a/recipes-kernel/linux/linux-raspberrypi.inc +++ b/recipes-kernel/linux/linux-raspberrypi.inc | |||
@@ -33,8 +33,6 @@ CMDLINE_append += ' ${@oe.utils.conditional("DISABLE_RPI_BOOT_LOGO", "1", "logo. | |||
33 | CMDLINE_DEBUG ?= "" | 33 | CMDLINE_DEBUG ?= "" |
34 | CMDLINE_append = " ${CMDLINE_DEBUG}" | 34 | CMDLINE_append = " ${CMDLINE_DEBUG}" |
35 | 35 | ||
36 | KERNEL_INITRAMFS ?= '${@oe.utils.conditional("INITRAMFS_IMAGE_BUNDLE", "1", "1", "", d)}' | ||
37 | |||
38 | KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "stmpe-ts", "", d)}" | 36 | KERNEL_MODULE_AUTOLOAD += "${@bb.utils.contains("MACHINE_FEATURES", "pitft28r", "stmpe-ts", "", d)}" |
39 | 37 | ||
40 | # A LOADADDR is needed when building a uImage format kernel. This value is not | 38 | # A LOADADDR is needed when building a uImage format kernel. This value is not |
@@ -99,7 +97,7 @@ do_configure_prepend() { | |||
99 | # Localversion | 97 | # Localversion |
100 | kernel_configure_variable LOCALVERSION "\"\"" | 98 | kernel_configure_variable LOCALVERSION "\"\"" |
101 | 99 | ||
102 | if [ ! -z "${KERNEL_INITRAMFS}" ]; then | 100 | if [ "${INITRAMFS_IMAGE_BUNDLE}" = "1" ]; then |
103 | kernel_configure_variable OVERLAY_FS y | 101 | kernel_configure_variable OVERLAY_FS y |
104 | kernel_configure_variable SQUASHFS y | 102 | kernel_configure_variable SQUASHFS y |
105 | kernel_configure_variable UBIFS_FS y | 103 | kernel_configure_variable UBIFS_FS y |
@@ -107,7 +105,7 @@ do_configure_prepend() { | |||
107 | 105 | ||
108 | # Activate the configuration options for VC4 | 106 | # Activate the configuration options for VC4 |
109 | VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" | 107 | VC4GRAPHICS="${@bb.utils.contains("MACHINE_FEATURES", "vc4graphics", "1", "0", d)}" |
110 | if [ ${VC4GRAPHICS} = "1" ]; then | 108 | if [ "${VC4GRAPHICS}" = "1" ]; then |
111 | kernel_configure_variable I2C_BCM2835 y | 109 | kernel_configure_variable I2C_BCM2835 y |
112 | kernel_configure_variable DRM y | 110 | kernel_configure_variable DRM y |
113 | kernel_configure_variable DRM_FBDEV_EMULATION y | 111 | kernel_configure_variable DRM_FBDEV_EMULATION y |