From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] Setting better names for partitions
Date: Wed, 15 Apr 2020 07:38:40 +0200 [thread overview]
Message-ID: <20200415073840.7f790c52@windsurf.home> (raw)
In-Reply-To: <CAOMZO5Cr9PUnSNDtMk7rcA_mC3FTe1AkCJT=9Jpj4WUKSMeDJw@mail.gmail.com>
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
next prev parent reply other threads:[~2020-04-15 5:38 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-14 17:50 [Buildroot] Setting better names for partitions Fabio Estevam
2020-04-15 5:38 ` Thomas Petazzoni [this message]
2020-04-15 7:27 ` Arnout Vandecappelle
2020-04-15 12:38 ` Fabio Estevam
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200415073840.7f790c52@windsurf.home \
--to=thomas.petazzoni@bootlin.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox