Skip to content

Instantly share code, notes, and snippets.

@MartinRGB
Last active November 8, 2023 13:36
Show Gist options
  • Save MartinRGB/2d5da4badc1aff7794f020e30fc2cc09 to your computer and use it in GitHub Desktop.
Save MartinRGB/2d5da4badc1aff7794f020e30fc2cc09 to your computer and use it in GitHub Desktop.
NanoPi Duo2 Init
@MartinRGB
Copy link
Author

auto login

sudo systemctl enable [email protected]

in /lib/systemd/system/[email protected]/20-autologin.conf

[Service]
ExecStart=
ExecStart=-/sbin/agetty --autologin pi --noclear %I $TERM

@MartinRGB
Copy link
Author

MartinRGB commented Oct 31, 2023

@MartinRGB
Copy link
Author

MartinRGB commented Nov 2, 2023

reference:

https://www.kernel.org/doc/Documentation/devicetree/bindings/display/panel/sitronix%2Cst7789v.txt
https://github.com/notro/fbtft/wiki/fbtft_device#parameters

(color was inverted)

st7789_test.dts

/dts-v1/;
/plugin/;

/ {
    compatible = "allwinner,sun8i-h3";
    fragment@0 {
        target = <&spi1>;
        __overlay__ {
            status = "okay";
            #address-cells = <1>;
            #size-cells = <0>;
            st7789: st7789@0{
                compatible = "sitronix,st7789v";
                reg = <0>;
                pinctrl-names = "default";
                pinctrl-0 = <&st7789_pins>;

                spi-max-frequency = <16000000>;
                rotate = <90>;
                bgr;
                spi-cpol;
                spi-cpha;
                fps = <33>;
                buswidth = <8>;
                dc-gpios = <&pio 0 12 0>;
                debug = <0>;
            };
        };
    };

    fragment@1 {
        target = <&pio>;
        __overlay__ {
            st7789_pins: st7789_pins {
                pins = "PA12";
                function = "gpio_out";
            };
        };
    };
};

@MartinRGB
Copy link
Author

MartinRGB commented Nov 5, 2023

font-size

sudo dpkg-reconfigure console-setup
Terminus
6x12

xorg openbox

sudo apt-get install xorg openbox

@MartinRGB
Copy link
Author

MartinRGB commented Nov 6, 2023

Ethernet

I just bought a Milk-V Duo board with HR91105A 5pinS

gtogto/nanoPi-Duo2#2

@MartinRGB
Copy link
Author

56-RJ45-8p8c

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment