This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Issue while building the OpenEmbedded filesysytem from source (ARM Versatile Express Juno r2 Development Platform)

Similar to this thread, i'm having some hard time building the openembedded filesystem.

So far I have managed to follow this tutoriall until the "Booting the board" section. After running the board some errors appear during the execution:

Execution of the PuTTY shell (Part 1)

Execution of the PuTTY shell (Part 2)

This lead me to follow the "Addendum B: Building the OpenEmbedded filesysytem from source" 

(I thought this part was optional since in this section "Initialising a workspace" it says "The script will guide you through the process of initialising your workspace, automatically downloading all relevant source files and required binaries.")

I executed this commands with no problems:

/* Create workspace */
/* WARNING: Do *not* create this as a subdirectory of the main Linaro Arm Platforms workspace created by `workspace_yy.mm' above */
$ mkdir openembedded
$ cd openembedded
$ export OE_HOME=`pwd`
$ git clone git://git.linaro.org/openembedded/jenkins-setup.git
$ cd $OE_HOME/jenkins-setup
$ git checkout release-YY.MM
$ cd $OE_HOME
$ sudo jenkins-setup/pre-build-root-install-dependencies.sh
$ jenkins-setup/init-and-build.sh
$ cd $OE_HOME/openembedded-core
$ ./oe-init-build-env
/* Add bitbake to your $PATH */
$ export PATH=$OE_HOME/openembedded-core/bitbake/bin:$PATH


But, after running this commands:

$ cd $OE_HOME/build
$ bitbake-layers show-recipes


I get the following Warnings and Errors (from the log file located in the directory /Desktop/openembedded/build/tmp-glibc/log/cooker)):

WARNING: /home/lfpm1993/Desktop/openembedded/meta-linaro/meta-ilp32/recipes-overlayed/glibc/glibc_2.26.bb: Exception during build_dependencies for do_install
WARNING: /home/lfpm1993/Desktop/openembedded/meta-linaro/meta-ilp32/recipes-overlayed/glibc/glibc_2.26.bb: Error during finalise of /home/lfpm1993/Desktop/openembedded/meta-linaro/meta-ilp32/recipes-overlayed/glibc/glibc_2.26.bb
WARNING: /home/lfpm1993/Desktop/openembedded/meta-linaro/meta-ilp32/recipes-overlayed/glibc/glibc-initial_2.26.bb: Exception during build_dependencies for do_install
WARNING: /home/lfpm1993/Desktop/openembedded/meta-linaro/meta-ilp32/recipes-overlayed/glibc/glibc-initial_2.26.bb: Error during finalise of /home/lfpm1993/Desktop/openembedded/meta-linaro/meta-ilp32/recipes-overlayed/glibc/glibc-initial_2.26.bb
ERROR: ExpansionError during parsing /home/lfpm1993/Desktop/openembedded/meta-linaro/meta-ilp32/recipes-overlayed/glibc/glibc_2.26.bb
Traceback (most recent call last):
bb.data_smart.ExpansionError: Failure expanding variable do_install, expression was 	oe_runmake install_root=/home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image install
	for r in bootparam_prot.x nlm_prot.x rstat.x 	  yppasswd.x klm_prot.x rex.x sm_inter.x mount.x 	  rusers.x spray.x nfs_prot.x rquota.x key_prot.x; do
		h=`echo $r|sed -e's,\.x$,.h,'`
		install -m 0644 /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/git/sunrpc/rpcsvc/$h /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image//usr/include/rpcsvc/
	done
	install -Dm 0644 /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/etc/ld.so.conf /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image//etc/ld.so.conf
	install -d /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/usr/lib/locale
	make -f /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/generate-supported.mk IN="/home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/git/localedata/SUPPORTED" OUT="/home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/SUPPORTED"
	# get rid of some broken files...
	for i in ; do
		sed -i "/$i/d" /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/SUPPORTED
	done
	rm -f /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/etc/rpc
	rm -rf /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/usr/share/zoneinfo
	rm -rf /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/usr/libexec/getconf
	rm -f /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/etc/localtime
	rm -rf /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/var

	# remove empty glibc dir
	if [ -d /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/usr/libexec ]; then
		rmdir --ignore-fail-on-non-empty /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/usr/libexec
	fi

	oe_multilib_header bits/syscall.h bits/long-double.h

	if [ -f /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/usr/bin/mtrace ]; then
		sed -i -e '1s,#!.*perl,#! /usr/bin/env perl,' -e '2s,exec.*perl,exec /usr/bin/env perl,' /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/usr/bin/mtrace
	fi
	rm -rf /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/usr/include/rpcsvc/rquota*
	# Info dir listing isn't interesting at this point so remove it if it exists.
	if [ -e "/home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/usr/share/info/dir" ]; then
		rm -f /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/usr/share/info/dir
	fi

	if ! ${@bb.utils.contains('DISTRO_FEATURES', 'ldconfig', 'true', 'false', d)}; then
		# The distro doesn't want these files so let's not install them
		rm -f /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/etc/ld.so.conf
		rm -f /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/sbin/ldconfig
		# This directory will be empty now so remove it too.
		# But check whether it exists first, since it won't for glibc-initial.
		if [ -d /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/etc ]; then
			rmdir /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/etc
		fi
	fi

	if echo glibc|grep -q "glibc-initial"; then
		return
	fi

	install -d /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/etc/init.d
	install -d /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/var/db/nscd
	install -m 0755 /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/git/nscd/nscd.init /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/etc/init.d/nscd
	install -m 0755 /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/git/nscd/nscd.conf /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/etc/nscd.conf
	sed -i "s%daemon%start-stop-daemon --start --exec%g" /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/etc/init.d/nscd

	install -d /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/lib/systemd/system
	install -m 0644 /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/git/nscd/nscd.service /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/lib/systemd/system/

	if ${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'true', 'false', d)}; then
		install -d /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/etc/tmpfiles.d
		echo "d /run/nscd 755 root root -" \
			> /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/etc/tmpfiles.d/nscd.conf
	else
		install -d /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/etc/default/volatiles
		echo "d root root 0755 /var/run/nscd none" \
			> /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/etc/default/volatiles/98_nscd
	fi
	if [ "/lib" != "/lib" ] ; then
		# The aarch64 ABI says the dynamic linker -must- be /lib/ld-linux-aarch64[_be].so.1
		install -d /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/lib
		if [ -e /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/lib/ld-linux-aarch64.so.1 ]; then
			ln -s ${@base_path_relative('/lib', '/lib')}/ld-linux-aarch64.so.1 \
				/home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/lib/ld-linux-aarch64.so.1
		elif [ -e /home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/lib/ld-linux-aarch64_be.so.1 ]; then
			ln -s ${@base_path_relative('/lib', '/lib')}/ld-linux-aarch64_be.so.1 \
				/home/lfpm1993/Desktop/openembedded/build/tmp-glibc/work/aarch64-oe-linux/glibc/2.26-r0/image/lib/ld-linux-aarch64_be.so.1
		fi
	fi
	do_install_armmultilib
 which triggered exception NameError: name 'base_path_relative' is not defined



The only thing I changed from the original files was that I added "DISTRO_FEATURES_append = " virtualization"" to the /Desktop/openembedded/meta-virtualization/layers.conf. It should be noted, I guess, that I'm running a virtual machine with Ubunto 16.04.1 LTS...executing uname -a gives:
Linux lfpm1993-virtual-machine 4.13.0-39-generic #44~16.04.1-Ubuntu SMP Thu Apr 5 16:43:10 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux


What I need from the development board (ARM Versatile Express Juno r2 Development Platform) is the ability to run PAPI (maximize the number os hardware counters that I have avaiable) and the energy aware scheduler (EAS). The reasson I didn't use a prebuilt build was because of ,according to the kernels tab, the only option that allows EAS is `ack-armlt' and all prebuilt configurations that don't use Android have `latest-armlt'.

So, my question is how do I solve those warnings and errors? if the 'base configuration' is correct, that is if I really need to run the addendum B? And in the case, of if it is 'working' what should I be doing next? (hope I was clear, english is not my native language). 

Thanks for the help,

Luis Martins

 
 




Parents
  • Hi Luis

    That is correct,`ack-armlt' is based on the Android Common Kernel(ack) and used for BusyBox, OpenEmbedded, and Android filesystems, it support EAS.
    For example you can choose build form source as below configuration, following the instructions:
    community.arm.com/.../juno

    +-------------+------------------------------------+
    | Workspace | /home/jetzho01/jetzho01_share/444/ |
    | Platform | [64-bit] Juno |
    | Build | Build from source |
    | Environment | Linux/Android |
    | Kernel | ack-4.9-armlt |
    | Filesystem | Android O 18.01 |
    +-------------+------------------------------------+
    In the configuration, the root filesystems is choosed to support Android, many partners evaluate and use EAS feature in Android mobile product and EAS can works better with Android HAL.
    Based on this, it can be used to do code change and development on kernel/firmware/driver according to your requirement. 
    Is this configuration suitable for your use case? If not, would you please help to share more information on your usage model?

    Regarding openembedded file system, without building the OpenEmbedded filesysytem from source, you can use the prebuilt filesystems image instead.
    Although there is some warning/error message as you mentioned, it is related with some network service routine that may be not caused by the rootfs, the system can boot up ok in the end as below log.

    [ OK ] Started NFS status monitor for NFSv2/3 locking..
    Starting SYSV: The kdump script provides the support:...
    [ OK ] Started Permit User Sessions.
    [ OK ] Started Login Service.
    [ OK ] Started SYSV: The kdump script provides the support:.
    Starting LSB: One of the first scri…to be executed. Starts or stops...
    Starting LSB: Starts gatord...
    [ OK ] Started Getty on tty1.
    [ OK ] Started Serial Getty on ttyAM[ 8.668845] random: crng init done
    A0.
    [ OK ] Started Network Name Resolution.
    [ OK ] Started LSB: One of the first scripts to be executed. Starts or stops.
    [ OK ] Started LSB: Starts gatord.

    OpenEmbedded nodistro.0 genericarmv8 ttyAMA0

    genericarmv8 login: root (automatic login)

    [ 13.820539] audit: type=1006 audit(1525318379.028:2): pid=265 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=1 res=1
    root@genericarmv8:~#
    root@genericarmv8:~#
    root@genericarmv8:~#
    root@genericarmv8:~# ls /
    bin boot dev etc home lib lost+found media mnt opt proc run sbin srv sys tmp usr var
    root@genericarmv8:~#

    Jett
    Thanks 

Reply
  • Hi Luis

    That is correct,`ack-armlt' is based on the Android Common Kernel(ack) and used for BusyBox, OpenEmbedded, and Android filesystems, it support EAS.
    For example you can choose build form source as below configuration, following the instructions:
    community.arm.com/.../juno

    +-------------+------------------------------------+
    | Workspace | /home/jetzho01/jetzho01_share/444/ |
    | Platform | [64-bit] Juno |
    | Build | Build from source |
    | Environment | Linux/Android |
    | Kernel | ack-4.9-armlt |
    | Filesystem | Android O 18.01 |
    +-------------+------------------------------------+
    In the configuration, the root filesystems is choosed to support Android, many partners evaluate and use EAS feature in Android mobile product and EAS can works better with Android HAL.
    Based on this, it can be used to do code change and development on kernel/firmware/driver according to your requirement. 
    Is this configuration suitable for your use case? If not, would you please help to share more information on your usage model?

    Regarding openembedded file system, without building the OpenEmbedded filesysytem from source, you can use the prebuilt filesystems image instead.
    Although there is some warning/error message as you mentioned, it is related with some network service routine that may be not caused by the rootfs, the system can boot up ok in the end as below log.

    [ OK ] Started NFS status monitor for NFSv2/3 locking..
    Starting SYSV: The kdump script provides the support:...
    [ OK ] Started Permit User Sessions.
    [ OK ] Started Login Service.
    [ OK ] Started SYSV: The kdump script provides the support:.
    Starting LSB: One of the first scri…to be executed. Starts or stops...
    Starting LSB: Starts gatord...
    [ OK ] Started Getty on tty1.
    [ OK ] Started Serial Getty on ttyAM[ 8.668845] random: crng init done
    A0.
    [ OK ] Started Network Name Resolution.
    [ OK ] Started LSB: One of the first scripts to be executed. Starts or stops.
    [ OK ] Started LSB: Starts gatord.

    OpenEmbedded nodistro.0 genericarmv8 ttyAMA0

    genericarmv8 login: root (automatic login)

    [ 13.820539] audit: type=1006 audit(1525318379.028:2): pid=265 uid=0 old-auid=4294967295 auid=0 tty=(none) old-ses=4294967295 ses=1 res=1
    root@genericarmv8:~#
    root@genericarmv8:~#
    root@genericarmv8:~#
    root@genericarmv8:~# ls /
    bin boot dev etc home lib lost+found media mnt opt proc run sbin srv sys tmp usr var
    root@genericarmv8:~#

    Jett
    Thanks 

Children