LegatoYocto15.01 source compilation


#1

Hello team,

I’ve been trying to compile the Legato Yocto 15.01 distribution for AR7 just running the make command on the LegatoYocto1501 folder. This is what I’m getting as output:

fv4dg00@lenovo-e540:~/ws/swi/distribution/tmp/LegatoYocto1501$ make
7"meta-swi-extras/build.sh"  -p poky/ -o meta-openembedded/ -l meta-swi -x "kernel" -j 2 -t 2   -m swi-mdm9x15 -b build_bin -q -g 
Poky dir: /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/poky
OE meta: /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/meta-openembedded
SWI meta dir: /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/meta-swi
Linux repo dir: /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/kernel
Number of make threads 2
Number of bitbake tasks 2
SWI machine: swi-mdm9x15
Build dir: /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/build_bin
Enable Qualcomm Proprietary bin

### Shell environment set up for builds. ###

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    core-image-sato
    meta-toolchain
    adt-installer
    meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86'
+ layer: meta-swi-mdm9x15
+ layer: meta-swi
+ layer: meta-oe
+ layer: meta-networking
+ layer: meta-swi-bin
+ layer: meta-swi-extras
Build image of minimal rootfs (for swi-mdm9x15).
Loading cache: 100% |##########################################################################################################################################################################################################################################| ETA:  00:00:00
Loaded 1878 entries from dependency cache.
Parsing recipes: 100% |########################################################################################################################################################################################################################################| Time: 00:00:00
Parsing of 1446 .bb files complete (1445 cached, 1 parsed). 1878 targets, 71 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.22.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "swi-mdm9x15"
DISTRO            = "poky-swi-ext"
DISTRO_VERSION    = "1.6.1"
TUNE_FEATURES     = "armv7a vfp neon"
TARGET_FPU        = "vfp-neon"
meta              
meta-yocto        
meta-yocto-bsp    = "(detachedfrombda51ee):bda51ee7821de9120f6f536fcabe592f2a0c8a37"
meta-networking   
meta-oe           = "(detachedfrom8e6f6e4):8e6f6e49c99a12a0382e48451f37adac0181362f"
meta-swi          
meta-swi-mdm9x15  = "master:6a86036e0f7e84acec98899cb90658de1a3765b1"
meta-swi-extras   
meta-swi-bin      = "master:0811adc249ea5cc7ec32fbd0323f0fb4de49e9f9"

NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: Failed to fetch URL ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.2/gcc-4.7.2.tar.bz2, attempting MIRRORS if available
WARNING: Failed to fetch URL ftp://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz;name=archive, attempting MIRRORS if available
ERROR: Fetcher failure: Fetch command failed with exit code 4, no output
ERROR: Function failed: Fetcher failure for URL: 'ftp://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz;name=archive'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/readline/5.2-r9/temp/log.do_fetch.2793
ERROR: Task 1432 (/home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/poky/meta/recipes-core/readline/readline_5.2.bb, do_fetch) failed with exit code '1'
ERROR: Fetcher failure: Fetch command failed with exit code 4, no output
ERROR: Function failed: Fetcher failure for URL: 'ftp://ftp.gnu.org/gnu/gcc/gcc-4.7.2/gcc-4.7.2.tar.bz2'. Unable to fetch URL from any source.
ERROR: Logfile of failure stored in: /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/gcc-cross-initial/4.7.2-r20/temp/log.do_fetch.2792
ERROR: Task 949 (/home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/meta-swi/common/recipes-devtools/gcc/gcc-cross-initial_4.7.bb, do_fetch) failed with exit code '1'
NOTE: Tasks Summary: Attempted 485 tasks of which 483 didn't need to be rerun and 2 failed.
Waiting for 0 running tasks to finish:

Summary: 2 tasks failed:
  /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/poky/meta/recipes-core/readline/readline_5.2.bb, do_fetch
  /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/meta-swi/common/recipes-devtools/gcc/gcc-cross-initial_4.7.bb, do_fetch
Summary: There were 2 WARNING messages shown.
Summary: There were 4 ERROR messages shown, returning a non-zero exit code.
make: *** [image_bin] Error 1

I think it could be a yocto project bug but I’m not sure. Also, does anyone have the same issue?

Thanks in advance,

Daniel


#2

Hi Daniel,

I suspect that bitbake is not able to fetch sources because “BB_NO_NETWORK” might be set to “1”.
Could you please check your conf file ( likely /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/build_bin/conf/local.conf ) and check if it’s set to “0” or “1” ?

If the value is already 0, then it should be able to fetch from the Internet, which leads me to my next question: does the build host has access to Internet (IP + proper DNS configuration) ?

For instance, what does “curl -I ftp://ftp.gnu.org/gnu/readline/readline-5.2.tar.gz” returns ?

Also, could you please upload or pastebin.com the content of fetch logs ( such as /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/readline/5.2-r9/temp/log.do_fetch.2793 ).

Bertrand


#3

Hi Daniel,

Your build is failing because your system was unable to fetch sources it needs. It looks like that gnu.org was down when you tried to build your distribution, or you lost your net connection. In order to build successfully, you would need to add packages causing the failure into meta-swi-extras/downloads directory. In your case, these would be:

readline-5.2.tar.gz
md5sum: e39331f32ad14009b9ff49cc10c5e751
sha256sum: 12e88d96aee2cd1192500356f0535540db499282ca7f76339fb4228c31249f45

gcc-4.7.2.tar.bz2
md5sum: cc308a0891e778cfda7a151ab8a6e762
sha256sum: 8a9283d7010fb9fe5ece3ca507e0af5c19412626384f8a5e9434251ae100b084

Please, let me know if you need more help.

Best regards,
Dragan


#4

Hi capricorncyber & CoRfr,

Thank you for your support. Finnaly, I’ve fixed this just downloading the packages manually and move it to the meta-swi-extras/download folder. Problably it is a network problem (because I’m doing this behind a proxy, sorry for not mentioning before).

Before doing that, I’ve continued with the source compilation but I’ve found another issue:

fv4dg00@lenovoe540:~/ws/swi/distribution/tmp/LegatoYocto1501$ make
"meta-swi-extras/build.sh"  -p poky/ -o meta-openembedded/ -l meta-swi -x "kernel" -j 2 -t 2   -m swi-mdm9x15 -b build_bin -q -g 
Poky dir: /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/poky
OE meta: /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/meta-openembedded
SWI meta dir: /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/meta-swi
Linux repo dir: /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/kernel
Number of make threads 2
Number of bitbake tasks 2
SWI machine: swi-mdm9x15
Build dir: /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/build_bin
Enable Qualcomm Proprietary bin

### Shell environment set up for builds. ###

You can now run 'bitbake <target>'

Common targets are:
    core-image-minimal
    core-image-sato
    meta-toolchain
    adt-installer
    meta-ide-support

You can also run generated qemu images with a command like 'runqemu qemux86'
+ layer: meta-swi-mdm9x15
+ layer: meta-swi
+ layer: meta-oe
+ layer: meta-networking
+ layer: meta-swi-bin
+ layer: meta-swi-extras
Build image of minimal rootfs (for swi-mdm9x15).
Loading cache: 100% |##########################################################################################################################################################################################################################################| ETA:  00:00:00
Loaded 1878 entries from dependency cache.
Parsing recipes: 100% |########################################################################################################################################################################################################################################| Time: 00:00:00
Parsing of 1446 .bb files complete (1445 cached, 1 parsed). 1878 targets, 71 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION        = "1.22.0"
BUILD_SYS         = "x86_64-linux"
NATIVELSBSTRING   = "Ubuntu-14.04"
TARGET_SYS        = "arm-poky-linux-gnueabi"
MACHINE           = "swi-mdm9x15"
DISTRO            = "poky-swi-ext"
DISTRO_VERSION    = "1.6.1"
TUNE_FEATURES     = "armv7a vfp neon"
TARGET_FPU        = "vfp-neon"
meta              
meta-yocto        
meta-yocto-bsp    = "(detachedfrombda51ee):bda51ee7821de9120f6f536fcabe592f2a0c8a37"
meta-networking   
meta-oe           = "(detachedfrom8e6f6e4):8e6f6e49c99a12a0382e48451f37adac0181362f"
meta-swi          
meta-swi-mdm9x15  = "master:6a86036e0f7e84acec98899cb90658de1a3765b1"
meta-swi-extras   
meta-swi-bin      = "master:0811adc249ea5cc7ec32fbd0323f0fb4de49e9f9"

NOTE: Preparing runqueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: Function failed: do_install (log file is located at /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/powerapp/1.0-r0/temp/log.do_install.28717)
ERROR: Logfile of failure stored in: /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/powerapp/1.0-r0/temp/log.do_install.28717
Log data follows:
| DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
| DEBUG: Executing shell function do_install
| /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/powerapp/1.0-r0/temp/run.do_install.28717: 120: /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/powerapp/1.0-r0/temp/run.do_install.28717: pushd: not found
| WARNING: exit code 127 from a shell command.
| ERROR: Function failed: do_install (log file is located at /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/powerapp/1.0-r0/temp/log.do_install.28717)
ERROR: Task 299 (/home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/meta-swi/meta-swi-mdm9x15/recipes-bsp/powerapp/powerapp.bb, do_install) failed with exit code '1'
NOTE: Tasks Summary: Attempted 1810 tasks of which 1800 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:

Summary: 1 task failed:
  /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/meta-swi/meta-swi-mdm9x15/recipes-bsp/powerapp/powerapp.bb, do_install
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
make: *** [image_bin] Error 1
fv4dg00@lenovoe540:~/ws/swi/distribution/tmp/LegatoYocto1501$ 

Now, the log file content:

DEBUG: SITE files ['endian-little', 'bit-32', 'arm-common', 'common-linux', 'common-glibc', 'arm-linux', 'arm-linux-gnueabi', 'common']
DEBUG: Executing shell function do_install
/home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/powerapp/1.0-r0/temp/run.do_install.28717: 120: /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/powerapp/1.0-r0/temp/run.do_install.28717: pushd: not found
WARNING: exit code 127 from a shell command.
ERROR: Function failed: do_install (log file is located at /home/fv4dg00/ws/swi/distribution/tmp/LegatoYocto1501/build_bin/tmp/work/armv7a-vfp-neon-poky-linux-gnueabi/powerapp/1.0-r0/temp/log.do_install.28717)

And here, the do_install instruction (within the powerapp.bb file):

do_install() {
        install -m 0755 ${WORKDIR}/powerapp/powerapp -D ${D}/sbin/powerapp
        install -m 0755 ${WORKDIR}/powerapp/reboot -D ${D}${sysconfdir}/init.d/reboot
        install -m 0755 ${S}/reboot-bootloader -D ${D}/sbin/reboot-bootloader
        install -m 0755 ${S}/reboot-recovery -D ${D}/sbin/reboot-recovery
        install -m 0755 ${S}/reboot-cookie -D ${D}${sysconfdir}/reboot-cookie
        install -m 0755 ${S}/reset_reboot_cookie -D ${D}${sysconfdir}/init.d/reset_reboot_cookie
        install -m 0755 ${WORKDIR}/powerapp/shutdown -D ${D}${sysconfdir}/init.d/shutdown
        install -m 0755 ${WORKDIR}/powerapp/start_power_config -D ${D}${sysconfdir}/init.d/power_config
        pushd ${D}${base_sbindir}
        ln -s powerapp sys_reboot
        ln -s powerapp sys_shutdown
        popd
}

It seems a pushd problem related to the path but I’m not sure. Is the 'pushd {D}{base_sbindir} line right?

Thank you again,


#5

Hi Daniel,

It seems you don’t have pushd which is built in to bash. What environment are you using? Is this a Ubuntu installation? Have you remembered to set your default shell to not be dash? I notice that if I run a dash shell I no longer have pushd.

legato.io/legato-docs/15_01_ … _host.html

Regards,
Andrew


#6

Sorry for the delay,

Finally I was able to compile the LegatoYocto1501 source distribution with your support. I reconfigured again the bash following your link (Andrew). I did it before to compile the legato-af so, I don’t know why it was unconfigured. But now, it finishes succesfully the compilation but with some problems after flashing the images.

I don’t have the output now (sorry), I will write soon with the output.

Thank you!

Daniel


#7

Hi,

Trying to compile again the sources and flashing the new images created I do not get again the problems after flashing so, probably it was an issue of the flashing procedure.

Thank you for helping me to compile the new Yocto image! :smiley:

Daniel