* [Buildroot] Further partition creation with genimage fails
@ 2018-02-01 8:32 AAlex_
2018-02-01 10:19 ` Peter Korsgaard
0 siblings, 1 reply; 3+ messages in thread
From: AAlex_ @ 2018-02-01 8:32 UTC (permalink / raw)
To: buildroot
Hi,
trying to define a further (third) partition within the disk.img fails. With
error messge:
/genext2fs: couldn't allocate a block (no free space)
ext4(data.ext4): failed to generate data.ext4/
Added to the disk.img block in genimage config file a partition named
data.ext4
(complete config script genimage config on pastebin
<https://pastebin.com/yN1Zfb5r> )
Creating manually the partition file via dd within the output/image folder
works.
But the goal is creating the partition file when building the system.
Thanks for help or proposal
Regards,
AAlex
--
Sent from: http://buildroot-busybox.2317881.n4.nabble.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Buildroot] Further partition creation with genimage fails
2018-02-01 8:32 [Buildroot] Further partition creation with genimage fails AAlex_
@ 2018-02-01 10:19 ` Peter Korsgaard
2018-02-01 12:57 ` AAlex_
0 siblings, 1 reply; 3+ messages in thread
From: Peter Korsgaard @ 2018-02-01 10:19 UTC (permalink / raw)
To: buildroot
>>>>> "AAlex" == AAlex <earthquake.de@freenet.de> writes:
> Hi,
> trying to define a further (third) partition within the disk.img fails. With
> error messge:
> /genext2fs: couldn't allocate a block (no free space)
> ext4(data.ext4): failed to generate data.ext4/
> Added to the disk.img block in genimage config file a partition named
> data.ext4
> (complete config script genimage config on pastebin
> <https://pastebin.com/yN1Zfb5r> )
> Creating manually the partition file via dd within the output/image folder
> works.
> But the goal is creating the partition file when building the system.
> Thanks for help or proposal
Looking at the genimage code (image-ext2.c) I see it runs genext2fs:
ret = systemp(image, "%s -d %s --size-in-blocks=%lld -i 16384 %s %s",
get_opt("genext2fs"),
mountpath(image), image->size / 1024, imageoutfile(image),
extraargs);
You could run genimage with '--loglevel 2' to see exactly what arguments it was
executed with.
I did a quick test here, and it seems to work for me. You do have enough
disk space on your build machine, right?
Do notice that we have moved away from using genext2fs for creating the
ext2/3/4 rootfs in Buildroot. Once issue with genext2fs is that it
doesn't know about the new features in ext3/4, so depending on your use
case you may be better up running mkfs.ext4 in your post-image script
manually.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 3+ messages in thread* [Buildroot] Further partition creation with genimage fails
2018-02-01 10:19 ` Peter Korsgaard
@ 2018-02-01 12:57 ` AAlex_
0 siblings, 0 replies; 3+ messages in thread
From: AAlex_ @ 2018-02-01 12:57 UTC (permalink / raw)
To: buildroot
Hi,
enabled loglevel 2 in genimage,
the data.ext4 is given as a further argument to genext2fs
genext2fs -d
<DIR>/buildroot2017.11rc/pc_x86_64_efi_defconfig/output/build/genimage.tmp/root
--size-in-blocks=131072 -i 16384
<DIR>/buildroot2017.11rc/pc_x86_64_efi_defconfig/output/images/data.ext4
But as you mentioned i will not longer use the genext2fs tool, so what i
did:
Editing board/pc/post-image.sh, added following:
/dd if=/dev/zero of=${BINARIES_DIR}/data.ext4 bs=124M count=1
mkfs.ext4 -F ${BINARIES_DIR}/data.ext4
echo "created: ${BINARIES_DIR}/data.ext4"
/
And keep just the partition data{} ]entry in the board/pc/genimage-efi.cfg:
/partition data {
partition-type = 0x83
image = "data.ext4"
}/
This works fine...and no further dependency on genext2fs tool.
So i dont need BR2_PACKAGE_HOST_GENEXT2FS anymore.
Regards,
AAlex
--
Sent from: http://buildroot-busybox.2317881.n4.nabble.com/
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-02-01 12:57 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-01 8:32 [Buildroot] Further partition creation with genimage fails AAlex_
2018-02-01 10:19 ` Peter Korsgaard
2018-02-01 12:57 ` AAlex_
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox