Giter Site home page Giter Site logo

Comments (6)

pstolarz avatar pstolarz commented on June 6, 2024

Hi Richard,
The problem is associated with lack of headers corresponding to the version of kernel you use (4.4.34).
If you want compile the module directly on the platform try this:

  • clone kernel src-tree corresponding to your ver of kernel:

    git clone --depth 1 --branch 38f2800e6e94019a00a2880bfed8fba37aea2e5d https://github.com/raspberrypi/linux

    NOTE: 38f2800e commit corresponds to 4.4.33 kernel since I don't see 4.4.34 on the raspberry/firmware repo. Should you had have problems with loading the module for this version of kernel src-tree, you may want to check commits later to this commit for compilation.

  • compile the module with

    KERNEL_SRC=<path to kernel src-tree> make

from w1-gpio-cl.

docrjh avatar docrjh commented on June 6, 2024

Hi
Thanks for the very quick reply.
Unfortunately, the clone request came back remote branch not found. Any ideas?
log
pi@raspberrypi:~/w1-gpio-cl $ sudo git clone --depth 1 --branch 38f2800e6e94019a00a2880bfed8fba37aea2e5d https://github.com/raspberrypi/linux
Cloning into 'linux'...
warning: Could not find remote branch 38f2800e6e94019a00a2880bfed8fba37aea2e5d to clone.
fatal: Remote branch 38f2800e6e94019a00a2880bfed8fba37aea2e5d not found in upstream origin

from w1-gpio-cl.

pstolarz avatar pstolarz commented on June 6, 2024

So try this:

git clone --branch rpi-4.4.y --depth 1000 https://github.com/raspberrypi/linux
cd linux
git checkout 38f2800e6e94019a00a2880bfed8fba37aea2e5d
export KERNEL_SRC=$(pwd)
make bcmrpi_defconfig modules_prepare

Hope, now you should be able to compile the module by make in its directory.

from w1-gpio-cl.

docrjh avatar docrjh commented on June 6, 2024

Hi, OK, I managed to clone linux and the git checkout and export seemed to work but make bcmrpi appears to fail. please see log bellow.

log
pi@raspberrypi:~ $ cd linux
pi@raspberrypi:/linux $ sudo git checkout 38f2800e6e94019a00a2880bfed8fba37aea2e5d
HEAD is now at 38f2800... Merge remote-tracking branch 'stable/linux-4.4.y' into rpi-4.4.y
pi@raspberrypi:/linux $ export KERNEL_SRC=$(pwd)
pi@raspberrypi:~/linux $ sudo make bcmrpi_defconfig modules_prepare

configuration written to .config

scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[2]: 'include/generated/mach-types.h' is up to date.
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
/bin/sh: 1: bc: not found
Kbuild:66: recipe for target 'include/generated/timeconst.h' failed
make[2]: *** [include/generated/timeconst.h] Error 127
Makefile:1003: recipe for target 'prepare0' failed
make[1]: *** [prepare0] Error 2
Makefile:520: recipe for target '__build_one_by_one' failed
make: *** [__build_one_by_one] Error 2

cd to w1-gpio-cl dir
pi@raspberrypi:/w1-gpio-cl $ sudo KERNEL_SRC=/home/pi/linux make
`gen-mast.h' has been generated.
make -C /home/pi/linux M= modules
make[1]: Entering directory '/home/pi/linux'
CHK include/config/kernel.release
CHK include/generated/uapi/linux/version.h
CHK include/generated/utsrelease.h
make[2]: 'include/generated/mach-types.h' is up to date.
CHK include/generated/bounds.h
CHK include/generated/timeconst.h
/bin/sh: 1: bc: not found
Kbuild:66: recipe for target 'include/generated/timeconst.h' failed
make[2]: *** [include/generated/timeconst.h] Error 127
Makefile:1003: recipe for target 'prepare0' failed
make[1]: *** [prepare0] Error 2
make[1]: Leaving directory '/home/pi/linux'
Makefile:13: recipe for target 'all' failed
make: *** [all] Error 2
pi@raspberrypi:~/w1-gpio-cl $

from w1-gpio-cl.

pstolarz avatar pstolarz commented on June 6, 2024

As stated in README bc is required to build the module/kernel. Install its package.
sudo apt-get install bc

from w1-gpio-cl.

pstolarz avatar pstolarz commented on June 6, 2024

README has been updated. If more info is needed reopen the issue or provide your pull request.

from w1-gpio-cl.

Related Issues (3)

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.