Skip to contentSkip to conversation

initrd isn't needed for iso9660 when initramfs is used

Buildroot New Assaf Inbal 2 participants 4 messages Aug 22, 2013

lore
Share & tools
lore
#0 lore raw

I'm not entirely sure of this patch.
The problem is that, while initrd isn't needed when initramfs is used, the default menu for grub always includes the initrd directive and will fail to load when it's missing.
Perhaps we should have two grub menus? Or create it during build? Any ideas?

Thanks,
Assaf

#1 lore raw

PATCH 1/1 iso9660 fs: no need to copy initrd when using initramfs

---
 fs/iso9660/iso9660.mk |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
fs/iso9660/iso9660.mk +3 -1
index 317314a..12ab9eb 100644
@@ -21,7 +21,9 @@ $(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio grub
 	cp $(GRUB_DIR)/stage2/stage2_eltorito $(ISO9660_TARGET_DIR)/boot/grub/
 	cp $(ISO9660_BOOT_MENU) $(ISO9660_TARGET_DIR)/boot/grub/menu.lst
 	cp $(LINUX_IMAGE_PATH) $(ISO9660_TARGET_DIR)/kernel
-	cp $(BINARIES_DIR)/rootfs.cpio$(ISO9660_CPIO_EXT-y) $(ISO9660_TARGET_DIR)/initrd
+	if [ "$(BR2_TARGET_ROOTFS_INITRAMFS)" != "y" ]; then \
+	  cp $(BINARIES_DIR)/rootfs.cpio$(ISO9660_CPIO_EXT-y) $(ISO9660_TARGET_DIR)/initrd; \
+	fi
 	# Use fakeroot to pretend all target binaries are owned by root
 	rm -f $(FAKEROOT_SCRIPT)
 	echo "chown -R 0:0 $(ISO9660_TARGET_DIR)" >> $(FAKEROOT_SCRIPT)
Signature · 1 line
1.7.9.5
#2 lore raw
In reply to Assaf Inbal
Quoted 4 lines · Assaf Inbal

I'm not entirely sure of this patch.
The problem is that, while initrd isn't needed when initramfs is used, the default menu for grub always includes the initrd directive and will fail to load when it's missing.

Why do you want to use iso9660 with an initramfs? initramfs is only
really useful for boat loaders that have a problem with passing an initrd, e.g. network boot.

Regards,
Arnout

Quoted 10 lines

Perhaps we should have two grub menus? Or create it during build? Any ideas?

Thanks,
Assaf
_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
#3 lore raw

Hey,

Why do you want to use iso9660 with an initramfs? initramfs is only really

Quoted 3 lines

useful for boat loaders that have a problem with passing an initrd, e.g. network boot.

Can't give you a real answer for that :)
I was basically playing around with a few things and didn't understand why initrd was always included.
Feel free to disregard this patch.

Good day,
Assaf
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130822/4b298588/attachment-0001.html>