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 /classes | |
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>
Diffstat (limited to 'classes')
-rw-r--r-- | classes/sdcard_image-rpi.bbclass | 18 |
1 files changed, 13 insertions, 5 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 |