Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] fs/romfs: add U-Boot image support
@ 2015-06-08 16:49 Hoang Tran
  2015-06-08 20:28 ` Arnout Vandecappelle
  2015-06-14 21:29 ` Thomas Petazzoni
  0 siblings, 2 replies; 6+ messages in thread
From: Hoang Tran @ 2015-06-08 16:49 UTC (permalink / raw)
  To: buildroot

Adds U-Boot image support for romfs root filesystems. This allows you to
use the bootm command in U-Boot to load the rootfs.

Signed-off-by: Hoang Tran <hoang.tran@vnoss.org>
---
 fs/romfs/Config.in | 13 +++++++++++++
 fs/romfs/romfs.mk  | 10 +++++++++-
 2 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/fs/romfs/Config.in b/fs/romfs/Config.in
index 84944a0..34faf2d 100644
--- a/fs/romfs/Config.in
+++ b/fs/romfs/Config.in
@@ -2,3 +2,16 @@ config BR2_TARGET_ROOTFS_ROMFS
 	bool "romfs root filesystem"
 	help
 	  Build a romfs image of the root filesystem.
+
+if BR2_TARGET_ROOTFS_ROMFS
+
+config BR2_TARGET_ROOTFS_ROMFS_UIMAGE
+	bool "u-boot image of romfs root filesystem"
+	select BR2_PACKAGE_HOST_UBOOT_TOOLS
+	help
+	  Add a u-boot header to the romfs root filesystem. This allows
+	  the u-boot image to be loaded with the bootm command in U-Boot.
+
+	  The u-boot image will be called rootfs.romfs.uboot
+
+endif
diff --git a/fs/romfs/romfs.mk b/fs/romfs/romfs.mk
index e0ac65f..9fa5005 100644
--- a/fs/romfs/romfs.mk
+++ b/fs/romfs/romfs.mk
@@ -12,4 +12,12 @@ define ROOTFS_ROMFS_CMD
 	$(HOST_DIR)/usr/bin/genromfs -d $(TARGET_DIR) -f $@
 endef
 
-$(eval $(call ROOTFS_TARGET,romfs))
\ No newline at end of file
+$(BINARIES_DIR)/rootfs.romfs.uboot: $(BINARIES_DIR)/rootfs.romfs host-uboot-tools
+	$(MKIMAGE) -A $(MKIMAGE_ARCH) -T ramdisk -O linux \
+		-C none -d $<$(ROOTFS_ROMFS_COMPRESS_EXT) $@
+
+ifeq ($(BR2_TARGET_ROOTFS_ROMFS_UIMAGE),y)
+ROOTFS_ROMFS_POST_TARGETS += $(BINARIES_DIR)/rootfs.romfs.uboot
+endif
+
+$(eval $(call ROOTFS_TARGET,romfs))
-- 
2.3.5

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

* [Buildroot] [PATCH 1/1] fs/romfs: add U-Boot image support
  2015-06-08 16:49 [Buildroot] [PATCH 1/1] fs/romfs: add U-Boot image support Hoang Tran
@ 2015-06-08 20:28 ` Arnout Vandecappelle
  2015-06-14 21:29 ` Thomas Petazzoni
  1 sibling, 0 replies; 6+ messages in thread
From: Arnout Vandecappelle @ 2015-06-08 20:28 UTC (permalink / raw)
  To: buildroot

On 06/08/15 18:49, Hoang Tran wrote:
> Adds U-Boot image support for romfs root filesystems. This allows you to
> use the bootm command in U-Boot to load the rootfs.

 Why would you want to do that? I don't see any reason to use the old
block-device-initrd rather than the usual cpio-initramfs...


 Regards,
 Arnout

> 
> Signed-off-by: Hoang Tran <hoang.tran@vnoss.org>
[snip]


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

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

* [Buildroot] [PATCH 1/1] fs/romfs: add U-Boot image support
  2015-06-08 16:49 [Buildroot] [PATCH 1/1] fs/romfs: add U-Boot image support Hoang Tran
  2015-06-08 20:28 ` Arnout Vandecappelle
@ 2015-06-14 21:29 ` Thomas Petazzoni
  2015-06-15 14:46   ` Hoang Tran
  1 sibling, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-06-14 21:29 UTC (permalink / raw)
  To: buildroot

Dear Hoang Tran,

On Mon,  8 Jun 2015 09:49:56 -0700, Hoang Tran wrote:
> Adds U-Boot image support for romfs root filesystems. This allows you to
> use the bootm command in U-Boot to load the rootfs.
> 
> Signed-off-by: Hoang Tran <hoang.tran@vnoss.org>
> ---
>  fs/romfs/Config.in | 13 +++++++++++++
>  fs/romfs/romfs.mk  | 10 +++++++++-
>  2 files changed, 22 insertions(+), 1 deletion(-)

Considering the absence of reaction to Arnout's comment about your
patch, I've marked it as 'Rejected' in our patch tracking system. Of
course, if you believe the patch is still useful despite Arnout
comment, do not hesitate to resend an updated version with an extended
justification.

Thanks,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 1/1] fs/romfs: add U-Boot image support
  2015-06-14 21:29 ` Thomas Petazzoni
@ 2015-06-15 14:46   ` Hoang Tran
  2015-06-15 14:51     ` Thomas Petazzoni
  0 siblings, 1 reply; 6+ messages in thread
From: Hoang Tran @ 2015-06-15 14:46 UTC (permalink / raw)
  To: buildroot

> > Adds U-Boot image support for romfs root filesystems. This allows you to
> > use the bootm command in U-Boot to load the rootfs.
> >
> > Signed-off-by: Hoang Tran <hoang.tran@vnoss.org>
> > ---
> >  fs/romfs/Config.in | 13 +++++++++++++
> >  fs/romfs/romfs.mk  | 10 +++++++++-
> >  2 files changed, 22 insertions(+), 1 deletion(-)
>
> Considering the absence of reaction to Arnout's comment about your
> patch, I've marked it as 'Rejected' in our patch tracking system. Of
> course, if you believe the patch is still useful despite Arnout
> comment, do not hesitate to resend an updated version with an extended
> justification.

Dear Thomas, Arnout,

Sorry I did not response because of the problem of my email client.
But anyway I agree with Arnout.
My rootfs is in romfs and I intended to make a uRamdisk for quick testing.
But we could use cpio Ramdisk instead.

Regards,
Hoang

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

* [Buildroot] [PATCH 1/1] fs/romfs: add U-Boot image support
  2015-06-15 14:46   ` Hoang Tran
@ 2015-06-15 14:51     ` Thomas Petazzoni
  2015-06-15 14:59       ` Hoang Tran
  0 siblings, 1 reply; 6+ messages in thread
From: Thomas Petazzoni @ 2015-06-15 14:51 UTC (permalink / raw)
  To: buildroot

Dear Hoang Tran,

On Mon, 15 Jun 2015 10:46:08 -0400, Hoang Tran wrote:

> Sorry I did not response because of the problem of my email client.
> But anyway I agree with Arnout.
> My rootfs is in romfs and I intended to make a uRamdisk for quick testing.
> But we could use cpio Ramdisk instead.

a "uRamdisk" can be in cpio format. Basically the "u" is just a
container for a ramdisk, and the ramdisk itself can use the cpio
format, or ext2, or whatever filesystem you want. However, by using
cpio, you leverage the initramfs mechanism of the kernel, which is much
better than initrd in terms of memory consumption.

See:

  https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

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

* [Buildroot] [PATCH 1/1] fs/romfs: add U-Boot image support
  2015-06-15 14:51     ` Thomas Petazzoni
@ 2015-06-15 14:59       ` Hoang Tran
  0 siblings, 0 replies; 6+ messages in thread
From: Hoang Tran @ 2015-06-15 14:59 UTC (permalink / raw)
  To: buildroot

On Mon, Jun 15, 2015 at 10:51 AM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Hoang Tran,
>
> On Mon, 15 Jun 2015 10:46:08 -0400, Hoang Tran wrote:
>
>> Sorry I did not response because of the problem of my email client.
>> But anyway I agree with Arnout.
>> My rootfs is in romfs and I intended to make a uRamdisk for quick testing.
>> But we could use cpio Ramdisk instead.
>
> a "uRamdisk" can be in cpio format. Basically the "u" is just a
> container for a ramdisk, and the ramdisk itself can use the cpio
> format, or ext2, or whatever filesystem you want. However, by using
> cpio, you leverage the initramfs mechanism of the kernel, which is much
> better than initrd in terms of memory consumption.
>
> See:
>
>   https://www.kernel.org/doc/Documentation/filesystems/ramfs-rootfs-initramfs.txt
>

I get it. That is really useful. Thank you.

Hoang

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

end of thread, other threads:[~2015-06-15 14:59 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-06-08 16:49 [Buildroot] [PATCH 1/1] fs/romfs: add U-Boot image support Hoang Tran
2015-06-08 20:28 ` Arnout Vandecappelle
2015-06-14 21:29 ` Thomas Petazzoni
2015-06-15 14:46   ` Hoang Tran
2015-06-15 14:51     ` Thomas Petazzoni
2015-06-15 14:59       ` Hoang Tran

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