[BPI-R3] ubuntu 22.04 Image

The importconfig was the missing piece, and now it worked. Thanks a lot for your help.

uEnv.txt is not created by image-script as it is initially empty (using my u-boot builtin environment). uEnv.txt allows to override this but it has to be created.

Ah, ok, so, I can create one and override settings, thanks.

@frank-w

How do we list the u-boot builtin environment from Linux? Would you be able to give an example of what to put in uEnv.txt in order to insert some customer linux boot link parameters? For example, i wish to experiment with the ā€œclk_ignore_unusedā€ kernel parameter.

in uboot itself you can use printenv, in linux there is a tool named fw_printenv, but i have tried it yet. else you can cat /boot/uEnv.txt if there is any (your own content), else builtin environment is created by the uEnv_*.txt in my uboot-repo

for r3 and the bootargs you can extend bootopts

which is added to bootargs by buildargs

so try to add this to your /boot/uEnv.txt

bootopts=$bootopts clk_ignore_unused=1

Hello. Hello. I am trying to defend the Access Point at the 5GHz Radio wlan1 at Ubuntu. If I start radio /usr/sbin/hostapd /etc/hostapd/hostapd_wlan1.conf Errors will come back:

/usr/sbin/hostapd /etc/hostapd/hostapd_wlan1.conf
wlan1: interface state UNINITIALIZED->COUNTRY_UPDATE
Frequency 5180 (primary) not allowed for AP mode, flags: 0x853 NO-IR
Primary frequency not allowed
wlan1: IEEE 802.11 Configured channel (36) or frequency (5180) (secondary_channel=1) not found from the channel list of the current mode (2) IEEE 802.11a
wlan1: IEEE 802.11 Hardware does not support configured channel
Could not select hw_mode and channel. (-3)
wlan1: interface state COUNTRY_UPDATE->DISABLED
wlan1: AP-DISABLED 
wlan1: interface state DISABLED->DISABLED
wlan1: AP-DISABLED 
wlan1: CTRL-EVENT-TERMINATING 
hostapd_free_hapd_data: Interface wlan1 wasn't started
nl80211: deinit ifname=wlan1 disabled_11b_rates=0

I use default settings /etc/hostapd/hostapd_wlan1.con from Ubuntu Image. How to fix this?

I guess this depends on your country settings.

https://wiki.fw-web.de/doku.php?id=en:bpi-r3:wlan

See iw reg get/set

It is strange. I have tried Debian Bookworm image with 5 GHz radio. The radio works fine there. I used the wlan1 config file from Debian in Ubuntu and in Ubuntu the radio returns errors.

Afair ubuntu the regdomain handling was a bit differentā€¦i remember about issues setting them. What does iw reg get says and what about the log?

iw reg get
global
country 00: DFS-UNSET
	(2402 - 2472 @ 40), (6, 20), (N/A)
	(2457 - 2482 @ 20), (6, 20), (N/A), AUTO-BW, PASSIVE-SCAN
	(2474 - 2494 @ 20), (6, 20), (N/A), NO-OFDM, PASSIVE-SCAN
	(5170 - 5250 @ 80), (6, 20), (N/A), AUTO-BW, PASSIVE-SCAN
	(5250 - 5330 @ 80), (6, 20), (0 ms), DFS, AUTO-BW, PASSIVE-SCAN
	(5490 - 5730 @ 160), (6, 20), (0 ms), DFS, PASSIVE-SCAN
	(5735 - 5835 @ 80), (6, 20), (N/A), PASSIVE-SCAN
	(57240 - 63720 @ 2160), (N/A, 0), (N/A)

Yeah,so domain unsetā€¦there are multiple ways to set it and some donnot work in ubuntu

https://wiki.fw-web.de/doku.php?id=en:bpi-r2:wlan#ghz

Have you installed the regdomain package?

iirc the cfg80211 way was working (and manual iw reg set),but of course needs the regulatory.db

I tried iw reg set CZ but iw reg get still returns:

global
country 00: DFS-UNSET
	(2402 - 2472 @ 40), (6, 20), (N/A)
	(2457 - 2482 @ 20), (6, 20), (N/A), AUTO-BW, PASSIVE-SCAN
	(2474 - 2494 @ 20), (6, 20), (N/A), NO-OFDM, PASSIVE-SCAN
	(5170 - 5250 @ 80), (6, 20), (N/A), AUTO-BW, PASSIVE-SCAN
	(5250 - 5330 @ 80), (6, 20), (0 ms), DFS, AUTO-BW, PASSIVE-SCAN
	(5490 - 5730 @ 160), (6, 20), (0ms), DFS, PASSIVE-SCAN
	(5735 - 5835 @ 80), (6, 20), (N/A), PASSIVE-SCAN
	(57240 - 63720 @ 2160), (N/A, 0), (N/A)

My /etc/hostapd/hostapd_wlan1.conf setting:

ctrl_interface=/var/run/hostapd_2
#ctrl_interface_group=0 # These 2 are just parameters so that the hostap daemon runs.

interface=wlan1
#interface=ap0
driver=nl80211

ssid=r3_AP1

#2.4G
hw_mode=g
channel=1

#5G-Support
country_code=DE
ieee80211n=1
ieee80211d=1
hw_mode=a
#34-50 step 2
#channel=40
#channel=44

channel=36
ieee80211h=1
require_vht=1
ht_capab=[GF][HT40+][SHORT-GI-20][SHORT-GI-40][RX-STBC1][DSSS_CCK-40]
vht_oper_chwidth=1
vht_capab=[SHORT-GI-80][RX-STBC-1][RX-ANTENNA-PATTERN][TX-ANTENNA-PATTERN]

#42 would be the centered frequency center channel number for 36 primary
#channel only if this were a 80 MHz channel, so the combination here is
#invalid. You would either need to change this to use vht_oper_chwidth=1
#or set vht_oper_centr_freq_seg0_idx=0 if you want to use a 40 MHz
#channel.

vht_oper_centr_freq_seg0_idx=42


#channel=60
ieee80211ac=1
wmm_enabled=1

#security
wpa=2
wpa_passphrase=12345678
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP CCMP
#ignore_broadcast_ssid=0
auth_algs=1
#rsn_pairwise=CCMP

#macaddr_acl=0
#accept_mac_file=/etc/hostapd/acl_accept
#deny_mac_file=/etc/hostapd/acl_deny

#macaddr_acl=1
#accept_mac_file=/etc/hostapd/hostapd.allow

Have you installed the regdomain package?

Sorry, but I donā€™t know how to install the regdomain package. Google didnā€™t help either. I am trying to create a basic wifi router. I donā€™t want to use Openwrt because it simply freezes.

apt-get install iw wireless-regdb

Afair crda was not available on ubuntu and i used this

$ sudo nano /etc/modprobe.d/cfg80211.conf
options cfg80211 ieee80211_regdom=US

Found documentation of ubuntu way in my wiki

https://wiki.fw-web.de/doku.php?id=en:bpi-r3:wlan

Hello, Would it be possible to include Docker support in the image? I got the error:

docker run hello-world
docker: Error response from daemon: failed to create task for container: failed to create shim task: OCI runtime create failed: runc create failed: unable to start container process: error during container init: error setting cgroup config for procHooks process: bpf_prog_query(BPF_CGROUP_DEVICE) failed: invalid argument: unknown.

i have added the cgroups_bpf option to my kernel and currently rebuilding imagesā€¦

can you confirm the wifi-regdomain way works?

edit: pipeline finishedā€¦

https://drive.google.com/drive/folders/1A5S7_82Bg4EYxjzdQ5FKyBw9Qi2C3uK-?usp=drive_link

You posted a link to Bookworm 6.6.36. There was no problem with the 5GHz AP. Here the AP works probably fine - I connect to it with a Raspberry Pi 5. Regdomains were problematic in Ubuntu. So I tried the new June 30 Bookworm 6.6.36 image. Docker works fine. I donā€™t know why wlan1 is not active after boot. I have to activate it in the boot process using

ExecStart=/usr/sbin/hostapd /etc/hostapd/hostapd_wlan1.conf

After boot, wlan1 and wlan0 wonā€™t connect wireless client until I do

systemctl restart systemd-networkd

I also added it to the boot process. Then it works. Perhaps it would like to solve these two shortcomingsā€¦ Otherwise perfect job!

The link is for all images which are built automaticly for all boardsā€¦ubuntu is now noble (24.04).

Hostapd for wlan1 can only start if the regulatory domain is set at this timeā€¦but this should only needed for 5g (wlan1)ā€¦2g4/wlan0 should work on boot

How to set up a regulatory domain?

Already answered here:

iw reg get

Must NOT show 00

reg get
global
country US: DFS-FCC
	(902 - 904 @ 2), (N/A, 30), (N/A)
	(904 - 920 @ 16), (N/A, 30), (N/A)
	(920 - 928 @ 8), (N/A, 30), (N/A)
	(2400 - 2472 @ 40), (N/A, 30), (N/A)
	(5150 - 5250 @ 80), (N/A, 23), (N/A), AUTO-BW
	(5250 - 5350 @ 80), (N/A, 24), (0 ms), DFS, AUTO-BW
	(5470 - 5730 @ 160), (N/A, 24), (0 ms), DFS
	(5730 - 5850 @ 80), (N/A, 30), (N/A), AUTO-BW
	(5850 - 5895 @ 40), (N/A, 27), (N/A), NO-OUTDOOR, AUTO-BW, PASSIVE-SCAN
	(5925 - 7125 @ 320), (N/A, 12), (N/A), NO-OUTDOOR, PASSIVE-SCAN
	(57240 - 71000 @ 2160), (N/A, 40), (N/A)


ā€¦ but wlan1 is not active after boot.