* [Buildroot] Setting better names for partitions
@ 2020-04-14 17:50 Fabio Estevam
2020-04-15 5:38 ` Thomas Petazzoni
0 siblings, 1 reply; 4+ messages in thread
From: Fabio Estevam @ 2020-04-14 17:50 UTC (permalink / raw)
To: buildroot
Hi,
On i.MX we usually generate the boot images via
board/freescale/common/imx/post-image.sh script, which creates two
partitions:
- One that contains the dtb and kernel
- One for rootfs
The names of these partitions are strings like 5934-861D and
ad09a287-46a9-4790-ba97-fbbb549e5e96.
Is there a way to specify a better name for the partitions? Something
like "boot" and "rootfs" instead?
If so, how can this be achieved?
Thanks,
Fabio Estevam
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] Setting better names for partitions
2020-04-14 17:50 [Buildroot] Setting better names for partitions Fabio Estevam
@ 2020-04-15 5:38 ` Thomas Petazzoni
2020-04-15 7:27 ` Arnout Vandecappelle
0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2020-04-15 5:38 UTC (permalink / raw)
To: buildroot
Hello Fabio,
On Tue, 14 Apr 2020 14:50:32 -0300
Fabio Estevam <festevam@gmail.com> wrote:
> On i.MX we usually generate the boot images via
> board/freescale/common/imx/post-image.sh script, which creates two
> partitions:
> - One that contains the dtb and kernel
> - One for rootfs
>
> The names of these partitions are strings like 5934-861D and
> ad09a287-46a9-4790-ba97-fbbb549e5e96.
>
> Is there a way to specify a better name for the partitions? Something
> like "boot" and "rootfs" instead?
>
> If so, how can this be achieved?
With DOS partition tables, there is no concept of "partition name" as
the partition table doesn't have any entry/space to store partition
names.
The strings like 5934-861D and ad09a287-46a9-4790-ba97-fbbb549e5e96 are
filesystems labels.
According to https://github.com/pengutronix/genimage/ and from a quick
look at the code, it seems like you can set such labels by doing:
label = "boot"
label = "rootfs"
inside the description of such images.
However, notice that when we do:
image boot.vfat {
vfat {
files = {
"bcm2708-rpi-b.dtb",
"bcm2708-rpi-b-plus.dtb",
"bcm2708-rpi-cm.dtb",
"rpi-firmware/bootcode.bin",
"rpi-firmware/cmdline.txt",
"rpi-firmware/config.txt",
"rpi-firmware/fixup.dat",
"rpi-firmware/start.elf",
"zImage"
}
}
size = 32M
}
image sdcard.img {
hdimage {
}
partition boot {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
}
partition rootfs {
partition-type = 0x83
image = "rootfs.ext4"
}
}
The FAT filesystem image is created by genimage, and therefore the
label property would have an effect. However, the ext4 filesystem image
is created by Buildroot, so you will have to use the
BR2_TARGET_ROOTFS_EXT2_LABEL Buildroot option to set the label.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] Setting better names for partitions
2020-04-15 5:38 ` Thomas Petazzoni
@ 2020-04-15 7:27 ` Arnout Vandecappelle
2020-04-15 12:38 ` Fabio Estevam
0 siblings, 1 reply; 4+ messages in thread
From: Arnout Vandecappelle @ 2020-04-15 7:27 UTC (permalink / raw)
To: buildroot
On 15/04/2020 07:38, Thomas Petazzoni wrote:
[snip]
> However, the ext4 filesystem image
> is created by Buildroot, so you will have to use the
> BR2_TARGET_ROOTFS_EXT2_LABEL Buildroot option to set the label.
It might make sense to change the default of that config to rootfs instead of
empty. The aria and arietta defconfigs already override it to exactly that.
Regards,
Arnout
^ permalink raw reply [flat|nested] 4+ messages in thread
* [Buildroot] Setting better names for partitions
2020-04-15 7:27 ` Arnout Vandecappelle
@ 2020-04-15 12:38 ` Fabio Estevam
0 siblings, 0 replies; 4+ messages in thread
From: Fabio Estevam @ 2020-04-15 12:38 UTC (permalink / raw)
To: buildroot
Hi Thomas and Arnout,
On Wed, Apr 15, 2020 at 4:27 AM Arnout Vandecappelle <arnout@mind.be> wrote:
> It might make sense to change the default of that config to rootfs instead of
> empty. The aria and arietta defconfigs already override it to exactly that.
Thanks for your help! Now I get proper volume-labels.
I have sent two patches to address that.
Thanks
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2020-04-15 12:38 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-04-14 17:50 [Buildroot] Setting better names for partitions Fabio Estevam
2020-04-15 5:38 ` Thomas Petazzoni
2020-04-15 7:27 ` Arnout Vandecappelle
2020-04-15 12:38 ` Fabio Estevam
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox