On 2018-08-27 9:16 AM, David Daniel wrote:
Am Freitag, den 24.08.2018, 11:59 -0400 schrieb Bruce Ashfield:
On 2018-08-24 11:54 AM, Bruce Ashfield wrote:
On 2018-08-23 4:55 AM, David Daniel wrote:
Am Mittwoch, den 22.08.2018, 20:35 -0400 schrieb Bruce Ashfield:
On Wed, Aug 22, 2018 at 7:31 AM, David Daniel <david.daniel@bbv
.ch>
wrote:
Hi all
I am trying to get a custom kernel recipe to work and it
fails by
issuing a weird make command - the command contains the
arguments
one
would pass to gcc when cross-compiling. Bitbake spits a NOTE
about
the
error that looks like the following:
----------------------
ERROR: linux-vortex86-4.14.65-r0 do_compile: oe_runmake
failed
ERROR: linux-vortex86-4.14.65-r0 do_compile: Function failed:
do_compile (log file is located at /home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-linux/linux-
vortex86/4.14.65-
r0/temp/log.do_compile.13645)
ERROR: Logfile of failure stored in:
/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-linux/linux-
vortex86/4.14.65-
r0/temp/log.do_compile.13645
Log data follows:
DEBUG: Executing shell function do_compile
NOTE: make -j 8 HOSTCC=gcc
-isystem/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-linux/linux-
vortex86/4.14.65-r0/recipe-sysroot-native/usr/include -O2
-pipe
-L/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-
linux/linux-vortex86/4.14.65-r0/recipe-sysroot-
native/usr/lib
-L/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-
linux/linux-vortex86/4.14.65-r0/recipe-sysroot-native/lib
-Wl,-
rpath-link,/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-linux/linux-
vortex86/4.14.65-r0/recipe-sysroot-native/usr/lib -Wl,-
rpath-
link,/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-
poky-linux/linux-vortex86/4.14.65-r0/recipe-sysroot-
native/lib
-Wl,-rpath,/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-linux/linux-
vortex86/4.14.65-r0/recipe-sysroot-native/usr/lib -Wl,-
rpath,/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-
poky-linux/linux-vortex86/4.14.65-r0/recipe-sysroot-
native/lib
-Wl,-O1 -Wl,--all
ow-shlib-undefined -Wl,--dynamic-
linker=/home/david/yocto/kraemer-
ng/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-
linux-x86-
64.so.2 HOSTCPP=gcc -E zImage CC=i586-poky-linux-gcc -fuse-
ld=bfd
-fdebug-prefix-map=/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-linux/linux-
vortex86/4.14.65-
r0=/usr/src/debug/linux-vortex86/4.14.65-r0 -fdebug-prefix-
map=/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-
linux/linux-vortex86/4.14.65-r0/recipe-sysroot= -fdebug-
prefix-
map=/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-
linux/linux-vortex86/4.14.65-r0/recipe-sysroot-native=
-fdebug-
prefix-map=/home/david/yocto/kraemer-ng/poky/build/tmp/work-
shared/vortex86/kernel-source=/usr/src/kernel -ffile-prefix-
map=/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-
linux/linux-vortex86/4.14.65-r0/git=/kernel-source/ LD=i586-
poky-
linux-ld.bfd
GEN ./Makefile
scripts/kconfig/conf --silentoldconfig Kconfig
make[2]: *** No rule to make target 'zImage'. Stop.
make[1]: *** [Makefile:146: sub-make] Error 2
make: *** [Makefile:24: __sub-make] Error 2
ERROR: oe_runmake failed
WARNING: /home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-linux/linux-
vortex86/4.14.65-r0/temp/run.do_compile.13645:1 exit 1 from
'exit
1'
ERROR: Function failed: do_compile (log file is located at
/home/david/yocto/kraemer-ng/poky/build/tmp/work/vortex86-
poky-
linux/linux-vortex86/4.14.65-r0/temp/log.do_compile.13645)
ERROR: Task (/home/david/yocto/kraemer-ng/poky/build/../meta-
vortex86/recipes-kernel/linux/linux-vortex86_4.14.65-
1.bb:do_compile) failed with exit code '1'
NOTE: Tasks Summary: Attempted 513 tasks of which 509 didn't
need
to be rerun and 1 failed.
----------------------
We have a device with a vortex86 (mainly i586 or i686 without
CMOV)
processor why I created a corresponding machine. The machine
is
defined
with tune-i586.inc. The machine definition seems to be fine,
the
cross
compiler gets built and many packages build correctly for the
target
system. This is the machine configuration:
----------------------
require conf/machine/include/tune-i586.inc
TARGET_ARCH = "i586"
PREFERRED_PROVIDER_virtual/kernel = "linux-vortex86"
MACHINE_FEATURES = "ext2 irda keyboard pcbios pci rtc screen
serial
touchscreen usbhost"
TARGET_FPU ?= "soft"
X86ARCH32 ?= "i586"
TUNE_PKGARCH = "${TUNE_PKGARCH_tune-${DEFAULTTUNE}}"
TUNECONFLICTS[m32] = "m64 mx32"
TUNE_ARCH = "i586"
GLIBC_ADDONS = "nptl"
SERIAL_CONSOLES = "115200;ttymxc2"
IMAGE_FSTYPES += "wic wic.bmap"
WKS_FILE ?= "kraemer.wks"
do_image_wic[depends] += "gptfdisk-
native:do_populate_sysroot"
do_image_wic[recrdeptask] += "do_bootimg"
----------------------
I guess the problem lies in the kernel recipe, since
everything
else
seems to be fine. I started with a recipe that was shown on
the
presentation "Working with the Linux Kernel in the Yocto
Project"
that
was published in March this year:
https://www.youtube.com/watch?v=tZACGS5nQxw
This didn't work though and I started to search the
documentation.
I
finally found:
https://www.yoctoproject.org/docs/1.6.1/kernel-dev/kernel-dev
.html#
working-with-your-own-sources
So I went ahead and modified until I got the current version
of the
recipe:
----------------------
SECTION = "kernel"
DESCRIPTION = "Linux kernel for the Vortex86 processor"
LICENSE = "GPLv2"
FILESEXTRAPATHS_prepend = "${THISDIR}/linux-vortex86:"
LIC_FILES_CHKSUM =
"file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
require recipes-kernel/linux/linux-yocto.inc
inherit kernel
SRCBRANCH = "linux-4.14.y"
SRCREV = "80a4edf7eba019147d93e60843bd2dda66526d5c"
SRC_URI =
"git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.g
it;bra
nch=${SRCBRANCH} \
file://defconfig \
file://bootlogo.ppm"
LINUX_VERSION ?= "4.14.65"
S = "${WORKDIR}/git"
PV = "4.14.65"
PR = "r0"
COMPATIBLE_MACHINE = "vortex86"
----------------------
Does anybody know what is wrong with that recipe? Why does
bitbake
for
building the kernel call make with arguments for gcc?
Those are the flags for HOSTCC/HOSTCPP not for the actual
building of
the kernel image, they are required to properly build host
components
of the kernel (i.e. mconf) against the sysroot.
The error that you are pasting looks more like an invalid type
of
image (zImage) for your configured machine.
Bruce
Thanks for any hints!
Best Regards
Dave
--
_______________________________________________
linux-yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/linux-yocto
The problem is that the flags _are_ used in order to build the
kernel -
make finally complains about unknown arguments - that's what it
complains about - I realize I haven't included the concrete
output of
the make call (cut lots of output at the end):
I assure you, they aren't. The kernel build system does not take
flags from the outside, it defines it own. But maybe we are talking
about different things. I'm talking about the kernel's host native
binaries.
That is HOSTCC in your dump below.
The CC and LD look ok at a glance,
If HOSTCC is not properly running on your build machine, then yes,
it has a bad set of flags. But that is buried in the machine
configs,
not the kernel recipes or kernel build.
make -j 8 HOSTCC=gcc
-isystem/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-linux/linux-
vortex86/4.14.65-r0/recipe-sysroot-native/usr/include
-O2 -pipe
-L/home/david/yocto/kraemer-ng/poky/build/tmp/work/vortex86-poky-
linux/linux-vortex86/4.14.65-r0/recipe-sysroot-native/usr/lib
-L/home/david/yocto/kraemer-ng/poky/build/tmp/work/vortex86-poky-
linux/linux-vortex86/4.14.65-r0/recipe-sysroot-native/lib
-Wl,-rpath-link,/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-linux/linux-
vortex86/4.14.65-r0/recipe-sysroot-native/usr/lib
-Wl,-rpath-link,/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-linux/linux-
vortex86/4.14.65-r0/recipe-sysroot-native/lib
-Wl,-rpath,/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-linux/linux-
vortex86/4.14.65-r0/recipe-sysroot-native/usr/lib
-Wl,-rpath,/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-linux/linux-
vortex86/4.14.65-r0/recipe-sysroot-native/lib
-Wl,-O1 -Wl,--allow-shl
ib
-undefined
-Wl,--dynamic-linker=/home/david/yocto/kraemer-
ng/poky/build/tmp/sysroots-uninative/x86_64-linux/lib/ld-linux-
x86-64.so.2
HOSTCPP=gcc -E zImage CC=i586-poky-linux-gcc -fuse-ld=bfd
-fdebug-prefix-map=/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-linux/linux-
vortex86/4.14.65-r0=/usr/src/debug/linux-vortex86/4.14.65-r0
-fdebug-prefix-map=/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-linux/linux-
vortex86/4.14.65-r0/recipe-sysroot=
-fdebug-prefix-map=/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-linux/linux-
vortex86/4.14.65-r0/recipe-sysroot-native=
-fdebug-prefix-map=/home/david/yocto/kraemer-
ng/poky/build/tmp/work-shared/vortex86/kernel-
source=/usr/src/kernel
-ffile-prefix-map=/home/david/yocto/kraemer-
ng/poky/build/tmp/work/vortex86-poky-linux/linux-
vortex86/4.14.65-r0/git=/kernel-source/
LD=i586-poky-linux-ld.bfd
make: invalid option -- 'y'
make: invalid option -- '/'
make: invalid option -- '/'
make: invalid option -- '/'
make: invalid option -- 'E'
How come all these options (-isystem etc. etc.) are passed to the
make
call to build the kernel? This is wrong - these are not make
options,
instead, it should contain ARCH=a CROSS_COMPILE=b etc. but not
the
arguments used - the ones really necessary are not present at
all.
It isn't wrong. If you look in the git history of oe-core, you'll
see
all the reasons for these changes. They were about getting the
native
binaries properly built.
It could also be that there's some option in the definition that is
causing a quoting issue and then it is incorrectly passing options to
the compile when invoked by the kernel build.
I thought I recalled a fix for that recently. I assume you are
building
against master ?
Bruce
Bruce
Can anyone tell me what is wrong with my recipe? Is this not the
recommended way to go? If not, how should I include a kernel for
a
machine that linux-yocto does not initially support?
Thanks!
Best Regards
Thanks for your replies! I started with the sumo branch and tried
master as well. The problem remains the same.
Is it that self-written kernel recipes are not supported?
They are definitely supported, there are hundreds of them in various
forms.
If what you have is available in a layer that I can get (temp branch,
tarball .. whatever), I can fire up a build and see what is going on.
Bruce
Best Regards
Dave
--
_______________________________________________
linux-yocto mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/linux-yocto