UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
7,492 Views
Registered: ‎04-14-2011

util-linux error when invoked from build-root

Jump to solution

Hello,

 

I am using buildroot-2013.02 to create an initramfs for Microblaze (Big Indian), selected busybox 1.21.0, e2fsprogs-1.42.7, util-linux-2.20.1

 

I need to have "mke2fs" in my filesystem, so I selected it from

"Package Selection for the target"  > "Filesystem and flash utilities" > "e2fsprogs" > "mkfs.ext2"

 

I get the following error when compiling:

 

 

 

../../lib/sysfs.c:244: warning: implicit declaration of function 'fdopendir'
../../lib/sysfs.c:244: warning: assignment makes pointer from integer without a cast
../../lib/sysfs.c: In function 'sysfs_is_partition_dirent':
../../lib/sysfs.c:292: warning: implicit declaration of function 'faccessat'
CCLD libblkid.la
copying selected object files to avoid basename conflicts...
make[5]: Leaving directory `/home/bashar/buildroot-2013.02/output/build/util-linux-2.20.1/libblkid/src'
make[4]: Leaving directory `/home/bashar/buildroot-2013.02/output/build/util-linux-2.20.1/libblkid/src'
CCLD mkswap
CCLD swaplabel
../libblkid/src/.libs/libblkid.a(sysfs.o): In function `sysfs_is_partition_dirent':
: undefined reference to `faccessat'
../libblkid/src/.libs/libblkid.a(sysfs.o): In function `sysfs_opendir':
: undefined reference to `fdopendir'
collect2: ld returned 1 exit status
make[3]: *** [swaplabel] Error 1
make[3]: *** Waiting for unfinished jobs....
../libblkid/src/.libs/libblkid.a(sysfs.o): In function `sysfs_is_partition_dirent':
: undefined reference to `faccessat'
../libblkid/src/.libs/libblkid.a(sysfs.o): In function `sysfs_opendir':
: undefined reference to `fdopendir'
collect2: ld returned 1 exit status
make[3]: *** [mkswap] Error 1
make[3]: Leaving directory `/home/bashar/buildroot-2013.02/output/build/util-linux-2.20.1/disk-utils'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/bashar/buildroot-2013.02/output/build/util-linux-2.20.1'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/home/bashar/buildroot-2013.02/output/build/util-linux-2.20.1'
make: *** [/home/bashar/buildroot-2013.02/output/build/util-linux-2.20.1/.stamp_built] Error 2

 

 

if I unselect ""e2fsprogs", it can compile successfully, but I am doing the whole thing just to get mkfs.ext2 in my system.

 

I noticed that, when I select "e2fsprogs", there are other features that becomes atoatically selected:

-*- util-linux

-*-   build libuuid and uuid utilities

-*-   build libblkid and blkid utilities

 

it seems that some header files are missing, anyone had a similar problem ?

 

ps: does anyone has a .config file that generates initramfs for Microblaze plb?

Best Regards,
B.Romanous
Tags (2)
0 Kudos
1 Solution

Accepted Solutions
Adventurer
Adventurer
10,133 Views
Registered: ‎01-29-2008

Re: util-linux error when invoked from build-root

Jump to solution

Hi,

 

I never tried to add mke2fs, but maybe you can try to add it into busybox not in buildroot :

make busybox-menuconfig 

 

(not sure mke2fs exists in busybox....)

 

I found some (old) post about similar issues :

https://dev.openwrt.org/ticket/4212

google

 

Hope you will find a solution

 

PS : why do you say :

does anyone has a .config file that generates initramfs for Microblaze plb?

 

Because Microblaze plb is little endian, so be carefull you need a different kernel/compiler if you are using plb instead of axi

 

View solution in original post

0 Kudos
5 Replies
Contributor
Contributor
7,470 Views
Registered: ‎04-14-2011

Re: util-linux error when invoked from build-root

Jump to solution
anyone? please help!

is there any more information I can provide?
Best Regards,
B.Romanous
0 Kudos
Adventurer
Adventurer
10,134 Views
Registered: ‎01-29-2008

Re: util-linux error when invoked from build-root

Jump to solution

Hi,

 

I never tried to add mke2fs, but maybe you can try to add it into busybox not in buildroot :

make busybox-menuconfig 

 

(not sure mke2fs exists in busybox....)

 

I found some (old) post about similar issues :

https://dev.openwrt.org/ticket/4212

google

 

Hope you will find a solution

 

PS : why do you say :

does anyone has a .config file that generates initramfs for Microblaze plb?

 

Because Microblaze plb is little endian, so be carefull you need a different kernel/compiler if you are using plb instead of axi

 

View solution in original post

0 Kudos
Contributor
Contributor
7,456 Views
Registered: ‎04-14-2011

Re: util-linux error when invoked from build-root

Jump to solution
make busybox-menuconfig worked like a charm
i added mkfs.ext2 and compiled using

make busybox

i copied the following folders :bin, sbin and usr from ~/buildroot-2013.02/output/target to my old initramfs folder ( I replaced the three original folders with these three) and rebuilt the kernel

now i have all the mkfs app working on xlnx linux

thanks a lot my friend, this is so much easier than using using build root

I have a note that Microblaze plb is Big endian while axi is the small endian
thanks again zben :)

Best Regards,
B.Romanous
0 Kudos
Adventurer
Adventurer
7,450 Views
Registered: ‎01-29-2008

Re: util-linux error when invoked from build-root

Jump to solution

Hi,

 

You're welcome bromanous.

 

Just some points :

  • You don't really need to do "make busybox" a simple "make" should do the trick : in fact busybox is a part of buildroot, when you do make, it will call "make busybox". 
  • You don't have to copy the bin, sbin... folders, normally it is automatic when you do "make"
  • In fact when you want to add something look if it exists in busybox menuconfig, if not go to buildroot : busybox has I said is part of buildroot : it is generally smaller (in term of binary size) and more easy to compile. But buildroot is still required and can be helpfull for exemple to add custom package

Bye and good luck for your project

0 Kudos
Contributor
Contributor
7,446 Views
Registered: ‎04-14-2011

Re: util-linux error when invoked from build-root

Jump to solution

The problem with buildroot was that it failed to solve the dependencies with the rest of the tools,

 

when I activated some functions from "e2fsprogs", this in turn activated the build of other functions from "util-linux" package (build libuuid and uuid utilities, build libblkid and blkid utilities)

 

however, the make process would fail due the errors posted in the main thread. I wish I can figure out the solution to:

 

 


 

../libblkid/src/.libs/libblkid.a(sysfs.o): In function `sysfs_is_partition_dirent':
: undefined reference to `faccessat'
../libblkid/src/.libs/libblkid.a(sysfs.o): In function `sysfs_opendir':
: undefined reference to `fdopendir'


 

and use buildroot to generate the ready initramfs.cpio file but I had to reside to that hack to keep my project going.

 

if anyone knows what triggered theses errors above, please share your ideas with us.

Best Regards,
B.Romanous
0 Kudos