flex-builder mkrfs buildroot fails

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

flex-builder mkrfs buildroot fails

1,347 Views
edelhardbecker
Contributor I

Hello all,

we are trying to build a root fs with flexbuild 1803 and buildroot on a Ubuntu 16.04 development host. This should be the default setup. When running:

source ./setup.env

flex-builder -i mkrfs -r buildroot:tiny -a arm64

after some time the build fails with this error message:

make: Entering directory '/home/sick/flexbuild-updates/flexbuild_lsdk1803/packages/rfs/buildroot'
/usr/bin/make -j1 O=/home/sick/flexbuild-updates/flexbuild_lsdk1803/build/rfs/rootfs_buildroot_arm64_tiny HOSTCC="/usr/bin/gcc" HOSTCXX="/usr/bin/g++" silentoldconfig
make[2]: warning: -jN forced in submake: disabling jobserver mode.
GEN /home/sick/flexbuild-updates/flexbuild_lsdk1803/build/rfs/rootfs_buildroot_arm64_tiny/Makefile
>>> fmlib LSDK-17.12 Building
PATH="/home/sick/flexbuild-updates/flexbuild_lsdk1803/build/rfs/rootfs_buildroot_arm64_tiny/host/bin:/home/sick/flexbuild-updates/flexbuild_lsdk1803/build/rfs/rootfs_buildroot_arm64_tiny/host/sbin:/home/sick/flexbuild-updates/flexbuild_lsdk1803:/home/sick/flexbuild-updates/flexbuild_lsdk1803/tools:/home/sick/bin:/home/sick/.local/bin:/opt/cmake-3.12.3-Linux-x86_64/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/sick/bin" /usr/bin/make CC="/home/sick/flexbuild-updates/flexbuild_lsdk1803/build/rfs/rootfs_buildroot_arm64_tiny/host/bin/aarch64-linux-gnu-gcc" CROSS_COMPILE="/home/sick/flexbuild-updates/flexbuild_lsdk1803/build/rfs/rootfs_buildroot_arm64_tiny/host/bin/aarch64-linux-gnu-" KERNEL_SRC="/home/sick/flexbuild-updates/flexbuild_lsdk1803/packages/linux/dash-lts" PREFIX="/home/sick/flexbuild-updates/flexbuild_lsdk1803/build/rfs/rootfs_buildroot_arm64_tiny/host/aarch64-buildroot-linux-gnu/sysroot/usr" -C /home/sick/flexbuild-updates/flexbuild_lsdk1803/build/rfs/rootfs_buildroot_arm64_tiny/build/fmlib-LSDK-17.12
(CC) libfm-arm.o
src/fm_lib.c:56:10: fatal error: fm_ioctls.h: No such file or directory
 #include "fm_ioctls.h"
          ^~~~~~~~~~~~~
compilation terminated.
Makefile:105: recipe for target 'libfm-arm.o' failed
make[2]: *** [libfm-arm.o] Error 1

Investigating where fm_ioctls.h should come from shows, that it was included in linux-libc-dev-arm64-cross up to version 3.13.0 that was included with Ubuntu 14.04 (trusty). In the arm64-cross packages for 16.04 (and newer) it just is not included anymore.

How to solve this? Is there a compile flag that should help? Or a separate package to install?

Thanks and greetings,

Edelhard

0 Kudos
2 Replies

931 Views
edelhardbecker
Contributor I

Hi Pavel,

thanks for the info, but unfortunately that still doesn't work.

  1. the three "wget"s (1. .. 3.) succeeded
  2. No. 4. didn't work, because there is no configs/ubuntu/additional_packages_list_full; i changed the command to "flex-builder -i mkrfs -a arm64 -B additional_packages_list_tiny" (so it matches my intended "tiny" buildroot); this succeeded
  3. No. 5 (and 6) didn't work, because at that time there is no build/images/. Changed the target dir for 5. to build/apps/ (as in the README)
  4. but anyway, none of the three .tgz archives provide fm_ioctls.h (only the "components" archive has some fm_-stuff, see below), so my command (flex-builder -i mkrfs -r buildroot:tiny -a arm64) fails with the same error message as before
  5. Is it maybe necessary to build a kernel before the "mkrfs" works? That isn't mentioned as a prerequisite in the README, so i left it out (the purpose of my question is to find out, for our CI workflow, how to build a root-fs with minimal effort)

Thanks and Greetings,
Edelhard

$ sudo find . -name fm_ioctls.h
[ .. empty! .. ]

$ tar tvzf components_arm64.tgz | grep fm_
-rw-r--r-- root/root 132078 2017-07-01 02:23 components_arm64/include/fmd/Peripherals/fm_port_ext.h
-rw-r--r-- root/root 250624 2017-07-01 02:23 components_arm64/include/fmd/Peripherals/fm_pcd_ext.h
-rw-r--r-- root/root  39930 2017-07-01 02:23 components_arm64/include/fmd/Peripherals/fm_mac_ext.h
-rw-r--r-- root/root  18746 2017-07-01 02:23 components_arm64/include/fmd/Peripherals/fm_vsp_ext.h
-rw-r--r-- root/root  33281 2017-07-01 02:23 components_arm64/include/fmd/Peripherals/fm_ext.h
0 Kudos

931 Views
Pavel
NXP Employee
NXP Employee

Use the following commands before your command:

  1. wget http://www.nxp.com/lgfiles/sdk/lsdk1709/components_arm64.tgz
  2. wget http://www.nxp.com/lgfiles/sdk/lsdk1709/bootpartition_arm64_lts_4.9.tgz

 

  1. wget http://www.nxp.com/lgfiles/sdk/lsdk1709/arm64-modules-4.9.35.tgz

 

  1. flex-builder -i mkrfs -a arm64 -B additional_packages_list_full

 

  1. tar xvzf components_arm64.tgz -C build/images
  2. tar xvzf arm64-modules-<kernel_version>.tgz -C build/images/ubuntu_xenial_arm64_rootfs.d/lib/modules

tar xvzf arm64-modules-4.9.35.tgz -C build/images/ubuntu_xenial_arm64_rootfs.d/lib/modules

Have a great day,
Pavel Chubakov

 

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos