WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: How can I symlink to the kernel source in "/lib/modules/'uname -a'/build"?  (Read 11275 times)

Offline danny

  • Jr. Member
  • **
  • Posts: 73
Hi Paul,
Thanks for your help.
I pasted in terminal:
Code: [Select]
modprobe configs.ko
zcat /proc/config.gz

And then I see Linux/arm 4.19.81 Kernel Configuration.
What is the next step I can compile driver source code against the prepared piCore kernel source?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14929
I learnt something there  :)

Once you have the kernel config, to prepare the kernel source you need to do something like this using:

http://tinycorelinux.net/11.x/armv7/releases/RPi/src/kernel/linux-rpi-4.19.81.tar.xz
http://tinycorelinux.net/11.x/armv7/releases/RPi/src/kernel/Module.symvers

Code: [Select]
$ tce-load -i compiletc bash bc perl5 ncurses-dev openssl-dev libelf-dev
$ tar xf linux-rpi-4.19.81.tar.xz
$ cd linux-rpi-4.19.81

$ make mrproper
$ cp ../config-4.19.81-piCore-v7 .config
$ make oldconfig
$ make prepare
$ make modules_prepare

$ cp ../Module.symvers ./
$ make SUBDIRS=scripts/mod

.and the kernel source will be ready to compile your RYWDB00 source against it.
« Last Edit: May 12, 2020, 02:33:52 AM by Juanito »

Offline danny

  • Jr. Member
  • **
  • Posts: 73
I met some problem:
1.Where is the directory of config-4.19.81-piCore-v7 and the file of .config?
2.Does the file of Module.symvers exist on piCore or I need to download it?

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14929
config-4.19.81-piCore-v7 is the piCore kernel config file as revealed by @Paul_123.

The config has been uploaded to the server here: http://tinycorelinux.net/11.x/armv7/releases/RPi/src/kernel/config-4.19.81-piCore-v7

Once you have downloaded the config file config-4.19.81-piCore-v7, you need to copy it into the kernel source and rename it to .config as explained previously.

As mentioned earlier, you need to download the Module.symvers file from here: http://tinycorelinux.net/11.x/armv7/releases/RPi/src/kernel/Module.symvers


Offline danny

  • Jr. Member
  • **
  • Posts: 73
Does it exist iw phy | greg phy command on piCore?
When I pasted iw phy | greg phy I got
Code: [Select]
-sh: iw: not found
-sh: greg: not found

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14929
The command is "grep" and not "greg".

There is no iw extension in piCore-11.x - use wireless_tools or, better still, wifi.

Offline danny

  • Jr. Member
  • **
  • Posts: 73
How can I use wireless_tools to find usable wifi interface?
Like:
Code: [Select]
iw phy | grep phy

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14929
Code: [Select]
$ iwconfig

Offline danny

  • Jr. Member
  • **
  • Posts: 73
This list when I execute "iwconfig"
Code: [Select]
wlan0     IEEE 802.11  ESSID:"MIT_5G"
          Mode:Managed  Frequency:5.22 GHz  Access Point: 68:FF:7B:1A:43:CF
          Bit Rate=433.3 Mb/s   Tx-Power=31 dBm
          Retry short limit:7   RTS thr:off   Fragment thr:off
          Power Management:on
          Link Quality=70/70  Signal level=-34 dBm
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:8  Invalid misc:0   Missed beacon:0

eth0      no wireless extensions.

rpine0    no wireless extensions.

lo        no wireless extensions.
I want to use "rpine0" be default wifi interface.

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14929
Have you tried:
Code: [Select]
$ sudo iwconfig wlan0 down
$ sudo iwconfig rpine0 up

Offline danny

  • Jr. Member
  • **
  • Posts: 73
It show:
Code: [Select]
iwconfig: unknown command "down"
iwconfig: unknown command "up"

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14929
Sorry - I meant ifconfig...

Offline danny

  • Jr. Member
  • **
  • Posts: 73
Can I use the following resource to install libnl and wi on piCore?
Code: [Select]
https://www.infradead.org/~tgr/libnl/files/
Code: [Select]
https://mirrors.edge.kernel.org/pub/software/network/iw/

Online Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11818
Hi danny
The info files from previous versions list where the sources were downloaded from:
http://tinycorelinux.net/10.x/armv7/tcz/libnl.tcz.info
http://tinycorelinux.net/10.x/armv7/tcz/iw.tcz.info

There are some build scripts for  libnl  and  iw  here:
http://tinycorelinux.net/10.x/armv7/tcz/src/libnl/
http://tinycorelinux.net/10.x/armv7/tcz/src/iw/

Offline Juanito

  • Administrator
  • Hero Member
  • *****
  • Posts: 14929
libnl is in piCore-11.x and iw is provided by wireless-tools, which is also in piCore-11.x