←  [EN] Third-Party Development

Forums

»

OpenEmbedded toolchain for OpenPLi7 3.x ke...

A.A.'s Photo A.A. 13 Dec 2018

Hi,

 

as OE developer and maintainer I normally do my various builds with bleeding-edge oe-core master.

I have tried for fun to add the vuplus layer and have immediately verified that the kernel 3.13 does not build with gcc8 (it's not just compiler-gcc8.h).

 

Unfortunately the build for mipsel fails with gcc7 as well, I think older binutils are needed.

Before doing further tests I am asking here if someone is already building these 3.x kernels with recent oe-core.

 

Cheers

A.A.

 

P.S. I still have an old Ubuntu 12.04 with OE configured to build this older stuff

Quote

betacentauri's Photo betacentauri 13 Dec 2018

With sumo we are able to build images:
https://github.com/O...-core/tree/sumo

And OE-Alliance uses I think Thud or similar:
https://github.com/o...roment/tree/4.3
Quote

Erik Slagter's Photo Erik Slagter 13 Dec 2018

But "master" is even quite a bit newer.

 

This may indeed yield problems when we move to Thud or newer. Currently I think we'll skip Thud, because by that time there will be already a newer stable release.

 

On the other hand, VU+ has proven to have a capable OE developer that always fixes these things quickly, for VU+ I don't see a problem here. Although a newer kernel would be quite nice as well.

Quote

Erik Slagter's Photo Erik Slagter 13 Dec 2018

Off topic: A.A. we still need some OE expertise in the team here ;)

Quote

A.A.'s Photo A.A. 13 Dec 2018

I see sumo had gcc 7.3 and binutils 2.30 while master as of today has gcc 8.2 and binutils 2.31.

 

I have already tried with GCCVERSION = "7.%" in the kernel recipe, it helps but then I get the specific mips error:

 

/tmp/build/tmp-musl/work-shared/vuduo2/kernel-source/arch/mips/kernel/r4k_fpu.S: Assembler messages:
/tmp/build/tmp-musl/work-shared/vuduo2/kernel-source/arch/mips/kernel/r4k_fpu.S:83: Error: opcode not supported on this processor: mips3 (mips3) `sdc1 $f
0,272+0($4)'
 

This is an old issue, there are surely fixes around in the kernel tree which I'll have to apply. Seems easier to use older binutils...

I'll let you know.

 

A.A.

 

BTW

WARNING: linux-vuduo2-3.13.5-r1.6.4 do_patch:
Some of the context lines in patches were ignored. This can lead to incorrectly applied patches.
 

Quote

Erik Slagter's Photo Erik Slagter 13 Dec 2018

So the compiler generates assembler instructions that the assembler refuses? That I would call a compiler bug, or is the source already in assembly? Is the arch actually completely correct, maybe that's where the real problem is?

Quote

A.A.'s Photo A.A. 13 Dec 2018

I think the problem is more on the binutils side.

Let me poke Khem this night ;)

 

Cheers

A.A.

Quote

WanWizard's Photo WanWizard 13 Dec 2018

P.S. I still have an old Ubuntu 12.04 with OE configured to build this older stuff

 

I use CentOS with devtoolsets for this, so I can run gcc 4 to 7 on the same buildserver. Haven't tried to build the Sumo branch though, busy getting 7.0 stable and out the door...

Quote

foxbob's Photo foxbob 13 Dec 2018

I builds without problems on sumo and master branch meta-vuplus on ubuntu 18.10.

Quote

Erik Slagter's Photo Erik Slagter 13 Dec 2018

I think the problem is more on the binutils side.

Let me poke Khem this night ;)

But how is binutils involved here then?

Quote

Erik Slagter's Photo Erik Slagter 13 Dec 2018

I builds without problems on sumo and master branch meta-vuplus on ubuntu 18.10.

That's not the issue. Please read carefully.

Quote

foxbob's Photo foxbob 13 Dec 2018

On gcc 8.2 build kernel 3.13 -ok.

Quote

Erik Slagter's Photo Erik Slagter 13 Dec 2018

Read, this is about the OE master branch.

Quote

rantanplan's Photo rantanplan 13 Dec 2018

Why do not you just pick up finished toolchains?

https://toolchains.bootlin.com/

 

Spares you a lot of work.

But probably I'm too naive again.

Quote

A.A.'s Photo A.A. 14 Dec 2018

I tried to build with sumo and it failed ( https://pastebin.com/gUCviDwH ).

 

Mystery is now solved: problem comes only with TCLIBC = "musl".

(Good build: https://pastebin.com/buMUaeZE ).

 

I suppose binutils-cross or then gcc.cross are broken for mips.

 

I'll do more tests with master.

Cheers

A.A.

 

 

P.S.  Warnings seen

 

WARNING: linux-vuduo2-3.13.5-r1.6.4 do_patch:
Some of the context lines in patches were ignored. This can lead to incorrectly applied patches.
The context lines in the patches can be updated with devtool:

    devtool modify <recipe>
    devtool finish --force-patch-refresh <recipe> <layer_path>

Then the updated patches and the source tree (in devtool's workspace)
should be reviewed to make sure the patches apply in the correct place
and don't introduce duplicate lines (which can, and does happen
when some of the context is ignored). Further information:
http://lists.openemb...rch/148675.html
https://bugzilla.yoc...ug.cgi?id=10450
Details:
Applying patch brcm_s3_wol.patch
patching file drivers/net/ethernet/broadcom/genet/bcmgenet.c
patching file drivers/brcmstb/setup.c
Hunk #1 succeeded at 932 with fuzz 1.
Hunk #2 succeeded at 948 with fuzz 2.

Now at patch brcm_s3_wol.patch
WARNING: linux-vuduo2-3.13.5-r1.6.4 do_package: QA Issue: FILES variable for package kernel-devicetree contains '//' which is invalid. Attempting to fix this but you should correct the metadata.
 [files-invalid]
WARNING: linux-vuduo2-3.13.5-r1.6.4 do_package: QA Issue: FILES variable for package kernel-image-vmlinux contains '//' which is invalid. Attempting to fix this but you should correct the metadata.
 [files-invalid]
WARNING: linux-vuduo2-3.13.5-r1.6.4 do_package: QA Issue: linux-vuduo2: Files/directories were installed but not shipped in any package:
  /tmp/vmlinux-3.13.5
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
linux-vuduo2: 1 installed and not shipped files. [installed-vs-shipped]
NOTE: Tasks Summary: Attempted 586 tasks of which 414 didn't need to be rerun and all succeeded.

 


Edited by A.A., 14 December 2018 - 00:29.
Quote

A.A.'s Photo A.A. 14 Dec 2018

For the records, during the night the build of kernel succeeded with yesterday's OE master-checkouts and default TCLIBC.

 

Here the full log:  https://pastebin.com/daEiJbKi

I only added  GCCVERSION ?= "7.%" to vuduo2.conf.

 

I'll try later again with gcc8.

 

Cheers

A.A.

Quote

Erik Slagter's Photo Erik Slagter 14 Dec 2018

We have sumo building without errors for some time now, even on mipsel.

Quote

A.A.'s Photo A.A. 14 Dec 2018

I think you could even move to Thud (2.6).

Apart kernel, in the last weeks I have fixed the failing mipsel recipes and have built core-image-base.

 

I hope now to quickly fix the kernel build using gcc8.

The issue I have now is known:

https://www.mail-arc.../msg579170.html

 

Cheers

A.A.

Quote

A.A.'s Photo A.A. 14 Dec 2018

Between a phone call and an e-mail I could find this hint:

 

https://lkml.org/lkml/2017/12/5/538

- turning off the gcc-8 -Wattribute-alias warning inside of the
SYSCALL_DEFINEx() macro without having to do it globally.

 

I could not yet find the patch, I think it is not committed.

Anyway a backport is needed.

 

Cheers

A.A.

Quote

A.A.'s Photo A.A. 14 Dec 2018

Ok,

 

other than creating    compiler-gcc8.h   this one-liner kernel patch is needed:

 

--- a/Makefile    2018-12-14 11:25:50.014973369 +0100
+++ b/Makefile    2018-12-14 11:25:13.206846263 +0100
@@ -376,6 +376,7 @@
            -fno-strict-aliasing -fno-common \
            -Werror-implicit-function-declaration \
            -Wno-format-security \
+           -Wno-error=attribute-alias \
            -fno-delete-null-pointer-checks
 KBUILD_AFLAGS_KERNEL :=
 KBUILD_CFLAGS_KERNEL :=
 

That's all!

(Well, minor packaging issues to fix)

 

andrea@andrea-ThinkPad-T520:/oe/meta-vuplus$ bitbake virtual/kernel
Loading cache: 100% |############################################| Time: 0:00:00
Loaded 3328 entries from dependency cache.
Parsing recipes: 100% |##########################################| Time: 0:00:01
Parsing of 2348 .bb files complete (2346 cached, 2 parsed). 3329 targets, 274 skipped, 0 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies

Build Configuration:
BB_VERSION           = "1.40.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-18.04"
TARGET_SYS           = "mipsel-oe-linux"
MACHINE              = "vuduo2"
DISTRO               = "nodistro"
DISTRO_VERSION       = "nodistro.0"
TUNE_FEATURES        = "o32 fpu-hard mips32"
TARGET_FPU           = ""
meta                 = "master:6d666b0413336de2e556b2722c5be97ae5cd40ad"
meta-oe              = "master:ff6bead1624a1e261408516b3d064a04aab5f592"
meta-handheld        = "master:a876aaa33317d388aa2e865f665fe6cc58d500a7"
meta-initramfs       
meta-multimedia      
meta-networking      
meta-python          = "master:ff6bead1624a1e261408516b3d064a04aab5f592"
meta-vuplus          = "master:2c48f82d916314dfc41828415951b6cb2bf8e2e5"
meta-kodi            = "sumo:112b519fe98ea2a236db88b8e43a905825c0857b"

Initialising tasks: 100% |#######################################| Time: 0:00:00
Sstate summary: Wanted 9 Found 2 Missed 7 Current 122 (22% match, 94% complete)
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
WARNING: linux-vuduo2-3.13.5-r1.6.4 do_package: QA Issue: FILES variable for package kernel-devicetree contains '//' which is invalid. Attempting to fix this but you should correct the metadata.
 [files-invalid]
WARNING: linux-vuduo2-3.13.5-r1.6.4 do_package: QA Issue: FILES variable for package kernel-image-vmlinux contains '//' which is invalid. Attempting to fix this but you should correct the metadata.
 [files-invalid]
WARNING: linux-vuduo2-3.13.5-r1.6.4 do_package: QA Issue: linux-vuduo2: Files/directories were installed but not shipped in any package:
  /tmp/vmlinux-3.13.5
Please set FILES such that these items are packaged. Alternatively if they are unneeded, avoid installing them or delete them within do_install.
linux-vuduo2: 1 installed and not shipped files. [installed-vs-shipped]
NOTE: Tasks Summary: Attempted 596 tasks of which 578 didn't need to be rerun and all succeeded.

Summary: There were 3 WARNING messages shown.
andrea@andrea-ThinkPad-T520:/oe/meta-vuplus$
 

Cheers

A.A.

Quote