Skip to contentSkip to conversation

linux-raspberry.inc: add initramfs support

PATCH In review Andrei Gherzan 1 participant 3 messages Feb 28, 2016 – Feb 29, 2016 Broadcom BCM2711/BCM2835 Arm architecture

lore
Share & tools
lore
#0 lore raw

PATCH v4 1/2 linux-raspberry.inc: add initramfs support

From: Stéphane Cerveau <[email protected]>

append initramfs creation to install RPi bootloader trailer

---
 recipes-kernel/linux/linux-raspberrypi.inc | 10 ++++++++++
 1 file changed, 10 insertions(+)
recipes-kernel/linux/linux-raspberrypi.inc +10 -0
index 8c7c46c..1befee4 100644
@@ -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
#1 lore raw

PATCH v4 2/2 linux-raspberrypi: Make sure we have initramfs image before running mkknlimg

---
 recipes-kernel/linux/linux-raspberrypi.inc | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)
recipes-kernel/linux/linux-raspberrypi.inc +6 -4
index 1befee4..5a8a175 100644
@@ -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
#2 lore raw
In reply to Andrei Gherzan
Quoted 30 lines · Andrei Gherzan

From: Stéphane Cerveau <[email protected]>

append initramfs creation to install RPi bootloader trailer

---
 recipes-kernel/linux/linux-raspberrypi.inc | 10 ++++++++++
 1 file changed, 10 insertions(+)
recipes-kernel/linux/linux-raspberrypi.inc +10 -1
index 8c7c46c..1befee4 100644
@@ -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