Irradium (based on crux linux) riscv64, aarch64

irradium - source based Linux distribution CRUX adhering to ideology keep it simple, has its own package system, also supports the port system.

irradium-core
irradium-opt
irradium-xorg
irradium-xfce

packages aarch64
packages riscv64

installation README.TXT
irradium-3.7-riscv64-core-visionfive_2-6.1.61-build-20231103.img.zst
irradium-3.7-riscv64-core-visionfive_2-6.1.61-build-20231103.img.zst.sha256

4 Likes

Installation README.TXT
kernel 6.6.15

irradium-3.7-riscv64-core-visionfive_2-6.6.15-build-20240206.img.zst
irradium-3.7-riscv64-core-visionfive_2-6.6.15-build-20240206.img.zst.sha256
irradium-3.7-riscv64-xfce-visionfive_2-6.6.15-build-20240206.img.zst
irradium-3.7-riscv64-xfce-visionfive_2-6.6.15-build-20240206.img.zst.sha256

In:    serial@10000000
Out:   serial@10000000
Err:   serial@10000000
Model: StarFive VisionFive V2
Net:   eth0: ethernet@16030000, eth1: ethernet@16040000
switch to partitions #0, OK
mmc1 is current device
found device 1
bootmode flash device 1
Can't set block device
Failed to load '/boot/uEnv.txt'
Hit any key to stop autoboot:  0 
Can't set block device
Importing environment from mmc1 ...
## Info: input data size = 7814 = 0x1E86
Can't set block device
## Warning: defaulting to text format
## Error: "boot2" not defined
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:3...
Found U-Boot script /boot.scr
2846 bytes read in 5 ms (555.7 KiB/s)
## Executing script at 43900000
Boot script loaded from mmc 1:3
155 bytes read in 5 ms (30.3 KiB/s)
42757 bytes read in 9 ms (4.5 MiB/s)
21837824 bytes read in 550 ms (37.9 MiB/s)
Failed to load '/dtb/starfive/overlay/starfive-fixup.scr'
2873511 bytes read in 126 ms (21.7 MiB/s)
Moving Image from 0x44000000 to 0x40200000, end=41728000
## Loading init Ramdisk from Legacy Image at 48100000 ...
   Image Name:   uInitrd
   Image Type:   RISC-V Linux RAMDisk Image (gzip compressed)
   Data Size:    2873447 Bytes = 2.7 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 48000000
   Booting using the fdt blob at 0x48000000
   Using Device Tree in place at 0000000048000000, end 0000000048072fff

Starting kernel ...

clk u5_dw_i2c_clk_core already disabled
clk u5_dw_i2c_clk_apb already disabled
CCACHE: DataError @ 0x00000000.08040140
CCACHE: DataFail @ 0x00000000.0804005B
debugfs: Directory '16008000.dma-controller' with parent 'dmaengine' already present!
imx219 6-0010: Error reading reg 0x   0: -121
imx219 6-0010: failed to read chip id 219
Successfully mounted device UUID=32539e08-a5c0-4084-9f32-0932043d95e3
No kernel modules for Linux 6.6.15
INIT: version 3.08 booting
The system is coming up.  Please wait.
udevd[137]: specified group 'sgx' unknown
linuxroot: clean, 48320/3747744 files, 762199/15112960 blocks
boot: clean, 34/76912 files, 48497/307200 blocks
hostname: visionfive-2
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.
font: default
Couldn't get a file descriptor referring to the console.
keyboard: us
Couldn't get a file descriptor referring to the console.
INIT: Entering runlevel: 2
starting services: sysklogd lo net[ERROR] sshd crond


irradium  (visionfive-2) (ttyS0)

Installation README.TXT
kernel 6.6.16

irradium-3.7-riscv64-core-visionfive_2-6.6.16-build-20240210.img.zst
irradium-3.7-riscv64-core-visionfive_2-6.6.16-build-20240210.img.zst.sha256
irradium-3.7-riscv64-xfce-visionfive_2-6.6.16-build-20240210.img.zst
irradium-3.7-riscv64-xfce-visionfive_2-6.6.16-build-20240210.img.zst.sha256

opensbi and u-boot are updated from upstream, HDMI output work.

update SPI bootloader

cat /proc/mtd
flashcp -v /boot/ u-boot.bin/dev/mtd0
flashcp -v /boot/u-boot.itb  /dev/mtd2
U-Boot SPL 2024.01-jh7110 (Feb 10 2024 - 06:22:41 +0200)
DDR version: dc2e84f0.
Trying to boot from SPI
spl_fdt_fixup_version_b set prop starfive,tx-use-rgmii-clk fail.

OpenSBI v1.4
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|____/_____|
        | |
        |_|

Platform Name             : Generic
Platform Features         : medeleg
Platform HART Count       : 5
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 4000000Hz
Platform Console Device   : uart8250
Platform HSM Device       : ---
Platform PMU Device       : ---
Platform Reboot Device    : ---
Platform Shutdown Device  : ---
Platform Suspend Device   : ---
Platform CPPC Device      : ---
Firmware Base             : 0x40000000
Firmware Size             : 363 KB
Firmware RW Offset        : 0x40000
Firmware RW Size          : 107 KB
Firmware Heap Offset      : 0x50000
Firmware Heap Size        : 43 KB (total), 2 KB (reserved), 9 KB (used), 31 KB (free)
Firmware Scratch Size     : 4096 B (total), 328 B (used), 3768 B (free)
Runtime SBI Version       : 2.0

Domain0 Name              : root
Domain0 Boot HART         : 1
Domain0 HARTs             : 0*,1*,2*,3*,4*
Domain0 Region00          : 0x0000000010000000-0x0000000010000fff M: (I,R,W) S/U: (R,W)
Domain0 Region01          : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: ()
Domain0 Region02          : 0x0000000040040000-0x000000004005ffff M: (R,W) S/U: ()
Domain0 Region03          : 0x0000000040000000-0x000000004003ffff M: (R,X) S/U: ()
Domain0 Region04          : 0x000000000c000000-0x000000000fffffff M: (I,R,W) S/U: (R,W)
Domain0 Region05          : 0x0000000000000000-0xffffffffffffffff M: () S/U: (R,W,X)
Domain0 Next Address      : 0x0000000040200000
Domain0 Next Arg1         : 0x0000000042200000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes
Domain0 SysSuspend        : yes

Boot HART ID              : 1
Boot HART Domain          : root
Boot HART Priv Version    : v1.11
Boot HART Base ISA        : rv64imafdcbx
Boot HART ISA Extensions  : zihpm
Boot HART PMP Count       : 8
Boot HART PMP Granularity : 12 bits
Boot HART PMP Address Bits: 34
Boot HART MHPM Info       : 2 (0x00000018)
Boot HART MIDELEG         : 0x0000000000000222
Boot HART MEDELEG         : 0x000000000000b109


U-Boot 2024.01-jh7110 (Feb 10 2024 - 06:19:21 +0200)

CPU:   rv64imafdc_zba_zbb
DRAM:  8 GiB
Core:  134 devices, 26 uclasses, devicetree: board
WDT:   Not starting watchdog@13070000
MMC:   mmc@16010000: 0, mmc@16020000: 1
Loading Environment from SPIFlash... SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
*** Warning - bad CRC, using default environment

Loading Environment from nowhere... OK
StarFive EEPROM format v2

--------EEPROM INFO--------
Vendor : StarFive Technology Co., Ltd.
Product full SN: VF7110B1-2310-D004E000-00001219
data version: 0x2
PCB revision: 0xb2
BOM revision: A
Ethernet MAC0 address: 6c:cf:39:00:26:e3
Ethernet MAC1 address: 6c:cf:39:00:26:e4
--------EEPROM INFO--------

starfive_7110_pcie pcie@2b000000: Starfive PCIe bus probed.
starfive_7110_pcie pcie@2c000000: Starfive PCIe bus probed.
In:    serial@10000000
Out:   serial@10000000
Err:   serial@10000000
Net:   eth0: ethernet@16030000, eth1: ethernet@16040000
starting USB...
Bus xhci_pci: Register 5000420 NbrPorts 5
Starting the controller
USB XHCI 1.00
scanning bus xhci_pci for devices... 2 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Working FDT set to ff72ec90
Hit any key to stop autoboot:  0 

Device 0: unknown device

Device 0: unknown device
Card did not respond to voltage select! : -110
switch to partitions #0, OK
mmc1 is current device
Scanning mmc 1:3...
Found U-Boot script /boot.scr
2584 bytes read in 2 ms (1.2 MiB/s)
## Executing script at 43900000
Boot script loaded from mmc 1:3
155 bytes read in 1 ms (151.4 KiB/s)
43142 bytes read in 7 ms (5.9 MiB/s)
21838336 bytes read in 779 ms (26.7 MiB/s)
Working FDT set to 46000000
Failed to load '/dtb/starfive/overlay/starfive-fixup.scr'
2873152 bytes read in 176 ms (15.6 MiB/s)
## Loading init Ramdisk from Legacy Image at 46100000 ...
   Image Name:   uInitrd
   Image Type:   RISC-V Linux RAMDisk Image (gzip compressed)
   Data Size:    2873088 Bytes = 2.7 MiB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 46000000
   Booting using the fdt blob at 0x46000000
Working FDT set to 46000000
   Loading Ramdisk to fe462000, end fe71f700 ... OK
   Loading Device Tree to 00000000fe3ef000, end 00000000fe461fff ... OK
Working FDT set to fe3ef000


Starting kernel ...

debugfs: Directory '16008000.dma-controller' with parent 'dmaengine' already present!
imx219 6-0010: Error reading reg 0x   0: -121
imx219 6-0010: failed to read chip id 219
Successfully mounted device UUID=32539e08-a5c0-4084-9f32-0932043d95e3
No kernel modules for Linux 6.6.16
INIT: version 3.08 booting
The system is coming up.  Please wait.
udevd[138]: specified group 'sgx' unknown
linuxroot: clean, 112848/3769920 files, 1912311/15112960 blocks
boot: clean, 34/76912 files, 48313/307200 blocks
hostname: visionfive-2
hwclock: Cannot access the Hardware Clock via any known method.
hwclock: Use the --verbose option to see the details of our search for an access method.
font: default
Couldn't get a file descriptor referring to the console.
keyboard: us
Couldn't get a file descriptor referring to the console.
INIT: Entering runlevel: 2
INIT: version 3.08 reloadinglo net[ERROR] sshd crond firstrun
 alsa dbus elogind lightdm


irradium  (visionfive-2) (ttyS0)

Installation README.TXT
kernel 6.1.77

irradium-3.7-riscv64-core-visionfive_2-6.1.77-build-20240210.img.zst
irradium-3.7-riscv64-core-visionfive_2-6.1.77-build-20240210.img.zst.sha256
irradium-3.7-riscv64-xfce-visionfive_2-6.6.16-build-20240210.img.zst
irradium-3.7-riscv64-xfce-visionfive_2-6.6.16-build-20240210.img.zst.sha256

Hm I’ve honestly never been able to boot any of your images after updating from the firmware the board had been released with. It just never detects any boot partition after dd’ing the img to the SD card.

U-Boot SPL 2021.10 (Feb 11 2024 - 21:28:13 +0100)
LPDDR4: 8G version: g8ad50857.
Trying to boot from SPI

OpenSBI JH7110_VF2_6.1_v5.10.3
   ____                    _____ ____ _____
  / __ \                  / ____|  _ \_   _|
 | |  | |_ __   ___ _ __ | (___ | |_) || |
 | |  | | '_ \ / _ \ '_ \ \___ \|  _ < | |
 | |__| | |_) |  __/ | | |____) | |_) || |_
  \____/| .__/ \___|_| |_|_____/|___/_____|
        | |
        |_|

Platform Name             : StarFive VisionFive V2
Platform Features         : medeleg
Platform HART Count       : 5
Platform IPI Device       : aclint-mswi
Platform Timer Device     : aclint-mtimer @ 4000000Hz
Platform Console Device   : uart8250
Platform HSM Device       : ---
Platform PMU Device       : ---
Platform Reboot Device    : pm-reset
Platform Shutdown Device  : pm-reset
Platform Suspend Device   : ---
Firmware Base             : 0x40000000
Firmware Size             : 392 KB
Firmware RW Offset        : 0x40000
Runtime SBI Version       : 1.0

Domain0 Name              : root
Domain0 Boot HART         : 1
Domain0 HARTs             : 0*,1*,2*,3*,4*
Domain0 Region00          : 0x0000000002000000-0x000000000200ffff M: (I,R,W) S/U: ()
Domain0 Region01          : 0x0000000040000000-0x000000004003ffff M: (R,X) S/U: ()
Domain0 Region02          : 0x0000000040040000-0x000000004007ffff M: (R,W) S/U: ()
Domain0 Region03          : 0x0000000000000000-0xffffffffffffffff M: (R,W,X) S/U: (R,W,X)
Domain0 Next Address      : 0x0000000040200000
Domain0 Next Arg1         : 0x0000000042200000
Domain0 Next Mode         : S-mode
Domain0 SysReset          : yes
Domain0 SysSuspend        : yes

Boot HART ID              : 1
Boot HART Domain          : root
Boot HART Priv Version    : v1.11
Boot HART Base ISA        : rv64imafdcbx
Boot HART ISA Extensions  : none
Boot HART PMP Count       : 8
Boot HART PMP Granularity : 4096
Boot HART PMP Address Bits: 34
Boot HART MHPM Count      : 2
Boot HART MIDELEG         : 0x0000000000000222
Boot HART MEDELEG         : 0x000000000000b109


U-Boot 2021.10 (Feb 11 2024 - 21:28:13 +0100)

CPU:   rv64imacu_zba_zbb
Model: StarFive VisionFive V2
DRAM:  8 GiB
MMC:   sdio0@16010000: 0, sdio1@16020000: 1
Loading Environment from SPIFlash... SF: Detected gd25lq128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB
OK
StarFive EEPROM format v2

--------EEPROM INFO--------
Vendor : StarFive Technology Co., Ltd.
Product full SN: VF7110B1-2253-D008E000-00004122
data version: 0x2
PCB revision: 0xb2
BOM revision: A
Ethernet MAC0 address: 6c:cf:39:00:43:90
Ethernet MAC1 address: 6c:cf:39:00:43:91
--------EEPROM INFO--------

In:    serial
Out:   serial
Err:   serial
Model: StarFive VisionFive V2
Net:   eth0: ethernet@16030000, eth1: ethernet@16040000
Hit any key to stop autoboot:  0
switch to partitions #0, OK
mmc1 is current device
Try booting from MMC1 ...
Can't set block device
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
## Error: "boot2" not defined
Card did not respond to voltage select! : -110
starfive_pcie pcie@2B000000: Port link up.
starfive_pcie pcie@2B000000: Starfive PCIe bus probed.
PCI: Failed autoconfig bar 10
starfive_pcie pcie@2C000000: Port link up.
starfive_pcie pcie@2C000000: Starfive PCIe bus probed.
PCI: Failed autoconfig bar 10

Device 0: Vendor: 0x126f Rev: 1002A    Prod: WK2309NV28250G00325
            Type: Hard Disk
            Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)
... is now current device
Try booting from NVME0 ...
Can't set block device
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
## Error: "boot2" not defined

Device 0: Vendor: 0x126f Rev: 1002A    Prod: WK2309NV28250G00325
            Type: Hard Disk
            Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)
... is now current device
Try booting from NVME0 ...
Can't set block device
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
## Error: "boot2" not defined
Tring booting distro ...
switch to partitions #0, OK
mmc1 is current device
Try booting from MMC1 ...
Can't set block device
## Warning: defaulting to text format
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
Can't set block device
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
fatwrite - write file into a dos filesystem

Usage:
fatwrite <interface> <dev[:part]> <addr> <filename> [<bytes> [<offset>]]
    - write file 'filename' from the address 'addr' in RAM
      to 'dev' on 'interface'
Retrieving file: /extlinux/extlinux.conf
Can't set block device
Error reading config file
Card did not respond to voltage select! : -110

Device 0: Vendor: 0x126f Rev: 1002A    Prod: WK2309NV28250G00325
            Type: Hard Disk
            Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)
... is now current device
Try booting from NVME0 ...
Can't set block device
## Warning: defaulting to text format
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
Can't set block device
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
fatwrite - write file into a dos filesystem

Usage:
fatwrite <interface> <dev[:part]> <addr> <filename> [<bytes> [<offset>]]
    - write file 'filename' from the address 'addr' in RAM
      to 'dev' on 'interface'
Retrieving file: /extlinux/extlinux.conf
Can't set block device
Error reading config file

Device 0: Vendor: 0x126f Rev: 1002A    Prod: WK2309NV28250G00325
            Type: Hard Disk
            Capacity: 238475.1 MB = 232.8 GB (488397168 x 512)
... is now current device
Try booting from NVME0 ...
Can't set block device
## Warning: defaulting to text format
## Warning: Input data exceeds 1048576 bytes - truncated
## Info: input data size = 1048578 = 0x100002
Can't set block device
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
libfdt fdt_check_header(): FDT_ERR_BADMAGIC
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
libfdt fdt_path_offset() returned FDT_ERR_NOTFOUND
fatwrite - write file into a dos filesystem

Usage:
fatwrite <interface> <dev[:part]> <addr> <filename> [<bytes> [<offset>]]
    - write file 'filename' from the address 'addr' in RAM
      to 'dev' on 'interface'
Retrieving file: /extlinux/extlinux.conf
Can't set block device
Error reading config file
StarFive #

I do wonder what I’m missing tbh

It’s simple, this image is not split for booting from sdcard and the bootloader is not recorded, boot 0 0 (sip) is used, switch and update the bootloader in spi

1 Like

Hm I am booting from 0:0 switch position. I also thought I did update the bootloader having downloaded the git repositories according to the guide and build everything accordingly.
Looking at your bootloader output I either did something wrong or the procedure changed somehow?
I’ll try to investigate :x

try to flash my bootloader according to the instructions.

flashcp -v /boot/ u-boot.bin /dev/mtd0
flashcp -v /boot/u-boot.itb /dev/mtd2
2 Likes

I did that and it completely shot my board ^^’
Trying to recover the bootloader now with the recovery image which… seems to fail as well

just take the official image, write it to the card and switch the loading mode of the card, then restore the bootloader in spi

1 Like

Hah that worked, loaded the Debian, flashed your firmware again and it seems to work now. Thanks!

Installation README.TXT
kernel 6.6.17

added loading from SD card

irradium-3.7-riscv64-core-visionfive_2-6.6.17-build-20240217.img.zst
irradium-3.7-riscv64-core-visionfive_2-6.6.17-build-20240217.img.zst.sha256
irradium-3.7-riscv64-xfce-visionfive_2-6.6.17-build-20240217.img.zst
irradium-3.7-riscv64-xfce-visionfive_2-6.6.17-build-20240217.img.zst.sha256

3 Likes

Hello Mara,

AWESOME work to provide a new Linux distro on the VF2.

Could we ask you to provide screenshots or a youtube video of your VF2 booting with irradium? I would also love to hear your comments about the GPU support with irradium. Where does it stand? Does your Xorg/xfce desktop utilize the gpu to provide an optimal experience? Or is it simply using framebuffer at the moment?

Thank you in advance.

2 Likes

Currently running some updates, but I’ve already downloaded the latest kernel packages. I might be able to record the boot process later today and upload it to answer omac’s question :sweat_smile:
(really starting to dig this irradium linux of yours)

irradium - this is still the same crux, but for riscv64 and aarch64.
also now the images have a bootloader and you can boot simply by switching the QSPI switches to:
0 0
0 1

1 Like

Is there a simple way to build said bootloader for existing installations? I mean if it works like the StarFive debian image it’d be nice to have the SD boot mode as a backup in case of a shot firmware flash

the latest image is loaded the same way as Debian SD images

2 Likes

Installation README.TXT
kernel 6.6.18

irradium-3.7-riscv64-core-visionfive_2-6.6.18-build-20240225.img.zst
irradium-3.7-riscv64-core-visionfive_2-6.6.18-build-20240225.img.zst.sha256
irradium-3.7-riscv64-xfce-visionfive_2-6.6.18-build-20240225.img.zst
irradium-3.7-riscv64-xfce-visionfive_2-6.6.18-build-20240225.img.zst.sha256

1 Like

Installation README.TXT
kernel 5.15.0

irradium-3.7-riscv64-core-visionfive_2-5.15.0-build-20240226.img.zst
irradium-3.7-riscv64-core-visionfive_2-5.15.0-build-20240226.img.zst.sha256
irradium-3.7-riscv64-xfce-visionfive_2-5.15.0-build-20240226.img.zst
irradium-3.7-riscv64-xfce-visionfive_2-5.15.0-build-20240226.img.zst.sha256

1 Like

Nice, downloaded and updated the kernel and firmware to the latest build :^)