[Solved] Raspberry Pi 4 B OpenWrt

I purchased a starter kit with Raspberry Pi 4 B with 8 GB https://www.kubii.it/raspberry-pi-4-modello-b/2967-kit-raspberry-pi4-8gb-3272496301689.html. Of course we convert it immediately to a router with OpenWrt. My use of it is with Raspberry connected to the fiber transcreiver and connected with PPPoE with tagged VLAN (no ISP modem). I read the official guide here https://openwrt.org/toh/raspberry_pi_foundation/raspberry_pi.
All very clear, but there are still some things to know:

  1. what is the best way to connect the Raspberry to the PC and download the drivers for the USB-Ethernet cable (RTL8153);
  2. how do I disable bluetooth (apart from OpenWrt, if there is a way);
  3. how do I disable WiFi (apart from OpenWrt, if there is a way).

Edit the /boot/config.txt file on the card.

# Disable Bluetooth
# Disable Wi-Fi

I read something similar by searching the internet, but /boot/config.txt where do I find it? On Raspberry OS? Or is there also on OpenWrt?

A few ways to do this:

  • use the built-in console (i.e. connect a display and a keyboard to the Pi), make the built-in ethernet (eth0) a WAN, then update the package lists and install the associated package.
  • enable wifi on the pi in OpenWrt -- it will be associated with the LAN. Then connect your PC via wifi to the Pi and configure the built-in port (eth0) as WAN, and use your PC via ssh or web to update the package lists and install the driver package.
  • download the packages you need from the downloads website, copy it over via scp from a PC which is connected to the LAN of the OpenWrt Pi (eth0), then install it from there. You may or many not also need to install other dependencies at the same time.
  • Build a custom image with the drivers included.

Okay, I think I'll use the first option. With keyboard and monitor will I be in OpenWrt as for a normal PC?

You will get a console interface. That is a command line interface in Linux.

All right, got it. It remains only to understand where I find /boot/config.txt.

That's the correct path in OpenWrt (/boot/config.txt).

1 Like

Is that new? because openwrt on my pi has never had /boot folder, let alone mounted the boot partition anywhere

That's how it's always been on the pi 4 since I've been using OpenWrt on it, but that's the only model I've used with OpenWrt, maybe it's different on others?

Odd, because I started using OpenWRT on a Pi4B only about 2 weeks ago, and there is not /boot folder, so, clearly the boot partition can't be mounted there, it's not mounted anywhere

I just realised, however, that I'm booting from USB (with appropriate mods done) - perhaps there's some code that creates/mounts the boot partition, but is hard coded to use /dev/mmcblk0p1 - and since that doesn't exist, it simply doesn't do it

edit: think I found it :stuck_out_tongue:

Yeah I'm just using an sd card, I was about to go give usb boot a try to see if it did the same on mine before I saw your edit haha

Thank you for your responses. Everything is much clearer now. Last thing: after configuring the USB-Ethernet thingy, do I need to configure the LAN with its firewall zone?
And you guys who have been using it for a while can you tell me if it can support SQM on an asynchronous 1Gb/100Mb line?

It is...

# mount
/dev/mmcblk0p1 on /boot type vfat (rw,noatime,fmask=0022,dmask=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)

For the record, you do not need to disable bluetooth here as distroconfig.txt does it automatically. See: https://github.com/openwrt/openwrt/blob/master/target/linux/bcm27xx/image/distroconfig.txt#L13-L14

Okay, so all I have to do is disable the WiFi module and configure the LAN.

Did you see that I realised why :stuck_out_tongue: I created an image fir USB boot - but clearly there's still something hard-coded to look for and mount /dev/mmcblk0p1 - I found some scripts that do that, but I haven't found the right one

Likely, maybe just grep -r mmcblk0p1 in the root dir of the source and see what you find.

tried that - what I found doesn't help - all good though, I don't need it mounted

In /lib/preinit/79_move_config:


Yes, I changed that, and it didn't make a difference ... at least, I don't think it did - I'm unsure now :stuck_out_tongue: