Giter Club home page Giter Club logo

buildroot_ext_lichee_rv's Introduction

Buildroot Externals for Allwinner D1 boards

This adds support for the RISC-V boards based on the Allwinner D1 SoC.

Buildroot has support for the main Nezha board, but it does not have built in support for the additional hardware on these boards. This package attempts to add support for all hardware.

Board Status

  • Lichee RV Dock - licheedock_defconfig
    • Well supported.
    • Serial Console access.
  • Lichee 86 Panel - lichee86panel_defconfig
    • Networking and LCD screen don't work.
    • Access shell via USB-UART interface.
  • Clockwork Pi DevTerm - clockworkpi_defconfig
    • Can be used with HDMI monitor and/or external USB keyboard.
    • Networking and LCD screen don't work.
    • Hidden UART interface shows logs but is non-interactive.
  • Dongshan Pi - dongshanpi_defconfig
    • External monitor fires up.
    • Still no USB so no keyboard.
    • DEBUG interface provides console. NOTE: this is on /dev/ttyACM0 instead of /dev/ttyUSB0

Kernel Notes

We're running 5.18 rc 4 on the main branch.

There is a branch allwinner_5.4 which compiles some of the interfaces with the version of kernel that these products use. If it provides better hardware support in the long run it will be moved back to mainline.

So far using the 5.4 kernel hasn't made it easier to find devices.

The 5.18 version uses boot.scr to configure the kernel so it can get the live DTC created by U-Boot. I beleive this is done so that we can get dynamic things like memory size.

The 5.4 version uses extlinux/extlinux.conf

Building an image

  1. Download this package and the buildroot source in peer directories:

    +-- src
      |- buildroot
      |- buildroot_ext_lichee_rv
    
  2. If you are running the latest LTS (2022.02) you must patch buildroot to get the correct bootloader. This is not required for 2022.05+. Assuming you're using the directory structure above:

    patch -d . -p1 < ../buildroot_ext_lichee_rv/0001-fix-sun20i-d1-spl-in-buildroot.patch 
    
  3. Enter the buildroot directory, enable the external package, and grab a configuration.

    make BR2_EXTERNAL=~/src/buildroot_ext_lichee_rv licheedock_defconfig
    

    See the config names for each board listed above.

  4. You will probably want to do some minimal configuration. For example adding dropbear for ssh access and nano so you don't need to use vi to edit files.

    make menuconfig

  5. Build the system.

    make

  6. Grab the image in output/images/sdcard.img and deploy it.

Disabling external package

  1. If you want to remove the external package run make BR2_EXTERNAL= menuconfig

Lichee Dock Serial Console

If you're developing you'll want this in case you lose screen or keyboard. Get a cheap UART adapter that support 3.3 Volt logic levels. I usually buy one that has a jumper to switch between 5 and 3.3 Volts.

    <USB A CONNECTOR>

                  +------+
		  | .  . |
		  | .  . |
		  | .  . | - GROUND
		  | .  . | - TX
		  | .  . | - RX
		  | .  . |
		  | .  . |
		  | .  . |
		  | .  . |
		  | .  . |
		  | .  . |
		  | .  . |
		  | .  . |
		  | .  . |
		  | .  . |
		  | .  . |
		  | .  . |
		  | .  . |
		  | .  . |
		  | .  . |
                  +------+
		  

    <HDMI CONNECTOR>

Remember that the TX on the board should be connected to the RX on the UART adapter, and the RX on the board should connect to the TX on the UART adapter!

Setting up wifi credentials

  1. Connect to serial console

  2. Generate a wpa configuration:

    # wpa_passphrase "MyNetwork" foobar88
    network={
            ssid="MyNetwork"
            #psk="foobar88"
            psk=67224fb26d73f404f3c12d2576bc9cb220d068318f9a44b97ad548f15d71058c
    }
    
    
  3. Replace the network section of /etc/wpa_supplicant.conf on the Lichee RV.

    # cat /etc/wpa_supplicant.conf 
    ctrl_interface=/var/run/wpa_supplicant
    ap_scan=1
    
    network={
            ssid="MyNetwork"
            #psk="foobar88"
            psk=67224fb26d73f404f3c12d2576bc9cb220d068318f9a44b97ad548f15d71058c
    }
    
  4. Reboot: /sbin/reboot

  5. get the ip:

    # ifconfig
    lo        Link encap:Local Loopback  
              inet addr:127.0.0.1  Mask:255.0.0.0
              inet6 addr: ::1/128 Scope:Host
              UP LOOPBACK RUNNING  MTU:65536  Metric:1
              RX packets:0 errors:0 dropped:0 overruns:0 frame:0
              TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)
    
    wlan0     Link encap:Ethernet  HWaddr 2C:05:47:35:8D:E1  
              inet addr:192.168.1.109  Bcast:192.168.1.255  Mask:255.255.255.0
              inet6 addr: fe80::2e05:47ff:fe35:8de1/64 Scope:Link
              UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
              RX packets:28 errors:0 dropped:4 overruns:0 frame:0
              TX packets:12 errors:0 dropped:0 overruns:0 carrier:0
              collisions:0 txqueuelen:1000 
              RX bytes:5422 (5.2 KiB)  TX bytes:1904 (1.8 KiB)
    
    
    

buildroot_ext_lichee_rv's People

Contributors

grant-olson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

buildroot_ext_lichee_rv's Issues

RTL8723DS is not in buildroot 2022.05

Hi!
First, thank you for working on the Lichee RV support! I've just received my Lichee RV dock. To be honest, I purchased it just for fun :) For some reason this RISC-V stuff reminds me the times of ZX Spectrum (yes, I'm that old).
After building the buildroot using your instructions I did expect to have wlan0 interface but that wasn't the case. As it turned out the driver for this chip is not in 2022.05. Btw, I did not expect to have working HDMI framebuffer :) So, no need for serial terminal!
I tried with buildroot's snapshot (09.july) but I didn't get output on the screen anymore. So I decided to manually merge RTL8723DS driver from snapshot to 2022.05 and it worked.
Also it may help someone to know that for nano editor its needed to have Toolchain->"Enable WCHAR support" selected. Also, with only keyboard and no mouse available its easier to get your hashed key for wpa_supplicant by:
$ wpa_passphrase [ ssid ] [ passphrase ] > my.conf
$ cat my.conf >> /etc/wpa_supplicant.conf
.. and then edit with nano. But its maybe matter of taste.
Also, just for the information, I have linux machines around but this time I was using WSL2 on windows and ubuntu 20.04. I happened to have Rasperry Pi Imager installed and I was using that to write .img to sd card.
Btw, what it takes to have working mouse on Lichee RV dock? Just selecting gpm and using /dev/input/event2 (wireless mouse in my case) didn't work.
Thanks,
Indrek

1.14 SPI LCD support?

There is only one image online (licheerv_d1_1.14lcd_ub2004) that has the 1.14 LCD screen working.
Provided by Sipeed via a Mega Cloud link but you need the Pheonix tools to burn to an SD card.

That ubuntu image was built before the release of the dock so it has no networking...
Here is a link to the SIPEED Chinese dev docs, has some instructions on including the driver.

https://elixir.bootlin.com/linux/latest/source/drivers/staging/fbtft/fb_st7789v.c
https://www.kernel.org/doc/Documentation/devicetree/bindings/display/panel/sitronix,st7789v.yaml

I was hoping that Buildroot had an easier approach for this?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.