AHCI SATA controller not detected

Hi all,

It's for my Helios64 NAS.

I compiled FreeBSD 13.0-BETA2 with GENERIC kernel and the system boot fine but the AHCI SATA controller is not detected.

U-Boot rockpro64-rk3399 :​


Code:
$ git clone https://github.com/kobol-io/u-boot.git
$ cd u-boot
$ make rockpro64-rk3399_defconfig
$ make CROSS_COMPILE=aarch64-linux-gnu-
$ dd if=idbloader.img of=/dev/da0 seek=64 bs=512 conv=sync
$ dd if=u-boot.itb of=/dev/da0 seek=16384 bs=512 conv=sync

Code:
# pciconf -lv
pcib1@pci0:0:0:0:       class=0x060400 rev=0x00 hdr=0x01 vendor=0x1d87 device=0x0100 subvendor=0x0000 subdevice=0x0000
    vendor     = 'Fuzhou Rockchip Electronics Co., Ltd'
    device     = 'RK3399 PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI
ahci0@pci0:1:0:0:       class=0x010601 rev=0x00 hdr=0x00 vendor=0x197b device=0x0585 subvendor=0x197b subdevice=0x0000
    vendor     = 'JMicron Technology Corp.'
    device     = 'JMB58x AHCI SATA controller'
    class      = mass storage
    subclass   = SATA

U-Boot helios64 :​


Code:
$ git clone https://github.com/kobol-io/u-boot.git
$ cd u-boot
$ make helios64_defconfig
$ make CROSS_COMPILE=aarch64-linux-gnu-
$ dd if=idbloader.img of=/dev/da0 seek=64 bs=512 conv=sync
$ dd if=u-boot.itb of=/dev/da0 seek=16384 bs=512 conv=sync

Code:
# pciconf -lv
pcib1@pci0:0:0:0:       class=0x060400 rev=0x00 hdr=0x01 vendor=0x1d87 device=0x0100 subvendor=0x0000 subdevice=0x0000
    vendor     = 'Fuzhou Rockchip Electronics Co., Ltd'
    device     = 'RK3399 PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI


Thanks
 
Probably this should be done by the authors of the patches.
That is, KOBOL TEAM.
I just prepared an unofficial port for u-boot-helios64 based on the patches provided to me.
My port is available

This still needs testing.
I have no feedback on successful installations other than my own experience.
If you succeed, let me know
 
SleepWalker is it possible to install the image to the internal flash?
Oh sure
Code:
root@helios:~ # df -h
Filesystem            Size    Used   Avail Capacity  Mounted on
zroot/ROOT/default    5.6G    2.4G    3.2G    43%    /
devfs                 1.0K    1.0K      0B   100%    /dev
tmpfs                 7.9G     49M    7.9G     1%    /tmp
zroot/var/log         3.2G    5.6M    3.2G     0%    /var/log
zroot/var/audit       3.2G    104K    3.2G     0%    /var/audit
zroot/var/crash       3.2G     96K    3.2G     0%    /var/crash
zroot/var/mail        3.2G     96K    3.2G     0%    /var/mail
zroot/usr/home        3.4G    198M    3.2G     6%    /usr/home
zroot/var/tmp         3.2G    120K    3.2G     0%    /var/tmp
tank/media             36T     25T     12T    68%    /usr/media
tank/media/git         12T     10G     12T     0%    /usr/media/git
root@helios:~ # gpart show -l -p
=>      40  30535600    mmcsd0  GPT  (15G)
        40     32728            - free -  (16M)
     32768    102400  mmcsd0p1  efi  (50M)
    135168  16777216  mmcsd0p2  swap  (8.0G)
  16912384  13621248  mmcsd0p3  root  (6.5G)
  30533632      2008            - free -  (1.0M)

=>       40  468862048    ada0  GPT  (224G)
         40  251658240  ada0p1  logs  (120G)
  251658280  217203808  ada0p2  cache  (104G)

=>         40  19532873648    ada1  GPT  (9.1T)
           40  19532873648  ada1p1  disk1  (9.1T)

=>         40  19532873648    ada2  GPT  (9.1T)
           40  19532873648  ada2p1  disk2  (9.1T)

=>         40  19532873648    ada3  GPT  (9.1T)
           40  19532873648  ada3p1  disk3  (9.1T)

=>         40  19532873648    ada4  GPT  (9.1T)
           40  19532873648  ada4p1  disk4  (9.1T)

root@helios:~ #
root@helios:~ # zpool list -v
NAME          SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
tank         36.4T  24.7T  11.7T        -         -     9%    67%  1.00x    ONLINE  -
  indirect-0      -      -      -        -         -      -      -      -    ONLINE
  indirect-1      -      -      -        -         -      -      -      -    ONLINE
  gpt/disk1  9.09T  8.08T  1.01T        -         -    11%  88.8%      -    ONLINE
  gpt/disk2  9.09T  7.86T  1.24T        -         -    10%  86.4%      -    ONLINE
  gpt/disk3  9.09T  5.44T  3.66T        -         -     9%  59.8%      -    ONLINE
  gpt/disk4  9.09T  3.33T  5.77T        -         -     7%  36.6%      -    ONLINE
zroot           6G  2.64G  3.36G        -         -    30%    44%  1.00x    ONLINE  -
  mmcsd0p3      6G  2.64G  3.36G        -         -    30%  44.0%      -    ONLINE
 
SleepWalker well that is fantastic. i want to migrate from my current running armbian to freebsd as it seems to be a bit unstable, so my next question is: how stable is it? :-) and can i just install any pkg from ports or pkg?
 
SleepWalker well that is fantastic. i want to migrate from my current running armbian to freebsd as it seems to be a bit unstable, so my next question is: how stable is it? :) and can i just install any pkg from ports or pkg?

My Helios64 has been running non-stop for over a year now. And I keep updating.

It works very stable for me. But I have over 20 years of FreeBSD experience. :cool:
Maybe that's why everything works for me.
I don't have feedback from guys who use FreeBSD on Kobol Helios64.

All my SATA drives are in ZFS pools, so it doesn't matter which operating system is currently running (Linux or FreeBSD) the data is equally available.

Usually my Helios64 is running FreeBSD (which is more convenient for me), but if I want to spend the weekend watching movies with my family,
I just run Linux (with ZFS support) from an SD card or USB Flash and spend time watching movies from my storage on 4K TV via Emby.

I have my own package repository, but this is just to have some fine tuning of some of them,
of course everything can be installed with the pkg command from the official repository.

I still don't have time to test 2.5G Ethernet well (and I don't have a 2.5Gbit Switch).
But basically everything works very stable, I'm happy that I have Helios64.

You can write to me if you have any questions.
Good luck.
 
SleepWalker very nice. just want to switch the base os. and as i know from the past 15 years, freebsd was allways a stable partner :-) i am mainly using my helios64 as storage for my nomad cluster. but as the armbian images i used over the past 1.5 half years keep behaving very strangly and damn, i tried so much different configurations with cpu governor and voltage adjustments i just want to have it stable :-) so as you stated...freebsd will be the way to go for me. thx. i will try it out next weekend.
 
Hi Jaques-Ludwig

Probably the problem is not related to changing the version of the operating system.
This is a consequence of changing the version or build date of U-boot.
Please compare the output of the command

root@helios:~ # kenv | grep smbios
hint.smbios.0.mem="0xf4ebb000"
smbios.bios.reldate="06/28/2021"
smbios.bios.vendor="U-Boot"
smbios.bios.version="2020.07"
smbios.chassis.maker="kobol"
smbios.chassis.type="Desktop"
smbios.planar.maker="kobol"
smbios.planar.product="helios64"
smbios.socket.enabled="1"
smbios.system.maker="kobol"
smbios.system.product="helios64"
smbios.system.serial="000100000031"
smbios.system.uuid="31303030-3030-3030-3030-333100000000"
smbios.version="3.0"
root@helios:~ #

In version 13.0 and 13.1.
My device is running 13.1 and I don't see a problem with AHCI.
 
Thanks for you anwer.

On 13.0 output is:
root@helios64:~ # kenv | grep smbios
hint.smbios.0.mem="0xf4ec9000"
smbios.bios.reldate="10/28/2021"
smbios.bios.vendor="U-Boot"
smbios.bios.version="2020.07"
smbios.chassis.maker="kobol"
smbios.chassis.type="Desktop"
smbios.planar.maker="kobol"
smbios.planar.product="helios64"
smbios.socket.enabled="1"
smbios.system.maker="kobol"
smbios.system.product="helios64"
smbios.system.serial="0e2473d5ecb89c99"
smbios.system.uuid="34326530-3337-3564--6563-623839633939"
smbios.version="3.0"

On Version 13.1 output is:
root@helios64:~ # kenv | grep smbios
hint.smbios.0.mem="0xf4ecc000"
smbios.bios.reldate="05/13/2022"
smbios.bios.vendor="U-Boot"
smbios.bios.version="2020.07"
smbios.chassis.maker="kobol"
smbios.chassis.type="Desktop"
smbios.planar.maker="kobol"
smbios.planar.product="helios64"
smbios.socket.enabled="1"
smbios.system.maker="kobol"
smbios.system.product="helios64"
smbios.system.serial="0e2473d5ecb89c99"
smbios.system.uuid="34326530-3337-3564-6563-623839633939"
smbios.version="3.0"
 
Hi langerma

I want to know how much Helios64 owners need this.
If there are really a lot of them, then there is a need to release a new image.
Since there are no radical changes in 14.0 relative to 13.2,
I don’t see the point in a new installation image yet.

You can always install the old one and do freebsd-update.
 
Hi SleepWalker and thanks for your work !
I am also an Helios user, and would like to install FreeBSD 14 on it.
I compiled u-boot.itb and idbloader.img and dd to my SDcard (and also to my mmc as I realized that it took it on priority..).
I am able to boot correctly but still not able to see my drives... only piece missing, but an important one !
I am wondering if this because I am also missing DTS... where / how are you creating it ?

Many thanks !
 
Just to give a little bit more, I realized that using the default FreeBSD u-boot-rockpro64 makes FreeBSD detects the AHCI controller :
Bash:
ahci0@pci0:1:0:0:       class=0x010601 rev=0x00 hdr=0x00 vendor=0x197b device=0x0585 subvendor=0x197b subdevice=0x0000
    vendor     = 'JMicron Technology Corp.'
    device     = 'JMB58x AHCI SATA controller'
    class      = mass storage
    subclass   = SATA

But the drives are electrically down !

Using your u-boot (the one I compiled from your Github) I now have the drives electrically up :) but pciconf is not showing me the AHCI controller anymore !

In either way, I am unable to see the drives in /dev

Thanks
 
SleepWalker : I just tried and the drives are not detected. I am using 14.1 and using your u-boot and dtb.

That's my lsblk :
Code:
DEVICE         MAJ:MIN SIZE TYPE                                    LABEL MOUNT
flash/spi0       0:107  16M -                                           - -
mmcsd0           0:94   30G GPT                                         - -
  <FREE>         -:-    16M -                                           - -
  mmcsd0p1       0:104  50M efi                               msdosfs/EFI /boot/efi
  mmcsd0p2       0:105  27G freebsd-ufs                        ufs/rootfs /
  mmcsd0p3       0:110 3.0G freebsd-swap                label/growfs_swap -
  <FREE>         -:-   4.0M -                                           - -
mmcsd1           0:116  15G -                        diskid/DISK-3C705B0E -
mmcsd1boot0      0:117 4.0M -                                           - -
mmcsd1boot1      0:118 4.0M -                                           - -

My kenv :
Code:
hint.smbios.0.mem="0xf4ed8000"
smbios.bios.reldate="02/18/2024"
smbios.bios.vendor="U-Boot"
smbios.bios.version="2020.07"
smbios.chassis.maker="kobol"
smbios.chassis.type="Desktop"
smbios.planar.maker="kobol"
smbios.planar.product="helios64"
smbios.socket.enabled="1"
smbios.system.maker="kobol"
smbios.system.product="helios64"
smbios.system.serial="000100000436"
smbios.system.uuid="31303030-3030-3030-3034-333600000000"
smbios.version="3.0"

So I guess that u-boot is loaded correctly

My pciconf :
Code:
pcib1@pci0:0:0:0:       class=0x060400 rev=0x00 hdr=0x01 vendor=0x1d87 device=0x0100 subvendor=0x0000 subdevice=0x0000
    vendor     = 'Rockchip Electronics Co., Ltd'
    device     = 'RK3399 PCI Express Root Port'
    class      = bridge
    subclass   = PCI-PCI

Do I have to activate something in loader or so ?

Many thanks
 
Back
Top