[oe] [meta-oe][PATCH 1/1] kernel-selftest: Add a recipe on kernel selftest

Hongzhi, Song hongzhi.song at windriver.com
Mon Jul 30 12:14:21 UTC 2018


Hi Raj,

I can continue to fix the error with rpi that you build. But I found 
that rpi gets kernel

from git://github.com/raspberrypi/linux.git;branch=rpi-4.14.y, which is 
not belong

to openembeded. I think that the rpi recipe must make some special 
change which

cause the error.


And the recipe in meta-oe is OK both with glibc and musl. So could you 
build a project

with oe-core's kernel?  If there is no problem, would you merge the recipe?


--Hongzhi


On 2018年07月30日 12:02, Khem Raj wrote:
> I can not get it compiling for musl and rpi with poky lsb equivalent 
> distro until there are clean builds it won’t be possible for me to get 
> this in
>
> On Sun, Jul 29, 2018 at 8:34 PM Hongzhi, Song 
> <hongzhi.song at windriver.com <mailto:hongzhi.song at windriver.com>> wrote:
>
>     ping
>
>     --Hongzhi
>
>
>     On 2018年07月27日 17:00, Hongzhi, Song wrote:
>     > Hi Raj,
>     >
>     > Could you help to confirm that if the libelf exists in your
>     > recipe-sysroot?
>     >
>     > Because I can't reproduce your error.
>     >
>     >
>     > --Hongzhi
>     >
>     >
>     > On 2018年07月27日 16:40, Khem Raj wrote:
>     >> this fails on rpi
>     >>
>     >> ERROR: Logfile of failure stored in:
>     >>
>     /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/kernel-selftest/1.0-r0/temp/log.do_compile.22198
>
>     >>
>     >> Log data follows:
>     >> | DEBUG: Executing shell function do_compile
>     >> | NOTE: make -j 16 CROSS_COMPILE=arm-bec-linux-gnueabi- ARCH=arm
>     >> CC=arm-bec-linux-gnueabi-gcc  -march=armv7ve -mthumb
>     -mfpu=neon-vfpv4
>     >> -mfloat-abi=hard -mcpu=cortex-a7 -fstack-protector-strong
>     >> -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security
>     -Werror=format-security
>     >> -fstack-protector-strong  -D_FORTIFY_SOURCE=2 -Wformat
>     >> -Wformat-security -Werror=format-security
>     >>
>     --sysroot=/mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/kernel-selftest/1.0-r0/recipe-sysroot
>
>     >>
>     >> AR=arm-bec-linux-gnueabi-ar LD=arm-bec-linux-gnueabi-ld
>     >>
>     --sysroot=/mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/kernel-selftest/1.0-r0/recipe-sysroot
>
>     >>
>     >>
>     DESTDIR=/mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/kernel-selftest/1.0-r0/image
>     >> -C
>     >>
>     /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/kernel-selftest/1.0-r0/kernel-selftest-1.0/tools/testing/selftests/bpf
>     >> | make: Entering directory
>     >>
>     '/mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/kernel-selftest/1.0-r0/kernel-selftest-1.0/tools/testing/selftests/bpf'
>
>     >>
>     >> | make -C ../../../lib/bpf
>     >>
>     OUTPUT=/mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/kernel-selftest/1.0-r0/kernel-selftest-1.0/tools/testing/selftests/bpf/
>
>     >>
>     >> | make[1]: Entering directory
>     >>
>     '/mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/kernel-selftest/1.0-r0/kernel-selftest-1.0/tools/lib/bpf'
>
>     >>
>     >> |
>     >> | Auto-detecting system features:
>     >> | ...                        libelf: [ ^[[31mOFF^[[m ]
>     >> | ...                           bpf: [ ^[[31mOFF^[[m ]
>     >> |
>     >> | BPF API too old
>     >> | make[1]: *** [Makefile:219: bpfdep] Error 255
>     >> | make[1]: *** Waiting for unfinished jobs....
>     >> | No libelf found
>     >> | make[1]: *** [Makefile:216: elfdep] Error 255
>     >> |   HOSTCC
>     >>
>     /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/kernel-selftest/1.0-r0/kernel-selftest-1.0/tools/testing/selftests/bpf/fixdep.o
>     >> |   HOSTLD
>     >>
>     /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/kernel-selftest/1.0-r0/kernel-selftest-1.0/tools/testing/selftests/bpf/fixdep-in.o
>     >> |   LINK
>     >>
>     /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/kernel-selftest/1.0-r0/kernel-selftest-1.0/tools/testing/selftests/bpf/fixdep
>     >> | make[1]: Leaving directory
>     >>
>     '/mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/kernel-selftest/1.0-r0/kernel-selftest-1.0/tools/lib/bpf'
>
>     >>
>     >> | make: *** [Makefile:33:
>     >>
>     /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/kernel-selftest/1.0-r0/kernel-selftest-1.0/tools/testing/selftests/bpf/libbpf.a]
>
>     >>
>     >> Error 2
>     >> | make: Leaving directory
>     >>
>     '/mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/kernel-selftest/1.0-r0/kernel-selftest-1.0/tools/testing/selftests/bpf'
>
>     >>
>     >> | ERROR: oe_runmake failed
>     >> | WARNING:
>     >>
>     /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/kernel-selftest/1.0-r0/temp/run.do_compile.22198:1
>     >> exit 1 from 'exit 1'
>     >> | ERROR: Function failed: do_compile (log file is located at
>     >>
>     /mnt/a/oe/build/tmp/work/raspberrypi3-bec-linux-gnueabi/kernel-selftest/1.0-r0/temp/log.do_compile.22198)
>
>     >>
>     >>
>     >> On Mon, Jul 16, 2018 at 2:51 AM Hongzhi, Song
>     >> <hongzhi.song at windriver.com
>     <mailto:hongzhi.song at windriver.com>> wrote:
>     >>>
>     >>>
>     >>> On 2018年07月14日 00:23, Burton, Ross wrote:
>     >>>> On 13 July 2018 at 15:06, Hongzhi.Song
>     <hongzhi.song at windriver.com <mailto:hongzhi.song at windriver.com>>
>     >>>> wrote:
>     >>>>> +LIC_FILES_CHKSUM =
>     >>>>> "file://COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7 \
>     >>>> Why are you shipping your own copy of the kernel's COPYING
>     file even
>     >>>> though you copy another in that prefunc?
>     >>>>
>     >>>> Isn't it possible to just depend on kernel-source and build
>     directly
>     >>>> from the kernel source tree?
>     >>>>
>     >>>>> +# for bpf and vm
>     >>>>> +DEPENDS = " \
>     >>>>> +    elfutils \
>     >>>>> +    libcap \
>     >>>>> +    libcap-ng \
>     >>>>> +    fuse \
>     >>>>> +    util-linux \
>     >>>>> +    rsync-native \
>     >>>>> +"
>     >>>> Really not convinced these dependencies are accurate.
>     >>>>
>     >>>>> +TEST_LIST = "bpf \
>     >>>>> +             vm \
>     >>>>> +"
>     >>>> You're not listing memfd in here, but that is the only place
>     which
>     >>>> uses fuse as far as I can tell.
>     >>>>
>     >>>> My suggestion is to trim the DEPENDS back to the core minimum
>     and use
>     >>>> PACKAGECONIG to select what directories get built. This means
>     you can
>     >>>> have optional test suites where the dependencies are not in
>     oe-core
>     >>>> (fuse for memfd, for example), and get the right RDEPENDS too.
>     >>>>
>     >>>>> +        oe_runmake -C ${S}/tools/testing/selftests/${i}
>     >>>>> INSTALL_PATH=${D}/opt/kselftest/${i} install
>     >>>> FHS says /opt is for sysadmin-installed tools that are not
>     package
>     >>>> managed.  You're building a package. You're also building a
>     package
>     >>>> which is essentially ptest.  I'd say inherit ptest, write a
>     runner,
>     >>>> and put all the binaries in $PTESTDIR.
>     >>> Hi Burton,
>     >>>
>     >>> kernel-selftest is designed to be shared by ptest and oe-self,
>     and
>     >>> thus is
>     >>> not supposed to inherit ptest.
>     >>>
>     >>> The suggestions you mentioned above will be modified soon.
>     >>>
>     >>> --Hongzhi
>     >>>
>     >>>> Ross
>     >>>>
>     >
>




More information about the Openembedded-devel mailing list