summaryrefslogtreecommitdiffstats
path: root/classes/sdcard_image-rpi.bbclass
diff options
context:
space:
mode:
Diffstat (limited to 'classes/sdcard_image-rpi.bbclass')
-rw-r--r--classes/sdcard_image-rpi.bbclass18
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
29IMAGE_BOOTLOADER ?= "bcm2835-bootfiles" 29IMAGE_BOOTLOADER ?= "bcm2835-bootfiles"
30 30
31# Set initramfs extension
32KERNEL_INITRAMFS ?= ""
33
34# Kernel image name 31# Kernel image name
35SDIMG_KERNELIMAGE_raspberrypi ?= "kernel.img" 32SDIMG_KERNELIMAGE_raspberrypi ?= "kernel.img"
36SDIMG_KERNELIMAGE_raspberrypi2 ?= "kernel7.img" 33SDIMG_KERNELIMAGE_raspberrypi2 ?= "kernel7.img"
@@ -49,6 +46,9 @@ IMAGE_ROOTFS_ALIGNMENT = "4096"
49SDIMG_ROOTFS_TYPE ?= "ext3" 46SDIMG_ROOTFS_TYPE ?= "ext3"
50SDIMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${SDIMG_ROOTFS_TYPE}" 47SDIMG_ROOTFS = "${IMGDEPLOYDIR}/${IMAGE_LINK_NAME}.${SDIMG_ROOTFS_TYPE}"
51 48
49# For the names of kernel artifacts
50inherit kernel-artifact-names
51
52do_image_rpi_sdimg[depends] = " \ 52do_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