linux-raspberry.inc: add initramfs support
PATCH v4 1/2 linux-raspberry.inc: add initramfs support
From: Stéphane Cerveau <[email protected]>
append initramfs creation to install RPi bootloader trailer
Signed-off-by Stéphane Cerveau <[email protected]>
Signed-off-by Andrei Gherzan <[email protected]>
--- recipes-kernel/linux/linux-raspberrypi.inc | 10 ++++++++++ 1 file changed, 10 insertions(+)
recipes-kernel/linux/linux-raspberrypi.inc +10 -0
@@ -64,4 +64,14 @@ do_rpiboot_mkimage() { fi fi } + +do_bundle_initramfs_append() { + if test "x${KERNEL_IMAGETYPE}" != "xuImage" ; then + if test -n "${KERNEL_DEVICETREE}"; then + # Add RPi bootloader trailer to kernel image to enable DeviceTree support + ${STAGING_LIBEXECDIR_NATIVE}/mkknlimg --dtok ${KERNEL_OUTPUT}.initramfs ${KERNEL_OUTPUT}.initramfs + fi + fi +} + addtask rpiboot_mkimage before do_install after do_compile
Signature · 1 line
2.7.0
PATCH v4 2/2 linux-raspberrypi: Make sure we have initramfs image before running mkknlimg
Signed-off-by Andrei Gherzan <[email protected]>
--- recipes-kernel/linux/linux-raspberrypi.inc | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-)
recipes-kernel/linux/linux-raspberrypi.inc +6 -4
@@ -66,10 +66,12 @@ do_rpiboot_mkimage() { } do_bundle_initramfs_append() { - if test "x${KERNEL_IMAGETYPE}" != "xuImage" ; then - if test -n "${KERNEL_DEVICETREE}"; then - # Add RPi bootloader trailer to kernel image to enable DeviceTree support - ${STAGING_LIBEXECDIR_NATIVE}/mkknlimg --dtok ${KERNEL_OUTPUT}.initramfs ${KERNEL_OUTPUT}.initramfs + if [ ! -z "${INITRAMFS_IMAGE}" -a x"${INITRAMFS_IMAGE_BUNDLE}" = x1 ]; then + if test "x${KERNEL_IMAGETYPE}" != "xuImage" ; then + if test -n "${KERNEL_DEVICETREE}"; then + # Add RPi bootloader trailer to kernel image to enable DeviceTree support + ${STAGING_LIBEXECDIR_NATIVE}/mkknlimg --dtok ${KERNEL_OUTPUT}.initramfs ${KERNEL_OUTPUT}.initramfs + fi fi fi }
Signature · 1 line
2.7.0
Quoted 30 lines · Andrei Gherzan
From: Stéphane Cerveau <[email protected]>
append initramfs creation to install RPi bootloader trailer
Signed-off-by Stéphane Cerveau <[email protected]>Signed-off-by Andrei Gherzan <[email protected]>--- recipes-kernel/linux/linux-raspberrypi.inc | 10 ++++++++++ 1 file changed, 10 insertions(+)recipes-kernel/linux/linux-raspberrypi.inc +10
-1@@ -64,4 +64,14 @@ do_rpiboot_mkimage() { fi fi } + +do_bundle_initramfs_append() { + if test "x${KERNEL_IMAGETYPE}" != "xuImage" ; then + if test -n "${KERNEL_DEVICETREE}"; then + # Add RPi bootloader trailer to kernel image to enable DeviceTree support + ${STAGING_LIBEXECDIR_NATIVE}/mkknlimg --dtok ${KERNEL_OUTPUT}.initramfs ${KERNEL_OUTPUT}.initramfs + fi + fi +} + addtask rpiboot_mkimage before do_install after do_compile --
Quoted 2 lines
2.7.0
Merged both patches to master.
--
Andrei Gherzan