All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [genimage] Create a folder with a file using genimage
@ 2016-04-27 11:25 Oscar Gomez Fuente
  2016-04-28 21:40 ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Oscar Gomez Fuente @ 2016-04-27 11:25 UTC (permalink / raw)
  To: buildroot

Hi,


I would like to use genimage to create an overlay folder in boot.vfat
partition to add (.dtbo or .dtb)  files. Does anyone know how to do this?


Oscar Gomez Fuente
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160427/8e8c9537/attachment.html>

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

* [Buildroot] [genimage] Create a folder with a file using genimage
  2016-04-27 11:25 [Buildroot] [genimage] Create a folder with a file using genimage Oscar Gomez Fuente
@ 2016-04-28 21:40 ` Peter Korsgaard
  2016-04-29  6:26   ` Oscar Gomez Fuente
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2016-04-28 21:40 UTC (permalink / raw)
  To: buildroot

>>>>> "Oscar" == Oscar Gomez Fuente <oscargomezf@gmail.com> writes:

 > Hi,
 > I would like to use genimage to create an overlay folder in boot.vfat
 > partition to add (.dtbo or .dtb)  files. Does anyone know how to do this?

That is afaik not currently possible. We can either talk to the
pengutronix guys if they would be interested in adding such support
(E.G. either a "dir" type or allowing wildcards for the "file" type), or
you can generate the list of files outside genimage (E.G. in the
post-image script) and include that genimage snippet in the main file:

http://git.pengutronix.de/?p=genimage.git;a=blob;f=README#l16

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [genimage] Create a folder with a file using genimage
  2016-04-28 21:40 ` Peter Korsgaard
@ 2016-04-29  6:26   ` Oscar Gomez Fuente
  2016-04-29 12:23     ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Oscar Gomez Fuente @ 2016-04-29  6:26 UTC (permalink / raw)
  To: buildroot

Thank you very much Peter,

I've got two more questions related to genimage.

1?.- Is there any way to give the partition boot the label "BOOT" and the
partition rootfs the label "rootfs"? It will be very useful because when I
insert the sd card in a computer I'm going to know the folder name where is
going to be mounted the sd card.

2?.- When the sdcard.img is generated and when you make a dd command to the
sd card, it's wasted most of the size of the sd card. I usually use a
16GBytes sd card, and my sdcard.img is only  around 110 MB so the remaining
space is wasted. Is there any way to give the rootfs partition an extra
size (for example 1 Gbyte o something like that)? I was trying to use this,
but it doesn't work:

image sdcard.img {
  hdimage {
  }

  partition boot {
    partition-type = 0xC
    bootable = "true"
    image = "boot.vfat"
  }

  partition rootfs {
    partition-type = 0x83
    image = "rootfs.ext4"
    size = 1G
  }
}

Best regards.

Oscar Gomez Fuente.

On 28 April 2016 at 23:40, Peter Korsgaard <peter@korsgaard.com> wrote:

> >>>>> "Oscar" == Oscar Gomez Fuente <oscargomezf@gmail.com> writes:
>
>  > Hi,
>  > I would like to use genimage to create an overlay folder in boot.vfat
>  > partition to add (.dtbo or .dtb)  files. Does anyone know how to do
> this?
>
> That is afaik not currently possible. We can either talk to the
> pengutronix guys if they would be interested in adding such support
> (E.G. either a "dir" type or allowing wildcards for the "file" type), or
> you can generate the list of files outside genimage (E.G. in the
> post-image script) and include that genimage snippet in the main file:
>
> http://git.pengutronix.de/?p=genimage.git;a=blob;f=README#l16
>
> --
> Bye, Peter Korsgaard
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160429/061f42f0/attachment.html>

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

* [Buildroot] [genimage] Create a folder with a file using genimage
  2016-04-29  6:26   ` Oscar Gomez Fuente
@ 2016-04-29 12:23     ` Peter Korsgaard
  2016-04-29 16:46       ` Peter Korsgaard
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2016-04-29 12:23 UTC (permalink / raw)
  To: buildroot

>>>>> "Oscar" == Oscar Gomez Fuente <oscargomezf@gmail.com> writes:

 > Thank you very much Peter,
 > I've got two more questions related to genimage.

 > 1?.- Is there any way to give the partition boot the label "BOOT" and the
 > partition rootfs the label "rootfs"? It will be very useful because when I
 > insert the sd card in a computer I'm going to know the folder name where is
 > going to be mounted the sd card.

I think you are referring to fat/ext2 filesystem labels as PC-style
partitions don't have labels.

We currently don't have an option to set the ext2 label of the
filesystem Buildroot creates, but I'll add that now.

For the fat filesystem genimage creates it seems like you can set an
"extraargs" parameter in the genimage.cfg. These arguments will be
passed to mkdosfs, so you can do something like:


image boot.vfat {
  vfat {
    extraargs = "-n mylabel"
    ..

 > 2?.- When the sdcard.img is generated and when you make a dd command to the
 > sd card, it's wasted most of the size of the sd card. I usually use a
 > 16GBytes sd card, and my sdcard.img is only  around 110 MB so the remaining
 > space is wasted. Is there any way to give the rootfs partition an extra
 > size (for example 1 Gbyte o something like that)? I was trying to use this,
 > but it doesn't work:

There's two parts to this:

 - The size of the partition (what you specify with size = )
 - The size of the filesystem

Buildroot will per default only make the filesystem as big as needed to
contain the files you have built. You can either specify extra space
with BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS or simply resize the filesystem
to match the partition after writing it to a sdcard using resize2fs
<device>.

-- 
Venlig hilsen,
Peter Korsgaard 

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

* [Buildroot] [genimage] Create a folder with a file using genimage
  2016-04-29 12:23     ` Peter Korsgaard
@ 2016-04-29 16:46       ` Peter Korsgaard
  2016-05-02  9:51         ` Oscar Gomez Fuente
  0 siblings, 1 reply; 6+ messages in thread
From: Peter Korsgaard @ 2016-04-29 16:46 UTC (permalink / raw)
  To: buildroot

>>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:

Hi,

 >> 1?.- Is there any way to give the partition boot the label "BOOT" and the
 >> partition rootfs the label "rootfs"? It will be very useful because when I
 >> insert the sd card in a computer I'm going to know the folder name where is
 >> going to be mounted the sd card.

 > I think you are referring to fat/ext2 filesystem labels as PC-style
 > partitions don't have labels.

 > We currently don't have an option to set the ext2 label of the
 > filesystem Buildroot creates, but I'll add that now.

Ehh, I remembered wrong - We already DO have an option for it:

config BR2_TARGET_ROOTFS_EXT2_LABEL
	string "filesystem label"

-- 
Bye, Peter Korsgaard

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

* [Buildroot] [genimage] Create a folder with a file using genimage
  2016-04-29 16:46       ` Peter Korsgaard
@ 2016-05-02  9:51         ` Oscar Gomez Fuente
  0 siblings, 0 replies; 6+ messages in thread
From: Oscar Gomez Fuente @ 2016-05-02  9:51 UTC (permalink / raw)
  To: buildroot

Ok Peter,

I've
checked BR2_TARGET_ROOTFS_EXT2_LABEL, BR2_TARGET_ROOTFS_EXT2_EXTRA_BLOCKS
and I've changed the boot image label:

...
image boot.vfat {
  vfat {
    extraargs = "-n mylabel"
...

And all work fine.

Thank you very much. Best regards.

Oscar Gomez Fuente
On 29 April 2016 at 18:46, Peter Korsgaard <peter@korsgaard.com> wrote:

> >>>>> "Peter" == Peter Korsgaard <peter@korsgaard.com> writes:
>
> Hi,
>
>  >> 1?.- Is there any way to give the partition boot the label "BOOT" and
> the
>  >> partition rootfs the label "rootfs"? It will be very useful because
> when I
>  >> insert the sd card in a computer I'm going to know the folder name
> where is
>  >> going to be mounted the sd card.
>
>  > I think you are referring to fat/ext2 filesystem labels as PC-style
>  > partitions don't have labels.
>
>  > We currently don't have an option to set the ext2 label of the
>  > filesystem Buildroot creates, but I'll add that now.
>
> Ehh, I remembered wrong - We already DO have an option for it:
>
> config BR2_TARGET_ROOTFS_EXT2_LABEL
>         string "filesystem label"
>
> --
> Bye, Peter Korsgaard
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20160502/33d2fee9/attachment.html>

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

end of thread, other threads:[~2016-05-02  9:51 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-27 11:25 [Buildroot] [genimage] Create a folder with a file using genimage Oscar Gomez Fuente
2016-04-28 21:40 ` Peter Korsgaard
2016-04-29  6:26   ` Oscar Gomez Fuente
2016-04-29 12:23     ` Peter Korsgaard
2016-04-29 16:46       ` Peter Korsgaard
2016-05-02  9:51         ` Oscar Gomez Fuente

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.