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: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
$ cd $OE_HOME/build $ bitbake-layers show-recipes
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
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
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:~#
JettThanks
Sorry jett, for the late reply.
Regarding your suggestion I can use that configuration. The only requirements are the ability to access to the hardware counters through PAPI tools and have the EAS, since I'm interested to micro benchmark Juno by applying a model and compare it to EAS. The objective is to analyse if I'm able to have better performance and power efficiency.
The reasson I took so long was because I was tunnel visioning in solving bitbake's OpenEmbedded problems. To the ones that may be interested in how I solved it, I will paste the replies I got from all kinds of support.
Starting from Paul's anwer from bitbake-devel@lists.openembedded.org support:
"base_path_relative" and some other related functions have recently been removed in master for the upcoming release, and I suspect the other layers you are using have not been updated to accommodate this change. You will probably need to use the most recent stable release of openembedded-core before this change (i.e. the "rocko" branch) in order to be able to build successfully. If there is a "rocko" branch available for any other layers you are using you would usually be best advised to use that there too - you shouldn't be mixing branches.
Then, I got another reply this time from Zoran, from yocto@yoctoproject.org:
Hmmmm... I called my best friend www.google.com to the help, since it seems to me that you are trying to do Docker, and that you need to set your kernel differently then it is done by default.
Just as a quick follow up. One of our developers was kind enough to contribute their thoughts on this. I'll quote verbatim if I may:
Long story short: the meta-ilp32 layer (with glibc 2.26) is out of date and needs to be refreshed against a newer glibc and OE environment. Not so short: In order to build ILP32 we use git.linaro.org/.../jenkins-setup.git, and git.linaro.org/.../manifest.git which rely on master revisions of OE-core & co., meta-96boards, meta-linaro, and recent versions of Bitbake. However, for ILP32 specifically, we need an older version of OE-core, which is incompatible with the most recent versions of everything else. In order to build with the older OE-core, we need to make the other layers compatible with Rocko. Conversely, in order to use a newer OE-core, we need to update the meta-ilp32 layer (kernel.inc, glibc-package.inc) to remove deprecated functions, set the preferred version of Glibc to 2.26 in jenkins-setup, and make glibc.inc provide virtual/crypt, all of this to find that the branch of arm/ilp32 was force-pushed a while back so it's not possible to reproduce those older builds with glibc 2.26. (Ideally, we'd have branches like ilp32/2.26, ilp32/2.27, and so on, instead of one single arm/ilp32 branch.) Two efforts are required in order to get our ARMv8 ILP32 builds jobs in working order: 1) update bits and pieces from meta-linaro/meta-ilp32 to most get it to work with a recent OE master, and 2) rebase patches and refresh all Glibc related recipes to 2.27+git as can be found in today's arm/ilp32 branch.
So, I tried to use rocko repositories, but I had some problems with the recipes, namely acpitests, so I ended up to use morty repository and after solving some annoyances it worked up fine.
Some things that I think it may prove to be useful for anyone who tries to do this...in your build/config/local.conf file, if you are using meta-virtulization add: DISTRO_FEATURES_append = " virtualization", if you want extra space for your image add IMAGE_ROOTFS_EXTRA_SPACE = "10000" and for me I could only run bitbake without freezing my pc if I had DL_DIR, SSTATE_DIR,TMPDIR and SDKMACHINE lines uncommented. Another thing make sure you have all the layers in build/conf/bblayers.conf it should look like this:
# POKY_BBLAYERS_CONF_VERSION is increased each time build/conf/bblayers.conf # changes incompatibly POKY_BBLAYERS_CONF_VERSION = "2" BBPATH = "${TOPDIR}" BBFILES ?= "" BBLAYERS ?= " \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/poky/meta \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/poky/meta-poky \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/poky/meta-yocto-bsp \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-openembedded/meta-oe \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-openembedded/meta-python \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-openembedded/meta-networking \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-openembedded/meta-filesystems \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-openembedded/meta-initramfs \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-openembedded/meta-webserver \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-openembedded/meta-gnome \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/openembedded-core/meta \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-linaro/meta-aarch64 \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-linaro/meta-ilp32 \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-linaro/meta-bigendian \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-linaro/meta-linaro \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-linaro/meta-linaro-toolchain \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-linaro/meta-linaro-integration \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-linaro/meta-optee \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-virtualization \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-96boards \ /home/lfpm1993/Desktop/Workplace_morty/sources_morty/meta-browser \ "
___________________
Because you said:
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.
I have decided to use Android instead. I'm facing some problems. I think it kind of works now at least I have access to the shell and I can run some commands, but I don't have root privileges nor can I see what is displayed to a monitor screen, all I get is a black screen without android's boot initialzation (I already tested with other monitors).
I did the configuration following this tutorial https://community.arm.com/dev-platforms/w/docs/303/juno .Summing it up, downloaded and executed the python script, juno 64 -> linux -> prebuilt -> ack-4.9-armlt + Android O 18.01, burned the image juno.img.xz to a external ssd, and I copied the remaining files to Juno's MMC card, then I power cycled the board.
I suppose after I have this all working, I can download PAPI tools and install it?
Either way, I only wanted to make sure if I'm having all working correctly.
Thanks, for your time,
Luís Martins
Hi Luis
The configuration you choosed for Android file system looks correct and the system boot up.
By default, it is not root account for the system, you can change it as root by cmd "su" in the console as below:
juno:/ $juno:/ $juno:/ $ sujuno:/ #juno:/ #
Then, user can operate the board by console or adb.
Regarding adb, it needs setup the network first, user can connect the network cable to the front "Ethernet port" of the board.
After it is done, you can show the interface in the console, for example as below:
juno:/ # ifconfiglo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 inet6 addr: ::1/128 Scope: Host UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:25 errors:0 dropped:0 overruns:0 frame:0 TX packets:25 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1 RX bytes:3204 TX bytes:3204
eth0 Link encap:Ethernet HWaddr 00:02:f7:00:57:d7 Driver smsc911x inet addr:10.169.36.101 Bcast:10.169.39.255 Mask:255.255.252.0 inet6 addr: fe80::202:f7ff:fe00:57d7/64 Scope: Link UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:8326 errors:0 dropped:0 overruns:0 frame:0 TX packets:65 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:1888616 TX bytes:12413 Interrupt:35
On the host side(eg Ubuntu), user can connect the board by adb:
jetzho01@system-sw-server:~/jetzho01_share/juno_1801_android$ adb connect 10.169.36.101connected to 10.169.36.101:5555jetzho01@system-sw-server:~/jetzho01_share/juno_1801_android$ adb shelljuno:/ #juno:/ #
With the adb, user can push some binary or other files into platform for running.
Regarding EAS, you can refer to below link for more information:
https://developer.arm.com/open-source/energy-aware-scheduling
https://www.linaro.org/blog/energy-aware-scheduling-eas-project/
https://www.slideshare.net/linaroorg/las16105-walkthrough-of-the-eas-kernel-adaptation-to-the-android-common-kernel
Regarding PAPI, I searched from google, it described as below link:
http://icl.cs.utk.edu/papi/index.html
http://web.eece.maine.edu/~vweaver/projects/perf_events/support.html
http://icl.cs.utk.edu/papi/faq/index.html#9
Jett
Best Regards