Code Monkey home page Code Monkey logo

Comments (9)

starnight avatar starnight commented on August 13, 2024 1

Please copy the built module to /lib/modules/<kernel-version>/extra/ of your target board.
It is described in Building External Modules

from lora.

starnight avatar starnight commented on August 13, 2024

This project makes the sx1278 as an external module which does not exist in original Linux kernel. So, I have not tried the cross-compiling for it. However, you can build it on an arm board manually, just like on x86 computers.

Or, you can move the source file into Linux kernel source code by yourself for experiment. Then, also prepare and modify the related Kconfigs and Makefiles which enables to choose the sx1278 module in make menuconfig.

from lora.

frank-w avatar frank-w commented on August 13, 2024

i compile my kernel with crosscompile (don't want doing on target-machine) so i added it to lora makefile too, as described above. i also changed path to my kernel-source...i know that it is not existing in kernel itself, but makefile needs kernel-sources so i only changed the path to them

problem is that module seems not to be compatible with 4.19, many missing, duplicate and different definitions

have compiled it against 4.19 kernel-sources yet?

from lora.

starnight avatar starnight commented on August 13, 2024

Please show the compiling error.

BTW, have you tried the commit which is just pushed few hours ago? I have tried it on my laptop whose kernel is 4.20.

from lora.

frank-w avatar frank-w commented on August 13, 2024

have now added the patch and got this result:

make -C ../.. M=/media/data_ext/bpi-r2-kernel/github/utils/lora modules
make[1]: Entering directory '/media/data_ext/bpi-r2-kernel/github'
  CC [M]  /media/data_ext/bpi-r2-kernel/github/utils/lora/sx1278.o
  Building modules, stage 2.
  MODPOST 1 modules
WARNING: "ieee802154_xmit_complete" [/media/data_ext/bpi-r2-kernel/github/utils/lora/sx1278.ko] undefined!
WARNING: "ieee802154_rx_irqsafe" [/media/data_ext/bpi-r2-kernel/github/utils/lora/sx1278.ko] undefined!
WARNING: "ieee802154_register_hw" [/media/data_ext/bpi-r2-kernel/github/utils/lora/sx1278.ko] undefined!
WARNING: "ieee802154_alloc_hw" [/media/data_ext/bpi-r2-kernel/github/utils/lora/sx1278.ko] undefined!
WARNING: "ieee802154_free_hw" [/media/data_ext/bpi-r2-kernel/github/utils/lora/sx1278.ko] undefined!
WARNING: "ieee802154_unregister_hw" [/media/data_ext/bpi-r2-kernel/github/utils/lora/sx1278.ko] undefined!
  CC      /media/data_ext/bpi-r2-kernel/github/utils/lora/sx1278.mod.o
  LD [M]  /media/data_ext/bpi-r2-kernel/github/utils/lora/sx1278.ko
make[1]: Leaving directory '/media/data_ext/bpi-r2-kernel/github'

from lora.

starnight avatar starnight commented on August 13, 2024

The log says sx1278 module is built now. Please copy it to /lib/modules/<kernel-version>/extra/ of your target board.

All of the functions in the warnings are provided by the mac802154 module in Linux kernel. You can check the mac802154 is built within the Linux kernel or not for the warnings. If it is not, please toggle it to Y or M in make menuconfig when you build Linux kernel.

from lora.

frank-w avatar frank-w commented on August 13, 2024

thank you, this fixes that

now i'm hanging on overlay (have changed target-dir and removed sudo)...

dtc -I dts -O dtb -@ -o rpi-lora-spi.dtbo rpi-lora-spi-overlay.dts
rpi-lora-spi.dtbo: Warning (unit_address_vs_reg): Node /fragment@0 has a unit name, but no reg property
rpi-lora-spi.dtbo: Warning (unit_address_vs_reg): Node /fragment@0/__overlay__/spidev@0 has a unit name, but no reg property
rpi-lora-spi.dtbo: Warning (unit_address_vs_reg): Node /fragment@0/__overlay__/spidev@1 has a unit name, but no reg property

btw. uploaded my staging here:
https://github.com/frank-w/BPI-R2-4.14/tree/4.19-lora_new

created a separate dts for bpi-r2 where only spi0 is defined (no spidev), so only the top-node (fragment 0) brings this warning

make CROSS_COMPILE=arm-linux-gnueabihf- ARCH=arm
dtc -I dts -O dtb -@ -o bpi-r2-lora-spi.dtbo bpi-r2-lora-spi-overlay.dts
bpi-r2-lora-spi.dtbo: Warning (unit_address_vs_reg): Node /fragment@0 has a unit name, but no reg property

build is a symlink to my source-directory on my host-machine (invalid on target)...imho the module has to be inside /lib/modules/kernelname/kernel/...but where?

from lora.

starnight avatar starnight commented on August 13, 2024

The original issue is solved.
The overlay question is another issue. Please separate it to a new ticket.

from lora.

frank-w avatar frank-w commented on August 13, 2024

Ok,have opened a new issue for dts

Where should i put the module? build-symlink is invalid on target

from lora.

Related Issues (14)

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.