Giter Club home page Giter Club logo

Comments (7)

AndreRH avatar AndreRH commented on July 30, 2024 1

Hacky but works:
in buildroot/support/scripts/check-kernel-headers.sh change the line return 1; -> return 0;

from freedom-u-sdk.

michaeljclark avatar michaeljclark commented on July 30, 2024

I spent a lot of time mucking with buildroot in early December and coudn't get it to work due to similar sorts of errors with gcc and linux header version dependencies. I tried fixing it but I gave up hacking on buildroot and went ahead and made a tiny busybox+dropbear linux root image builder. Caveat: it requires sudo as it loop mounts an ext4 filesystem

There is obviously some buildroot patches I must be missing or I'm on the wrong branch. When I run it a third time, the build log is shorter, but I get the same error.

$ make qemu
make -C /home/mclark/src/sifive/freedom-u-sdk/buildroot RISCV=/opt/riscv/toolchain PATH=/opt/riscv/toolchain/bin:/home/mclark/bin:/home/mclark/.local/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/opt/riscv/toolchain/bin:/opt/riscv/qemu/bin:/opt/riscv/musl-riscv-toolchain-7.2.0-7/bin O=/home/mclark/src/sifive/freedom-u-sdk/work/buildroot_initramfs
make[1]: Entering directory '/home/mclark/src/sifive/freedom-u-sdk/buildroot'
>>> toolchain-external undefined Configuring
Incorrect selection of kernel headers: expected 4.6.x, got 4.13.x
package/pkg-generic.mk:185: recipe for target '/home/mclark/src/sifive/freedom-u-sdk/work/buildroot_initramfs/build/toolchain-external-undefined/.stamp_configured' failed
make[1]: *** [/home/mclark/src/sifive/freedom-u-sdk/work/buildroot_initramfs/build/toolchain-external-undefined/.stamp_configured] Error 1
make[1]: Leaving directory '/home/mclark/src/sifive/freedom-u-sdk/buildroot'
Makefile:87: recipe for target '/home/mclark/src/sifive/freedom-u-sdk/work/buildroot_initramfs/images/rootfs.tar' failed
make: *** [/home/mclark/src/sifive/freedom-u-sdk/work/buildroot_initramfs/images/rootfs.tar] Error 2

It's possibly my linux toolchain version. My linux toolchain is top-of-tree default master branch of riscv-gnu-toolchain as of 01-Feb-2018

$ /opt/riscv/toolchain-20180201/bin/riscv64-unknown-linux-gnu-gcc --version
riscv64-unknown-linux-gnu-gcc (GCC) 7.1.1 20170509
Copyright (C) 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

from freedom-u-sdk.

terpstra avatar terpstra commented on July 30, 2024

from freedom-u-sdk.

michaeljclark avatar michaeljclark commented on July 30, 2024

Oh that's good to know. I'll give it a try.

We probably should have master (default branch) in riscv-gnu-toolchain pointing at a newer toolchain. I'll try and figure out which branch freedom-u-sdk is using...

from freedom-u-sdk.

michaeljclark avatar michaeljclark commented on July 30, 2024

We have quite a few repos that build private copies of the toolchain (freedom, freedom-u-sdk, freedom-e-sdk, riscv-tools (if built separately) and riscv-gnu-toolchain (if built separately). Hopefully, we'll be able to fix some of these issues by using packaged dependencies instead of submodules. At some point...

@palmer-dabbelt @jim-wilson what branch of riscv-gnu-toolchain does freedom-u-sdk depend on? linux-headers-4.15-rc3? master in riscv-gnu-toolchain seems to be a little behind.

from freedom-u-sdk.

michaeljclark avatar michaeljclark commented on July 30, 2024

Appears to be the issue. The build is getting a lot further... it is still building...

I'll leave the issue open as its likely many folk will have RISCV set.

We should probably add a test for the headers if an external toolchain is being used.

We could perhaps add it to the README.md when we give it a README.md. I can make a PR...

from freedom-u-sdk.

terpstra avatar terpstra commented on July 30, 2024

the documentation now includes a comment about this gotcha

from freedom-u-sdk.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.