new package - generate iso with isolinux bootloader
PATCH 1/1 new package - generate iso with isolinux bootloader
--- fs/Config.in | 1 + fs/isolinux/Config.in | 182 ++++++++++++++++++++++++++++++++++++++ fs/isolinux/isolinux.mk | 226 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 409 insertions(+) create mode 100644 fs/isolinux/Config.in create mode 100644 fs/isolinux/isolinux.mk
fs/Config.in +1 -0
@@ -11,5 +11,6 @@ source "fs/romfs/Config.in" source "fs/squashfs/Config.in" source "fs/tar/Config.in" source "fs/ubifs/Config.in" +source "fs/isolinux/Config.in" endmenu
fs/isolinux/Config.in new file +182 -0
182 lines not on this page · raw message
fs/isolinux/isolinux.mk new file +226 -0
226 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH 1/1 new package - generate iso with isolinux bootloader
Dear All,
Sorry, It's my first patch.
We can generate new iso file with isolinux.
Regards,
Jean
Quoted 440 lines
Signed-off-by jean <[email protected]>--- fs/Config.in | 1 + fs/isolinux/Config.in | 182 ++++++++++++++++++++++++++++++++++++++ fs/isolinux/isolinux.mk | 226 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 409 insertions(+)create mode 100644
fs/isolinux/Config.in
create mode 100644fs/isolinux/isolinux.mkfs/Config.in +1
-0@@ -11,5 +11,6 @@ source "fs/romfs/Config.in" source "fs/squashfs/Config.in" source "fs/tar/Config.in" source "fs/ubifs/Config.in" +source "fs/isolinux/Config.in" endmenufs/isolinux/Config.in new file +182
-0@@ -0,0 +1,182 @@ +## Menu ISO image with syslinux +menu "iso image (isolinux bootloader - with initramfs)" +config BR2_TARGET_ROOTFS_ISO_ISOLINUX + bool "iso image (isolinux bootloader)" + depends on (BR2_i386 || BR2_x86_64) + depends on BR2_LINUX_KERNEL + select BR2_TARGET_ROOTFS_INITRAMFS + select BR2_TARGET_SYSLINUX + select BR2_TARGET_SYSLINUX_ISOLINUX + help + Build a bootable iso9660 image (with isolinux bootloader and initramfs) + You can launch this iso with : + qemu -boot d -cdrom rootfs.isolinux + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_JOLIET + bool "create iso with Joliet format" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + help + Create iso image with Joliet format (long file) + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_ROCK_RIDGE + bool "Generate Rock Ridge directory information" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + help + Generate Rock Ridge directory information + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_MENU_LINUX + string "Name to start linux" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + default "buildroot" + help + define message see to select linux + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_NAME + string "Name iso" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + default "buildroot iso" + help + cdrom name + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_INPUT_CHARSET + string "define parameter input charset" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + default "iso8859-15" + help + define parameter input charset + (see program genisoimage : genisoimage -input-charset help) + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_BOOT_MESSAGE + string "Message boot for isolinux" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + default "Buildroot isolinux boot" + help + define first message see in prompt boot + after that, you see all options + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_BOOT_TIMEOUT + int "timeout" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + default "20" + help + define timeout (second) + after this time, boot on default config + +config BR2_TARGET_ISO_ISOLINUX_TOOLS_HARDWARE_INFO + bool "add tools hardware info" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + help + isolinux menu, you can see hardware info + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_TOOLS_REBOOT + bool "add isolinux option reboot" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + help + isolinux menu, you can reboot + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_TOOLS_POWEROFF + bool "add isolinux option poweroff" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + help + isolinux menu, you can power off + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_TOOLS_FIRSTDISKBOOT + bool "add isolinux option to boot on first disk" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + help + isolinux menu, you can boot on disk + +## Keyboard menu +menu "keyboard" +depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX +depends on BR2_PACKAGE_KBD + +## Choice default keyboard on boot (isolinux only) +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD + string +choice + prompt "Default keyboard on isolinux boot" + default BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD_US if BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD = "us" + default BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD_FR if BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD = "fr" + default BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD_FR_PC if BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD = "fr-pc" + default BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD_DE if BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD = "de" + default BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD_MANUAL if BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD = "manual" + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD_US + bool "us" + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD_FR + bool "fr" + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD_FR_PC + bool "fr-pc" + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD_DE + bool "de" + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD_MANUAL + bool "manual" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_MANUAL_ACTIVATE + +endchoice +## End choice default keyboard on boot (isolinux only) + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_US + bool "keyboard us" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + help + activate option keyboard us (exist by default) + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_FR + bool "keyboard fr" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + help + activate option keyboard fr + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_FR_PC + bool "keyboard fr-pc" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + help + activate option keyboard fr_pc + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_DE + bool "keyboard de" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + help + activate option keyboard de + + +menu "Manual configuration keyboard" + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_MANUAL_ACTIVATE + bool "Enable manual configuration" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + help + Activate manual keyboard configuration + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_MANUAL_NAME + string "Name of keyboard" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_MANUAL_ACTIVATE + default "unknown" + help + define name to select this keyboard in isolinux menu + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_MANUAL_SOURCE + string "File source to generate the keyboard map" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_MANUAL_ACTIVATE + default "data/keymaps/i386/qwerty/us.map" + help + define map file to generate the keyboard configuration + root is kbd package + example : data/keymaps/i386/qwerty/gr.map + +endmenu +## End manual configuration keyboard + +endmenu +## End keyboard menu + +endmenu +## End Menu ISO image with syslinuxfs/isolinux/isolinux.mk new file +226
-0@@ -0,0 +1,226 @@ +################################################################################ +# +# Build the iso96600 with isolinux bootloader (and initramfs) +# +################################################################################ + +BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_BOOT=boot +BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_ISOLINUX=isolinux +BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_TOOLS=tools +BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_KEYBOARD=keyboard + +BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR = $(BUILD_DIR)/isolinux +BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_BOOT = $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR)/$(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_BOOT) +BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_ISOLINUX = $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR)/$(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_ISOLINUX) +BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_TOOLS = $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR)/$(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_TOOLS) +BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_KEYBOARD = $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR)/$(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_KEYBOARD) + +BR2_TARGET_ISO_ISOLINUX_BOOT_MESSAGE := $(call qstrip,$(BR2_TARGET_ROOTFS_ISO_ISOLINUX_BOOT_MESSAGE)) +BR2_TARGET_ISO_ISOLINUX_BOOT_TIMEOUT := $(call qstrip,$(BR2_TARGET_ROOTFS_ISO_ISOLINUX_BOOT_TIMEOUT)) + +BR2_TARGET_ISO_ISOLINUX_KEYBOARD_US = $(KBD_BUILDDIR)data/keymaps/i386/qwerty/us.map + +BR2_TARGET_ISO_ISOLINUX_CONFIG = "" +BR2_TARGET_ISO_BR2_TARGET_ISO_ISOLINUX_BOOT_MSG = "" + +define copy_files_isolinux_image_tools + cp $(1) $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_TOOLS); +endef + +define copy_files_isolinux_image_keyboard + $(SYSLINUX_BUILDDIR)utils/keytab-lilo \ + $(BR2_TARGET_ISO_ISOLINUX_KEYBOARD_US) \ + $1 \ + > $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_KEYBOARD)/$(subst -,_,$(notdir $(basename $1))).ktl; +endef + +$(BINARIES_DIR)/rootfs.isolinux: host-cdrkit linux syslinux rootfs-initramfs + @$(call MESSAGE,"Generating root filesystem image rootfs.isolinux") + @mkdir -p $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR) + @mkdir -p $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_BOOT) + @mkdir -p $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_ISOLINUX) + @mkdir -p $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_TOOLS) + @mkdir -p $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_KEYBOARD) + + @echo -e $(BR2_TARGET_ISO_BR2_TARGET_ISO_ISOLINUX_BOOT_MSG) > $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR)/bootmsg.txt + + @cp $(BINARIES_DIR)/isolinux.bin $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR)/$(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_ISOLINUX)/ + @cp $(LINUX_IMAGE_PATH) $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR)/$(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_BOOT)/ + + @echo -e $(BR2_TARGET_ISO_ISOLINUX_CONFIG) > $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR)/isolinux.cfg + + @$(foreach file, $(BR2_TARGET_ISO_ISOLINUX_LIST_TOOLS), $(call copy_files_isolinux_image_tools, $(file) ) ) + @$(foreach file, $(BR2_TARGET_ISO_ISOLINUX_LIST_KEYBOARD), $(call copy_files_isolinux_image_keyboard, $(file) ) ) + + $(HOST_DIR)/usr/bin/genisoimage \ + $(BR2_TARGET_ISO_ISOLINUX_GENISOIMAGE_OPTION) \ + -o $(BINARIES_DIR)/rootfs.isolinux \ + -b $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_ISOLINUX)/isolinux.bin \ + -no-emul-boot \ + -c $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_ISOLINUX)/boot.cat \ + -boot-load-size 4 \ + -boot-info-table \ + -input-charset $(BR2_TARGET_ROOTFS_ISO_ISOLINUX_INPUT_CHARSET) \ + -V $(BR2_TARGET_ROOTFS_ISO_ISOLINUX_NAME) \ + $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR) + + - at rm -rf $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR) + +rootfs-isolinux: $(BINARIES_DIR)/rootfs.isolinux + +################################################################################ +# +# Toplevel Makefile options +# +################################################################################ + +ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX),y) +TARGETS+=rootfs-isolinux +BR2_TARGET_ISO_ISOLINUX_CONFIG += "display bootmsg.txt\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += "default $(BR2_TARGET_ROOTFS_ISO_ISOLINUX_MENU_LINUX)\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += "timeout $(BR2_TARGET_ISO_ISOLINUX_BOOT_TIMEOUT)\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += "prompt 1\\n" +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX_JOLIET),y) +BR2_TARGET_ISO_ISOLINUX_GENISOIMAGE_OPTION += -J +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX_ROCK_RIDGE),y) +BR2_TARGET_ISO_ISOLINUX_GENISOIMAGE_OPTION += -R +endif + +# By default it us keyboard +#ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD_US),y) +#BR2_TARGET_ISO_ISOLINUX_CONFIG += "kbdmap $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_KEYBOARD)/us.ktl" +#BR2_TARGET_ISO_ISOLINUX_KEYBOARD_US_ACTIVATED=y +#endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD_FR),y) +BR2_TARGET_ISO_ISOLINUX_CONFIG += "kbdmap $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_KEYBOARD)/fr.ktl\\n" +BR2_TARGET_ISO_ISOLINUX_KEYBOARD_FR_ACTIVATED=y +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD_FR_PC),y) +BR2_TARGET_ISO_ISOLINUX_CONFIG += "kbdmap $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_KEYBOARD)/fr_pc.ktl\\n" +BR2_TARGET_ISO_ISOLINUX_KEYBOARD_FR_PC_ACTIVATED=y +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX_DESIRED_KEYBOARD_DE),y) +BR2_TARGET_ISO_ISOLINUX_CONFIG += "kbdmap $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_KEYBOARD)/de.ktl\\n" +BR2_TARGET_ISO_ISOLINUX_KEYBOARD_DE_ACTIVATED=y +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX),y) +BR2_TARGET_ISO_ISOLINUX_CONFIG += "LABEL $(BR2_TARGET_ROOTFS_ISO_ISOLINUX_MENU_LINUX)\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " KERNEL $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_BOOT)/bzImage\\n" +BR2_TARGET_ISO_BR2_TARGET_ISO_ISOLINUX_BOOT_MSG += "$(BR2_TARGET_ISO_ISOLINUX_BOOT_MESSAGE)\n" +BR2_TARGET_ISO_BR2_TARGET_ISO_ISOLINUX_BOOT_MSG += " $(BR2_TARGET_ROOTFS_ISO_ISOLINUX_MENU_LINUX)) launch linux\n" +endif + +ifeq ($(BR2_TARGET_ISO_ISOLINUX_TOOLS_HARDWARE_INFO),y) +BR2_TARGET_ISO_ISOLINUX_CONFIG += "LABEL hdt\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " MENU LABEL Hardware Info\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " COM32 $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_TOOLS)/hdt.c32\\n" +BR2_TARGET_ISO_BR2_TARGET_ISO_ISOLINUX_BOOT_MSG += " hdt) hardware info\n" +BR2_TARGET_ISO_ISOLINUX_LIST_TOOLS += $(SYSLINUX_BUILDDIR)com32/hdt/hdt.c32 +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX_TOOLS_REBOOT),y) +BR2_TARGET_ISO_ISOLINUX_CONFIG += "LABEL reboot\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " MENU LABEL Reboot\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " KERNEL $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_TOOLS)/reboot.c32\\n" +BR2_TARGET_ISO_BR2_TARGET_ISO_ISOLINUX_BOOT_MSG += " reboot) reboot server\n" +BR2_TARGET_ISO_ISOLINUX_LIST_TOOLS += $(SYSLINUX_BUILDDIR)com32/modules/reboot.c32 +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX_TOOLS_POWEROFF),y) +BR2_TARGET_ISO_ISOLINUX_CONFIG += "LABEL poweroff\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " MENU LABEL Poweroff\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " KERNEL $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_TOOLS)/poweroff.com\\n" +BR2_TARGET_ISO_BR2_TARGET_ISO_ISOLINUX_BOOT_MSG += " poweroff) poweroff server\n" +BR2_TARGET_ISO_ISOLINUX_LIST_TOOLS += $(SYSLINUX_BUILDDIR)modules/poweroff.com +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX_TOOLS_FIRSTDISKBOOT),y) +BR2_TARGET_ISO_ISOLINUX_CONFIG += "LABEL hd\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " MENU LABEL Boot from first hard disk\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " localboot 0x80\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " append -\\n" +BR2_TARGET_ISO_BR2_TARGET_ISO_ISOLINUX_BOOT_MSG += " hd) boot on first hard disk\n" +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_US),y) +BR2_TARGET_ISO_ISOLINUX_CONFIG += "LABEL us\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " MENU LABEL keyboard US (qwerty)\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " KERNEL $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_TOOLS)/kbdmap.c32\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " APPEND $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_KEYBOARD)/us.ktl\\n" +BR2_TARGET_ISO_BR2_TARGET_KEYBOARD_OPTION += us +BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_ACTIVATED=y +BR2_TARGET_ISO_ISOLINUX_KEYBOARD_US_ACTIVATED=y +endif + +ifeq ($(BR2_TARGET_ISO_ISOLINUX_KEYBOARD_US_ACTIVATED),y) +BR2_TARGET_ISO_ISOLINUX_LIST_KEYBOARD += $(KBD_BUILDDIR)data/keymaps/i386/qwerty/us.map +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_FR),y) +BR2_TARGET_ISO_ISOLINUX_CONFIG += "LABEL fr\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " MENU LABEL keyboard FR (azerty)\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " KERNEL $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_TOOLS)/kbdmap.c32\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " APPEND $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_KEYBOARD)/fr.ktl\\n" +BR2_TARGET_ISO_BR2_TARGET_KEYBOARD_OPTION += fr +BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_ACTIVATED=y +BR2_TARGET_ISO_ISOLINUX_KEYBOARD_FR_ACTIVATED=y +endif + +ifeq ($(BR2_TARGET_ISO_ISOLINUX_KEYBOARD_FR_ACTIVATED),y) +BR2_TARGET_ISO_ISOLINUX_LIST_KEYBOARD += $(KBD_BUILDDIR)data/keymaps/i386/azerty/fr.map +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_FR_PC),y) +BR2_TARGET_ISO_ISOLINUX_CONFIG += "LABEL frpc\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " MENU LABEL keyboard FR-PC (azerty)\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " KERNEL $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_TOOLS)/kbdmap.c32\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " APPEND $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_KEYBOARD)/fr_pc.ktl\\n" +BR2_TARGET_ISO_BR2_TARGET_KEYBOARD_OPTION += frpc +BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_ACTIVATED=y +BR2_TARGET_ISO_ISOLINUX_KEYBOARD_FR_PC_ACTIVATED=y +endif + +ifeq ($(BR2_TARGET_ISO_ISOLINUX_KEYBOARD_FR_PC_ACTIVATED),y) +BR2_TARGET_ISO_ISOLINUX_LIST_KEYBOARD += $(KBD_BUILDDIR)data/keymaps/i386/azerty/fr-pc.map +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_DE),y) +BR2_TARGET_ISO_ISOLINUX_CONFIG += "LABEL de\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " MENU LABEL keyboard DE (qwertz)\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " KERNEL $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_TOOLS)/kbdmap.c32\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " APPEND $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_KEYBOARD)/de.ktl\\n" +BR2_TARGET_ISO_BR2_TARGET_KEYBOARD_OPTION += de +BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_ACTIVATED=y +BR2_TARGET_ISO_ISOLINUX_KEYBOARD_DE_ACTIVATED=y +endif + +ifeq ($(BR2_TARGET_ISO_ISOLINUX_KEYBOARD_DE_ACTIVATED),y) +BR2_TARGET_ISO_ISOLINUX_LIST_KEYBOARD += $(KBD_BUILDDIR)data/keymaps/i386/qwertz/de.map +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_MANUAL_ACTIVATE),y) +BR2_TARGET_ISO_ISOLINUX_CONFIG += "LABEL $(BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_MANUAL_NAME)\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " MENU LABEL keyboard $(BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_MANUAL_NAME)\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " KERNEL $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_TOOLS)/kbdmap.c32\\n" +BR2_TARGET_ISO_ISOLINUX_CONFIG += " APPEND $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_KEYBOARD)/$(subst -,_,$(notdir $(basename $(BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_MANUAL_SOURCE)))).ktl\\n" +BR2_TARGET_ISO_ISOLINUX_LIST_KEYBOARD += $(KBD_BUILDDIR)$(BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_MANUAL_SOURCE) +BR2_TARGET_ISO_BR2_TARGET_KEYBOARD_OPTION += $(BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_MANUAL_NAME) +BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_ACTIVATED=y +endif + + +ifeq ($(BR2_TARGET_ROOTFS_ISO_ISOLINUX_KEYBOARD_ACTIVATED),y) +BR2_TARGET_ISO_ISOLINUX_LIST_TOOLS += $(SYSLINUX_BUILDDIR)com32/modules/kbdmap.c32 +endif + +ifneq ($(BR2_TARGET_ISO_BR2_TARGET_KEYBOARD_OPTION),) +BR2_TARGET_ISO_BR2_TARGET_ISO_ISOLINUX_BOOT_MSG += " $(BR2_TARGET_ISO_BR2_TARGET_KEYBOARD_OPTION)) keyboard option" +endif
PATCH 1/1 new package - generate iso with isolinux bootloader
In reply to jeanQuoted 2 lines · jean
Signed-off-by jean <[email protected]>
Hi Jean,
Thanks for your patch. We will comment on it, and hopefully you can
send an updated patch to fix the issues we report. When you do, please send the updated patch with the --in-reply-to=1376644934-4302-1-git-send-email-jean.sorgemoel at laposte.net and
-v 2 (or --subject-prefix='PATCH v2' for older git)
options, so that we can easily follow the updated patch in patchwork.
First a generic comment. Is there any reason not to simply replace the
iso9660 filesystem? That one is currently using grub as a bootloader, but it doesn't work very well. So I think this patch is very valuable to get the iso9660 filesystem working properly again. But as it is now, it is too complex to be included in buildroot. See my comments below.
A second generic comment is about the choice of booting with an
initramfs. Why not boot with a (rockridge) iso9660 rootfs? Clearly it puts a bit more strain on the kernel config since iso9660 as well as the bus drivers (sata, usb) have to be linked in, but I think that would be a much nicer solution. This type of image containing the actual rootfs in a different format should really be generated by a post-image script instead of a filesystem target. Can the rest of the list give their opinion?
Quoted 25 lines
--- fs/Config.in | 1 + fs/isolinux/Config.in | 182 ++++++++++++++++++++++++++++++++++++++ fs/isolinux/isolinux.mk | 226 +++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 409 insertions(+)create mode 100644
fs/isolinux/Config.in
create mode 100644fs/isolinux/isolinux.mkfs/Config.in +1
-0@@ -11,5 +11,6 @@ source "fs/romfs/Config.in" source "fs/squashfs/Config.in" source "fs/tar/Config.in" source "fs/ubifs/Config.in" +source "fs/isolinux/Config.in" endmenufs/isolinux/Config.in new file +0
-0
fs/isolinux/Config.in line 1
Quoted 1 line
fs/isolinux/Config.in new file +1
-0@@ -0,0 +1,182 @@ +## Menu ISO image with syslinux
This comment is redundant: the line below says exactly that.
fs/isolinux/Config.in line 2
Quoted 1 line
fs/isolinux/Config.in new file +1
-0+menu "iso image (isolinux bootloader - with initramfs)"
We normally don't have a menu in this case. The sub-options will be
hidden unless the ISOLINUX option is selected, and normally you only have one filesystem so the total menu doesn't become too large.
In some cases we do add a menuconfig (which is a combination of a menu
and a boolean config), but I don't think it is warranted here.
fs/isolinux/Config.in line 3
Quoted 1 line
fs/isolinux/Config.in new file +1
-0+config BR2_TARGET_ROOTFS_ISO_ISOLINUX
The name of the config symbols should correspond to the directory, i.e.BR2_TARGET_ROOTFS_ISOLINUX (or BR2_TARGET_ROOTFS_ISO9660 if you do decide to replace that one). And of course the suboptions should also be renamed to BR2_TARGET_ROOTFS_ISOLINUX_FOO.
fs/isolinux/Config.in line 6
Quoted 3 lines
fs/isolinux/Config.in new file +3
-0+ bool "iso image (isolinux bootloader)" + depends on (BR2_i386 || BR2_x86_64) + depends on BR2_LINUX_KERNEL
If you have a dependency on the kernel, you should also add a comment
at the file explaining that it is needed. Cfr. iso9660.
fs/isolinux/Config.in line 11
Quoted 5 lines
fs/isolinux/Config.in new file +5
-0+ select BR2_TARGET_ROOTFS_INITRAMFS + select BR2_TARGET_SYSLINUX + select BR2_TARGET_SYSLINUX_ISOLINUX + help + Build a bootable iso9660 image (with isolinux bootloader and initramfs)
I think it would be nice if the bootable aspect would be optional. But
that can be done in a follow-up patch.
Help text should be indented with 1 tab + 2 spaces, and wrap at 70
characters (= 80 columns if you have 8-char tabs).
fs/isolinux/Config.in line 17
Quoted 6 lines
fs/isolinux/Config.in new file +6
-0+ You can launch this iso with : + qemu -boot d -cdrom rootfs.isolinux + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_JOLIET + bool "create iso with Joliet format" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX
Instead of defining a 'depends on' for every suboption, just wrap the
whole thing in a 'if ... endif' construct.
fs/isolinux/Config.in line 19
Quoted 2 lines
fs/isolinux/Config.in new file +2
-0+ help + Create iso image with Joliet format (long file)
long filenames
fs/isolinux/Config.in line 25
Quoted 6 lines
fs/isolinux/Config.in new file +6
-0+ +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_ROCK_RIDGE + bool "Generate Rock Ridge directory information" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + help + Generate Rock Ridge directory information
That help text isn't very useful... How about 'Generate Rock Ridge
directory information, which includes symbolic links, file mode, uid, gid, etc.'
fs/isolinux/Config.in line 28
Quoted 3 lines
fs/isolinux/Config.in new file +3
-0+ +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_MENU_LINUX + string "Name to start linux"
All Config.in stuff (except help text) should be indented with 1 tab,
not with spaces.
fs/isolinux/Config.in line 32
Quoted 4 lines
fs/isolinux/Config.in new file +4
-0+ depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + default "buildroot" + help + define message see to select linux
I don't think generating the boot menu is a good idea. Instead, add an
option to let the user point to the menu file, like iso9660 does it. Or actually, a list of files to include in the root dir.
There should be a default 'menu' that boots immediately. You can just
put this menu in fs/isolinux, and set the default for this option to that path.
fs/isolinux/Config.in line 35
Quoted 3 lines
fs/isolinux/Config.in new file +3
-0+ +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_NAME + string "Name iso"
"Volume label" or "Volume ID"
And maybe the config symbol should be named the same.
fs/isolinux/Config.in line 37
Quoted 2 lines
fs/isolinux/Config.in new file +2
-0+ depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + default "buildroot iso"
I think the default label should be just "buildroot".
fs/isolinux/Config.in line 50
Quoted 13 lines
fs/isolinux/Config.in new file +13
-0+ help + cdrom name + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_INPUT_CHARSET + string "define parameter input charset" + depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + default "iso8859-15" + help + define parameter input charset + (see program genisoimage : genisoimage -input-charset help) + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_BOOT_MESSAGE + string "Message boot for isolinux"
I guess this one is part of the menu file so can be removed.
fs/isolinux/Config.in line 58
Quoted 8 lines
fs/isolinux/Config.in new file +8
-0+ depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + default "Buildroot isolinux boot" + help + define first message see in prompt boot + after that, you see all options + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_BOOT_TIMEOUT + int "timeout"
Ditto.
fs/isolinux/Config.in line 66
Quoted 8 lines
fs/isolinux/Config.in new file +8
-0+ depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + default "20" + help + define timeout (second) + after this time, boot on default config + +config BR2_TARGET_ISO_ISOLINUX_TOOLS_HARDWARE_INFO + bool "add tools hardware info"
Ditto.
fs/isolinux/Config.in line 72
Quoted 6 lines
fs/isolinux/Config.in new file +6
-0+ depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + help + isolinux menu, you can see hardware info + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_TOOLS_REBOOT + bool "add isolinux option reboot"
Ditto.
fs/isolinux/Config.in line 78
Quoted 6 lines
fs/isolinux/Config.in new file +6
-0+ depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + help + isolinux menu, you can reboot + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_TOOLS_POWEROFF + bool "add isolinux option poweroff"
Ditto.
fs/isolinux/Config.in line 84
Quoted 6 lines
fs/isolinux/Config.in new file +6
-0+ depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + help + isolinux menu, you can power off + +config BR2_TARGET_ROOTFS_ISO_ISOLINUX_TOOLS_FIRSTDISKBOOT + bool "add isolinux option to boot on first disk"
Ditto.
fs/isolinux/Config.in line 90
Quoted 6 lines
fs/isolinux/Config.in new file +6
-0+ depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX + help + isolinux menu, you can boot on disk + +## Keyboard menu +menu "keyboard"
This whole keyboard thing is way too complex. Buildroot wants to be
_simple_. The only relevant thing would be a space-separate list of keyboard layouts to include in the image (cfr. the manual option, but with the possibility to specify several keyboards). However, I think for the time being it is best to only support a single keyboard (US).
[snip the 100 lines for the keyboard definition]
fs/isolinux/isolinux.mk line 7
Quoted 13 lines
fs/isolinux/isolinux.mk new file +7
-0@@ -0,0 +1,226 @@ +################################################################################ +# +# Build the iso96600 with isolinux bootloader (and initramfs) +# +################################################################################ + +BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_BOOT=boot
Variables defined in a .mk file should never start with BR2_. The BR2_
prefix indicates that it is a Kconfig variable. Also the rest of the prefixes can be removed, so you would simply have ISOLINUX_ROOT_DIR_BOOT
Assignments in .mk files should have a space before and after the =
(like you do below).
This variable and the three below, however, are redundant. They are not
an abbreviation, and they are not variable. So they're not useful, and they make the file harder to read.
fs/isolinux/isolinux.mk line 12
Quoted 5 lines
fs/isolinux/isolinux.mk new file +5
-0+BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_ISOLINUX=isolinux +BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_TOOLS=tools +BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_KEYBOARD=keyboard + +BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR = $(BUILD_DIR)/isolinux
This one could still be useful, since we have a similar variable for
the generic packages. However, it should then be called ISOLINUX_DIR.
fs/isolinux/isolinux.mk line 16
Quoted 4 lines
fs/isolinux/isolinux.mk new file +4
-0+BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_BOOT = $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR)/$(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_BOOT) +BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_ISOLINUX = $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR)/$(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_ISOLINUX) +BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_TOOLS = $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR)/$(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_TOOLS) +BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_KEYBOARD = $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR)/$(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_KEYBOARD)
These four are redundant again.
fs/isolinux/isolinux.mk line 19
Quoted 3 lines
fs/isolinux/isolinux.mk new file +3
-0+ +BR2_TARGET_ISO_ISOLINUX_BOOT_MESSAGE := $(call qstrip,$(BR2_TARGET_ROOTFS_ISO_ISOLINUX_BOOT_MESSAGE)) +BR2_TARGET_ISO_ISOLINUX_BOOT_TIMEOUT := $(call qstrip,$(BR2_TARGET_ROOTFS_ISO_ISOLINUX_BOOT_TIMEOUT))
Redundant.
fs/isolinux/isolinux.mk line 21
Quoted 2 lines
fs/isolinux/isolinux.mk new file +2
-0+ +BR2_TARGET_ISO_ISOLINUX_KEYBOARD_US = $(KBD_BUILDDIR)data/keymaps/i386/qwerty/us.map
Redundant.
Also, refering to KBD_BUILDDIR is not very nice. As I said before, I
would leave the whole keyboard handling thing out for the first submission, and maybe add it in a follow-up patch.
fs/isolinux/isolinux.mk line 28
Quoted 7 lines
fs/isolinux/isolinux.mk new file +7
-0+ +BR2_TARGET_ISO_ISOLINUX_CONFIG = "" +BR2_TARGET_ISO_BR2_TARGET_ISO_ISOLINUX_BOOT_MSG = "" + +define copy_files_isolinux_image_tools + cp $(1) $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_TOOLS); +endef
Redundant
fs/isolinux/isolinux.mk line 37
Quoted 9 lines
fs/isolinux/isolinux.mk new file +9
-0+ +define copy_files_isolinux_image_keyboard + $(SYSLINUX_BUILDDIR)utils/keytab-lilo \ + $(BR2_TARGET_ISO_ISOLINUX_KEYBOARD_US) \ + $1 \ + > $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_KEYBOARD)/$(subst -,_,$(notdir $(basename $1))).ktl; +endef + +$(BINARIES_DIR)/rootfs.isolinux: host-cdrkit linux syslinux rootfs-initramfs
Dependency on linux is redundant, since it is implied by the initramfs.
You should probably collect the dependencies in a ISOLINUX_DEPENDENCIES
variable, for consistency with the generic infrastructure.
fs/isolinux/isolinux.mk line 47
Quoted 10 lines
fs/isolinux/isolinux.mk new file +10
-0+ @$(call MESSAGE,"Generating root filesystem image rootfs.isolinux") + @mkdir -p $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR) + @mkdir -p $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_BOOT) + @mkdir -p $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_ISOLINUX) + @mkdir -p $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_TOOLS) + @mkdir -p $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR_KEYBOARD) + + @echo -e $(BR2_TARGET_ISO_BR2_TARGET_ISO_ISOLINUX_BOOT_MSG) > $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR)/bootmsg.txt + + @cp $(BINARIES_DIR)/isolinux.bin $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR)/$(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_ISOLINUX)/
We use '$(INSTALL) -D' instead of cp, which also makes the mkdir's
above redundant. Remember, however, that the target file name has to be given if the -D option is used.
fs/isolinux/isolinux.mk line 57
Quoted 10 lines
fs/isolinux/isolinux.mk new file +10
-0+ @cp $(LINUX_IMAGE_PATH) $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR)/$(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_BOOT)/ + + @echo -e $(BR2_TARGET_ISO_ISOLINUX_CONFIG) > $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR)/isolinux.cfg + + @$(foreach file, $(BR2_TARGET_ISO_ISOLINUX_LIST_TOOLS), $(call copy_files_isolinux_image_tools, $(file) ) ) + @$(foreach file, $(BR2_TARGET_ISO_ISOLINUX_LIST_KEYBOARD), $(call copy_files_isolinux_image_keyboard, $(file) ) ) + + $(HOST_DIR)/usr/bin/genisoimage \ + $(BR2_TARGET_ISO_ISOLINUX_GENISOIMAGE_OPTION) \ + -o $(BINARIES_DIR)/rootfs.isolinux \
This should be $@
fs/isolinux/isolinux.mk line 69
Quoted 12 lines
fs/isolinux/isolinux.mk new file +12
-0+ -b $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_ISOLINUX)/isolinux.bin \ + -no-emul-boot \ + -c $(BR2_TARGET_ISO_ISOLINUX_ROOT_DIR_ISOLINUX)/boot.cat \ + -boot-load-size 4 \ + -boot-info-table \ + -input-charset $(BR2_TARGET_ROOTFS_ISO_ISOLINUX_INPUT_CHARSET) \ + -V $(BR2_TARGET_ROOTFS_ISO_ISOLINUX_NAME) \ + $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR) + + - at rm -rf $(BR2_TARGET_ISO_ISOLINUX_BUILDIMAGE_DIR) + +rootfs-isolinux: $(BINARIES_DIR)/rootfs.isolinux
I won't comment on the rest anymore since it will change too much after
my feedback.
I hope you're not scared off by the big change requests...
Regards,
Arnout
[snip]
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
PATCH 1/1 new package - generate iso with isolinux bootloader
Dear Arnout Vandecappelle,
Quoted 5 lines · Arnout Vandecappelle
First a generic comment. Is there any reason not to simply replace the
iso9660 filesystem? That one is currently using grub as a bootloader, but it doesn't work very well. So I think this patch is very valuable to get the iso9660 filesystem working properly again. But as it is now, it is too complex to be included in buildroot. See my comments below.
What doesn't work with the current iso9660 filesystem support that is grub based? I've tested it recently, and it was working. I've even pushed a few improvements to it.
Quoted 7 lines
A second generic comment is about the choice of booting with an
initramfs. Why not boot with a (rockridge) iso9660 rootfs? Clearly it puts a bit more strain on the kernel config since iso9660 as well as the bus drivers (sata, usb) have to be linked in, but I think that would be a much nicer solution. This type of image containing the actual rootfs in a different format should really be generated by a post-image script instead of a filesystem target. Can the rest of the list give their opinion?
I don't think that ISO9660 supports symbolic links, ownership, permissions, device files and all these Unix filesystem features that are typically needed to use a given filesystem type as a Linux root filesystem.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 new package - generate iso with isolinux bootloader
Quoted 10 lines · Thomas Petazzoni
Dear Arnout Vandecappelle,
Quoted 5 lines · Arnout Vandecappelle
First a generic comment. Is there any reason not to simply replace the
iso9660 filesystem? That one is currently using grub as a bootloader, but it doesn't work very well. So I think this patch is very valuable to get the iso9660 filesystem working properly again. But as it is now, it is too complex to be included in buildroot. See my comments below.
Quoted 3 lines
What doesn't work with the current iso9660 filesystem support that is grub based? I've tested it recently, and it was working. I've even pushed a few improvements to it.
To be honest it has been a couple of years since I tried it, and I
don't remember exactly. Here are a few issues that I can think of now.
* It doesn't actually build a rootfs, but rather a bootable image.
* grub has issues cross-compiling between x86_64 and i386 - but your recent patches may have fixed that.
* Bug#6092 (closed now, but not at the time I posted it).
* The issue that grub was built without iso support (fixed now, but not at the time I posted it).
Possibly iso9660 is working reliably by now.
Quoted 8 lines
Quoted 7 lines
A second generic comment is about the choice of booting with an
initramfs. Why not boot with a (rockridge) iso9660 rootfs? Clearly it puts a bit more strain on the kernel config since iso9660 as well as the bus drivers (sata, usb) have to be linked in, but I think that would be a much nicer solution. This type of image containing the actual rootfs in a different format should really be generated by a post-image script instead of a filesystem target. Can the rest of the list give their opinion?
Quoted 4 lines
I don't think that ISO9660 supports symbolic links, ownership, permissions, device files and all these Unix filesystem features that are typically needed to use a given filesystem type as a Linux root filesystem.
That's what RockRidge is for.
Regards,
Arnout
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
PATCH 1/1 new package - generate iso with isolinux bootloader
Dear Arnout Vandecappelle,
Quoted 4 lines · Arnout Vandecappelle
To be honest it has been a couple of years since I tried it, and I
don't remember exactly. Here are a few issues that I can think of now.* It doesn't actually build a rootfs, but rather a bootable image.
Well, yes, that's true, but it was since the beginning the idea of this iso9660 support, and the additional 'isolinux' filesystem being proposed is exactly the same: a bootable image, except that it uses a different bootloader.
Quoted 2 lines
* grub has issues cross-compiling between
x86_64and i386 - but your recent patches may have fixed that.
Yes, they fixed that.
Quoted 1 line
* Bug#6092 (closed now, but not at the time I posted it).
Yes, I've closed it, because it works for me.
Quoted 2 lines
* The issue that grub was built without iso support (fixed now, but not at the time I posted it).
Yes, it is fixed.
Quoted 1 line
Possibly iso9660 is working reliably by now.
It works for me, at least, and was also reported to work by Thierry Bultel, IIRC.
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
A second generic comment is about the choice of booting with an
initramfs. Why not boot with a (rockridge) iso9660 rootfs? Clearly it puts a bit more strain on the kernel config since iso9660 as well as the bus drivers (sata, usb) have to be linked in, but I think that would be a much nicer solution. This type of image containing the actual rootfs in a different format should really be generated by a post-image script instead of a filesystem target. Can the rest of the list give their opinion?
Quoted 6 lines
Quoted 4 lines
I don't think that ISO9660 supports symbolic links, ownership, permissions, device files and all these Unix filesystem features that are typically needed to use a given filesystem type as a Linux root filesystem.
That's what RockRidge is for.
Aaah, interesting, I didn't know that. So it would probably make a lot of sense to improve the ISO9660 support to:
* Generate just an ISO9660 root filesystem image by default
* Optionally, make it bootable using either Grub or isolinux
* Optionally, replace the ISO9660 root filesystem by an initramfs
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 new package - generate iso with isolinux bootloader
On 28/01/14 22:39, Thomas Petazzoni wrote:
[snip]
The conclusion of the snipped text was that my comments from August are
no longer valid.
Quoted 15 lines
Quoted 8 lines
Quoted 8 lines
Quoted 7 lines
A second generic comment is about the choice of booting with an
initramfs. Why not boot with a (rockridge) iso9660 rootfs? Clearly it puts a bit more strain on the kernel config since iso9660 as well as the bus drivers (sata, usb) have to be linked in, but I think that would be a much nicer solution. This type of image containing the actual rootfs in a different format should really be generated by a post-image script instead of a filesystem target. Can the rest of the list give their opinion?Quoted 6 lines
Quoted 4 lines
I don't think that ISO9660 supports symbolic links, ownership, permissions, device files and all these Unix filesystem features that are typically needed to use a given filesystem type as a Linux root filesystem.
That's what RockRidge is for.
Quoted 8 lines
Aaah, interesting, I didn't know that. So it would probably make a lot of sense to improve the ISO9660 support to:
* Generate just an ISO9660 root filesystem image by default
* Optionally, make it bootable using either Grub or isolinux
* Optionally, replace the ISO9660 root filesystem by an initramfs
The third one fits better in the genimages approach IMHO. The second
one as well - except that that is not possible, once the iso image is created you can't make it bootable anymore. So yes, I think that would really improve the iso9660 support.
However, I would also be happy with a patch that simply adds an option
to use isolinux instead of grub for the current iso9660 infrastructure.
Regards,
Arnout
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
PATCH 1/1 new package - generate iso with isolinux bootloader
Arnout, Jean,
Quoted 5 lines · Arnout Vandecappelle
Quoted 5 lines
Aaah, interesting, I didn't know that. So it would probably make a lot of sense to improve the ISO9660 support to:
* Generate just an ISO9660 root filesystem image by default
Quoted 8 lines
Quoted 3 lines
* Optionally, make it bootable using either Grub or isolinux
* Optionally, replace the ISO9660 root filesystem by an initramfs
The third one fits better in the genimages approach IMHO. The second
one as well - except that that is not possible, once the iso image is created you can't make it bootable anymore. So yes, I think that would really improve the iso9660 support.
I agree.
Quoted 2 lines
However, I would also be happy with a patch that simply adds an option
to use isolinux instead of grub for the current iso9660 infrastructure.
Yes, this would be interesting regardless of the other possible improvements discussed above.
Bottomline: Jean, if you could add the possibility of using isolinux as part of the existing fs/iso9660 stuff, that would be great.
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 new package - generate iso with isolinux bootloader
Thomas, Arnout,
I sent new patch to include your comment.
I modify iso9660 module (add choice to select grub or isolinux)
I'm not happy with my code.
For each image we use different filename:
rootfs.iso9660 for grub
rootfs.isolinux.iso9660 for isolinux
The code is similar but we have each difference on dependency (and other but not important)
I'm not sure understand optional initramfs (because it's not easy to see if option activated) but I implement same method of old module iso9660 (with grub)
Thanks for your remark (and your time)
Regards,
Jean
Quoted 29 lines
Arnout, Jean,
Quoted 5 lines · Arnout Vandecappelle
Quoted 5 lines
Aaah, interesting, I didn't know that. So it would probably make a lot of sense to improve the ISO9660 support to:
* Generate just an ISO9660 root filesystem image by default
Quoted 7 lines
Quoted 3 lines
* Optionally, make it bootable using either Grub or isolinux
* Optionally, replace the ISO9660 root filesystem by an initramfs
The third one fits better in the genimages approach IMHO. The second
one as well - except that that is not possible, once the iso image is created you can't make it bootable anymore. So yes, I think that would really improve the iso9660 support.I agree.
Quoted 2 lines
However, I would also be happy with a patch that simply adds an option
to use isolinux instead of grub for the current iso9660 infrastructure.Yes, this would be interesting regardless of the other possible improvements discussed above.
Bottomline: Jean, if you could add the possibility of using isolinux as part of the existing fs/iso9660 stuff, that would be great.
Thanks a lot!
Thomas
PATCH v2 1/1 update package isolinux bootloader - simplify code
In reply to jeanFrom: jean <[email protected]>
---
After Arnout's remark, (sorry, I read last month), I updated this module. Goal : use other method to generate iso (and I think it's work fine)
File : fs/isolinux/Config.in
1/ I suppress redundant comment
2/ Suppress menu and use conditional (replace 'depends on' by 'if/endif') 3/ Modify comment
4/ suppress option (keyboard, ...)
5/ replace 8 x space by tabulation
File : fs/isolinux/isolinux.mk
5/ suppress extension 'BR2_'
7/ use variable 'ISOLINUX_DIR'
8/ suppress keyboard option
9/ I can't use command '$(INSTALL) -D' beacause I don't define filenames (I keep old code) 10/ Hide command genisoimage (with option $@)
fs/Config.in | 2 +- fs/isolinux/Config.in | 210 ++++++++++---------------------------------- fs/isolinux/bootmsg.txt | 4 + fs/isolinux/isolinux.cfg | 7 ++ fs/isolinux/isolinux.mk | 219 ++++++---------------------------------------- 5 files changed, 87 insertions(+), 355 deletions(-) create mode 100644 fs/isolinux/bootmsg.txt create mode 100644 fs/isolinux/isolinux.cfg
fs/Config.in +1 -1
@@ -6,11 +6,11 @@ source "fs/cramfs/Config.in" source "fs/ext2/Config.in" source "fs/initramfs/Config.in" source "fs/iso9660/Config.in" +source "fs/isolinux/Config.in" source "fs/jffs2/Config.in" source "fs/romfs/Config.in" source "fs/squashfs/Config.in" source "fs/tar/Config.in" source "fs/ubifs/Config.in" -source "fs/isolinux/Config.in" endmenu
fs/isolinux/Config.in +47 -163
229 lines not on this page · raw message
fs/isolinux/bootmsg.txt new file +4 -0
@@ -0,0 +1,4 @@ +Buildroot isolinux boot + buildroot) launch linux + +
fs/isolinux/isolinux.cfg new file +7 -0
@@ -0,0 +1,7 @@ +display bootmsg.txt +default buildroot +timeout 20 +prompt 1 +LABEL buildroot + KERNEL bzImage +
fs/isolinux/isolinux.mk +28 -191
248 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH v2 1/1 update package isolinux bootloader - simplify code
Dear jean.sorgemoel at laposte.net,
Quoted 4 lines · jean.sorgemoel at laposte.net
From: jean <[email protected]>
Signed-off-by jean <[email protected]>
Please add a commit log with details, explaining what the patch is doing.
Quoted 16 lines
---
After Arnout's remark, (sorry, I read last month), I updated this module. Goal : use other method to generate iso (and I think it's work fine)
File :fs/isolinux/Config.in
1/ I suppress redundant comment
2/ Suppress menu and use conditional (replace 'depends on' by 'if/endif') 3/ Modify comment
4/ suppress option (keyboard, ...)
5/ replace 8 x space by tabulation
File :fs/isolinux/isolinux.mk
5/ suppress extension 'BR2_'
7/ use variable 'ISOLINUX_DIR'
8/ suppress keyboard option
9/ I can't use command '$(INSTALL) -D' beacause I don't define filenames (I keep old code) 10/ Hide command genisoimage (with option $@)
Quoted 8 lines
fs/Config.in | 2 +- fs/isolinux/Config.in | 210 ++++++++++---------------------------------- fs/isolinux/bootmsg.txt | 4 + fs/isolinux/isolinux.cfg | 7 ++ fs/isolinux/isolinux.mk | 219 ++++++---------------------------------------- 5 files changed, 87 insertions(+), 355 deletions(-) create mode 100644 fs/isolinux/bootmsg.txt create mode 100644 fs/isolinux/isolinux.cfg
You did your patch incorrectly: what you're sending here are the differences between your v1 and your v2. What we need is a single patch that contains all of your changes.
You need to squash your v2 changes into the original patch, to make only one patch that adds the isolinux stuff.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 update package isolinux bootloader - simplify code
Quoted 36 lines · Thomas Petazzoni
Dear jean.sorgemoel at laposte.net,
Quoted 4 lines · jean.sorgemoel at laposte.net
From: jean <[email protected]>
Signed-off-by jean <[email protected]>Please add a commit log with details, explaining what the patch is doing.
Quoted 16 lines
---
After Arnout's remark, (sorry, I read last month), I updated this module. Goal : use other method to generate iso (and I think it's work fine)
File :fs/isolinux/Config.in
1/ I suppress redundant comment
2/ Suppress menu and use conditional (replace 'depends on' by 'if/endif') 3/ Modify comment
4/ suppress option (keyboard, ...)
5/ replace 8 x space by tabulation
File :fs/isolinux/isolinux.mk
5/ suppress extension 'BR2_'
7/ use variable 'ISOLINUX_DIR'
8/ suppress keyboard option
9/ I can't use command '$(INSTALL) -D' beacause I don't define filenames (I keep old code) 10/ Hide command genisoimage (with option $@)Quoted 8 lines
fs/Config.in | 2 +- fs/isolinux/Config.in | 210 ++++++++++---------------------------------- fs/isolinux/bootmsg.txt | 4 + fs/isolinux/isolinux.cfg | 7 ++ fs/isolinux/isolinux.mk | 219 ++++++---------------------------------------- 5 files changed, 87 insertions(+), 355 deletions(-)create mode 100644
fs/isolinux/bootmsg.txt
create mode 100644fs/isolinux/isolinux.cfg
Quoted 6 lines
You did your patch incorrectly: what you're sending here are the differences between your v1 and your v2. What we need is a single patch that contains all of your changes.
You need to squash your v2 changes into the original patch, to make only one patch that adds the isolinux stuff.
Also, this version doesn't yet address one of the main comments that
both Thomas and I have: you shouldn't create a new filesystem type, but instead you should modify the existing iso9660 support and add an option to it to use isolinux instead of grub.
Regards,
Arnout
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
PATCH 1/1 new package - generate iso with isolinux bootloader
In reply to jeanDear jean,
fs/isolinux/Config.in line 3
Quoted 9 lines · jean
fs/isolinux/Config.in new file +3
-0@@ -0,0 +1,182 @@ +## Menu ISO image with syslinux +menu "iso image (isolinux bootloader - with initramfs)" +config BR2_TARGET_ROOTFS_ISO_ISOLINUX
I don't agree with the idea that this is introduced as a new filesystem type. I'm sorry, but "isolinux" is not a filesystem type, it's a bootloader.
Instead, if you want to support ISO9660 images that use isolinux as the bootloader instead of Grub (as is currently supported in fs/iso9660), then you should expand fs/iso9660/ to support either Grub or isolinux as the bootloader. Probably with a Config.in "choice" in fs/iso9660/Config.in.
This way, all your improvements such as offering options for Joliet, Rock Ridge support and so on will also benefit to the existing iso9660 support.
Best regards,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v3 1/1 add bootloader option for iso9660 filesystem image (isolinux)
In reply to jeanFrom: jean <[email protected]>
default generate iso with grub bootloader
you can select isolinux bootloader
detail : (module fs/iso9660)
option to select bootloader (grub/isolinux)
file(s) bootloader configuration
option to copy file(s) on iso (only for isolinux)
option to create iso with long filenames (Joliet format) option to create iso with POSIX file system (file mode, uid, gid, ...) define volume label
define parameter input charset
can use initramfs (if activate), also cpio (like initrd)
--- fs/iso9660/Config.in | 81 +++++++++++++++++++++++++++++++++++++++++++++-- fs/iso9660/bootmsg.txt | 4 +++ fs/iso9660/iso9660.mk | 77 +++++++++++++++++++++++++++++++++++++++++--- fs/iso9660/isolinux.cfg | 10 ++++++ 4 files changed, 165 insertions(+), 7 deletions(-) create mode 100644 fs/iso9660/bootmsg.txt create mode 100644 fs/iso9660/isolinux.cfg
fs/iso9660/Config.in +78 -3
@@ -2,17 +2,92 @@ config BR2_TARGET_ROOTFS_ISO9660 bool "iso image" depends on (BR2_i386 || BR2_x86_64) depends on BR2_LINUX_KERNEL + help + Build a bootable iso9660 image + +choice + prompt "Bootloader" + default BR2_TARGET_ROOTFS_ISO9660_GRUB + depends on BR2_TARGET_ROOTFS_ISO9660 + help + Select bootloader for iso + +config BR2_TARGET_ROOTFS_ISO9660_GRUB + bool "grub" select BR2_TARGET_ROOTFS_CPIO select BR2_TARGET_GRUB select BR2_TARGET_GRUB_FS_ISO9660 help - Build a bootable iso9660 image + Use bootloader Grub. -config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + bool "isolinux" +# select BR2_TARGET_ROOTFS_INITRAMFS + select BR2_TARGET_ROOTFS_CPIO + select BR2_TARGET_SYSLINUX + select BR2_TARGET_SYSLINUX_ISOLINUX + help + Use bootloader Isolinux (syslinux). + +endchoice + +if BR2_TARGET_ROOTFS_ISO9660_GRUB + +config BR2_TARGET_ROOTFS_ISO9660_GRUB_BOOT_MENU string "Boot menu.lst file" - depends on BR2_TARGET_ROOTFS_ISO9660 default "fs/iso9660/menu.lst" +endif # BR2_TARGET_ROOTFS_ISO9660_GRUB + +if BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MESSAGE + string "Boot message" + default "fs/iso9660/bootmsg.txt" + help + Filename is contain boot message + +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_CONFIG_FILE + string "Configuration file" + default "fs/iso9660/isolinux.cfg" + help + isolinux configuration file + +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_EXTRA_FILES + string "Extra files copy on image" + default "" + help + list of file (binary or other) copy directly on iso + (separate by space, target directory 'extra') + ex. : + $(SYSLINUX_BUILDDIR)com32/hdt/hdt.c32 + +endif # BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + +config BR2_TARGET_ROOTFS_ISO9660_JOLIET + bool "Create iso with Joliet format" + help + Create iso image with Joliet format (long filenames) + +config BR2_TARGET_ROOTFS_ISO9660_ROCK_RIDGE + bool "Generate Rock Ridge directory information" + help + Generate Rock Ridge directory information, + which includes file mode, uid, gid, etc... + +config BR2_TARGET_ROOTFS_ISO9660_NAME + string "Volume label" + default "buildroot" + help + cdrom name + +config BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET + string "Define parameter input charset" + default "iso8859-15" + help + define parameter input charset + (see program genisoimage : genisoimage -input-charset help) + comment "iso image needs a Linux kernel to be built" depends on BR2_i386 || BR2_x86_64 depends on !BR2_LINUX_KERNEL
fs/iso9660/bootmsg.txt new file +4 -0
@@ -0,0 +1,4 @@ +Buildroot isolinux boot + buildroot) launch linux + harddrive) Hard Drive (first partition) +
fs/iso9660/iso9660.mk +73 -4
100 lines not on this page · raw message
fs/iso9660/isolinux.cfg new file +10 -0
@@ -0,0 +1,10 @@ +display bootmsg.txt +default buildroot +timeout 20 +prompt 1 +LABEL buildroot + KERNEL bzImage + INITRD initrd + +LABEL harddrive + LOCALBOOT 0x80
Signature · 1 line
1.7.10.4
PATCH v3 1/1 add bootloader option for iso9660 filesystem image (isolinux)
Jean,
Thanks a lot for working on this! Below are just a few comments, this is not yet a full review.
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 4
Quoted 8 lines · jean.sorgemoel at laposte.net
fs/iso9660/Config.in +0
-0@@ -2,17 +2,92 @@ config BR2_TARGET_ROOTFS_ISO9660 bool "iso image" depends on (BR2_i386 || BR2_x86_64) depends on BR2_LINUX_KERNEL
You need to keep the "select BR2_TARGET_ROOTFS_CPIO" because it is needed for both the Grub and Isolinux support. Both assume that the root filesystem will be stored in $(BINARIES_DIR)/rootfs.cpio.
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 11
Quoted 7 lines
fs/iso9660/Config.in +7
-0+ help + Build a bootable iso9660 image + +choice + prompt "Bootloader" + default BR2_TARGET_ROOTFS_ISO9660_GRUB + depends on BR2_TARGET_ROOTFS_ISO9660
Replace this dependency by enclosing the entire block of Config.in options in a:
if BR2_TARGET_ROOTFS_ISO9660
...
endif
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 13
Quoted 2 lines
fs/iso9660/Config.in +2
-0+ help + Select bootloader for iso
We would like to have slightly better help texts, such as:
Select the bootloader that should be used for the bootable ISO9660 image.
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 21
Quoted 9 lines
fs/iso9660/Config.in +4
-1+ +config BR2_TARGET_ROOTFS_ISO9660_GRUB + bool "grub" select BR2_TARGET_ROOTFS_CPIO select BR2_TARGET_GRUB select BR2_TARGET_GRUB_FS_ISO9660 help - Build a bootable iso9660 image + Use bootloader Grub.
Use the Grub bootloader for the bootable ISO9660 image.
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 26
Quoted 6 lines
fs/iso9660/Config.in +4
-1-config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + bool "isolinux" +# select BR2_TARGET_ROOTFS_INITRAMFS + select BR2_TARGET_ROOTFS_CPIO
As explained above, not needed, since it should be selected both the Grub and Isolinux support.
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 30
Quoted 4 lines
fs/iso9660/Config.in +4
-0+ select BR2_TARGET_SYSLINUX + select BR2_TARGET_SYSLINUX_ISOLINUX + help + Use bootloader Isolinux (syslinux).
Use the Isolinux bootloader from the syslinux project as the ISO9660 bootable image bootloader.
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 38
Quoted 9 lines
fs/iso9660/Config.in +6
-1+ +endchoice + +if BR2_TARGET_ROOTFS_ISO9660_GRUB + +config BR2_TARGET_ROOTFS_ISO9660_GRUB_BOOT_MENU string "Boot menu.lst file" - depends on BR2_TARGET_ROOTFS_ISO9660 default "fs/iso9660/menu.lst"
There's a little problem here because you're renaming the BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU option to BR2_TARGET_ROOTFS_ISO9660_GRUB_BOOT_MENU. I think this is good for consistency, but then you need to add some code in Config.in.legacy for backward compatibility. See
http://git.buildroot.net/buildroot/tree/Config.in.legacy#n1.
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 48
Quoted 10 lines
fs/iso9660/Config.in +9
-0+endif # BR2_TARGET_ROOTFS_ISO9660_GRUB + +if BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MESSAGE + string "Boot message" + default "fs/iso9660/bootmsg.txt" + help + Filename is contain boot message
We want a slightly better help text here.
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 54
Quoted 6 lines
fs/iso9660/Config.in +6
-0+ +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_CONFIG_FILE + string "Configuration file" + default "fs/iso9660/isolinux.cfg" + help + isolinux configuration file
Here as well.
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 63
Quoted 9 lines
fs/iso9660/Config.in +9
-0+ +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_EXTRA_FILES + string "Extra files copy on image" + default "" + help + list of file (binary or other) copy directly on iso + (separate by space, target directory 'extra') + ex. : + $(SYSLINUX_BUILDDIR)com32/hdt/hdt.c32
Why is this specific to the Isolinux case?
Quoted 16 lines
fs/iso9660/Config.in +16
-0+ +endif # BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + +config BR2_TARGET_ROOTFS_ISO9660_JOLIET + bool "Create iso with Joliet format" + help + Create iso image with Joliet format (long filenames) + +config BR2_TARGET_ROOTFS_ISO9660_ROCK_RIDGE + bool "Generate Rock Ridge directory information" + help + Generate Rock Ridge directory information, + which includes file mode, uid, gid, etc... + +config BR2_TARGET_ROOTFS_ISO9660_NAME + string "Volume label"
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 89
Quoted 10 lines
fs/iso9660/Config.in +10
-0+ default "buildroot" + help + cdrom name + +config BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET + string "Define parameter input charset" + default "iso8859-15" + help + define parameter input charset + (see program genisoimage : genisoimage -input-charset help)
These are definitely interesting, but are not at all related to the addition of Isolinux support. Could you split your patch into a series of two patches: one adding these additional options, one adding the Isolinux support?
Also, for each of these options, we can a slightly better help text. Also, the short description should be more uniform. The option for Joliet is "Create iso with Joliet format", while your second option is "Generate Rock Ridge directory information". This is not very consistent.
Quoted 19 lines
fs/iso9660/Config.in +1
-0+ comment "iso image needs a Linux kernel to be built" depends on BR2_i386 || BR2_x86_64 depends on !BR2_LINUX_KERNELfs/iso9660/bootmsg.txt new file +4
-0@@ -0,0 +1,4 @@ +Buildroot isolinux boot + buildroot) launch linux + harddrive) Hard Drive (first partition) +fs/iso9660/iso9660.mk +0
-0
fs/iso9660/iso9660.mk line 14
Quoted 8 lines
fs/iso9660/iso9660.mk +4
-1@@ -8,8 +8,16 @@ ################################################################################ ISO9660_TARGET_DIR = $(BUILD_DIR)/iso9660 -ISO9660_BOOT_MENU := $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU)) +ISO9660_BOOT_MENU := $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_GRUB_BOOT_MENU)) +ISO9660_TARGET_DIR_EXTRA = $(ISO9660_TARGET_DIR)/extra +QUOTE = " +ISO9660_LIST_EXTRA = $(subst $(QUOTE),,$(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_EXTRA_FILES))
We already have the qstrip function for that, so:
ISO9660_LIST_EXTRA = $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_EXTRA_FILES))
fs/iso9660/iso9660.mk line 18
Quoted 4 lines
fs/iso9660/iso9660.mk +3
-0+define copy_files_isolinux_image_extra + cp $(1) $(ISO9660_TARGET_DIR_EXTRA); +endef
Why is this a separate function?
Quoted 56 lines
fs/iso9660/iso9660.mk +40
-2+ +# Build ISO9660 with bootloader Grub $(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio grub @$(call MESSAGE,"Generating root filesystem image rootfs.iso9660") mkdir -p $(ISO9660_TARGET_DIR)@@ -31,8 +39,15 @@ endif rm -f $(FAKEROOT_SCRIPT) echo "chown -R 0:0 $(ISO9660_TARGET_DIR)" >> $(FAKEROOT_SCRIPT) # Use fakeroot so mkisofs believes the previous fakery - echo "$(HOST_DIR)/usr/bin/genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot " \ - "-boot-load-size 4 -boot-info-table -o $@ $(ISO9660_TARGET_DIR)" \ + echo "$(HOST_DIR)/usr/bin/genisoimage " \ + "$(GENISOIMAGE_OPTION) " \ + "-b boot/grub/stage2_eltorito " \ + "-no-emul-boot " \ + "-boot-load-size 4 " \ + "-boot-info-table " \ + "-input-charset $(BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET) " \ + "-V $(BR2_TARGET_ROOTFS_ISO9660_NAME) " \ + "-o $@ $(ISO9660_TARGET_DIR)" \ >> $(FAKEROOT_SCRIPT) chmod a+x $(FAKEROOT_SCRIPT) $(HOST_DIR)/usr/bin/fakeroot -- $(FAKEROOT_SCRIPT)@@ -41,11 +56,65 @@ endif rootfs-iso9660: $(BINARIES_DIR)/rootfs.iso9660 +# Build ISO9660 with bootloader ISOLINUX +$(BINARIES_DIR)/rootfs.isolinux.iso9660: host-cdrkit host-fakeroot linux syslinux rootfs-cpio + @$(call MESSAGE,"Generating root filesystem image rootfs.isolinux.iso9660") + @mkdir -p $(ISO9660_TARGET_DIR) + @mkdir -p $(ISO9660_TARGET_DIR_EXTRA) + + @cp $(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MESSAGE) $(ISO9660_TARGET_DIR) + + @cp $(BINARIES_DIR)/isolinux.bin $(ISO9660_TARGET_DIR) + @cp $(LINUX_IMAGE_PATH) $(ISO9660_TARGET_DIR) + @cp $(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_CONFIG_FILE) $(ISO9660_TARGET_DIR)/isolinux.cfg + +ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) + @$(SED) '/INITRD/d' $(ISO9660_TARGET_DIR)/isolinux.cfg +else + @cp $(BINARIES_DIR)/rootfs.cpio$(ROOTFS_CPIO_COMPRESS_EXT) $(ISO9660_TARGET_DIR)/initrd +endif + + @$(foreach file, $(ISO9660_LIST_EXTRA), $(call copy_files_isolinux_image_extra, $(file) ) ) + + # 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) + # Use fakeroot so mkisofs believes the previous fakery + echo "$(HOST_DIR)/usr/bin/genisoimage " \ + "$(GENISOIMAGE_OPTION) " \ + "-b isolinux.bin " \ + "-no-emul-boot " \ + "-c boot.cat " \
fs/iso9660/iso9660.mk endif · line 97
Quoted 10 lines
fs/iso9660/iso9660.mk +10
-0+ "-boot-load-size 4 " \ + "-boot-info-table " \ + "-input-charset $(BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET) " \ + "-V $(BR2_TARGET_ROOTFS_ISO9660_NAME) " \ + "-o $@ $(ISO9660_TARGET_DIR)" \ + >> $(FAKEROOT_SCRIPT) + chmod a+x $(FAKEROOT_SCRIPT) + $(HOST_DIR)/usr/bin/fakeroot -- $(FAKEROOT_SCRIPT) + - at rm -f $(FAKEROOT_SCRIPT) + - at rm -rf $(ISO9660_TARGET_DIR)
We really don't want to duplicate this between the Grub case and the Isolinux case. They should be common, with just a variable that defines the value to be passed to genisoimage -b option.
Quoted 6 lines
fs/iso9660/iso9660.mk +3
-0+ +rootfs-isolinux-iso9660: $(BINARIES_DIR)/rootfs.isolinux.iso9660 + ################################################################################ # # Toplevel Makefile options
fs/iso9660/iso9660.mk endif · line 112
Quoted 10 lines
fs/iso9660/iso9660.mk +5
-1# ################################################################################ -ifeq ($(BR2_TARGET_ROOTFS_ISO9660),y) +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y) TARGETS += rootfs-iso9660 endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX),y) +TARGETS += rootfs-isolinux-iso9660 +endif
As explained above, there should be only one target for both.
fs/iso9660/iso9660.mk endif · line 120
Quoted 8 lines
fs/iso9660/iso9660.mk +8
-0+ +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_JOLIET),y) +GENISOIMAGE_OPTION += -J +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_ROCK_RIDGE),y) +GENISOIMAGE_OPTION += -R +endif
These should be *before* the rootfs-iso9660 target. Also, please name the variable GENISOIMAGE_OPTS.
Quoted 6 lines
fs/iso9660/isolinux.cfg new file +0
-0
fs/iso9660/isolinux.cfg line 10
Quoted 10 lines
fs/iso9660/isolinux.cfg new file +10
-0@@ -0,0 +1,10 @@ +display bootmsg.txt +default buildroot +timeout 20 +prompt 1 +LABEL buildroot + KERNEL bzImage + INITRD initrd + +LABEL harddrive + LOCALBOOT 0x80
Again, thanks a lot for this work!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v4 1/2 add option for iso9660 filesystem image
In reply to jeanFrom: jean <[email protected]>
detail : (module fs/iso9660)
option to copy file(s) on iso
option to create iso with long filenames (Joliet format) option to create iso with POSIX file system (file mode, uid, gid, ...) define volume label
define parameter input charset (for genisoimage)
--- fs/iso9660/Config.in | 46 ++++++++++++++++++++++++++++++++++++- fs/iso9660/iso9660.mk | 61 +++++++++++++++++++++++++++++++++++++------------ 2 files changed, 92 insertions(+), 15 deletions(-)
fs/iso9660/Config.in +45 -1
@@ -8,10 +8,54 @@ config BR2_TARGET_ROOTFS_ISO9660 help Build a bootable iso9660 image +if BR2_TARGET_ROOTFS_ISO9660 + config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU string "Boot menu.lst file" - depends on BR2_TARGET_ROOTFS_ISO9660 default "fs/iso9660/menu.lst" + help + Grub configuration + Define menu, commands and options for grub + +config BR2_TARGET_ROOTFS_ISO9660_EXTRA_FILES + string "Extra files copy on image" + default "" + help + list of file (binary or other) copy directly on iso + (separate by space, target directory 'extra') + ex. : + $(SYSLINUX_BUILDDIR)com32/hdt/hdt.c32 + $(SYSLINUX_BUILDDIR)com32/modules/reboot.c32 + +config BR2_TARGET_ROOTFS_ISO9660_JOLIET + bool "Create iso with Joliet format (long filenames)" + help + Generate iso image with Joliet directory records. + Use Unicode and each path component can be up 64 + Unicode characters long. + +config BR2_TARGET_ROOTFS_ISO9660_ROCK_RIDGE + bool "Create iso with Rock Ridge extensions (POSIX Filesystem)" + default y + help + Generate iso image with Rock Ridge directory information, + POSIX file system (file mode, uid, gid, ...) + +config BR2_TARGET_ROOTFS_ISO9660_NAME + string "Volume label" + default "buildroot" + help + cdrom name + +config BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET + string "Define parameter input charset (genisoimage)" + default "iso8859-15" + help + Defines the local character set you are using on your + machine. + (see program genisoimage : genisoimage -input-charset help) + +endif # BR2_TARGET_ROOTFS_ISO9660 comment "iso image needs a Linux kernel to be built" depends on BR2_i386 || BR2_x86_64
fs/iso9660/iso9660.mk +47 -14
82 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH v4 2/2 add bootloader option for iso9660 filesystem image (isolinux)
From: jean <[email protected]>
default generate iso with grub bootloader
you can select isolinux bootloader
detail : (module fs/iso9660)
option to select bootloader (grub/isolinux)
can use initramfs (if activate), also cpio (like initrd)
--- fs/iso9660/Config.in | 47 ++++++++++++++++++++++++++++++++++++++++++++--- fs/iso9660/bootmsg.txt | 4 ++++ fs/iso9660/iso9660.mk | 26 ++++++++++++++++++++++++-- fs/iso9660/isolinux.cfg | 10 ++++++++++ 4 files changed, 82 insertions(+), 5 deletions(-) create mode 100644 fs/iso9660/bootmsg.txt create mode 100644 fs/iso9660/isolinux.cfg
fs/iso9660/Config.in +44 -3
@@ -1,14 +1,37 @@ config BR2_TARGET_ROOTFS_ISO9660 bool "iso image" + select BR2_TARGET_ROOTFS_CPIO depends on (BR2_i386 || BR2_x86_64) depends on BR2_LINUX_KERNEL - select BR2_TARGET_ROOTFS_CPIO - select BR2_TARGET_GRUB - select BR2_TARGET_GRUB_FS_ISO9660 help Build a bootable iso9660 image if BR2_TARGET_ROOTFS_ISO9660 +choice + prompt "Bootloader" + default BR2_TARGET_ROOTFS_ISO9660_GRUB + help + Select the bootloader that should be used for the bootable + ISO9660 image. + +config BR2_TARGET_ROOTFS_ISO9660_GRUB + bool "grub" + select BR2_TARGET_GRUB + select BR2_TARGET_GRUB_FS_ISO9660 + help + Use the Grub bootloader for the bootable ISO9660 image. + +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + bool "isolinux" + select BR2_TARGET_SYSLINUX + select BR2_TARGET_SYSLINUX_ISOLINUX + help + Use the Isolinux bootloader from the syslinux project as the + ISO9660 bootable image bootloader. + +endchoice + +if BR2_TARGET_ROOTFS_ISO9660_GRUB config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU string "Boot menu.lst file"
@@ -17,6 +40,24 @@ config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU Grub configuration Define menu, commands and options for grub +endif # BR2_TARGET_ROOTFS_ISO9660_GRUB + +if BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MESSAGE + string "Boot message" + default "fs/iso9660/bootmsg.txt" + help + Displays this filename on the screen at boot time + +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_CONFIG_FILE + string "Configuration file" + default "fs/iso9660/isolinux.cfg" + help + This file define all options to start isolinux + +endif # BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + config BR2_TARGET_ROOTFS_ISO9660_EXTRA_FILES string "Extra files copy on image" default ""
fs/iso9660/bootmsg.txt new file +4 -0
@@ -0,0 +1,4 @@ +Buildroot isolinux boot + buildroot) launch linux + harddrive) Hard Drive (first partition) +
fs/iso9660/iso9660.mk +24 -2
@@ -12,14 +12,29 @@ ISO9660_BOOT_MENU := $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU)) ISO9660_TARGET_DIR_EXTRA = $(ISO9660_TARGET_DIR)/extra ISO9660_LIST_EXTRA = $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_EXTRA_FILES)) +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y) +BOOTLOADER_PACKAGE = grub BOOTLOADER_BIN = $(GRUB_DIR)/stage2/stage2_eltorito BOOTLOADER_DIR = $(ISO9660_TARGET_DIR)/boot/grub/ BOOTLOADER_SRC_CFG = $(ISO9660_BOOT_MENU) BOOTLOADER_DST_CFG = $(ISO9660_TARGET_DIR)/boot/grub/menu.lst KERNEL_DST = $(ISO9660_TARGET_DIR)/kernel ELTORITO_BOOT = boot/grub/stage2_eltorito +INITRD_SED_CMD = '/initrd/d' +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX),y) +BOOTLOADER_PACKAGE = syslinux +BOOTLOADER_BIN = $(BINARIES_DIR)/isolinux.bin +BOOTLOADER_DIR = $(ISO9660_TARGET_DIR) +BOOTLOADER_SRC_CFG = $(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_CONFIG_FILE) +BOOTLOADER_DST_CFG = $(ISO9660_TARGET_DIR)/isolinux.cfg +KERNEL_DST = $(ISO9660_TARGET_DIR)/bzImage +ELTORITO_BOOT = isolinux.bin +INITRD_SED_CMD = '/INITRD/d' +endif -$(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio grub +$(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio $(BOOTLOADER_PACKAGE) @$(call MESSAGE,"Generating root filesystem image rootfs.iso9660") @mkdir -p $(ISO9660_TARGET_DIR) @mkdir -p $(BOOTLOADER_DIR)
@@ -29,14 +44,21 @@ $(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio grub @cp $(BOOTLOADER_SRC_CFG) $(BOOTLOADER_DST_CFG) @cp $(LINUX_IMAGE_PATH) $(KERNEL_DST) +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y) ifeq ($(BR2_TARGET_GRUB_SPLASH),) @$(SED) '/^splashimage/d' $(BOOTLOADER_DST_CFG) else @cp boot/grub/splash.xpm.gz $(ISO9660_TARGET_DIR)/ endif # BR2_TARGET_GRUB_SPLASH +endif # BR2_TARGET_ROOTFS_ISO9660_GRUB + +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX),y) + @cp $(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MESSAGE) \ + $(ISO9660_TARGET_DIR) +endif ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) - @$(SED) '/initrd/d' $(BOOTLOADER_DST_CFG) + @$(SED) $(INITRD_SED_CMD) $(BOOTLOADER_DST_CFG) else @cp $(BINARIES_DIR)/rootfs.cpio$(ROOTFS_CPIO_COMPRESS_EXT) \ $(ISO9660_TARGET_DIR)/initrd
fs/iso9660/isolinux.cfg new file +10 -0
@@ -0,0 +1,10 @@ +display bootmsg.txt +default buildroot +timeout 20 +prompt 1 +LABEL buildroot + KERNEL bzImage + INITRD initrd + +LABEL harddrive + LOCALBOOT 0x80
Signature · 1 line
1.7.10.4
PATCH v4 2/2 add bootloader option for iso9660 filesystem image (isolinux)
Hi Jean,
Quoted 32 lines · jean.sorgemoel at laposte.net
From: jean <[email protected]>
default generate iso with grub bootloader
you can select isolinux bootloaderdetail : (module fs/iso9660)
option to select bootloader (grub/isolinux)
can use initramfs (if activate), also cpio (like initrd)Signed-off-by jean <[email protected]>--- fs/iso9660/Config.in | 47 ++++++++++++++++++++++++++++++++++++++++++++--- fs/iso9660/bootmsg.txt | 4 ++++ fs/iso9660/iso9660.mk | 26 ++++++++++++++++++++++++-- fs/iso9660/isolinux.cfg | 10 ++++++++++ 4 files changed, 82 insertions(+), 5 deletions(-) create mode 100644 fs/iso9660/bootmsg.txt create mode 100644 fs/iso9660/isolinux.cfgfs/iso9660/Config.in +1
-3@@ -1,14 +1,37 @@ config BR2_TARGET_ROOTFS_ISO9660 bool "iso image" + select BR2_TARGET_ROOTFS_CPIO depends on (BR2_i386 || BR2_x86_64) depends on BR2_LINUX_KERNEL - select BR2_TARGET_ROOTFS_CPIO - select BR2_TARGET_GRUB - select BR2_TARGET_GRUB_FS_ISO9660
fs/iso9660/Config.in line 15
Quoted 10 lines
fs/iso9660/Config.in +6
-0help Build a bootable iso9660 image if BR2_TARGET_ROOTFS_ISO9660 +choice + prompt "Bootloader" + default BR2_TARGET_ROOTFS_ISO9660_GRUB + help + Select the bootloader that should be used for the bootable + ISO9660 image.
Actually, Kconfig doesn't show help text associated with a choice. So
this is pointless.
Quoted 25 lines
fs/iso9660/Config.in +19
-0+ +config BR2_TARGET_ROOTFS_ISO9660_GRUB + bool "grub" + select BR2_TARGET_GRUB + select BR2_TARGET_GRUB_FS_ISO9660 + help + Use the Grub bootloader for the bootable ISO9660 image. + +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + bool "isolinux" + select BR2_TARGET_SYSLINUX + select BR2_TARGET_SYSLINUX_ISOLINUX + help + Use the Isolinux bootloader from the syslinux project as the + ISO9660 bootable image bootloader. + +endchoice + +if BR2_TARGET_ROOTFS_ISO9660_GRUB config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU string "Boot menu.lst file"@@ -17,6 +40,24 @@ config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU Grub configuration Define menu, commands and options for grub
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU · line 51
Quoted 10 lines
fs/iso9660/Config.in +9
-0+endif # BR2_TARGET_ROOTFS_ISO9660_GRUB + +if BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MESSAGE + string "Boot message" + default "fs/iso9660/bootmsg.txt" + help + Displays this filename on the screen at boot time
It's the contents of that file that is displayed, not the filename :-)
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU · line 57
Quoted 6 lines
fs/iso9660/Config.in +6
-0+ +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_CONFIG_FILE + string "Configuration file" + default "fs/iso9660/isolinux.cfg" + help + This file define all options to start isolinux
defines
Quoted 12 lines
fs/iso9660/Config.in +3
-0+ +endif # BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + config BR2_TARGET_ROOTFS_ISO9660_EXTRA_FILES string "Extra files copy on image" default ""fs/iso9660/bootmsg.txt new file +0
-0
fs/iso9660/bootmsg.txt line 2
Quoted 2 lines
fs/iso9660/bootmsg.txt new file +2
-0@@ -0,0 +1,4 @@ +Buildroot isolinux boot + buildroot) launch linux
Launch linux from the CD-ROM
Quoted 9 lines
fs/iso9660/bootmsg.txt new file +2
-0+ harddrive) Hard Drive (first partition) +fs/iso9660/iso9660.mk +0
-0@@ -12,14 +12,29 @@ ISO9660_BOOT_MENU := $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU)) ISO9660_TARGET_DIR_EXTRA = $(ISO9660_TARGET_DIR)/extra ISO9660_LIST_EXTRA = $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_EXTRA_FILES))
fs/iso9660/iso9660.mk ISO9660_BOOT_MENU := $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU)) · line 23
Quoted 10 lines
fs/iso9660/iso9660.mk +3
-0+ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y) +BOOTLOADER_PACKAGE = grub BOOTLOADER_BIN = $(GRUB_DIR)/stage2/stage2_eltorito BOOTLOADER_DIR = $(ISO9660_TARGET_DIR)/boot/grub/ BOOTLOADER_SRC_CFG = $(ISO9660_BOOT_MENU) BOOTLOADER_DST_CFG = $(ISO9660_TARGET_DIR)/boot/grub/menu.lst KERNEL_DST = $(ISO9660_TARGET_DIR)/kernel ELTORITO_BOOT = boot/grub/stage2_eltorito +INITRD_SED_CMD = '/initrd/d'
You can avoid this additional variable by using '/initrd\|INITRD/d'
fs/iso9660/iso9660.mk ISO9660_BOOT_MENU := $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU)) · line 32
Quoted 9 lines
fs/iso9660/iso9660.mk +9
-0+endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX),y) +BOOTLOADER_PACKAGE = syslinux +BOOTLOADER_BIN = $(BINARIES_DIR)/isolinux.bin +BOOTLOADER_DIR = $(ISO9660_TARGET_DIR) +BOOTLOADER_SRC_CFG = $(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_CONFIG_FILE) +BOOTLOADER_DST_CFG = $(ISO9660_TARGET_DIR)/isolinux.cfg +KERNEL_DST = $(ISO9660_TARGET_DIR)/bzImage
I see no reason to call it 'bzImage' for one bootloader and 'kernel' for
another. Probably both of them should be called bzImage. Even better would be to use $(LINUX_IMAGE_NAME) but that requires an addition sed of the config file, and is pretty pointless since on x86 the only other option is vmlinux which AFAIK doesn't boot from either bootloader.
Quoted 19 lines
fs/iso9660/iso9660.mk +5
-1+ELTORITO_BOOT = isolinux.bin +INITRD_SED_CMD = '/INITRD/d' +endif -$(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio grub +$(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio $(BOOTLOADER_PACKAGE) @$(call MESSAGE,"Generating root filesystem image rootfs.iso9660") @mkdir -p $(ISO9660_TARGET_DIR) @mkdir -p $(BOOTLOADER_DIR)@@ -29,14 +44,21 @@ $(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio grub @cp $(BOOTLOADER_SRC_CFG) $(BOOTLOADER_DST_CFG) @cp $(LINUX_IMAGE_PATH) $(KERNEL_DST) +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y) ifeq ($(BR2_TARGET_GRUB_SPLASH),) @$(SED) '/^splashimage/d' $(BOOTLOADER_DST_CFG) else @cp boot/grub/splash.xpm.gz $(ISO9660_TARGET_DIR)/ endif # BR2_TARGET_GRUB_SPLASH
fs/iso9660/iso9660.mk $(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio grub · line 61
Quoted 10 lines
fs/iso9660/iso9660.mk +7
-1+endif # BR2_TARGET_ROOTFS_ISO9660_GRUB + +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX),y) + @cp $(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MESSAGE) \ + $(ISO9660_TARGET_DIR) +endif ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) - @$(SED) '/initrd/d' $(BOOTLOADER_DST_CFG) + @$(SED) $(INITRD_SED_CMD) $(BOOTLOADER_DST_CFG)
As I mentioned, here you can use '/initrd\|INITRD/d'
fs/iso9660/isolinux.cfg line 1
Quoted 10 lines
fs/iso9660/iso9660.mk +0
-0else @cp $(BINARIES_DIR)/rootfs.cpio$(ROOTFS_CPIO_COMPRESS_EXT) \ $(ISO9660_TARGET_DIR)/initrdfs/iso9660/isolinux.cfg new file +1
-0@@ -0,0 +1,10 @@ +display bootmsg.txt
The bootmsg.txt is actually optional, right? Would it be possible to sed
it out when the option is set to empty?
fs/iso9660/isolinux.cfg line 3
Quoted 2 lines
fs/iso9660/isolinux.cfg new file +2
-0+default buildroot +timeout 20
For grub, we have a timeout of 10 seconds. I'd keep the same timeout.
Regards,
Arnout
Quoted 8 lines
fs/iso9660/isolinux.cfg new file +7
-0+prompt 1 +LABEL buildroot + KERNEL bzImage + INITRD initrd + +LABEL harddrive + LOCALBOOT 0x80
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
PATCH v4 1/2 add option for iso9660 filesystem image
In reply to jean.sorgemoel at laposte.netHi Jean,
Thanks for your update! Sorry for the late response, the 2014.02 release
is keeping us busy...
Your patch looks pretty good, even though I still have many (rather
small) comments.
Quoted 10 lines · jean.sorgemoel at laposte.net
From: jean <[email protected]>
detail : (module fs/iso9660)
option to copy file(s) on iso
option to create iso with long filenames (Joliet format) option to create iso with POSIX file system (file mode, uid, gid, ...) define volume label
define parameter input charset (for genisoimage)Signed-off-by jean <[email protected]>
Please use your full name for Signed-off-by. Remember that Signed-off-by
is a legal statement, so using anything other than your full real name is pointless.
In follow-up patches, please include a patch changelog, separated by ---
from the commit message itself. Alternatively, you can include the changelog in a cover letter.
Quoted 22 lines
--- fs/iso9660/Config.in | 46 ++++++++++++++++++++++++++++++++++++- fs/iso9660/iso9660.mk | 61 +++++++++++++++++++++++++++++++++++++------------ 2 files changed, 92 insertions(+), 15 deletions(-)fs/iso9660/Config.in +5
-1@@ -8,10 +8,54 @@ config BR2_TARGET_ROOTFS_ISO9660 help Build a bootable iso9660 image +if BR2_TARGET_ROOTFS_ISO9660 + config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU string "Boot menu.lst file" - depends on BR2_TARGET_ROOTFS_ISO9660 default "fs/iso9660/menu.lst" + help + Grub configuration + Define menu, commands and options for grub
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 28
Quoted 10 lines
fs/iso9660/Config.in +10
-0+ +config BR2_TARGET_ROOTFS_ISO9660_EXTRA_FILES + string "Extra files copy on image" + default "" + help + list of file (binary or other) copy directly on iso + (separate by space, target directory 'extra') + ex. : + $(SYSLINUX_BUILDDIR)com32/hdt/hdt.c32 + $(SYSLINUX_BUILDDIR)com32/modules/reboot.c32
Why limit this to files only, and why would you put it in the 'extra'
directory? Better to use the approach of BR2_ROOTFS_OVERLAY. You can also reuse its help text:
"""
Specify a list of directories that are copied over the iso9660 filesystem, next to the kernel and initrd images.
They are copied as-is into the iso9660 filesystem, excluding files ending with ~ and .git, .svn and .hg directories.
"""
The prompt would then be "iso9660 filesystem overlay directories".
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 38
Quoted 10 lines
fs/iso9660/Config.in +10
-0+ +config BR2_TARGET_ROOTFS_ISO9660_JOLIET + bool "Create iso with Joliet format (long filenames)" + help + Generate iso image with Joliet directory records. + Use Unicode and each path component can be up 64 + Unicode characters long. + +config BR2_TARGET_ROOTFS_ISO9660_ROCK_RIDGE + bool "Create iso with Rock Ridge extensions (POSIX Filesystem)"
Filesystem -> filesystem
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 39
Quoted 1 line
fs/iso9660/Config.in +1
-0+ default y
Why default this to y? It was not y before and it's not needed for the
default kernel+initrd layout.
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 42
Quoted 3 lines
fs/iso9660/Config.in +3
-0+ help + Generate iso image with Rock Ridge directory information, + POSIX file system (file mode, uid, gid, ...)
... directory information, which makes it a POSIX filesystem...
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 46
Quoted 4 lines
fs/iso9660/Config.in +4
-0+ +config BR2_TARGET_ROOTFS_ISO9660_NAME + string "Volume label" + default "buildroot"
I think this should default to empty, like it was before.
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 56
Quoted 10 lines
fs/iso9660/Config.in +10
-0+ help + cdrom name + +config BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET + string "Define parameter input charset (genisoimage)" + default "iso8859-15" + help + Defines the local character set you are using on your + machine. + (see program genisoimage : genisoimage -input-charset help)
This description and its default don't seem appropriate to me.
string "Input filename character encoding"
default "utf8"
help
The character encoding with which the names of the files that will be copied into the iso9660 filesystem are encoded. For the RockRidge directory, the same encoding will be used. For the Joliet directory, it will be converted to UTF-16.
However, I wonder how useful this option is. Why would you put files
with non-ASCII characters in the name into the iso9660 filesystem? Also, does this make sense at all unless either RockRidge or Joliet is used?
fs/iso9660/iso9660.mk line 11
Quoted 13 lines
fs/iso9660/Config.in +2
-0+ +endif # BR2_TARGET_ROOTFS_ISO9660 comment "iso image needs a Linux kernel to be built" depends on BR2_i386 || BR2_x86_64fs/iso9660/iso9660.mk +0
-0@@ -9,32 +9,57 @@ ISO9660_TARGET_DIR = $(BUILD_DIR)/iso9660 ISO9660_BOOT_MENU := $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU))
Since you define BOOTLOADER_SRC_CFG below, this variable has become
redundant.
fs/iso9660/iso9660.mk line 12
Quoted 1 line
fs/iso9660/iso9660.mk +1
-0+ISO9660_TARGET_DIR_EXTRA = $(ISO9660_TARGET_DIR)/extra
As I said, I don't see a reason to keep the extra/
fs/iso9660/iso9660.mk line 20
Quoted 8 lines
fs/iso9660/iso9660.mk +8
-0+ISO9660_LIST_EXTRA = $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_EXTRA_FILES)) + +BOOTLOADER_BIN = $(GRUB_DIR)/stage2/stage2_eltorito +BOOTLOADER_DIR = $(ISO9660_TARGET_DIR)/boot/grub/ +BOOTLOADER_SRC_CFG = $(ISO9660_BOOT_MENU) +BOOTLOADER_DST_CFG = $(ISO9660_TARGET_DIR)/boot/grub/menu.lst +KERNEL_DST = $(ISO9660_TARGET_DIR)/kernel +ELTORITO_BOOT = boot/grub/stage2_eltorito
All these variables should get an ISO9660_ prefix.
Quoted 27 lines
fs/iso9660/iso9660.mk +12
-9$(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio grub @$(call MESSAGE,"Generating root filesystem image rootfs.iso9660") - mkdir -p $(ISO9660_TARGET_DIR) - mkdir -p $(ISO9660_TARGET_DIR)/boot/grub - cp $(GRUB_DIR)/stage2/stage2_eltorito $(ISO9660_TARGET_DIR)/boot/grub/ - cp $(ISO9660_BOOT_MENU) $(ISO9660_TARGET_DIR)/boot/grub/menu.lst + @mkdir -p $(ISO9660_TARGET_DIR) + @mkdir -p $(BOOTLOADER_DIR) + @mkdir -p $(ISO9660_TARGET_DIR_EXTRA) + + @cp $(BOOTLOADER_BIN) $(BOOTLOADER_DIR) + @cp $(BOOTLOADER_SRC_CFG) $(BOOTLOADER_DST_CFG) + @cp $(LINUX_IMAGE_PATH) $(KERNEL_DST) + ifeq ($(BR2_TARGET_GRUB_SPLASH),) - $(SED) '/^splashimage/d' $(ISO9660_TARGET_DIR)/boot/grub/menu.lst + @$(SED) '/^splashimage/d' $(BOOTLOADER_DST_CFG) else - cp boot/grub/splash.xpm.gz $(ISO9660_TARGET_DIR)/ -endif - cp $(LINUX_IMAGE_PATH) $(ISO9660_TARGET_DIR)/kernel + @cp boot/grub/splash.xpm.gz $(ISO9660_TARGET_DIR)/ +endif # BR2_TARGET_GRUB_SPLASH + ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) - $(SED) '/initrd/d' $(ISO9660_TARGET_DIR)/boot/grub/menu.lst
fs/iso9660/iso9660.mk line 46
Quoted 10 lines
fs/iso9660/iso9660.mk +7
-2+ @$(SED) '/initrd/d' $(BOOTLOADER_DST_CFG) else - cp $(BINARIES_DIR)/rootfs.cpio$(ROOTFS_CPIO_COMPRESS_EXT) $(ISO9660_TARGET_DIR)/initrd -endif + @cp $(BINARIES_DIR)/rootfs.cpio$(ROOTFS_CPIO_COMPRESS_EXT) \ + $(ISO9660_TARGET_DIR)/initrd +endif # BR2_TARGET_ROOTFS_INITRAMFS + + @$(foreach file, $(ISO9660_LIST_EXTRA), \ + cp $(file) $(ISO9660_TARGET_DIR_EXTRA)/ ; )
This should use rsync:
@$(foreach d, $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_EXTRA)),\
$(call MESSAGE,"Copying overlay $(d)"); \
rsync -a --ignore-times $(RSYNC_VCS_EXCLUSIONS) \
--chmod=Du+w --exclude .empty --exclude '*~' \
$(d)/ $(ISO9660_TARGET_DIR)$(sep))Quoted 5 lines
fs/iso9660/iso9660.mk +1
-0+ # 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) # Use fakeroot so mkisofs believes the previous fakery
fs/iso9660/iso9660.mk line 59
Quoted 10 lines
fs/iso9660/iso9660.mk +8
-2- echo "$(HOST_DIR)/usr/bin/genisoimage -R -b boot/grub/stage2_eltorito -no-emul-boot " \ - "-boot-load-size 4 -boot-info-table -o $@ $(ISO9660_TARGET_DIR)" \ + echo "$(HOST_DIR)/usr/bin/genisoimage " \ + "$(GENISOIMAGE_OPTS) " \ + "-b $(ELTORITO_BOOT) " \ + "-no-emul-boot " \ + "-boot-load-size 4 " \ + "-boot-info-table " \ + "-input-charset $(BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET) " \ + "-V $(BR2_TARGET_ROOTFS_ISO9660_NAME) " \
You need to qstrip the variable.
Regards,
Arnout
Quoted 20 lines
fs/iso9660/iso9660.mk +10
-1+ "-o $@ $(ISO9660_TARGET_DIR)" \ >> $(FAKEROOT_SCRIPT) - chmod a+x $(FAKEROOT_SCRIPT) + @chmod a+x $(FAKEROOT_SCRIPT) $(HOST_DIR)/usr/bin/fakeroot -- $(FAKEROOT_SCRIPT) - at rm -f $(FAKEROOT_SCRIPT) - at rm -rf $(ISO9660_TARGET_DIR)@@ -49,3 +74,11 @@ rootfs-iso9660: $(BINARIES_DIR)/rootfs.iso9660 ifeq ($(BR2_TARGET_ROOTFS_ISO9660),y) TARGETS += rootfs-iso9660 endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_JOLIET),y) +GENISOIMAGE_OPTS += -J +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_ROCK_RIDGE),y) +GENISOIMAGE_OPTS += -R +endif
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
PATCH v5 1/2 modify bootloader option for iso9660 filesystem image (grub)
In reply to jeanFrom: Jerome Sagnole <[email protected]>
Changelog :
patch v1 : new branch to generate iso with bootloader isolinux
patch v2 : add bootloader option for iso9660 filesystem image (isolinux)
addon to include comment Arnout Vandecappelle
simplify code
1/ I suppress redundant comment
2/ Suppress menu and use conditional (replace 'depends on' by 'if/end$ 3/ Modify comment
4/ suppress option (keyboard, ...)
5/ replace 8 x space by tabulation
File : fs/isolinux/isolinux.mk
6/ suppress extension 'BR2_'
7/ use variable 'ISOLINUX_DIR'
8/ suppress keyboard option
9/ I can't use command '$(INSTALL) -D' beacause I don't define filena$
10/ Hide command genisoimage (with option $@)
patch v3 : add bootloader option for iso9660 filesystem image (isolinux)
addon to include comment Thomas Petazzoni & Arnout Vandecappelle modify comment
default generate iso with grub bootloader
you can select isolinux bootloader
detail : (module fs/iso9660)
option to select bootloader (grub/isolinux)
file(s) bootloader configuration
option to copy file(s) on iso (only for isolinux)
option to create iso with long filenames (Joliet format) option to create iso with POSIX file system (file mode, uid, gid, ...) define volume label
define parameter input charset
can use initramfs (if activate), also cpio (like initrd)
patch v4 : add bootloader option for iso9660 filesystem image (isolinux)
addon to include comment Arnout Vandecappelle & Thomas Petazzoni add choise to select bootloader in iso9660 menu modify comment
seperate code in two patch
1st patch : update iso9660 with grub
2nd patch : add new bootloader isolinux
patch v5 part 1: modify bootloader option for iso9660 filesystem image (grub)
addon to include comment Arnout Vandecappelle & Martin Bark modify option to include files and directories in iso image
suppress option BR2_TARGET_ROOTFS_ISOLINUX_EXTRA_FILES add option BR2_TARGET_ROOTFS_ISO9660_OVERLAY
modify code to include this new option
modify comment
modify signed-off-by (use real name)
keep default option for BR2_TARGET_ROOTFS_ISO9660_ROCK_RIDGE
in old code, it defined by default (keep for compatibility)
modify default option for BR2_TARGET_ROOTFS_ISO9660_NAME modify default option for BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET modify variable name to add prefix 'ISO9660_'
"qstrip" each variable
BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET BR2_TARGET_ROOTFS_ISO9660_NAME
modify command INITRD_SED_CMD
modify kernel launch for this iso
use LINUX_IMAGE_NAME
add command sed to replace __LINUX_IMAGE_NAME__ in configuration
--- fs/iso9660/Config.in | 49 ++++++++++++++++++++++++++++++++++- fs/iso9660/iso9660.mk | 68 ++++++++++++++++++++++++++++++++++++------------- 2 files changed, 99 insertions(+), 18 deletions(-)
fs/iso9660/Config.in +48 -1
@@ -8,10 +8,57 @@ config BR2_TARGET_ROOTFS_ISO9660 help Build a bootable iso9660 image +if BR2_TARGET_ROOTFS_ISO9660 + config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU string "Boot menu.lst file" - depends on BR2_TARGET_ROOTFS_ISO9660 default "fs/iso9660/menu.lst" + help + Grub configuration + Define menu, commands and options for grub + +config BR2_TARGET_ROOTFS_ISO9660_OVERLAY + string "iso9660 filesystem overlay directories" + default "" + help + Specify a list of directories that are copied over the root of the + iso filesystem after the build has finished and before it is + packed into the iso filesystem image. + + They are copied as-is into the iso image, excluding files ending + with ~ and .git, .svn and .hg directories. + +config BR2_TARGET_ROOTFS_ISO9660_JOLIET + bool "Create iso with Joliet format (long filenames)" + help + Generate iso image with Joliet directory records. + Use Unicode and each path component can be up 64 + Unicode characters long. + +config BR2_TARGET_ROOTFS_ISO9660_ROCK_RIDGE + bool "Create iso with Rock Ridge extensions (POSIX filesystem)" + default y + help + Generate iso image with Rock Ridge directory information, + which makes it a POSIX filesystem (file mode, uid, gid, ...) + +config BR2_TARGET_ROOTFS_ISO9660_NAME + string "Volume label" + default "" + help + cdrom name + +config BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET + string "Input filename character encoding" + default "utf8" + help + The character encoding with which the names of the files that + will be copied into the iso9660 filesystem are encoded. For the + RockRidge directory, the same encoding will be used. For the + Joliet directory, it will be converted to UTF-16. + (see program genisoimage : genisoimage -input-charset help) + +endif # BR2_TARGET_ROOTFS_ISO9660 comment "iso image needs a Linux kernel to be built" depends on BR2_i386 || BR2_x86_64
fs/iso9660/iso9660.mk +51 -17
87 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH v5 2/2 add bootloader option for iso9660 filesystem image (isolinux)
From: Jerome Sagnole <[email protected]>
Changelog :
patch v1 : new branch to generate iso with bootloader isolinux
patch v2 : add bootloader option for iso9660 filesystem image (isolinux)
addon to include comment Arnout Vandecappelle
simplify code
1/ I suppress redundant comment
2/ Suppress menu and use conditional (replace 'depends on' by 'if/end$ 3/ Modify comment
4/ suppress option (keyboard, ...)
5/ replace 8 x space by tabulation
File : fs/isolinux/isolinux.mk
6/ suppress extension 'BR2_'
7/ use variable 'ISOLINUX_DIR'
8/ suppress keyboard option
9/ I can't use command '$(INSTALL) -D' beacause I don't define filena$
10/ Hide command genisoimage (with option $@)
patch v3 : add bootloader option for iso9660 filesystem image (isolinux)
addon to include comment Thomas Petazzoni & Arnout Vandecappelle modify comment
default generate iso with grub bootloader
you can select isolinux bootloader
detail : (module fs/iso9660)
option to select bootloader (grub/isolinux)
file(s) bootloader configuration
option to copy file(s) on iso (only for isolinux)
option to create iso with long filenames (Joliet format) option to create iso with POSIX file system (file mode, uid, gid, ...) define volume label
define parameter input charset
can use initramfs (if activate), also cpio (like initrd)
patch v4 : add bootloader option for iso9660 filesystem image (isolinux)
addon to include comment Arnout Vandecappelle & Thomas Petazzoni add choise to select bootloader in iso9660 menu modify comment
seperate code in two patch
1st patch : update iso9660 with grub
2nd patch : add new bootloader isolinux
patch v5 part 1: modify bootloader option for iso9660 filesystem image (grub)
addon to include comment Arnout Vandecappelle & Martin Bark modify option to include files and directories in iso image
suppress option BR2_TARGET_ROOTFS_ISOLINUX_EXTRA_FILES add option BR2_TARGET_ROOTFS_ISO9660_OVERLAY
modify code to include this new option
modify comment
modify signed-off-by (use real name)
keep default option for BR2_TARGET_ROOTFS_ISO9660_ROCK_RIDGE
in old code, it defined by default (keep for compatibility)
modify default option for BR2_TARGET_ROOTFS_ISO9660_NAME modify default option for BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET modify variable name to add prefix 'ISO9660_'
"qstrip" each variable
BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET BR2_TARGET_ROOTFS_ISO9660_NAME
modify command INITRD_SED_CMD
modify kernel launch for this iso
use LINUX_IMAGE_NAME
add command sed to replace __LINUX_IMAGE_NAME__ in configuration
patch v5 part 2: add bootloader option for iso9660 filesystem image (isolinux)
addon to include comment Arnout Vandecappelle & Martin Bark modify comment
suppress bootmsg.txt in isolinux.cfg if is empty (bootloader isolinux)
--- fs/iso9660/Config.in | 40 ++++++++++++++++++++++++++++++++++++++-- fs/iso9660/bootmsg.txt | 4 ++++ fs/iso9660/iso9660.mk | 40 +++++++++++++++++++++++++++++++++++----- fs/iso9660/isolinux.cfg | 10 ++++++++++ fs/iso9660/menu.lst | 2 +- 5 files changed, 88 insertions(+), 8 deletions(-) create mode 100644 fs/iso9660/bootmsg.txt create mode 100644 fs/iso9660/isolinux.cfg
fs/iso9660/Config.in +38 -2
@@ -3,12 +3,30 @@ config BR2_TARGET_ROOTFS_ISO9660 depends on (BR2_i386 || BR2_x86_64) depends on BR2_LINUX_KERNEL select BR2_TARGET_ROOTFS_CPIO - select BR2_TARGET_GRUB - select BR2_TARGET_GRUB_FS_ISO9660 help Build a bootable iso9660 image if BR2_TARGET_ROOTFS_ISO9660 +choice + prompt "Bootloader" + default BR2_TARGET_ROOTFS_ISO9660_GRUB + help + Select the bootloader that should be used for the bootable + ISO9660 image. + +config BR2_TARGET_ROOTFS_ISO9660_GRUB + bool "grub" + select BR2_TARGET_GRUB + select BR2_TARGET_GRUB_FS_ISO9660 + +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + bool "isolinux" + select BR2_TARGET_SYSLINUX + select BR2_TARGET_SYSLINUX_ISOLINUX + +endchoice + +if BR2_TARGET_ROOTFS_ISO9660_GRUB config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU string "Boot menu.lst file"
@@ -17,6 +35,24 @@ config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU Grub configuration Define menu, commands and options for grub +endif # BR2_TARGET_ROOTFS_ISO9660_GRUB + +if BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MESSAGE + string "Boot message" + default "fs/iso9660/bootmsg.txt" + help + Displays the contents of this file on the screen at boot time + +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_CONFIG_FILE + string "Configuration file" + default "fs/iso9660/isolinux.cfg" + help + This file defines all options to start isolinux + +endif # BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + config BR2_TARGET_ROOTFS_ISO9660_OVERLAY string "iso9660 filesystem overlay directories" default ""
fs/iso9660/bootmsg.txt new file +4 -0
@@ -0,0 +1,4 @@ +Buildroot isolinux boot + buildroot) Launch linux from the CD-ROM + harddrive) Hard Drive (first partition) +
fs/iso9660/iso9660.mk +35 -5
@@ -8,33 +8,63 @@ ################################################################################ ISO9660_TARGET_DIR = $(BUILD_DIR)/iso9660 -ISO9660_BOOT_MENU := $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU)) +ISO9660_INITRD_SED_CMD = '/initrd/Id' ISO9660_CHARSET = $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET)) ISO9660_NAME = $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_NAME)) -ISO9660_KERNEL_DST = $(ISO9660_TARGET_DIR)/kernel +ISO9660_KERNEL_DST = $(ISO9660_TARGET_DIR)/$(LINUX_IMAGE_NAME) +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y) +ISO9660_BOOTLOADER_PACKAGE = grub ISO9660_BOOTLOADER_BIN = $(GRUB_DIR)/stage2/stage2_eltorito ISO9660_BOOTLOADER_DIR = $(ISO9660_TARGET_DIR)/boot/grub/ +ISO9660_BOOTLOADER_SRC_CFG = $(call qstrip, \ + $(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU)) ISO9660_BOOTLOADER_DST_CFG = $(ISO9660_TARGET_DIR)/boot/grub/menu.lst ISO9660_ELTORITO_BOOT = boot/grub/stage2_eltorito +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX),y) +ISO9660_BOOTLOADER_PACKAGE = syslinux +ISO9660_BOOTLOADER_BIN = $(BINARIES_DIR)/isolinux.bin +ISO9660_BOOTLOADER_DIR = $(ISO9660_TARGET_DIR) +ISO9660_BOOTLOADER_SRC_CFG = $(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_CONFIG_FILE) +ISO9660_BOOTLOADER_DST_CFG = $(ISO9660_TARGET_DIR)/isolinux.cfg +ISO9660_ELTORITO_BOOT = isolinux.bin +ISO9660_BOOT_MESSAGE = $(call qstrip, \ + $(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MESSAGE)) +endif -$(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio grub +$(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio $(ISO9660_BOOTLOADER_PACKAGE) @$(call MESSAGE,"Generating root filesystem image rootfs.iso9660") @mkdir -p $(ISO9660_TARGET_DIR) @mkdir -p $(ISO9660_BOOTLOADER_DIR) @cp $(ISO9660_BOOTLOADER_BIN) $(ISO9660_BOOTLOADER_DIR) - @cp $(ISO9660_BOOT_MENU) $(ISO9660_BOOTLOADER_DST_CFG) + @cp $(ISO9660_BOOTLOADER_SRC_CFG) $(ISO9660_BOOTLOADER_DST_CFG) @cp $(LINUX_IMAGE_PATH) $(ISO9660_KERNEL_DST) +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y) ifeq ($(BR2_TARGET_GRUB_SPLASH),) @$(SED) '/^splashimage/d' $(ISO9660_BOOTLOADER_DST_CFG) else @cp boot/grub/splash.xpm.gz $(ISO9660_TARGET_DIR)/ endif # BR2_TARGET_GRUB_SPLASH +endif # BR2_TARGET_ROOTFS_ISO9660_GRUB + +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX),y) +ifeq ($(ISO9660_BOOT_MESSAGE),) + @$(SED) '/display bootmsg.txt/d' $(ISO9660_BOOTLOADER_DST_CFG) +else + @cp $(ISO9660_BOOT_MESSAGE) \ + $(ISO9660_TARGET_DIR) +endif # ISO9660_BOOT_MESSAGE +endif # BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + + @$(SED) 's/__LINUX_IMAGE_NAME__/'$(LINUX_IMAGE_NAME)'/g' \ + $(ISO9660_BOOTLOADER_DST_CFG) ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) - @$(SED) '/initrd/d' $(ISO9660_BOOTLOADER_DST_CFG) + @$(SED) $(ISO9660_INITRD_SED_CMD) $(ISO9660_BOOTLOADER_DST_CFG) else @cp $(BINARIES_DIR)/rootfs.cpio$(ROOTFS_CPIO_COMPRESS_EXT) \ $(ISO9660_TARGET_DIR)/initrd
fs/iso9660/isolinux.cfg new file +10 -0
@@ -0,0 +1,10 @@ +display bootmsg.txt +default buildroot +timeout 10 +prompt 1 +LABEL buildroot + KERNEL __LINUX_IMAGE_NAME__ + INITRD initrd + +LABEL harddrive + LOCALBOOT 0x80
fs/iso9660/menu.lst +1 -1
@@ -12,7 +12,7 @@ foreground 000000 background cccccc title Buildroot ISO9660 image -kernel /kernel +kernel /__LINUX_IMAGE_NAME__ initrd /initrd title Hard Drive (first partition)
Signature · 1 line
1.7.10.4
PATCH v5 1/2 modify bootloader option for iso9660 filesystem image (grub)
In reply to jean.sorgemoel at laposte.netHello,
Quoted 56 lines · jean.sorgemoel at laposte.net
From: Jerome Sagnole <[email protected]>
Changelog :
patch v1 : new branch to generate iso with bootloader isolinux
patch v2 : add bootloader option for iso9660 filesystem image (isolinux)
addon to include comment Arnout Vandecappelle
simplify code
1/ I suppress redundant comment
2/ Suppress menu and use conditional (replace 'depends on' by 'if/end$ 3/ Modify comment
4/ suppress option (keyboard, ...)
5/ replace 8 x space by tabulation
File :fs/isolinux/isolinux.mk
6/ suppress extension 'BR2_'
7/ use variable 'ISOLINUX_DIR'
8/ suppress keyboard option
9/ I can't use command '$(INSTALL) -D' beacause I don't define filena$
10/ Hide command genisoimage (with option $@)patch v3 : add bootloader option for iso9660 filesystem image (isolinux)
addon to include comment Thomas Petazzoni & Arnout Vandecappelle modify comment
default generate iso with grub bootloader
you can select isolinux bootloader
detail : (module fs/iso9660)
option to select bootloader (grub/isolinux)
file(s) bootloader configuration
option to copy file(s) on iso (only for isolinux)
option to create iso with long filenames (Joliet format) option to create iso with POSIX file system (file mode, uid, gid, ...) define volume label
define parameter input charset
can use initramfs (if activate), also cpio (like initrd)patch v4 : add bootloader option for iso9660 filesystem image (isolinux)
addon to include comment Arnout Vandecappelle & Thomas Petazzoni add choise to select bootloader in iso9660 menu modify comment
seperate code in two patch
1st patch : update iso9660 with grub
2nd patch : add new bootloader isolinuxpatch v5 part 1: modify bootloader option for iso9660 filesystem image (grub)
addon to include comment Arnout Vandecappelle & Martin Bark modify option to include files and directories in iso image
suppress optionBR2_TARGET_ROOTFS_ISOLINUX_EXTRA_FILESadd optionBR2_TARGET_ROOTFS_ISO9660_OVERLAY
modify code to include this new option
modify comment
modify signed-off-by (use real name)
keep default option forBR2_TARGET_ROOTFS_ISO9660_ROCK_RIDGE
in old code, it defined by default (keep for compatibility)
modify default option forBR2_TARGET_ROOTFS_ISO9660_NAMEmodify default option forBR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET
Quoted 8 lines
modify variable name to add prefix '
ISO9660_'
"qstrip" each variable
BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSETBR2_TARGET_ROOTFS_ISO9660_NAME
modify commandINITRD_SED_CMD
modify kernel launch for this iso
useLINUX_IMAGE_NAME
add command sed to replace__LINUX_IMAGE_NAME__in configuration
This changelog should go after the "---" sign below. Moreover your commit should have a proper title, like:
fs/iso9660: <short description>
and a proper commit log, with several paragraphs explaining what the commit is changing. Your title mentions only "modify bootloader option", but your commit does *much* more than that. If your commit does multiple things, it should be split into several commits. Your commit actually seems to be doing several things:
* Adding multiple new options for ISO9660 filesystems: Joliet, RockRidge, name, input charset, overlay, etc.
* Adding the infrastructure to use different bootloaders.
Those two things should lead to two separate patches.
See also
http://buildroot.org/downloads/manual/manual.html#_patch_revision_changelog
on how to format a git commit log with a changelog.
Quoted 24 lines
Signed-off-by Jerome Sagnole <[email protected]>--- fs/iso9660/Config.in | 49 ++++++++++++++++++++++++++++++++++- fs/iso9660/iso9660.mk | 68 ++++++++++++++++++++++++++++++++++++------------- 2 files changed, 99 insertions(+), 18 deletions(-)fs/iso9660/Config.in +6
-1@@ -8,10 +8,57 @@ config BR2_TARGET_ROOTFS_ISO9660 help Build a bootable iso9660 image +if BR2_TARGET_ROOTFS_ISO9660 + config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU string "Boot menu.lst file" - depends on BR2_TARGET_ROOTFS_ISO9660 default "fs/iso9660/menu.lst" + help + Grub configuration + Define menu, commands and options for grub +
fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 29
Quoted 10 lines
fs/iso9660/Config.in +10
-0+config BR2_TARGET_ROOTFS_ISO9660_OVERLAY + string "iso9660 filesystem overlay directories" + default "" + help + Specify a list of directories that are copied over the root of the + iso filesystem after the build has finished and before it is + packed into the iso filesystem image. + + They are copied as-is into the iso image, excluding files ending + with ~ and .git, .svn and .hg directories.
I must say I'm not a big fan of this. We already have an overlay mechanism for the root filesystem. I understand that in the case of iso9660, the root filesystem as generated by Buildroot goes into the initramfs, and that there is no way to put some more stuff in the iso9660 filesystem itself (outside the initramfs), I believe that the direction we are taking here is the wrong one.
Instead, I believe we should turn the iso9660 option into what it should have been in the first place: using an iso9660 root filesystem. So we would get rid of the initramfs usage, enable Rock Ridge and Joliet extensions by default, and put the Buildroot filesystem as is in the ISO9660 filesystem. This way, no need for an additional overlay mechanism, we can just re-use the one from Buildroot.
Do you think this would be possible?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v5 1/2 modify bootloader option for iso9660 filesystem image (grub)
Hi,
Quoted 81 lines · Thomas Petazzoni
Hello,
Quoted 56 lines · On Sat, 1 Mar 2014 22:00:55 +0100,jean.sorgemoel at laposte.net wrote:
From: Jerome Sagnole<[email protected]>
Changelog :
patch v1 : new branch to generate iso with bootloader isolinux
patch v2 : add bootloader option for iso9660 filesystem image (isolinux)
addon to include comment Arnout Vandecappelle
simplify code
1/ I suppress redundant comment
2/ Suppress menu and use conditional (replace 'depends on' by 'if/end$ 3/ Modify comment
4/ suppress option (keyboard, ...)
5/ replace 8 x space by tabulation
File :fs/isolinux/isolinux.mk
6/ suppress extension 'BR2_'
7/ use variable 'ISOLINUX_DIR'
8/ suppress keyboard option
9/ I can't use command '$(INSTALL) -D' beacause I don't define filena$
10/ Hide command genisoimage (with option $@)patch v3 : add bootloader option for iso9660 filesystem image (isolinux)
addon to include comment Thomas Petazzoni & Arnout Vandecappelle modify comment
default generate iso with grub bootloader
you can select isolinux bootloader
detail : (module fs/iso9660)
option to select bootloader (grub/isolinux)
file(s) bootloader configuration
option to copy file(s) on iso (only for isolinux)
option to create iso with long filenames (Joliet format) option to create iso with POSIX file system (file mode, uid, gid, ...) define volume label
define parameter input charset
can use initramfs (if activate), also cpio (like initrd)patch v4 : add bootloader option for iso9660 filesystem image (isolinux)
addon to include comment Arnout Vandecappelle & Thomas Petazzoni add choise to select bootloader in iso9660 menu modify comment
seperate code in two patch
1st patch : update iso9660 with grub
2nd patch : add new bootloader isolinuxpatch v5 part 1: modify bootloader option for iso9660 filesystem image (grub)
addon to include comment Arnout Vandecappelle & Martin Bark modify option to include files and directories in iso image
suppress optionBR2_TARGET_ROOTFS_ISOLINUX_EXTRA_FILESadd optionBR2_TARGET_ROOTFS_ISO9660_OVERLAY
modify code to include this new option
modify comment
modify signed-off-by (use real name)
keep default option forBR2_TARGET_ROOTFS_ISO9660_ROCK_RIDGE
in old code, it defined by default (keep for compatibility)
modify default option forBR2_TARGET_ROOTFS_ISO9660_NAMEmodify default option forBR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSETQuoted 8 lines
modify variable name to add prefix '
ISO9660_'
"qstrip" each variable
BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSETBR2_TARGET_ROOTFS_ISO9660_NAME
modify commandINITRD_SED_CMD
modify kernel launch for this iso
useLINUX_IMAGE_NAME
add command sed to replace__LINUX_IMAGE_NAME__in configurationThis changelog should go after the "---" sign below. Moreover your commit should have a proper title, like:
fs/iso9660: <short description>and a proper commit log, with several paragraphs explaining what the commit is changing. Your title mentions only "modify bootloader option", but your commit does *much* more than that. If your commit does multiple things, it should be split into several commits. Your commit actually seems to be doing several things:
* Adding multiple new options for ISO9660 filesystems: Joliet, RockRidge, name, input charset, overlay, etc.
Quoted 7 lines
* Adding the infrastructure to use different bootloaders.
Those two things should lead to two separate patches.
See also
http://buildroot.org/downloads/manual/manual.html#_patch_revision_changelog
on how to format a git commit log with a changelog.
Good remark, I will update my patch.
Quoted 41 lines
Quoted 24 lines
Signed-off-by Jerome Sagnole<[email protected]>--- fs/iso9660/Config.in | 49 ++++++++++++++++++++++++++++++++++- fs/iso9660/iso9660.mk | 68 ++++++++++++++++++++++++++++++++++++------------- 2 files changed, 99 insertions(+), 18 deletions(-)fs/iso9660/Config.in +6
-1@@ -8,10 +8,57 @@ config BR2_TARGET_ROOTFS_ISO9660 help Build a bootable iso9660 image +if BR2_TARGET_ROOTFS_ISO9660 + config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU string "Boot menu.lst file" - depends on BR2_TARGET_ROOTFS_ISO9660 default "fs/iso9660/menu.lst" + help + Grub configuration + Define menu, commands and options for grub +fs/iso9660/Config.in config BR2_TARGET_ROOTFS_ISO9660 · line 29
Quoted 10 lines
fs/iso9660/Config.in +10
-0+config BR2_TARGET_ROOTFS_ISO9660_OVERLAY + string "iso9660 filesystem overlay directories" + default "" + help + Specify a list of directories that are copied over the root of the + iso filesystem after the build has finished and before it is + packed into the iso filesystem image. + + They are copied as-is into the iso image, excluding files ending + with ~ and .git, .svn and .hg directories.I must say I'm not a big fan of this. We already have an overlay mechanism for the root filesystem. I understand that in the case of iso9660, the root filesystem as generated by Buildroot goes into the initramfs, and that there is no way to put some more stuff in the iso9660 filesystem itself (outside the initramfs), I believe that the direction we are taking here is the wrong one.
Quoted 8 lines
Instead, I believe we should turn the iso9660 option into what it should have been in the first place: using an iso9660 root filesystem. So we would get rid of the initramfs usage, enable Rock Ridge and Joliet extensions by default, and put the Buildroot filesystem as is in the ISO9660 filesystem. This way, no need for an additional overlay mechanism, we can just re-use the one from Buildroot.
Do you think this would be possible?
The goal is to copy on iso the binary to choice in boot. (ex. check memory) The initial code copy only files (not directories). (and without overlay method)
What's method can be use?
I will update my patch without this option.
I will enable Joliet extension by default (for Rock Ridge it's ok)
Quoted 3 lines
Thanks,
Thomas
Thanks,
Jerome
PATCH v6 1/2 adding bootloader option for iso9660 filesystem image
In reply to jeanFrom: Jerome Sagnole <[email protected]>
* Adding multiple new options for ISO9660 filesystems: Joliet, RockRidge, name, input charset
* Adding the infrastructure to use different bootloaders.
---
changes v4 -> v5:
* addon to include comment Arnout Vandecappelle & Martin Bark
* modify option to include files and directories in iso image
- suppress option BR2_TARGET_ROOTFS_ISOLINUX_EXTRA_FILES
- add option BR2_TARGET_ROOTFS_ISO9660_OVERLAY
- modify code to include this new option
* modify comment
* modify signed-off-by (use real name)
* keep default option for BR2_TARGET_ROOTFS_ISO9660_ROCK_RIDGE in old code, it defined by default (keep for compatibility)
* modify default option for BR2_TARGET_ROOTFS_ISO9660_NAME
* modify default option for BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET
* modify variable name to add prefix 'ISO9660_'
* "qstrip" each variable BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET BR2_TARGET_ROOTFS_ISO9660_NAME
* modify command INITRD_SED_CMD
* modify kernel launch for this iso
- use LINUX_IMAGE_NAME
- add command sed to replace __LINUX_IMAGE_NAME__ in configuration
* suppress bootmsg.txt in isolinux.cfg is empty (bootloader isolinux)
changes v3 -> v4:
* addon to include remark Arnout Vandecappelle & Thomas Petazzoni
* add choise to select bootloader in iso9660 menu
* modify comment
* seperate code in two patch
1st patch : update iso9660 with grub
2nd patch : add new bootloader isolinux
changes v2 -> v3:
* addon to include remark Thomas Petazzoni & Arnout Vandecappelle
- modify comment
- default generate iso with grub bootloader
- you can select isolinux bootloader
- detail : (module fs/iso9660)
- option to select bootloader (grub/isolinux)
- file(s) bootloader configuration
- option to copy file(s) on iso (only for isolinux)
- option to create iso with long filenames (Joliet format)
- option to create iso with POSIX file system (file mode, uid, gid, ...)
- define volume label
- define parameter input charset
- can use initramfs (if activate), also cpio (like initrd)
changes v1 -> v2:
* simplify code (suggest by Arnout Vandecappelle)
- I suppress redundant comment
- Suppress menu and use conditional (replace 'depends on' by 'if/endif')
- Modify comment
- suppress option (keyboard, ...)
- replace 8 x space by tabulation
- suppress extension 'BR2_'
- use variable 'ISOLINUX_DIR'
- suppress keyboard option
- I can't use command '$(INSTALL) -D' beacause I don't define filenames (I keep old code)
- Hide command genisoimage (with option $@)
Changes v0 -> v1:
* new branch to generate iso with bootloader isolinux
fs/iso9660/Config.in | 39 ++++++++++++++++++++++++++++++- fs/iso9660/iso9660.mk | 62 +++++++++++++++++++++++++++++++++++-------------- 2 files changed, 83 insertions(+), 18 deletions(-)
fs/iso9660/Config.in +38 -1
@@ -8,10 +8,47 @@ config BR2_TARGET_ROOTFS_ISO9660 help Build a bootable iso9660 image +if BR2_TARGET_ROOTFS_ISO9660 + config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU string "Boot menu.lst file" - depends on BR2_TARGET_ROOTFS_ISO9660 default "fs/iso9660/menu.lst" + help + Grub configuration + Define menu, commands and options for grub + +config BR2_TARGET_ROOTFS_ISO9660_JOLIET + bool "Create iso with Joliet format (long filenames)" + default y + help + Generate iso image with Joliet directory records. + Use Unicode and each path component can be up 64 + Unicode characters long. + +config BR2_TARGET_ROOTFS_ISO9660_ROCK_RIDGE + bool "Create iso with Rock Ridge extensions (POSIX filesystem)" + default y + help + Generate iso image with Rock Ridge directory information, + which makes it a POSIX filesystem (file mode, uid, gid, ...) + +config BR2_TARGET_ROOTFS_ISO9660_NAME + string "Volume label" + default "" + help + cdrom name + +config BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET + string "Input filename character encoding" + default "utf8" + help + The character encoding with which the names of the files that + will be copied into the iso9660 filesystem are encoded. For the + RockRidge directory, the same encoding will be used. For the + Joliet directory, it will be converted to UTF-16. + (see program genisoimage : genisoimage -input-charset help) + +endif # BR2_TARGET_ROOTFS_ISO9660 comment "iso image needs a Linux kernel to be built" depends on BR2_i386 || BR2_x86_64
fs/iso9660/iso9660.mk +45 -17
81 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH v6 2/2 add bootloader isolinux for iso9660 filesystem image
From: Jerome Sagnole <[email protected]>
* Adding bootloader isolinux
* Modify kernel filename (use variable LINUX_IMAGE_NAME)
* Update grub/isolinux configuration
replace __LINUX_IMAGE_NAME__ by value of LINUX_IMAGE_NAME
---
changes v4 -> v5:
* addon to include comment Arnout Vandecappelle & Martin Bark
* modify option to include files and directories in iso image
- suppress option BR2_TARGET_ROOTFS_ISOLINUX_EXTRA_FILES
- add option BR2_TARGET_ROOTFS_ISO9660_OVERLAY
- modify code to include this new option
* modify comment
* modify signed-off-by (use real name)
* keep default option for BR2_TARGET_ROOTFS_ISO9660_ROCK_RIDGE in old code, it defined by default (keep for compatibility)
* modify default option for BR2_TARGET_ROOTFS_ISO9660_NAME
* modify default option for BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET
* modify variable name to add prefix 'ISO9660_'
* "qstrip" each variable BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET BR2_TARGET_ROOTFS_ISO9660_NAME
* modify command INITRD_SED_CMD
* modify kernel launch for this iso
- use LINUX_IMAGE_NAME
- add command sed to replace __LINUX_IMAGE_NAME__ in configuration
* suppress bootmsg.txt in isolinux.cfg is empty (bootloader isolinux)
changes v3 -> v4:
* addon to include remark Arnout Vandecappelle & Thomas Petazzoni
* add choise to select bootloader in iso9660 menu
* modify comment
* seperate code in two patch
1st patch : update iso9660 with grub
2nd patch : add new bootloader isolinux
changes v2 -> v3:
* addon to include remark Thomas Petazzoni & Arnout Vandecappelle
- modify comment
- default generate iso with grub bootloader
- you can select isolinux bootloader
- detail : (module fs/iso9660)
- option to select bootloader (grub/isolinux)
- file(s) bootloader configuration
- option to copy file(s) on iso (only for isolinux)
- option to create iso with long filenames (Joliet format)
- option to create iso with POSIX file system (file mode, uid, gid, ...)
- define volume label
- define parameter input charset
- can use initramfs (if activate), also cpio (like initrd)
changes v1 -> v2:
* simplify code (suggest by Arnout Vandecappelle)
- I suppress redundant comment
- Suppress menu and use conditional (replace 'depends on' by 'if/endif')
- Modify comment
- suppress option (keyboard, ...)
- replace 8 x space by tabulation
- suppress extension 'BR2_'
- use variable 'ISOLINUX_DIR'
- suppress keyboard option
- I can't use command '$(INSTALL) -D' beacause I don't define filenames (I keep old code)
- Hide command genisoimage (with option $@)
Changes v0 -> v1:
* new branch to generate iso with bootloader isolinux
fs/iso9660/Config.in | 40 ++++++++++++++++++++++++++++++++++++++-- fs/iso9660/bootmsg.txt | 4 ++++ fs/iso9660/iso9660.mk | 40 +++++++++++++++++++++++++++++++++++----- fs/iso9660/isolinux.cfg | 10 ++++++++++ fs/iso9660/menu.lst | 2 +- 5 files changed, 88 insertions(+), 8 deletions(-) create mode 100644 fs/iso9660/bootmsg.txt create mode 100644 fs/iso9660/isolinux.cfg
fs/iso9660/Config.in +38 -2
@@ -3,12 +3,30 @@ config BR2_TARGET_ROOTFS_ISO9660 depends on (BR2_i386 || BR2_x86_64) depends on BR2_LINUX_KERNEL select BR2_TARGET_ROOTFS_CPIO - select BR2_TARGET_GRUB - select BR2_TARGET_GRUB_FS_ISO9660 help Build a bootable iso9660 image if BR2_TARGET_ROOTFS_ISO9660 +choice + prompt "Bootloader" + default BR2_TARGET_ROOTFS_ISO9660_GRUB + help + Select the bootloader that should be used for the bootable + ISO9660 image. + +config BR2_TARGET_ROOTFS_ISO9660_GRUB + bool "grub" + select BR2_TARGET_GRUB + select BR2_TARGET_GRUB_FS_ISO9660 + +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + bool "isolinux" + select BR2_TARGET_SYSLINUX + select BR2_TARGET_SYSLINUX_ISOLINUX + +endchoice + +if BR2_TARGET_ROOTFS_ISO9660_GRUB config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU string "Boot menu.lst file"
@@ -17,6 +35,24 @@ config BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU Grub configuration Define menu, commands and options for grub +endif # BR2_TARGET_ROOTFS_ISO9660_GRUB + +if BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MESSAGE + string "Boot message" + default "fs/iso9660/bootmsg.txt" + help + Displays the contents of this file on the screen at boot time + +config BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_CONFIG_FILE + string "Configuration file" + default "fs/iso9660/isolinux.cfg" + help + This file defines all options to start isolinux + +endif # BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + config BR2_TARGET_ROOTFS_ISO9660_JOLIET bool "Create iso with Joliet format (long filenames)" default y
fs/iso9660/bootmsg.txt new file +4 -0
@@ -0,0 +1,4 @@ +Buildroot isolinux boot + buildroot) Launch linux from the CD-ROM + harddrive) Hard Drive (first partition) +
fs/iso9660/iso9660.mk +35 -5
@@ -8,33 +8,63 @@ ################################################################################ ISO9660_TARGET_DIR = $(BUILD_DIR)/iso9660 -ISO9660_BOOT_MENU := $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU)) +ISO9660_INITRD_SED_CMD = '/initrd/Id' ISO9660_CHARSET = $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_INPUT_CHARSET)) ISO9660_NAME = $(call qstrip,$(BR2_TARGET_ROOTFS_ISO9660_NAME)) -ISO9660_KERNEL_DST = $(ISO9660_TARGET_DIR)/kernel +ISO9660_KERNEL_DST = $(ISO9660_TARGET_DIR)/$(LINUX_IMAGE_NAME) +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y) +ISO9660_BOOTLOADER_PACKAGE = grub ISO9660_BOOTLOADER_BIN = $(GRUB_DIR)/stage2/stage2_eltorito ISO9660_BOOTLOADER_DIR = $(ISO9660_TARGET_DIR)/boot/grub/ +ISO9660_BOOTLOADER_SRC_CFG = $(call qstrip, \ + $(BR2_TARGET_ROOTFS_ISO9660_BOOT_MENU)) ISO9660_BOOTLOADER_DST_CFG = $(ISO9660_TARGET_DIR)/boot/grub/menu.lst ISO9660_ELTORITO_BOOT = boot/grub/stage2_eltorito +endif + +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX),y) +ISO9660_BOOTLOADER_PACKAGE = syslinux +ISO9660_BOOTLOADER_BIN = $(BINARIES_DIR)/isolinux.bin +ISO9660_BOOTLOADER_DIR = $(ISO9660_TARGET_DIR) +ISO9660_BOOTLOADER_SRC_CFG = $(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_CONFIG_FILE) +ISO9660_BOOTLOADER_DST_CFG = $(ISO9660_TARGET_DIR)/isolinux.cfg +ISO9660_ELTORITO_BOOT = isolinux.bin +ISO9660_BOOT_MESSAGE = $(call qstrip, \ + $(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX_BOOT_MESSAGE)) +endif -$(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio grub +$(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio $(ISO9660_BOOTLOADER_PACKAGE) @$(call MESSAGE,"Generating root filesystem image rootfs.iso9660") @mkdir -p $(ISO9660_TARGET_DIR) @mkdir -p $(ISO9660_BOOTLOADER_DIR) @cp $(ISO9660_BOOTLOADER_BIN) $(ISO9660_BOOTLOADER_DIR) - @cp $(ISO9660_BOOT_MENU) $(ISO9660_BOOTLOADER_DST_CFG) + @cp $(ISO9660_BOOTLOADER_SRC_CFG) $(ISO9660_BOOTLOADER_DST_CFG) @cp $(LINUX_IMAGE_PATH) $(ISO9660_KERNEL_DST) +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_GRUB),y) ifeq ($(BR2_TARGET_GRUB_SPLASH),) @$(SED) '/^splashimage/d' $(ISO9660_BOOTLOADER_DST_CFG) else @cp boot/grub/splash.xpm.gz $(ISO9660_TARGET_DIR)/ endif # BR2_TARGET_GRUB_SPLASH +endif # BR2_TARGET_ROOTFS_ISO9660_GRUB + +ifeq ($(BR2_TARGET_ROOTFS_ISO9660_ISOLINUX),y) +ifeq ($(ISO9660_BOOT_MESSAGE),) + @$(SED) '/display bootmsg.txt/d' $(ISO9660_BOOTLOADER_DST_CFG) +else + @cp $(ISO9660_BOOT_MESSAGE) \ + $(ISO9660_TARGET_DIR) +endif # ISO9660_BOOT_MESSAGE +endif # BR2_TARGET_ROOTFS_ISO9660_ISOLINUX + + @$(SED) 's/__LINUX_IMAGE_NAME__/'$(LINUX_IMAGE_NAME)'/g' \ + $(ISO9660_BOOTLOADER_DST_CFG) ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y) - @$(SED) '/initrd/d' $(ISO9660_BOOTLOADER_DST_CFG) + @$(SED) $(ISO9660_INITRD_SED_CMD) $(ISO9660_BOOTLOADER_DST_CFG) else @cp $(BINARIES_DIR)/rootfs.cpio$(ROOTFS_CPIO_COMPRESS_EXT) \ $(ISO9660_TARGET_DIR)/initrd
fs/iso9660/isolinux.cfg new file +10 -0
@@ -0,0 +1,10 @@ +display bootmsg.txt +default buildroot +timeout 10 +prompt 1 +LABEL buildroot + KERNEL __LINUX_IMAGE_NAME__ + INITRD initrd + +LABEL harddrive + LOCALBOOT 0x80
fs/iso9660/menu.lst +1 -1
@@ -12,7 +12,7 @@ foreground 000000 background cccccc title Buildroot ISO9660 image -kernel /kernel +kernel /__LINUX_IMAGE_NAME__ initrd /initrd title Hard Drive (first partition)
Signature · 1 line
1.7.10.4