Patchwork [1/1] new package - generate iso with isolinux bootloader

login
register
mail settings
Submitter jean
Date Aug. 16, 2013, 9:22 a.m.
Message ID <1376644934-4302-1-git-send-email-jean.sorgemoel@laposte.net>
Download mbox | patch
Permalink /patch/267604/
State Superseded
Headers show

Comments

jean - Aug. 16, 2013, 9:22 a.m.
Signed-off-by: jean <jean.sorgemoel@laposte.net>
---
 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
jean - Aug. 16, 2013, 11:49 a.m.
Dear All,

Sorry, It's my first patch.

We can generate new iso file with isolinux.

Regards,
Jean

> Signed-off-by: jean <jean.sorgemoel@laposte.net>
> ---
>   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
>
> diff --git a/fs/Config.in b/fs/Config.in
> index da4c5ff..02294a9 100644
> --- a/fs/Config.in
> +++ b/fs/Config.in
> @@ -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
> diff --git a/fs/isolinux/Config.in b/fs/isolinux/Config.in
> new file mode 100644
> index 0000000..8abe409
> --- /dev/null
> +++ b/fs/isolinux/Config.in
> @@ -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 syslinux
> diff --git a/fs/isolinux/isolinux.mk b/fs/isolinux/isolinux.mk
> new file mode 100644
> index 0000000..0d9464d
> --- /dev/null
> +++ b/fs/isolinux/isolinux.mk
> @@ -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)
> +
> +	-@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
Arnout Vandecappelle - Aug. 20, 2013, 10:24 p.m.
On 16/08/13 11:22, jean wrote:
>
> Signed-off-by: jean <jean.sorgemoel@laposte.net>

  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@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?

> ---
>   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
>
> diff --git a/fs/Config.in b/fs/Config.in
> index da4c5ff..02294a9 100644
> --- a/fs/Config.in
> +++ b/fs/Config.in
> @@ -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
> diff --git a/fs/isolinux/Config.in b/fs/isolinux/Config.in
> new file mode 100644
> index 0000000..8abe409
> --- /dev/null
> +++ b/fs/isolinux/Config.in
> @@ -0,0 +1,182 @@
> +## Menu ISO image with syslinux

  This comment is redundant: the line below says exactly that.

> +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.

> +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.

> +	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.

> +	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).

> +		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.

> +        help
> +              	Create iso image with Joliet format (long file)

  long filenames

> +
> +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.'

> +
> +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.

> +        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.

> +
> +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.

> +        depends on BR2_TARGET_ROOTFS_ISO_ISOLINUX
> +        default "buildroot iso"

  I think the default label should be just "buildroot".

> +        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.

> +	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.

> +	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.

> +        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.

> +        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.

> +        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.

> +        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]

> diff --git a/fs/isolinux/isolinux.mk b/fs/isolinux/isolinux.mk
> new file mode 100644
> index 0000000..0d9464d
> --- /dev/null
> +++ b/fs/isolinux/isolinux.mk
> @@ -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.

> +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.

> +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.

> +
> +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.

> +
> +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.

> +
> +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


> +
> +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.


> +	@$(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.

> +	@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 $@

> +		-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)
> +
> +	-@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]
Thomas Petazzoni - Jan. 28, 2014, 4:25 p.m.
Dear Arnout Vandecappelle,

On Wed, 21 Aug 2013 00:24:36 +0200, Arnout Vandecappelle wrote:

>   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.

>   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
Thomas Petazzoni - Jan. 28, 2014, 4:30 p.m.
Dear jean,

On Fri, 16 Aug 2013 11:22:14 +0200, jean wrote:

> diff --git a/fs/isolinux/Config.in b/fs/isolinux/Config.in
> new file mode 100644
> index 0000000..8abe409
> --- /dev/null
> +++ b/fs/isolinux/Config.in
> @@ -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
Arnout Vandecappelle - Jan. 28, 2014, 5:33 p.m.
On 28/01/14 17:25, Thomas Petazzoni wrote:
> Dear Arnout Vandecappelle,
>
> On Wed, 21 Aug 2013 00:24:36 +0200, Arnout Vandecappelle wrote:
>
>>    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.

  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.


>>    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.

  That's what RockRidge is for.


  Regards,
  Arnout
Thomas Petazzoni - Jan. 28, 2014, 9:39 p.m.
Dear Arnout Vandecappelle,

On Tue, 28 Jan 2014 18:33:24 +0100, Arnout Vandecappelle wrote:

>   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.

> * grub has issues cross-compiling between x86_64 and i386 - but your 
> recent patches may have fixed that.

Yes, they fixed that.

> * Bug#6092 (closed now, but not at the time I posted it).

Yes, I've closed it, because it works for me.

> * The issue that grub was built without iso support (fixed now, but not 
> at the time I posted it).

Yes, it is fixed.

>   Possibly iso9660 is working reliably by now.

It works for me, at least, and was also reported to work by Thierry
Bultel, IIRC.

> >>    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.
> 
>   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
Arnout Vandecappelle - Jan. 29, 2014, 7 a.m.
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.

>>>>     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.
>>
>>    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

  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
Thomas Petazzoni - Jan. 29, 2014, 8:25 a.m.
Arnout, Jean,

On Wed, 29 Jan 2014 08:00:48 +0100, Arnout Vandecappelle wrote:

> > 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.

I agree.

>   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
jean - Feb. 1, 2014, 9:33 p.m.
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

> Arnout, Jean,
>
> On Wed, 29 Jan 2014 08:00:48 +0100, Arnout Vandecappelle wrote:
>
>>> 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.
> I agree.
>
>>    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

diff --git a/fs/Config.in b/fs/Config.in
index da4c5ff..02294a9 100644
--- a/fs/Config.in
+++ b/fs/Config.in
@@ -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
diff --git a/fs/isolinux/Config.in b/fs/isolinux/Config.in
new file mode 100644
index 0000000..8abe409
--- /dev/null
+++ b/fs/isolinux/Config.in
@@ -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 syslinux
diff --git a/fs/isolinux/isolinux.mk b/fs/isolinux/isolinux.mk
new file mode 100644
index 0000000..0d9464d
--- /dev/null
+++ b/fs/isolinux/isolinux.mk
@@ -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)
+
+	-@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