Archlinux for BPI-M2 Zero

So, for the first time. I used my PC with some ip forwarding feature to route my internet over ethernet.
Once P2Z got internet from ethernet, I use it to install 'dialog’ so i can use ‘wifi-menu’.
From wifi-menu, I saw my primary WiFi router’s signal very low(-95).
I tried to share internet from phone over WiFi and put my phone really close to the board just to make sure WiFi working (even very low signal).


And my WLan router signal’s showed to -95. Very low because my PC got it -42

I can see no Country set. I suppose should be: US

Just for reference:

As far as i know if no Country set or wrong Country will get weak signal. Ty to set manually the country with Arch tools.

in Ubuntu

sudo iw reg set US

I did, and I tried few another way: with wpa_supplicant.conf, /etc/default/crda, even echo-in “US” to /sys/module/cfg80211/parameters/ieee80211_regdom. This all I got.
/sys/module/cfg80211/parameters/ieee80211_regdom said US but iw reg get produce country 00 and signal still low.

Anyway, I managed to change few lines on boot.cmd and move dtb file for p2z to /boot instead of /boot/dtbs/. Compile it to boot.scr and It survived kernel upgrade!

part uuid ${devtype} ${devnum}:${bootpart} uuid 
setenv bootargs console=${console} root=PARTUUID=${uuid} rw rootwait 

if load ${devtype} ${devnum}:${bootpart} ${kernel_addr_r} /boot/zImage; then 
  if load ${devtype} ${devnum}:${bootpart} ${fdt_addr_r} /boot/${fdtfile}; then 
    if load ${devtype} ${devnum}:${bootpart} ${ramdisk_addr_r} /boot/initramfs-linux.img; then 
      bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}; 
      bootz ${kernel_addr_r} - ${fdt_addr_r}; 

if load ${devtype} ${devnum}:${bootpart} 0x48000000 /boot/uImage; then 
  if load ${devtype} ${devnum}:${bootpart} 0x43000000 /boot/script.bin; then 
    setenv bootm_boot_mode sec; 
    bootm 0x48000000; 

And I tried to make dtb files from mainline linux source with make INSTALL_MOD_PATH=output dtbs and use it for boot. Ethernet, WiFi, and HDMI not works. Just curious, how do you patch your source so you could get latest working dtb files? Because BSP repository seems not updated ever since Kernel3.4.

Well, after reading and doing experiments back and forth about patching dts source.
I managed to get Ethernet, HDMI, WiFi, I2C, and eMMC working in mainline.

Currently working for temp/thermal sensor (Yangtao patches or IIO ).

1 Like

I think everything is working by now. image

For someone who need the kernel and dtb files, you can find it here

1 Like

Really glad to see this! and as always @avaf is carrying the Banana Pi M2 Zero community ! I’ve been using the avaf recent images for my M2 zero. But now need an Arch Linux build will follow that link @xqdzn :pray:

@xqdzn I went through the posted link… Running through a few issues on build. Could you or @avaf post a working img?



Sorry, i don’t have any update or Archlinux image to share. I think @xqdzn’s work on the Archlinux img would be the best option.