Tiny Core Linux

dCore Import Debian Packages to Mountable SCE extensions => dCore X86 => dCore x86 Imported Extensions => Topic started by: liam391 on July 11, 2017, 02:15:02 AM

Title: Hello all, and issue wth sce-load during boot for automated wireless etc
Post by: liam391 on July 11, 2017, 02:15:02 AM
Hello all, I am fairly new to dCore/TC, and Linux in general to be honest, but have been playing about with ‘Cores and various versions of Puppy for the last couple of years. I love the speed and flexibility and the ‘Cores are great for revitalizing old hardware….and for learning from my point of view. I particularly like the ability of dCore to be so flexible with the sce-import abilities and am using it more and more – so thank you to all involved with the project, it’s fantastic! Sorry for the long-winded message, but I wanted to fully explain my set up.

With learning in mind I decided to reinvigorate an old laptop by installing dCore to HDD, basically following the dCore wiki in combination with an external guide (http://www.brianlinkletter.com/how-to-install-dcore-linux-in-a-virtual-machine/ (http://www.brianlinkletter.com/how-to-install-dcore-linux-in-a-virtual-machine/)) which was originally for installing a basic dCore to a virtual machine. I copied the SCE’s over from USB as I didn’t have a wired connection handy.

The installation was easy overall - the main difficulty I experienced was getting the wireless to work. I’m currently working with an old P3 800MHz Compaq Presario, using a PCMIA wireless card made by EDUP.  Using the FAQ’s, Forum and various Ubuntu pages I got there in the end. I’ll describe the process as it feeds in to my question. Firstly, I found out which wireless card was internal to the PCMIA card:

Code: [Select]
lspci -nn -d 14e4:
My card is Broadcom BCM4306 [14e4:4320]. Using the website http://linuxwireless.org/en/users/Drivers/b43/ (http://linuxwireless.org/en/users/Drivers/b43/) confirmed that I require the b43 driver, and indicated the download location for the firmware, which I downloaded.
I extracted the bz2 and the tar using 7z zip software. The instructions indicate that the file required is wl_apsta.o, so I copied this to a USB drive and then to my TCE directory (since it is persistent). I then installed b43-fwcutter and extracted the firmware:

Code: [Select]
sudo mkdir /lib/firmware
sudo b43-fwcutter -w /lib/firmware /mnt/sda1/tce/wl_apsta.o

At this point using the 2 standard dCore wireless sce’s I was able to connect using sudo wifi.sh or wpa_supplicant. I decided to use wpa_supplicant as I wanted to try to make the internet connection automatic on startup of dCore.
I tried doing this by adding the relevant SCEs (in the correct order) to sceboot.lst and adding the relevant commands to bootlocal.sh:

Code: [Select]
mkdir /lib/firmware
b43-fwcutter -w /lib/firmware /mnt/sda1/tce/wl_apsta.o
wpa_supplicant -B -iwlan0 -c/mnt/sda1/tce/wpa.conf
udhcpc -b -i wlan0

This failed as the correct firmware was not loaded:
Code: [Select]
b43 ssb0:0: Direct firmware load for b43/ucode5.fw failed with error -2
b43-phy0 Error: Firmware file b43/ucode5.fw request failed

so I thought that perhaps ‘wireless-4.2.9-tinycore’ was being loaded before b43-fwcutter had done its work. Therefore I made lib/firmware/b43 persistent using filetool.lst and removed b43 from the bootlocal script but the process still fails.

However, if I remove wireless-4.2.9-tinycore from sceboot.lst, and manually load it on startup, followed by wpa_supplicant, everything works as it is meant to. So I looked at the boot order wiki and tried to load wireless-4.2.9-tinycore later in the process (bootlocal.sh, .X.d) but I wasn’t able to achieve this as the scripts are run as root or just didn’t seem to load the sce for .X.d. case. Even making a script to load the wireless-4.2.9 SCE and perform the wpa and udhcpc commands, and running this script after boot, does not seem to work? I’m sure this is some daft Noob error but can’t put my finger on it.

It’s a very small deal really, I just manually load the sce and run a simple script to access wifi, but I thought it might be useful to find a solution and document it in case anyone else is interested. I did find a couple of older threads also searching for a non-root sce-load during boot.

I also thought about doing a ‘for dummies’ step-by-step guide to the installation I did – as I am new to everything I thought it might be worth adding some extra detail and explanation to an example installation (a newbie like myself might find it useful). Would this be worthwhile or is the consensus that there is plenty out there already? I’ll be doing it for my own future reference anyway.

Sorry for the long-winded post and thanks for reading!
Title: Re: Hello all, and issue wth sce-load during boot for automated wireless etc
Post by: jls on July 11, 2017, 02:20:47 AM
Hi iliam391
I made a personal sce with the b43 firmware which is in the first position in sceboot.
I have sce loaded in ~/.X.d and they are correctly loaded.
Maybe some sleep commands in your script could also solve the problem?
Title: Re: Hello all, and issue wth sce-load during boot for automated wireless etc
Post by: liam391 on July 11, 2017, 05:01:07 AM
Thanks jls both for the quick response and for solving my problem! Adding sleep 5s to the script solved the issue, and wifi is auto started using a file in ~/.X.d calling the existing script. Knew I'd be missing something obvious. Cheers.