summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README13
-rw-r--r--classes/sdcard_image-rpi.bbclass7
2 files changed, 18 insertions, 2 deletions
diff --git a/README b/README
index fc492c5..daa4059 100644
--- a/README
+++ b/README
@@ -37,6 +37,7 @@ Contents:
37 2.F. Optional - Video camera support with V4L2 drivers 37 2.F. Optional - Video camera support with V4L2 drivers
38 2.G. Images 38 2.G. Images
39 2.H. Boot to U-Boot 39 2.H. Boot to U-Boot
40 2.I. Image with Initramfs
403. Extra apps 413. Extra apps
41 3.A. omxplayer 42 3.A. omxplayer
424. Source code and mirrors 434. Source code and mirrors
@@ -155,6 +156,18 @@ KERNEL_IMAGETYPE = "uImage"
155This will make kernel.img be u-boot image which will load uImage. 156This will make kernel.img be u-boot image which will load uImage.
156By default, kernel.img is the actual kernel image (ex. Image). 157By default, kernel.img is the actual kernel image (ex. Image).
157 158
1592.I. Image with Initramfs
160=========================
161To build an initramfs image :
162 * Set this 3 kernel variables (in linux-raspberrypi.inc for example)
163 - kernel_configure_variable BLK_DEV_INITRD y
164 - kernel_configure_variable INITRAMFS_SOURCE ""
165 - kernel_configure_variable RD_GZIP y
166 * Set the yocto variables (in linux-raspberrypi.inc for example)
167 - INITRAMFS_IMAGE = "<a name for your initramfs image>"
168 - INITRAMFS_IMAGE_BUNDLE = "1"
169 * Set the meta-rasberrypi variable (in raspberrypi.conf for example)
170 - KERNEL_INITRAMFS = "-initramfs"
158 171
1593. Extra apps 1723. Extra apps
160============= 173=============
diff --git a/classes/sdcard_image-rpi.bbclass b/classes/sdcard_image-rpi.bbclass
index 179b7b7..eb337dc 100644
--- a/classes/sdcard_image-rpi.bbclass
+++ b/classes/sdcard_image-rpi.bbclass
@@ -26,6 +26,9 @@ inherit image_types
26# Set kernel and boot loader 26# Set kernel and boot loader
27IMAGE_BOOTLOADER ?= "bcm2835-bootfiles" 27IMAGE_BOOTLOADER ?= "bcm2835-bootfiles"
28 28
29# Set initramfs extension
30KERNEL_INITRAMFS ?= ""
31
29# Boot partition volume id 32# Boot partition volume id
30BOOTDD_VOLUME_ID ?= "${MACHINE}" 33BOOTDD_VOLUME_ID ?= "${MACHINE}"
31 34
@@ -95,10 +98,10 @@ IMAGE_CMD_rpi-sdimg () {
95 case "${KERNEL_IMAGETYPE}" in 98 case "${KERNEL_IMAGETYPE}" in
96 "uImage") 99 "uImage")
97 mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.img ::kernel.img 100 mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.img ::kernel.img
98 mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::uImage 101 mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage
99 ;; 102 ;;
100 *) 103 *)
101 mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::kernel.img 104 mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::kernel.img
102 ;; 105 ;;
103 esac 106 esac
104 107