Tiny Core Linux
Tiny Core Extensions => TCE Corepure64 => Topic started by: pek on May 09, 2023, 04:53:30 AM
-
Hi all.. I'm back again with more questions :)
This time, I loaded these to my initial failed attempts to make wifi on a macbook air working.
dbus.tcz
firmware-broadcom_bcm43xx.tcz
wifi.tcz
When i typed iwconfig, no wlan adapter was found.
This is what i get in dmesg that i think related to it
[ 16.037321] i801_smbus 0000:00:1f.3: SMBus using PCI interrupt
[ 16.037555] i2c i2c-0: 2/2 memory slots populated (from DMI)
[ 16.072354] loop30: detected capacity change from 0 to 1528
[ 16.104450] platform regulatory.0: Direct firmware load for regulatory.db failed with error -2
[ 16.104457] platform regulatory.0: Falling back to sysfs fallback for: regulatory.db
[ 16.108967] cfg80211: failed to load regulatory.db
[ 16.159657] b43-phy0: Broadcom 4360 WLAN found (core revision 42)
[ 16.160887] b43-phy0 ERROR: FOUND UNSUPPORTED PHY (Analog 12, Type 11 (AC), Revision 1)
[ 16.160895] b43: probe of bcma0:1 failed with error -95
[ 16.160918] Broadcom 43xx driver loaded [ Features: PNLS ]
So, I could't make the wifi work.
Then I tried other distro which also failed.
After some random google searching, I found a suggestion that makes wifi works on other distro. By doing this
$ modprobe -r b43
$ modprobe -r bcma
$ modprobe -r wl
$ modprobe wl
When I tried to replicate this with Corepure64, I'm stuck at
$ sudo modprobe wl
It says wl not found in modules.dep
Here's the lsmod
Module Size Used by Not tainted
b43 339968 0
mac80211 331776 1 b43
cfg80211 237568 2 b43,mac80211
ssb 40960 1 b43
i2c_i801 20480 0
i2c_smbus 12288 1 i2c_i801
mmc_core 86016 2 b43,ssb
cordic 12288 1 b43
cpufreq_userspace 12288 0
cpufreq_conservative 12288 0
cpufreq_powersave 12288 0
squashfs 36864 31
apple_mfi_fastcharge 12288 0
hid_apple 16384 0
sbs 12288 0
sbshc 12288 1 sbs
mei_hdcp 12288 0
video 45056 0
wmi 16384 1 video
pcspkr 12288 0
xhci_pci 12288 0
xhci_hcd 102400 1 xhci_pci
ac 12288 0
xhci_pci_renesas 12288 1 xhci_pci
apple_bl 12288 0
thunderbolt 143360 0
loop 20480 62
backlight 12288 2 video,apple_bl
mei_me 20480 1
lpc_ich 24576 0
mei 49152 3 mei_hdcp,mei_me
bcma 32768 1 b43
What should I do from here?
Thank you.
-
The first thing to check with lsusb or lspci is what hardware you have.
The last time I compiled wl it literally needed 10 patches..
-
Hi Juanito,
The first thing to check with lsusb or lspci is what hardware you have.
Actually I loaded all available firmwares/drivers for wifi from Tinycore64 repo.
And when i dmesg, it found this Broadcom 4360 :D
So, I guessed this was correct.
I will run lspci later again though, to do it proper way and educate myself.
I don't think it's related to lsusb, because it's a built in wifi module. But I will also run lsblk out of curiosity.
I'll post back after I get more details of these.
The last time I compiled wl it literally needed 10 patches..
I hope this is not about kernel compiling again :-X
I'm still far out of league about that for now.
-
Apparently there are two versions of the 4360:
14E4:4360 no linux driver
14E4:43A0 wl driver
Use “lspci -vnn | grep -i net” to find which you have.
-
lspci -vnn | grep -i net gave me
03:00.0 Network controller [0280]: Broadcom Limited BCM4360 802.11ac Wireless Network Adapter [14e4:43a0] (rev 03)
so, it's wl then.. :-[
So, do i have to recompile kernel for this?
or
Is there a way to make a tcz for this? (I prefer this if possible though)
And.. btw
14E4:4360 no linux driver
14E4:43A0 wl driver
How did you figured out one is "no linux driver" and the other is "wl" just by looking at those numbers? :o
-
Is there a way to make a tcz for this?
I'll take a look, however it looks like broadcom have not updated the source since this: http://tinycorelinux.net/11.x/x86_64/tcz/wl-modules-5.4.3-tinycore64.tcz.info
How did you figured out one is "no linux driver" and the other is "wl" just by looking at those numbers? :o
It was the first hit on google...
-
Here some more clues, you should blacklist lots of modules.
https://bbs.archlinux.org/viewtopic.php?id=249038
And here they using the Linux Technic "DKMS".
I don't know so much about how to accomplish that in TC.
-
The modules to blacklist are in the wl info file above and there is a blacklist boot code.
-
I'll take a look, however it looks like broadcom have not updated the source since this: http://tinycorelinux.net/11.x/x86_64/tcz/wl-modules-5.4.3-tinycore64.tcz.info
Thank you so much for this. No rush though. Anytime convenient to you. Thanks.
It was the first hit on google...
I searched high and low for "14E4:4360" trying to find a "no linux driver" as a literal driver, with no avail and finally I think what you meant was
- There's no linux driver for this 14E4:4360
as opposite to what i thought was
- There's a linux driver named "14E4:4360 no linux driver" ;D
Well.. now i learn many advance things and also to understand simple statement ;D
-
Hi everyone,
after completing a task of compiling kernel and creating module with massive helps... here:
http://forum.tinycorelinux.net/index.php/topic,26244.30.html (http://forum.tinycorelinux.net/index.php/topic,26244.30.html)
I'm tempted to try to create this "wl" module.
Before I start, there are few questions.. as usual ;D
1. Can I reuse the source that I already "ticked" (SPIxx.. etc) or should I create a fresh "make menuconfig"?
2. This is the screenshot when I tried to reuse. Do I just tick everything related to Broadcom?
(https://i.ibb.co/mqP3gjS/bcom.png)
and then "make"
3. I hope it's that simple.. But I highly doubt that ::)
-
The wl module is not in the kernel source - you need to download its source code from the Broadcom site. The link is in the wl info file in the 11.x repo.
Note that the latest debian build uses 27 patches.
See also: http://www.tinycorelinux.net/11.x/x86_64/tcz/src/wl/
-
..seems the source has moved to here: https://docs.broadcom.com/docs/12358410
-
..seems the source has moved to here: https://docs.broadcom.com/docs/12358410
Thanks for the update.
I downloaded from https://docs.broadcom.com/docs-and-downloads/docs/linux_sta/hybrid-v35_64-nodebug-pcoem-6_30_223_271.tar.gz
as mentioned in http://www.tinycorelinux.net/11.x/x86_64/tcz/src/wl/ (http://www.tinycorelinux.net/11.x/x86_64/tcz/src/wl/). And I think they are the same.
This part.. I'm lost:
patch -Np1 -i ../wl-licence.patch
patch -Np1 -i ../wl-linux.c.patch
...
make API=CFG80211 -C /usr/src/linux-5.4.3 M=`pwd`
there are no such files..??
-
You’ll need to look back in previous repos for the missing patch files i.e. 10.x, 9.x, etc.
Substitute the actual location of your prepared source for /usr/src/linux-5.4.3
-
Hi Juanito
I copied all of the patches to:
http://tinycorelinux.net/11.x/x86_64/tcz/src/wl/
I'll do the same for x86.
-
Thanks :)
-
..and there's a bunch of patches in http://deb.debian.org/debian/pool/non-free-firmware/b/broadcom-sta/broadcom-sta_6.30.223.271-24~exp3.debian.tar.xz
I guess you'll need patches 16 to 29
-
Thanks guys.
I patched all that and
make API=CFG80211 -C /mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl M=`pwd`
Then I got wl.mod
I searched for wl.ko but nowhere to be found.
When I "cat wl.mod" I got
/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/shared/linux_osl.o
/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_linux.o
/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_iw.o
/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_cfg80211_hybrid.o
Is this the file I'm supposed to look for?
Btw, when I did "make API=CFG80211 -C..."
It showed this in terminal
tc@box:/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl$ make API=CFG80211 -C /mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/
linux-6.1.2 M=`pwd` > /home/tc/logWL.txt[J[1A
tc@box:/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl$ make API=CFG80211 -C /mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/
linux-6.1.2 M=`pwd`[J
make: Entering directory '/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2'
CFG80211 API specified in command line
Using CFG80211 API
CC [M] /mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_linux.o
In file included from [01m[K/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_linux.c:81[m[K:
[01m[K/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_iw.h:73:[m[K [01;35m[Kwarning: [m[K"isprint" redefined
73 | #define isprint(c) bcm_isprint(c)
|
In file included from [01m[K./include/linux/string_helpers.h:6[m[K,
from [01m[K./include/linux/seq_file.h:7[m[K,
from [01m[K./include/linux/seq_file_net.h:5[m[K,
from [01m[K./include/net/net_namespace.h:191[m[K,
from [01m[K./include/linux/netdevice.h:38[m[K,
from [01m[K/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/include/linuxver.h:69[m[K,
from [01m[K/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_linux.c:27[m[K:
[01m[K./include/linux/ctype.h:30:[m[K [01;36m[Knote: [m[Kthis is the location of the previous definition
30 | #define isprint(c) ((__ismask(c)&(_P|_U|_L|_D|_SP)) != 0)
|
[01m[K/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_linux.c:[m[K In function '[01m[Kwl_dump_ver[m[K':
[01m[K/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_linux.c:2125:17:[m[K [01;31m[Kerror: [m[Kmacro "__DATE__" might prevent reproducible builds [[01;31m[K]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdate-time-Werror=date-time]8;;[m[K]
2125 | [01;31m[K__DATE__[m[K, __TIME__, EPI_VERSION_STR);
| [01;31m[K^~~~~~~~[m[K
[01m[K/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_linux.c:2125:27:[m[K [01;31m[Kerror: [m[Kmacro "__TIME__" might prevent reproducible builds [[01;31m[K]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdate-time-Werror=date-time]8;;[m[K]
2125 | __DATE__, [01;31m[K__TIME__[m[K, EPI_VERSION_STR);
| [01;31m[K^~~~~~~~[m[K
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:250: /mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_linux.o] Error 1
make: *** [Makefile:1992: /mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl] Error 2
make: Leaving directory '/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2'
tc@box:/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl$
-
wl.ko is not built because of this:
cc1: some warnings being treated as errors
Edit the Makefile and try changing "EXTRA_CFLAGS :=" to "EXTRA_CFLAGS := -Wno-error"
-
It gives same error I think
tc@box:/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl$ make API=CFG80211 -C /mnt/
sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2 M=`pwd`[J
make: Entering directory '/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2'
CFG80211 API specified in command line
Using CFG80211 API
CC [M] /mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_linux.o
In file included from [01m[K/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_linux.c:81[m[K:
[01m[K/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_iw.h:73:[m[K [01;35m[Kwarning: [m[K"isprint" redefined
73 | #define isprint(c) bcm_isprint(c)
|
In file included from [01m[K./include/linux/string_helpers.h:6[m[K,
from [01m[K./include/linux/seq_file.h:7[m[K,
from [01m[K./include/linux/seq_file_net.h:5[m[K,
from [01m[K./include/net/net_namespace.h:191[m[K,
from [01m[K./include/linux/netdevice.h:38[m[K,
from [01m[K/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/include/linuxver.h:69[m[K,
from [01m[K/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_linux.c:27[m[K:
[01m[K./include/linux/ctype.h:30:[m[K [01;36m[Knote: [m[Kthis is the location of the previous definition
30 | #define isprint(c) ((__ismask(c)&(_P|_U|_L|_D|_SP)) != 0)
|
[01m[K/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_linux.c:[m[K In function '[01m[Kwl_dump_ver[m[K':
[01m[K/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_linux.c:2125:17:[m[K [01;31m[Kerror: [m[Kmacro "__DATE__" might prevent reproducible builds [[01;31m[K]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdate-time-Werror=date-time]8;;[m[K]
2125 | [01;31m[K__DATE__[m[K, __TIME__, EPI_VERSION_STR);
| [01;31m[K^~~~~~~~[m[K
[01m[K/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_linux.c:2125:27:[m[K [01;31m[Kerror: [m[Kmacro "__TIME__" might prevent reproducible builds [[01;31m[K]8;;https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wdate-time-Werror=date-time]8;;[m[K]
2125 | __DATE__, [01;31m[K__TIME__[m[K, EPI_VERSION_STR);
| [01;31m[K^~~~~~~~[m[K
cc1: some warnings being treated as errors
make[1]: *** [scripts/Makefile.build:250: /mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl/src/wl/sys/wl_linux.o] Error 1
make: *** [Makefile:1992: /mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl] Error 2
make: Leaving directory '/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2'
tc@box:/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl$
-
Hi pek
Try changing this in your Makefile:
ifeq "$(GE_49)" "1"
EXTRA_CFLAGS += -Wno-date-time
endif
to this:
#ifeq "$(GE_49)" "1"
EXTRA_CFLAGS += -Wno-date-time
#endif
I think you then need to run:
make clean
# You may need to re-apply your patches here.
make
-
Hi Rich,
"make clean" gives me this
tc@box:/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl$ make clean
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd` clean
make[1]: Entering directory '/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl'
make[1]: *** /lib/modules/6.1.2-tinycore64/build: No such file or directory. Stop.
make[1]: Leaving directory '/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl'
make: *** [Makefile:165: clean] Error 2
tc@box:/mnt/sda1/tcl/tcz/14/tcz64/compileKernel/src/linux-6.1.2/hybrid_wl$
Turns out /lib/modules/6.1.2-tinycore64/build is not there.
-
wl-modules-KERNEL posted to CorePure64 14.x repo - maybe you could test it (blacklist needed as per info file).
-
Hi pek
as Juanito as already built the module for you, forgive me for making observation
make[1]: *** /lib/modules/6.1.2-tinycore64/build: No such file or directory. Stop.
Other posts by Juanito and others suggests you forgot to do this
sudo ln -s /usr/src/linux-6.1.2 /lib/modules/6.1.2-tinycore64/build
-
Hi Juanito,
Thanks for the module. It works perfectly. The wifi is working well. :D
I would also like to point out my mistakes that I think caused my failed attempts.
I followed this http://www.tinycorelinux.net/11.x/x86_64/tcz/src/wl/ (http://www.tinycorelinux.net/11.x/x86_64/tcz/src/wl/)
But I skipped this part..
gunzip Module.symvers-5.4.3-tinycore64.gz
cp Module.symvers-5.4.3-tinycore64 Module.symvers
make SUBDIRS=scripts/mod
Because I didn't know where to find Module.symvers-5.4.3-tinycore64.gz and there's no wget instruction for it.
After random google searching I think I found an article stating that "make SUBDIRS" is obsolete after Linux 5.0 or so that I thought.
So conveniently I left this part out.
Now I come back again to check the latest documentation
http://www.tinycorelinux.net/14.x/x86_64/tcz/src/wl/compile_wl (http://www.tinycorelinux.net/14.x/x86_64/tcz/src/wl/compile_wl)
Then I realized my mistakes.
Well.. Another mission accomplished..!! (almost by me) ;D
Thank you very much for all the helps and guidance guys!!!
I learnt more awesome stuffs today.
-
Hi pek
as Juanito as already built the module for you, forgive me for making observation
make[1]: *** /lib/modules/6.1.2-tinycore64/build: No such file or directory. Stop.
Other posts by Juanito and others suggests you forgot to do this
sudo ln -s /usr/src/linux-6.1.2 /lib/modules/6.1.2-tinycore64/build
Thanks for looking into this aus9.
I tried "sudo ln -s /usr/src/linux-6.1.2 /lib/modules/6.1.2-tinycore64/build"
It makes the error go away
make[1]: *** /lib/modules/6.1.2-tinycore64/build: No such file or directory. Stop.
However, it still does not produce wl.ko
So I think the mistakes that I posted right just before your reply is the problem.
Thanks.
-
But I skipped this part..
gunzip Module.symvers-5.4.3-tinycore64.gz
cp Module.symvers-5.4.3-tinycore64 Module.symvers
make SUBDIRS=scripts/mod
Prior to kernel 5.x this used to be a quick way to prepare the kernel source for an out of tree build.
Since kernel 5.x it looks like this is the equivalent of "make modules", which may take an hour or longer to complete.
One or the other needs to be done in order to properly prepare the kernel source.
-
Noted. Thank you for clarifying.. :)
-
Hi pek
... Because I didn't know where to find Module.symvers-5.4.3-tinycore64.gz ...
In your case that would have been Module.symvers-6.1.2-tinycore64.gz.
It is located with the matching source and config files:
http://tinycorelinux.net/14.x/x86_64/release/src/kernel/
-
Hi Rich,
Yes I realized that after reading this
http://www.tinycorelinux.net/14.x/x86_64/tcz/src/wl/compile_wl (http://www.tinycorelinux.net/14.x/x86_64/tcz/src/wl/compile_wl)
It was not hinted to download it (or at least I didn't know it's something to download) in
http://www.tinycorelinux.net/11.x/x86_64/tcz/src/wl/compile_wl (http://www.tinycorelinux.net/11.x/x86_64/tcz/src/wl/compile_wl)
Which I initially tried to follow. Thus the confusion.
I thought "Module.symvers.." was some sort of command. :o
All good now.. Thanks