WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Raspberry Pi Zero Wireless and piCore14.x LAN Connectivity  (Read 4906 times)

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 776
Re: Raspberry Pi Zero Wireless and piCore14.x LAN Connectivity
« Reply #15 on: January 14, 2024, 02:18:54 AM »
@Paul_123: I'm heading into the shop this afternoon and grabbing some test boxes (Pi-0W, Pi-2, Pi-3 and Pi-4) to start a Pi bench at home; this has turned into something "...I just have to do/see for myself..." as my notes are not matching the config/cmdline in 14.x armv# for piCore (zswap changes, for example, that have taken place in the last couple releases which I'm guessing thanks to COVID/Silicon issues, I just haven't kept up with as we don't usually bench projects to use RasPi BCM27xx units anymore unless someone specifically insists.)
  • If you don't mind, please send along a copy of your arm6/7/7l 14x.6.1.25 build script(s)
  • release/src : safe to assume busybox for armv7l is exact as armv7 ?
  • If the notes/scripts don't mention it, a link to our specific overlays/firm/boot used, please.
  • Just for grins, please repeat the above for aarch64; I'll grab a Pi-5 while I'm at it*
* We have modular cases we print for the RasPi bench units -- Pi-5 hasn't been fitted for it's Tux yet! :)

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1264
Re: Raspberry Pi Zero Wireless and piCore14.x LAN Connectivity
« Reply #16 on: January 14, 2024, 12:27:40 PM »
I have a switch on the wall by my bench, I just hang the boads off a short ethernet cable.

32 bit  (* means it is a 64 bit processor running in 32 bit mode)
  • armv6 kernel = Pi models A,B,A+,B+,Zero, ZeroW, CM
  • armv7 kernel = Pi models 2B, 2Bv1.2*, 3B*, 3A+*, 3B+*, Zero2W*, CM2, CM3*
  • armv7l kernel = Pi model 4B*, 400*,  CM4*, CM4S*, CM4io*
64 bit
  • aarch64 kernel = Pi models 2Bv1.2*, 3B*, 3A+*, 3B+*, Zero2W*, CM3, 4B, 400*,  CM4*, CM4S*, CM4io, 5
  • aarch64_16k kernel = Pi model 5  (Experimental kernel with 16k paging, requires extensions squashed with 16k blocksize)
Notes:
  • All code contained in all 32 bit initrd and repos is compiled with flags -march=armv6zk -mtune=arm1176jzf-s -mfpu=vfp.
  • All code on 64 bit initrd and repos is compiled with flags -march=armv8-a+crc -mtune=cortex-a72
  • Processors running in 64bit mode can run 32bit code, but we don't fully support this, as it is quite difficult to manage repo usage
  • Kernel source is https://github.com/raspberrypi/linux with very few changes (kernel name and a few squashfs related patches) kernel source is uploaded the TC repo. The kernel source provides all board dtb files and overlays
  • Rpi Boot Firmware comes from https://github.com/raspberrypi/firmware/tree/master/boot (bootcode.bin, fixup*, start*)
I'm not sure what hoops you are thinking of, but if we do this, we would not modify the initrd's, all we would do is add the following extensions to the image and load in onboot.lst.  It adds about 12MB to the image.
  • net-usb-KERNEL (all kernels, the image supports)
  • wireless-KERNEL (all kernels the image supports)
  • firmware-(atheros, brcmwifi, mediatek, ralinkwifi, rpi-wifi, rtlwifi, ti-connectivity)
  • wpa_supplicant
  • wireless_tools
  • wifi

Adding wifi connection OOTB is feasible, but would require reworking the wifi.sh scripts, as it regenerates wpa_supplicant.conf from a saved file in the tc home directory.  There is not provisions for a user supplied wpa_supplicant.conf.

Offline CentralWare

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 776
Re: Raspberry Pi Zero Wireless and piCore14.x LAN Connectivity
« Reply #17 on: January 14, 2024, 04:58:39 PM »
If we do this, I didn't care whether or not wireless/drivers/etc. were even loaded (onboot) -- as long as they're inside the image, KeithA's issue is tended to as would those who own Zero/Zero-2 or any device at all if they're not able to wire into the router/hub/switch/etc. (It would be a simple task to add a short wiki instructing how to launch wireless on Pi-0/Pi-0-2/etc. as the resources would already be in their hands, it's then just a matter of turning everything on without having to download all of the necessary TCZs remotely and copy them onto the SD card manually...  something some of these people haven't even done on their own desktop/laptop machines.)

* Kernel -- I know the git repo, but had hopes you knew which (commit) ID# 14x was built from (file dates don't correlate to a specific release and I avoid "assumption" when ever possible -- thus I'm guessing/assuming the AUG-11 commit as the file dates for TCL's kernels are only a week and a half older than that.)

Quote
The kernel source provides all board dtb files and overlays
-- thanks, this is probably what I need for the above question.

As for adding wireless to Pi images, my first suggestion was to simply create a stand-alone cpio and have it load along with modules.gz

My way of thinking (I've not personally had to build piCore completely from scratch so I may be off a bit here) was to create a single wireless.gz and theoretically (depending on what I found for arm6/7/7l compile flags) the drivers and apps for wifi "should" be a single file shared between the three different releases as the files in question "should" be the same regardless of which unit they're being used on, especially since they're compiled as kernel modules from the same kernel core.  (To prove any of this I would have to build everything from the ground floor to "properly" test, thus my inquiries.  I could easily cheat and just copy all the binaries (firmware) from piCore, extract and repack as needed for "wireless.gz", etc. -- just figured if I'm going to put the toes in the water, might as well jump in!? :) )

From what you said in your notes, though, there's a chance the Pi-4 would possibly need a separate wireless.gz built IF the modules were affected by the -march difference.  Maybe.

Regardless, Thanks again and take care!

~TJ~

Offline Paul_123

  • Administrator
  • Hero Member
  • *****
  • Posts: 1264
Re: Raspberry Pi Zero Wireless and piCore14.x LAN Connectivity
« Reply #18 on: January 14, 2024, 07:57:44 PM »
I find the hurdles to start are.

1) Only other machine is Windows based
2) No keyboard/monitor
3) No ethernet adapter

From what you said in your notes, though, there's a chance the Pi-4 would possibly need a separate wireless.gz built IF the modules were affected by the -march difference.  Maybe.

All Kernel modules are kernel specific.  You cannot use 6.1.25-piCore-v7 on a pi4.