diff options
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 |
