uboot linking problem

557 views
Skip to first unread message

gurparta...@gmail.com

unread,
Feb 25, 2017, 7:01:28 AM2/25/17
to swupdate
I am compiling meta-swupdate with morty branch of yocto.Build failed with following logs:
/home/apaul/BEAGLEBONE/poky/build/tmp/sysroots/beaglebone/usr/lib/libubootenv.a(fw_env.o): In function `fw_printenv':
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:260: undefined reference to `printenv_args'
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:260: undefined reference to `printenv_args'
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:266: undefined reference to `common_args'
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:290: undefined reference to `common_args'
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:246: undefined reference to `common_args'
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:246: undefined reference to `common_args'
| collect2: error: ld returned 1 exit status
| make: *** [swupdate_unstripped] Error 1

There are solutions in patch form but I don't know how to apply that patches.

savo...@gmail.com

unread,
Mar 2, 2017, 2:17:01 AM3/2/17
to swupdate
Hello Gurpartap,

If you are on master or on the morty branch and you have this issue, you could use the krogoth branch or cherry-picks the following commits:
1) git cherry-pick 5dcda505c1204d102917887f7d40cff240419a17
2) git cherry-pick 1ae910286f3ad55abe193a36f9d6f8e00461e85a

Regards,

Georges

gurparta...@gmail.com

unread,
Mar 2, 2017, 5:29:30 AM3/2/17
to swupdate
Still same issue..
what I did:

git clone --branch krogoth git://git.yoctoproject.org/poky.git
cd poky
git clone --branch krogoth https://github.com/openembedded/meta-openembedded.git
https://github.com/sbabic/swupdate.git
source oe-init-build-env
added MACHINE=beaglebone in conf/local.conf
bitbake-layers add-layer ../meta-openembedded/meta-oe
bitbake-layers add-layer ../meta-swupdate
bitbake swupdate

Message has been deleted

gurparta...@gmail.com

unread,
Mar 2, 2017, 5:42:41 AM3/2/17
to swupdate
Here is Log:
/home/apaul/BEAGLEBONE/yocto-swupdate/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/swupdate/2016.10-r0/git/scripts/trylink "swupdate_unstripped" "arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a8 --sysroot=/home/apaul/BEAGLEBONE/yocto-swupdate/poky/build/tmp/sysroots/beaglebone" " -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wno-format-security -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -fno-unwind-tables -fno-asynchronous-unwind-tables -Os -DNO_SSL_DL -DUSE_LUA " " -Wl,-E" "core/built-in.o handlers/built-in.o" "archival/lib.a corelib/lib.a ipc/lib.a mongoose/lib.a parser/lib.a suricatta/lib.a" "pthread lua m dl config crypto ssl ubi mtd z z ubootenv "
| Trying libraries: pthread lua m dl config crypto ssl ubi mtd z ubootenv
| Failed: -Wl,--start-group -lpthread -llua -lm -ldl -lconfig -lcrypto -lssl -lubi -lmtd -lz -lubootenv -Wl,--end-group
| Output of:
| arm-poky-linux-gnueabi-gcc -march=armv7-a -mfpu=neon -mfloat-abi=hard -mcpu=cortex-a8 --sysroot=/home/apaul/BEAGLEBONE/yocto-swupdate/poky/build/tmp/sysroots/beaglebone -Wall -Wshadow -Wwrite-strings -Wundef -Wstrict-prototypes -Wunused -Wunused-parameter -Wunused-function -Wunused-value -Wmissing-prototypes -Wmissing-declarations -Wno-format-security -Wold-style-definition -fno-builtin-strlen -finline-limit=0 -fomit-frame-pointer -ffunction-sections -fdata-sections -fno-guess-branch-probability -funsigned-char -static-libgcc -falign-functions=1 -falign-jumps=1 -falign-labels=1 -falign-loops=1 -fno-unwind-tables -fno-asynchronous-unwind-tables -Os -DNO_SSL_DL -DUSE_LUA -Wl,-E -o swupdate_unstripped -Wl,--sort-common -Wl,--sort-section,alignment -Wl,--gc-sections -Wl,--start-group core/built-in.o handlers/built-in.o archival/lib.a corelib/lib.a ipc/lib.a mongoose/lib.a parser/lib.a suricatta/lib.a -Wl,--end-group -Wl,--start-group -lpthread -llua -lm -ldl -lconfig -lcrypto -lssl -lubi -lmtd -lz -lubootenv -Wl,--end-group
| ==========
| /home/apaul/BEAGLEBONE/yocto-swupdate/poky/build/tmp/sysroots/beaglebone/usr/lib/libubootenv.a(fw_env.o): In function `getenvsize':
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:131: undefined reference to `common_args'
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:131: undefined reference to `common_args'
| /home/apaul/BEAGLEBONE/yocto-swupdate/poky/build/tmp/sysroots/beaglebone/usr/lib/libubootenv.a(fw_env.o): In function `env_aes_cbc_crypt':
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:968: undefined reference to `common_args'
| /home/apaul/BEAGLEBONE/yocto-swupdate/poky/build/tmp/sysroots/beaglebone/usr/lib/libubootenv.a(fw_env.o): In function `fw_getenv':
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:161: undefined reference to `common_args'
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:161: undefined reference to `common_args'
| /home/apaul/BEAGLEBONE/yocto-swupdate/poky/build/tmp/sysroots/beaglebone/usr/lib/libubootenv.a(fw_env.o):/usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:187: more undefined references to `common_args' follow
| /home/apaul/BEAGLEBONE/yocto-swupdate/poky/build/tmp/sysroots/beaglebone/usr/lib/libubootenv.a(fw_env.o): In function `fw_printenv':
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:260: undefined reference to `printenv_args'
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:260: undefined reference to `printenv_args'
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:270: undefined reference to `common_args'
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:270: undefined reference to `common_args'
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:246: undefined reference to `common_args'
| /usr/src/debug/u-boot-fw-utils/v2016.03+gitAUTOINC+df61a74e68-r0/git/tools/env/fw_env.c:246: undefined reference to `common_args'
| collect2: error: ld returned 1 exit status
| make: *** [swupdate_unstripped] Error 1
| WARNING: /home/apaul/BEAGLEBONE/yocto-swupdate/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/swupdate/2016.10-r0/temp/run.do_compile.29970:1 exit 1 from 'exit 1'
| ERROR: oe_runmake failed
| ERROR: Function failed: do_compile (log file is located at /home/apaul/BEAGLEBONE/yocto-swupdate/poky/build/tmp/work/beaglebone-poky-linux-gnueabi/swupdate/2016.10-r0/temp/log.do_compile.29970)

Stefano Babic

unread,
Mar 2, 2017, 6:16:42 AM3/2/17
to gurparta...@gmail.com, swupdate
This is a known issue - SWUpdate needs a version of libubootenv >
2016.05. It is a pity that morty has still this old version. The issue
could be easy fixed, but I am not excited to do this for old versions.

If you switch to a newer u-boot-fw-utils version, everything works fine.
So put a newer SRCREV in a .bbappend for u-boot-fw-utils (I would
upgrade u-boot as well, anyway) to point to a recent u-boot version. For
example, you can take it from poky/master (2017.01).

SRCREV = "a705ebc81b7f91bbd0ef7c634284208342901149"

Best regards,
Stefano Babic


--
Meet DENX at the Embedded World Trade Show
14 Mar - 16 Mar 2017, Nuremberg Trade Fair Centre, Hall 4, Booth 581
--
=====================================================================
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sba...@denx.de
=====================================================================

gurparta...@gmail.com

unread,
Mar 2, 2017, 6:31:40 AM3/2/17
to swupdate, sba...@denx.de
THANKS ... SOLVED NOW
Reply all
Reply to author
Forward
0 new messages