* [meta-raspberrypi][PATCH V3] Add initramfs support
@ 2014-02-11 16:33 Sébastien Mennetrier
2014-02-13 23:25 ` Andrei Gherzan
0 siblings, 1 reply; 2+ messages in thread
From: Sébastien Mennetrier @ 2014-02-11 16:33 UTC (permalink / raw)
To: yocto
Permit to build an image with initramfs.
Add information in README to build with initramfs.
Signed-off-by: Sébastien Mennetrier <s.mennetrier@innotis.org>
---
README | 13 +++++++++++++
classes/sdcard_image-rpi.bbclass | 7 +++++--
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:
2.F. Optional - Video camera support with V4L2 drivers
2.G. Images
2.H. Boot to U-Boot
+ 2.I. Image with Initramfs
3. Extra apps
3.A. omxplayer
4. Source code and mirrors
@@ -155,6 +156,18 @@ KERNEL_IMAGETYPE = "uImage"
This will make kernel.img be u-boot image which will load uImage.
By default, kernel.img is the actual kernel image (ex. Image).
+2.I. Image with Initramfs
+=========================
+To build an initramfs image :
+ * Set this 3 kernel variables (in linux-raspberrypi.inc for example)
+ - kernel_configure_variable BLK_DEV_INITRD y
+ - kernel_configure_variable INITRAMFS_SOURCE ""
+ - kernel_configure_variable RD_GZIP y
+ * Set the yocto variables (in linux-raspberrypi.inc for example)
+ - INITRAMFS_IMAGE = "<a name for your initramfs image>"
+ - INITRAMFS_IMAGE_BUNDLE = "1"
+ * Set the meta-rasberrypi variable (in raspberrypi.conf for example)
+ - KERNEL_INITRAMFS = "-initramfs"
3. Extra apps
=============
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
# Set kernel and boot loader
IMAGE_BOOTLOADER ?= "bcm2835-bootfiles"
+# Set initramfs extension
+KERNEL_INITRAMFS ?= ""
+
# Boot partition volume id
BOOTDD_VOLUME_ID ?= "${MACHINE}"
@@ -95,10 +98,10 @@ IMAGE_CMD_rpi-sdimg () {
case "${KERNEL_IMAGETYPE}" in
"uImage")
mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/u-boot.img ::kernel.img
- mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::uImage
+ mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::uImage
;;
*)
- mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}-${MACHINE}.bin ::kernel.img
+ mcopy -i ${WORKDIR}/boot.img -s ${DEPLOY_DIR_IMAGE}/${KERNEL_IMAGETYPE}${KERNEL_INITRAMFS}-${MACHINE}.bin ::kernel.img
;;
esac
--
1.8.1.2
^ permalink raw reply related [flat|nested] 2+ messages in thread* Re: [meta-raspberrypi][PATCH V3] Add initramfs support
2014-02-11 16:33 [meta-raspberrypi][PATCH V3] Add initramfs support Sébastien Mennetrier
@ 2014-02-13 23:25 ` Andrei Gherzan
0 siblings, 0 replies; 2+ messages in thread
From: Andrei Gherzan @ 2014-02-13 23:25 UTC (permalink / raw)
To: Sébastien Mennetrier; +Cc: yocto
Hello Sebastien,
On Tue, Feb 11, 2014 at 05:33:30PM +0100, Sébastien Mennetrier wrote:
> Permit to build an image with initramfs.
> Add information in README to build with initramfs.
>
> Signed-off-by: Sébastien Mennetrier <s.mennetrier@innotis.org>
> ---
> README | 13 +++++++++++++
> classes/sdcard_image-rpi.bbclass | 7 +++++--
> 2 files changed, 18 insertions(+), 2 deletions(-)
>
Your patch was merged. Thank you.
--
Andrei Gherzan
m: +40.744.478.414 | f: +40.31.816.28.12
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-02-13 23:26 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-11 16:33 [meta-raspberrypi][PATCH V3] Add initramfs support Sébastien Mennetrier
2014-02-13 23:25 ` Andrei Gherzan
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.