Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCHv2 0/4] grub/iso9660 improvements
@ 2013-12-29 17:33 Thomas Petazzoni
  2013-12-29 17:33 ` [Buildroot] [PATCHv2 1/4] linux: enable initrd/initramfs support when cpio rootfs is chosen Thomas Petazzoni
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Thomas Petazzoni @ 2013-12-29 17:33 UTC (permalink / raw)
  To: buildroot

Hello,

Here is the v2 of the grub/iso9660 improvements. Changes since v1:

 * Dropped patches that have been applied.

 * Added comments in the menu.lst files that explains when color
   vs. foreground/background are used (Yann)

 * Added link in the splashimage Config.in option help text that
   explains how to generate a splashimage (Yann).

Thanks!

Thomas

Thomas Petazzoni (4):
  linux: enable initrd/initramfs support when cpio rootfs is chosen
  fs/iso9660: add Grub splashscreen support
  grub: align splashscreen handling with iso9660 code
  grub: add web reference that documents how to generate a splashimage

 boot/grub/Config.in   |  6 ++++--
 boot/grub/grub.mk     |  5 ++++-
 boot/grub/menu.lst    | 17 +++++++++++++----
 fs/iso9660/iso9660.mk |  5 +++++
 fs/iso9660/menu.lst   | 11 ++++++++++-
 linux/linux.mk        |  3 ++-
 6 files changed, 38 insertions(+), 9 deletions(-)

-- 
1.8.3.2

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCHv2 1/4] linux: enable initrd/initramfs support when cpio rootfs is chosen
  2013-12-29 17:33 [Buildroot] [PATCHv2 0/4] grub/iso9660 improvements Thomas Petazzoni
@ 2013-12-29 17:33 ` Thomas Petazzoni
  2013-12-29 17:44   ` Yann E. MORIN
  2013-12-29 17:33 ` [Buildroot] [PATCHv2 2/4] fs/iso9660: add Grub splashscreen support Thomas Petazzoni
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2013-12-29 17:33 UTC (permalink / raw)
  To: buildroot

When one enables the generation of a cpio archive of the root
filesystem, the most likely usage is as an initramfs for the
kernel. This commit ensures that the kernel has initramfs support when
the rootfs cpio image format is chosen.

This will for example ensure that if the user selects the ISO9660
filesystem format (which uses a cpio initramfs), the kernel will have
proper support to load and use the initramfs.

It is worth mentionning that when BR2_TARGET_ROOTFS_INITRAMFS is
enabled, then BR2_TARGET_ROOTFS_CPIO is always enabled. That's why we
move the enabling of CONFIG_BLK_DEV_INITRD from the initramfs case to
the cpio case.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 linux/linux.mk | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/linux/linux.mk b/linux/linux.mk
index 5af167d..fa8aa0c 100644
--- a/linux/linux.mk
+++ b/linux/linux.mk
@@ -169,13 +169,14 @@ define LINUX_CONFIGURE_CMDS
 	rm $(KERNEL_ARCH_PATH)/configs/buildroot_defconfig
 	$(if $(BR2_arm)$(BR2_armeb),
 		$(call KCONFIG_ENABLE_OPT,CONFIG_AEABI,$(@D)/.config))
+	$(if $(BR2_TARGET_ROOTFS_CPIO),
+		$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config))
 	# As the kernel gets compiled before root filesystems are
 	# built, we create a fake cpio file. It'll be
 	# replaced later by the real cpio archive, and the kernel will be
 	# rebuilt using the linux26-rebuild-with-initramfs target.
 	$(if $(BR2_TARGET_ROOTFS_INITRAMFS),
 		touch $(BINARIES_DIR)/rootfs.cpio
-		$(call KCONFIG_ENABLE_OPT,CONFIG_BLK_DEV_INITRD,$(@D)/.config)
 		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_SOURCE,\"$(BINARIES_DIR)/rootfs.cpio\",$(@D)/.config)
 		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_UID,0,$(@D)/.config)
 		$(call KCONFIG_SET_OPT,CONFIG_INITRAMFS_ROOT_GID,0,$(@D)/.config))
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCHv2 2/4] fs/iso9660: add Grub splashscreen support
  2013-12-29 17:33 [Buildroot] [PATCHv2 0/4] grub/iso9660 improvements Thomas Petazzoni
  2013-12-29 17:33 ` [Buildroot] [PATCHv2 1/4] linux: enable initrd/initramfs support when cpio rootfs is chosen Thomas Petazzoni
@ 2013-12-29 17:33 ` Thomas Petazzoni
  2013-12-29 17:47   ` Yann E. MORIN
  2013-12-29 17:33 ` [Buildroot] [PATCHv2 3/4] grub: align splashscreen handling with iso9660 code Thomas Petazzoni
  2013-12-29 17:33 ` [Buildroot] [PATCHv2 4/4] grub: add web reference that documents how to generate a splashimage Thomas Petazzoni
  3 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2013-12-29 17:33 UTC (permalink / raw)
  To: buildroot

When Grub is built with splashscreen support, copy the splashscreen
image to the ISO9660 filesystem. Otherwise, disable the splashscreen
in the grub menu.lst file.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 fs/iso9660/iso9660.mk |  5 +++++
 fs/iso9660/menu.lst   | 11 ++++++++++-
 2 files changed, 15 insertions(+), 1 deletion(-)

diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk
index 56e87bb..0260d41 100644
--- a/fs/iso9660/iso9660.mk
+++ b/fs/iso9660/iso9660.mk
@@ -16,6 +16,11 @@ $(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio grub
 	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
+ifeq ($(BR2_TARGET_GRUB_SPLASH),)
+	$(SED) '/splashimage/d' $(ISO9660_TARGET_DIR)/boot/grub/menu.lst
+else
+	cp boot/grub/splash.xpm.gz $(ISO9660_TARGET_DIR)/
+endif
 	cp $(LINUX_IMAGE_PATH) $(ISO9660_TARGET_DIR)/kernel
 ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
 	$(SED) '/initrd/d'  $(ISO9660_TARGET_DIR)/boot/grub/menu.lst
diff --git a/fs/iso9660/menu.lst b/fs/iso9660/menu.lst
index ed7836a..c0bbff6 100644
--- a/fs/iso9660/menu.lst
+++ b/fs/iso9660/menu.lst
@@ -1,6 +1,15 @@
 default		0
 timeout		10
-color cyan/blue white/blue
+
+# Used when no splashimage is used
+color 		cyan/blue white/blue
+
+# Gets enabled/disabled depending on Grub support for splashimage
+splashimage	/splash.xpm.gz
+
+# Used when a splashimage is enabled
+foreground 	000000
+background 	cccccc
 
 title		Buildroot ISO9660 image
 kernel		/kernel
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCHv2 3/4] grub: align splashscreen handling with iso9660 code
  2013-12-29 17:33 [Buildroot] [PATCHv2 0/4] grub/iso9660 improvements Thomas Petazzoni
  2013-12-29 17:33 ` [Buildroot] [PATCHv2 1/4] linux: enable initrd/initramfs support when cpio rootfs is chosen Thomas Petazzoni
  2013-12-29 17:33 ` [Buildroot] [PATCHv2 2/4] fs/iso9660: add Grub splashscreen support Thomas Petazzoni
@ 2013-12-29 17:33 ` Thomas Petazzoni
  2013-12-29 17:50   ` Yann E. MORIN
  2013-12-29 17:33 ` [Buildroot] [PATCHv2 4/4] grub: add web reference that documents how to generate a splashimage Thomas Petazzoni
  3 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2013-12-29 17:33 UTC (permalink / raw)
  To: buildroot

This commit aligns the Grub handling of the splash screen with what is
done in the ISO9660 code.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/grub/grub.mk  |  5 ++++-
 boot/grub/menu.lst | 17 +++++++++++++----
 2 files changed, 17 insertions(+), 5 deletions(-)

diff --git a/boot/grub/grub.mk b/boot/grub/grub.mk
index 3be4a74..d22df88 100644
--- a/boot/grub/grub.mk
+++ b/boot/grub/grub.mk
@@ -82,7 +82,10 @@ GRUB_CONF_OPT = \
 ifeq ($(BR2_TARGET_GRUB_SPLASH),y)
 define GRUB_INSTALL_SPLASH
 	cp boot/grub/splash.xpm.gz $(TARGET_DIR)/boot/grub/
-	$(SED) 's/^#splashimage/splashimage/' $(TARGET_DIR)/boot/grub/menu.lst
+endef
+else
+define GRUB_INSTALL_SPLASH
+	$(SED) '/^splashimage/d' $(TARGET_DIR)/boot/grub/menu.lst
 endef
 endif
 
diff --git a/boot/grub/menu.lst b/boot/grub/menu.lst
index 7845fee..a231f7e 100644
--- a/boot/grub/menu.lst
+++ b/boot/grub/menu.lst
@@ -1,7 +1,16 @@
-default=0
-timeout=5
-#splashimage=(hd0,0)/boot/grub/splash.xpm.gz
-hiddenmenu
+default		0
+timeout		10
+
+# Used when no splashimage is used
+color 		cyan/blue white/blue
+
+# Gets enabled/disabled depending on Grub support for splashimage
+splashimage	(hd0,0)/boot/grub/splash.xpm.gz
+
+# Used when a splashimage is enabled
+foreground 	000000
+background 	cccccc
+
 title Buildroot
 	root (hd0,0)
 	kernel /boot/bzImage rw root=/dev/sda1
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCHv2 4/4] grub: add web reference that documents how to generate a splashimage
  2013-12-29 17:33 [Buildroot] [PATCHv2 0/4] grub/iso9660 improvements Thomas Petazzoni
                   ` (2 preceding siblings ...)
  2013-12-29 17:33 ` [Buildroot] [PATCHv2 3/4] grub: align splashscreen handling with iso9660 code Thomas Petazzoni
@ 2013-12-29 17:33 ` Thomas Petazzoni
  2013-12-29 17:48   ` Yann E. MORIN
  3 siblings, 1 reply; 9+ messages in thread
From: Thomas Petazzoni @ 2013-12-29 17:33 UTC (permalink / raw)
  To: buildroot

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 boot/grub/Config.in | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/boot/grub/Config.in b/boot/grub/Config.in
index 3ae8448..4db8642 100644
--- a/boot/grub/Config.in
+++ b/boot/grub/Config.in
@@ -42,8 +42,10 @@ config BR2_TARGET_GRUB_SPLASH
 	help
 	  Add support for splashimage.
 
-	  A splashimage is a 14-color indexed .xpm picture which
-	  is displayed as background for the grub menu.
+	  A splashimage is a 14-color indexed .xpm picture which is
+	  displayed as background for the grub menu. See
+	  http://www.katspace.org/computers/Grub_Splash/ for details
+	  on how to generate a splashimage.
 
 config BR2_TARGET_GRUB_DISKLESS
 	bool "diskless support"
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCHv2 1/4] linux: enable initrd/initramfs support when cpio rootfs is chosen
  2013-12-29 17:33 ` [Buildroot] [PATCHv2 1/4] linux: enable initrd/initramfs support when cpio rootfs is chosen Thomas Petazzoni
@ 2013-12-29 17:44   ` Yann E. MORIN
  0 siblings, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2013-12-29 17:44 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2013-12-29 18:33 +0100, Thomas Petazzoni spake thusly:
> When one enables the generation of a cpio archive of the root
> filesystem, the most likely usage is as an initramfs for the
> kernel. This commit ensures that the kernel has initramfs support when
> the rootfs cpio image format is chosen.
> 
> This will for example ensure that if the user selects the ISO9660
> filesystem format (which uses a cpio initramfs), the kernel will have
> proper support to load and use the initramfs.
> 
> It is worth mentionning that when BR2_TARGET_ROOTFS_INITRAMFS is
> enabled, then BR2_TARGET_ROOTFS_CPIO is always enabled. That's why we
> move the enabling of CONFIG_BLK_DEV_INITRD from the initramfs case to
> the cpio case.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCHv2 2/4] fs/iso9660: add Grub splashscreen support
  2013-12-29 17:33 ` [Buildroot] [PATCHv2 2/4] fs/iso9660: add Grub splashscreen support Thomas Petazzoni
@ 2013-12-29 17:47   ` Yann E. MORIN
  0 siblings, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2013-12-29 17:47 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2013-12-29 18:33 +0100, Thomas Petazzoni spake thusly:
> When Grub is built with splashscreen support, copy the splashscreen
> image to the ISO9660 filesystem. Otherwise, disable the splashscreen
> in the grub menu.lst file.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
> ---
>  fs/iso9660/iso9660.mk |  5 +++++
>  fs/iso9660/menu.lst   | 11 ++++++++++-
>  2 files changed, 15 insertions(+), 1 deletion(-)
> 
> diff --git a/fs/iso9660/iso9660.mk b/fs/iso9660/iso9660.mk
> index 56e87bb..0260d41 100644
> --- a/fs/iso9660/iso9660.mk
> +++ b/fs/iso9660/iso9660.mk
> @@ -16,6 +16,11 @@ $(BINARIES_DIR)/rootfs.iso9660: host-cdrkit host-fakeroot linux rootfs-cpio grub
>  	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
> +ifeq ($(BR2_TARGET_GRUB_SPLASH),)
> +	$(SED) '/splashimage/d' $(ISO9660_TARGET_DIR)/boot/grub/menu.lst

This would also get rid of the comments, but keep foreground/background
untouched. Maybe:
    /^splashimage/d

> +else
> +	cp boot/grub/splash.xpm.gz $(ISO9660_TARGET_DIR)/
> +endif
>  	cp $(LINUX_IMAGE_PATH) $(ISO9660_TARGET_DIR)/kernel
>  ifeq ($(BR2_TARGET_ROOTFS_INITRAMFS),y)
>  	$(SED) '/initrd/d'  $(ISO9660_TARGET_DIR)/boot/grub/menu.lst
> diff --git a/fs/iso9660/menu.lst b/fs/iso9660/menu.lst
> index ed7836a..c0bbff6 100644
> --- a/fs/iso9660/menu.lst
> +++ b/fs/iso9660/menu.lst
> @@ -1,6 +1,15 @@
>  default		0
>  timeout		10
> -color cyan/blue white/blue
> +
> +# Used when no splashimage is used
> +color 		cyan/blue white/blue
> +
> +# Gets enabled/disabled depending on Grub support for splashimage
> +splashimage	/splash.xpm.gz
> +
> +# Used when a splashimage is enabled
> +foreground 	000000
> +background 	cccccc
>  
>  title		Buildroot ISO9660 image
>  kernel		/kernel

With that fixed: Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCHv2 4/4] grub: add web reference that documents how to generate a splashimage
  2013-12-29 17:33 ` [Buildroot] [PATCHv2 4/4] grub: add web reference that documents how to generate a splashimage Thomas Petazzoni
@ 2013-12-29 17:48   ` Yann E. MORIN
  0 siblings, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2013-12-29 17:48 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2013-12-29 18:33 +0100, Thomas Petazzoni spake thusly:
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 9+ messages in thread

* [Buildroot] [PATCHv2 3/4] grub: align splashscreen handling with iso9660 code
  2013-12-29 17:33 ` [Buildroot] [PATCHv2 3/4] grub: align splashscreen handling with iso9660 code Thomas Petazzoni
@ 2013-12-29 17:50   ` Yann E. MORIN
  0 siblings, 0 replies; 9+ messages in thread
From: Yann E. MORIN @ 2013-12-29 17:50 UTC (permalink / raw)
  To: buildroot

Thomas, All,

On 2013-12-29 18:33 +0100, Thomas Petazzoni spake thusly:
> This commit aligns the Grub handling of the splash screen with what is
> done in the ISO9660 code.
> 
> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Acked-by: "Yann E. MORIN" <yann.morin.1998@free.fr>

But see below...

> diff --git a/boot/grub/grub.mk b/boot/grub/grub.mk
> index 3be4a74..d22df88 100644
> --- a/boot/grub/grub.mk
> +++ b/boot/grub/grub.mk
> @@ -82,7 +82,10 @@ GRUB_CONF_OPT = \
>  ifeq ($(BR2_TARGET_GRUB_SPLASH),y)
>  define GRUB_INSTALL_SPLASH
>  	cp boot/grub/splash.xpm.gz $(TARGET_DIR)/boot/grub/
> -	$(SED) 's/^#splashimage/splashimage/' $(TARGET_DIR)/boot/grub/menu.lst
> +endef
> +else
> +define GRUB_INSTALL_SPLASH
> +	$(SED) '/^splashimage/d' $(TARGET_DIR)/boot/grub/menu.lst

Here you already use '/^splashimage/d' so it's not really at-par with
the code in iso9660. ;-)

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2013-12-29 17:50 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-29 17:33 [Buildroot] [PATCHv2 0/4] grub/iso9660 improvements Thomas Petazzoni
2013-12-29 17:33 ` [Buildroot] [PATCHv2 1/4] linux: enable initrd/initramfs support when cpio rootfs is chosen Thomas Petazzoni
2013-12-29 17:44   ` Yann E. MORIN
2013-12-29 17:33 ` [Buildroot] [PATCHv2 2/4] fs/iso9660: add Grub splashscreen support Thomas Petazzoni
2013-12-29 17:47   ` Yann E. MORIN
2013-12-29 17:33 ` [Buildroot] [PATCHv2 3/4] grub: align splashscreen handling with iso9660 code Thomas Petazzoni
2013-12-29 17:50   ` Yann E. MORIN
2013-12-29 17:33 ` [Buildroot] [PATCHv2 4/4] grub: add web reference that documents how to generate a splashimage Thomas Petazzoni
2013-12-29 17:48   ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox