I just got hold of one of these boards (GitHub - redbear/IoT_pHAT: WiFi + Bluetooth, designed for the Raspberry Pi Zero) and am looking to use it with OSMC on a Pi Zero (1.3). From what I have read the board uses the same chipset as the on-board WiFi and BT on the new Pi 3 and should work under Raspbian.
I have been through the steps to update the EEPROM firmware using OSMC and that all worked well. The correct firmware version is shown when running:
Does not list it as a piece of hardware.
I am wondering what might be missing from OSMC that is required to get it setup. This post suggests WiringPi is required (which I am building now) and I have set the following in my config.txt:
Any suggestions would be much appreciated.
Let me know what CONFIG_ options to add and I’ll get it included.
This won’t reach OSMC’s August update (which is scheduled for tomorrow), but I can produce a kernel with support and get you to test it just after then.
Thanks Sam, much appreciated.
I fired up a standard install of Raspbian to see if I could spot the differences. Running
vcgencmd get_config int showed a similar config to OSMC:
The main difference seems to be around the available kernal modules,
bnep 11853 2
hci_uart 21122 1
btbcm 7885 1 hci_uart
bluetooth 365780 8 bnep,btbcm,hci_uart
ax88179_178a 16089 0
sg 20799 0
brcmfmac 202038 0
snd_bcm2835 23163 0
brcmutil 9031 1 brcmfmac
snd_pcm 95441 1 snd_bcm2835
snd_timer 22396 1 snd_pcm
snd 68368 3 snd_bcm2835,snd_timer,snd_pcm
cfg80211 499234 1 brcmfmac
rfkill 21397 4 cfg80211,bluetooth
bcm2835_gpiomem 3823 0
bcm2835_wdt 4133 0
uio_pdrv_genirq 3718 0
uio 10230 1 uio_pdrv_genirq
ipv6 367607 24
8021q 21672 0
garp 7807 1 8021q
stp 2218 1 garp
llc 5918 2 stp,garp
uas 17270 0
ax88179_178a 24752 0
snd_bcm2835 23591 0
snd_pcm 115645 1 snd_bcm2835
snd_timer 28675 1 snd_pcm
bcm2835_thermal 2435 0
snd 79485 3 snd_bcm2835,snd_timer,snd_pcm
i2c_bcm2708 5964 0
bcm2835_gpiomem 3823 0
bcm2835_wdt 4197 0
uio_pdrv_genirq 3846 0
uio 10288 1 uio_pdrv_genirq
sg 23990 0
md_mod 165493 0
fuse 111723 1
ipv6 433779 40
If there is anything I should be looking for specifically then let me know.
Here is what I think I need for this to work. I have not found a way to test it just yet:
I can see that I can modify these in
/boot/config-4.4.16-4-osmc, would I need to re-compile the kernel in order for these changes to be reflected? (this is all new to me).
My OSMC remote has arrived so I am looking forward to getting this up and running
- All included (apart from SoftMAC maybe?)
Here’s the best way to do it all:
I understand this is brief, but you’ll likely work it out
Edit: just refreshed my memory, if build for a Pi Zero, you want rbp1, but I’d also like to see support added for rbp2/rbp3 if applicable.
Can I double check this step @sam_nazarko - it seems to wipe out the entire
rbp1-000-add-kernel-config.patch file. I am running:
diff -u /dev/null .config > rbp1-000-add-kernel-config.patch and it comes back with
diff: .config: No such file or directory. I created the file
.config and then they both end up blank.
I have compared the current RBP1 and RBP2 configs and whilst these settings are mostly present in RBP2 they are missing from RBP1, so I think this could well be the changes I need.
I also interested to make it work in OSMC. I’ve heavily customized my OSMC and dont want to change OS or install from scratch. Looking forward for the solution
You need the .config file to be present in the kernel sources directory.
They’re in RBP2 because of the integrated WiFi and BT modules on the Pi 3. The Pi 3 and Pi 2 have the same kernel.
So here is the process have gone through:
- Install git
sudo apt-get install build-essential git
- Grab the repo
git clone https://github.com/osmc/osmc
- Edit the new
.config file I have just created with my new settings (to reflect Pi2/3)
diff -u /dev/null .config > rbp1-000-add-kernel-config.patch
I am now waiting for it to build. It is taking a while and seems to be installing all sorts of stuff.
This isn’t correct.
You shouldn’t manually edit the config. You need to run
make menuconfig and diff against the new config.
Thanks for all your help and patience on this Sam. I think I might be missing a dependency on my Pi. I get
make: *** No rule to make target 'menuconfig'. Stop. From what I have read, the Makefiles should contain a
menuconfig entry, but I am not seeing any of those in the OSMC repo. Do you know what I am missing?
You need to pull the kernel source first.
So I grabbed the kernel source from
git clone --depth 1 https://github.com/raspberrypi/linux.git.
make menuconfig resulted in:
scripts/basic/fixdep.c:444:1: fatal error: opening dependency file scripts/basic/.fixdep.d: Permission denied
I am going to have a break I think
Managed to make some progress following the kernel compile guides here: Kernel building - Raspberry Pi Documentation and generated a new config using
make menuconfig late last night. Left the build going over night but lost my SSH connection in the night and it does not look like it completed.
Running again now and I am guessing it will be ready in about 5 hours or so, hoping all will be well this time.
It would be great if there was a way to patch the kernel rather than rebuild from scratch as the Pi is so slow.
The build system uses ccache, so when you’re on the right track, compilation is about an hour with a fast SD card.
That’s not quite right, because you won’t necessarily be making a config against the kernel version we use and you won’t be using our patches which add some drivers (CONFIG_) options.
The best way is to run make rbp2 once and let it build with the OSMC config. You will then have a complete source tree under src/ and you can run make menuconfig, make your adjustments, diff -u /dev/null .config, drop it in patches and re-run make.
It is possible to include this fix on the next OSMC update? I’m sure were not only two person have this board. thanks in advance.
When I know what needs to be done to add support (i.e which kernel config options), sure
Thanks! look forward on this. If you need someone with this board to beta test, just let me know. thanks!
What we need is someone to work out exactly what needs to be done and actually contribute to add support. Sam requested this above…
I’ve given as detailed information as I can without a board.