Jump to content

[Armbian build PR] - sipeed-lichepi-4a: Official support + OpenSBI


Recommended Posts

Posted

Adds official support for the board and solid foundation for the development

Description

Progress from https://github.com/armbian/build/pull/5684

The original work is on https://github.com/Kreyren/armbian-build-kreyren/compare/6cd581c96c0b7b800b6549afe23112d4a662d2a0..811288169004dccacab964129ecaf8cfe891b22d i tried to shorten it as much as possible for the easy merge request review

  • The image boots and seems to work without major issues
  • The fans doesn't work and need to be corrected with:
echo 1 > /sys/class/pwm/pwmchip0/export
echo 1000000 > /sys/class/pwm/pwmchip0/pwm1/period
echo 1000000 > /sys/class/pwm/pwmchip0/pwm1/duty_cycle
echo 1 > /sys/class/pwm/pwmchip0/pwm1/enable

CC @chainsx - Rerefencing https://github.com/armbian/build/pull/5684#discussion_r1318068619 -> you seem to have better understanding for how to make it work, please implement it

  • The audio has issues with playback e.g. crab rave from youtube has lot of popping sounds on both the HDMI output and headphones through JACK
  • UEFI was not implemented and i try to submit that in next patch, TODO tracking
  • Tested using:
$ ./compile.sh build BOARD=sipeed-licheepi-4a BRANCH=legacy BUILD_DESKTOP=no BUILD_MINIMAL=yes EXPERT=yes KERNEL_CONFIGURE=no RELEASE=sid

Build Log: https://paste.next.armbian.com/oxamexecoj

  • Complains about:
[🐳|πŸ”¨]   ===================== WARNING ======================
[🐳|πŸ”¨]   This board does not use CONFIG_DM_USB. Please update
[🐳|πŸ”¨]   the board to use CONFIG_DM_USB before the v2019.07 release.
[🐳|πŸ”¨]   Failure to update by the deadline may result in board removal.
[🐳|πŸ”¨]   See doc/driver-model/MIGRATION.txt for more info.
[🐳|πŸ”¨]   ====================================================
[🐳|πŸ”¨]   ===================== WARNING ======================
[🐳|πŸ”¨]   CONFIG_OF_EMBED is enabled. This option should only
[🐳|πŸ”¨]   be used for debugging purposes. Please use
[🐳|πŸ”¨]   CONFIG_OF_SEPARATE for boards in mainline.
[🐳|πŸ”¨]   See doc/README.fdt-control for more info.
[🐳|πŸ”¨]   ====================================================

I try to address it in next merge request

  • The GPU and NPU are not usable, context in Figure out the GPU and NPU https://github.com/ryan4yin/nixos-licheepi4a/issues/11.. blame the manufacturer

  • GNOME doesn't compile as it's currently broken for riscv64 in debian repositories

  • I didn't work on ubuntu compatibility, @chainsx seems to be better option for that as it seems to be his main distro

  • Debian claims that bookworm will never support riscv so should be flagged

  • Trixie doesn't build because:

[🐳|🚸] Could not find package filename for 'base-files' in 'https://packages.debian.org/bookworm/riscv64/base-files/download' [ looking for base-files ]

Debian upstream informed and working on the issue, i try to submit patch if they take long time

  • Complains about:
[    2.563670]
[    2.565219] ********************************************************************
[    2.572714] **     NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE           **
[    2.580204] **                                                                **
[    2.587680] **  WRITEABLE clk DebugFS SUPPORT HAS BEEN ENABLED IN THIS KERNEL **
[    2.595150] **                                                                **
[    2.602619] ** This means that this kernel is built to expose clk operations  **
[    2.610105] ** such as parent or rate setting, enabling, disabling, etc.      **
[    2.617589] ** to userspace, which may compromise security on your system.    **
[    2.625091] **                                                                **
[    2.632561] ** If you see this message and you are not debugging the          **
[    2.640030] ** kernel, report this immediately to your vendor!                **
[    2.647498] **                                                                **
[    2.654967] **     NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE NOTICE           **
[    2.662433] ********************************************************************
[    2.669998] random: fast init done

I try to address that in upcoming merge, TODO tracking

  • Complains about:
[FAILED] Failed to listen on systemd-networ…t - Network Service Netlink Socket.

TODO: Track this

  • The flashing is not implemented and needs to be done manually as i and the riscv community ware unable to find any documentation or data on how to make it bootable through the sdcard, needs to be flashed through fastboot:
  1. Hold the BOOT button and connect the USB-C cable to your system
  2. Verify that the Android Downloader shows up in # dmesg
  3. Verify that fastboot can see the device with # fastboot devices
  4. Invoke:
# fastboot flash rom ./path/to/uboot/binary # Flash the binary in the tempfs so that we can flash it
# fastboot reboot # Reboot the device to the binary
# fastboot flash uboot ./path/to/uboot/binary # Flash the uboot on the board
# fastboot flash root ./path/to/rootfs.tar # Flash the rootfs
  1. Remove the USB-C and try to boot the device, you should be greeted with armbian
  • Issues were observed with serial console in picocom as it starts to print data that are not sensible, to fix this use C-a C-x to close picocom and reopen it again, repeat until it works

  • I tried to adjust the coding style to the armbian standard where possible

  • riscv64 include was added with stuff that should always be included

  • thead family adjusted to provide generic configuration for the family of chips

Jira reference number: Ehwww jira

How Has This Been Tested?

Through pain, suffering and lack of sleep by trying to boot the SD Card and flashing the fastboot and then testing the features

  • Bluetooth has not been tested

Checklist:

  • [X] My code follows the style guidelines of this project
  • [X] I have performed a self-review of my own code
  • [X] I have commented my code, particularly in hard-to-understand areas
  • [X] I have made corresponding changes to the documentation

Made where possible, i try to work on the documentation separatedly

  • [X] My changes generate no new warnings

Beyond the one mentioned

  • [X] Any dependent changes have been merged and published in downstream modules

View the full article

Γ—
Γ—
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines