diff options
-rw-r--r-- | README | 13 | ||||
-rw-r--r-- | classes/sdcard_image-rpi.bbclass | 7 |
2 files changed, 18 insertions, 2 deletions
@@ -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 | ||
40 | 3. Extra apps | 41 | 3. Extra apps |
41 | 3.A. omxplayer | 42 | 3.A. omxplayer |
42 | 4. Source code and mirrors | 43 | 4. Source code and mirrors |
@@ -155,6 +156,18 @@ KERNEL_IMAGETYPE = "uImage" | |||
155 | This will make kernel.img be u-boot image which will load uImage. | 156 | This will make kernel.img be u-boot image which will load uImage. |
156 | By default, kernel.img is the actual kernel image (ex. Image). | 157 | By default, kernel.img is the actual kernel image (ex. Image). |
157 | 158 | ||
159 | 2.I. Image with Initramfs | ||
160 | ========================= | ||
161 | To 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 | ||
159 | 3. Extra apps | 172 | 3. 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 |
27 | IMAGE_BOOTLOADER ?= "bcm2835-bootfiles" | 27 | IMAGE_BOOTLOADER ?= "bcm2835-bootfiles" |
28 | 28 | ||
29 | # Set initramfs extension | ||
30 | KERNEL_INITRAMFS ?= "" | ||
31 | |||
29 | # Boot partition volume id | 32 | # Boot partition volume id |
30 | BOOTDD_VOLUME_ID ?= "${MACHINE}" | 33 | BOOTDD_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 | ||