[BPI-R64] Imagebuilder R64 Archlinux, linux-rolling-stable

We are using the standard dts prebuild, so offbeat found the correct way to add it as overlay.

If the short version is functioning correctly I will add it to the collection of overlays that is installed with the script.

At first I tried to activate via &leds but got an error : Failed to apply '/boot/dtbos/led_blue.dtbo': FDT_ERR_NOTFOUND

I think the reason is that leds is not declared in DT as a label that can be accessed by a link. But the option with fragment@0 worked for me.

I think “keep” allows you not to light the LED when you turn on the router. The user himself determines the logic of the LED’s behavior in scripts.

Then the short new style version would be:

/dts-v1/;
/plugin/;

#define LED_COLOR_ID_BLUE  3
#define GPIO_ACTIVE_LOW    1

&{/leds} {
  blue {
    compatible = "gpio-leds";
    label = "bpi-r64:pio:blue";
    gpios = <&pio 85 GPIO_ACTIVE_LOW>;
    default-state = "keep";
    function = "gpio_out";
    color = <LED_COLOR_ID_BLUE>;
  };
};

Added some defines… If this works, I will add it. Why do you have the line with //color = <3>; commented out?

I did not get a positive result right away, I tried options for different examples. I tried to adhere to the generally accepted standard. It worked in such an edition, I did not continue the experiments, I left it like this. As I understand it, it’s more for people who will work with this code, according to the idea there should be a color written in letters like in your example.

Thank you for your quick reply. We weren’t aware since we weren’t up-to-date. Now that we are up-to-date we’ve seen that the kernel has been build using this compile option. Thank you also for your hints on how to build the bpir64-package on our own. We will try it later.

Thank you. This worked for us as well :slight_smile:

Unfortunately, the optimizations proposed by Eric didn’t work for us, so it has something to do with the fragment@0, I guess.

Guess #define cannot be used, so it needs to be:

/dts-v1/;
/plugin/;

&{/leds} {
  blue {
    compatible = "gpio-leds";
    label = "bpi-r64:pio:blue";
    gpios = <&pio 85 1>;
    default-state = "keep";
    function = "gpio_out";
    color = <3>;
  };
};

It is added to the script.

define can only be used if dts is passed through c-preprocessor (like in kernel build-chain) :wink: dtc alone is not enough (i guess you use dtc only)

Indeed. The last one works ok and is now added to the script. In a new build of image it will already be added.

Some changes that also apply to R3 version:

The script now is much more fool proof. Continuing after download hickups.

Major settings are now chosen with an interactive menu. Some advanced tweaks can be done by changing definitions at top of script.

Latest ready to download image:

Download v1.3 SD card version Router setup (301MB) Kernel version v6.3.10 (linux-rolling-stable), Linux version latest (Arch Linux has rolling updates)

Write the image file for sd-card to the appropriate device, MAKE SURE YOU HAVE THE CORRECT DEVICE!

xz -dcv ~/Downloads/bpir64-RT.img.xz | sudo dd of=/dev/sdX
1 Like

New images available for download:

www.woudstra.mywire.org/images/

The path includes images for different setups.