Re: Sipeed Lichee RV (Allwinner D1)

From: Julien Cassette <julien.cassette_at_gmail.com>
Date: Thu, 03 Mar 2022 21:50:30 UTC
Le lun. 28 févr. 2022 à 18:48, Milan Obuch <freebsd-riscv@dino.sk> a écrit :
>
> On Mon, 28 Feb 2022 18:19:46 +0100
> Julien Cassette <julien.cassette@gmail.com> wrote:
>
> [ snip ]
>
> > Now the boot is failing while mouting the rootfs:
> >
> > Hit [Enter] to boot immediately, or any other key for command prompt.
> > Booting [/boot/kernel/kernel]...
> > Using DTB provided by EFI at 0x47ef6000.
> > Kernel entry at 0x56a0002e...
> > Kernel args: (null)
> > ---<<BOOT>>---
> > Copyright (c) 1992-2021 The FreeBSD Project.
> > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993,
> > 1994 The Regents of the University of California. All rights reserved.
> > FreeBSD is a registered trademark of The FreeBSD Foundation.
> > FreeBSD 13.0-RELEASE #0 releng/13.0-n244733-ea31abc261f: Fri Apr  9
> > 03:30:22 UTC 2021
> >     root@releng1.nyi.freebsd.org:/usr/obj/usr/src/riscv.riscv64/sys/GENERIC
> > riscv
> > FreeBSD clang version 11.0.1 (git@github.com:llvm/llvm-project.git
> > llvmorg-11.0.1-0-g43ff75f2c3fe)
> > SBI: OpenSBI v0.9
> > SBI Specification Version: 0.3
> > CPU(0): Unknown Implementer Unknown Processor
> > real memory  = 536870912 (512 MB)
> > avail memory = 507383808 (483 MB)
> > arc4random: WARNING: initial seeding bypassed the cryptographic random
> > device because it was not yet seeded and the knob
> > 'bypass_before_seeding' was enabled.
> > random: entropy device external interface
> > WARNING: Device "openfirm" is Giant locked and may be deleted before
> > FreeBSD 14.0.
> > ofwbus0: <Open Firmware Device Tree>
> > clk_fixed0: <Fixed clock> on ofwbus0
> > simplebus0: <Flattened device tree simple bus> on ofwbus0
> > timer0: <RISC-V Timer>
> > Timecounter "RISC-V Timecounter" frequency 24000000 Hz quality 1000
> > Event timer "RISC-V Eventtimer" frequency 24000000 Hz quality 1000
> > rcons0: <RISC-V console>
> > cpulist0: <Open Firmware CPU Group> on ofwbus0
> > cpu0: <Open Firmware CPU> on cpulist0
> > cryptosoft0: <software crypto>
> > Timecounters tick every 1.000 msec
> > Trying to mount root from ufs:/dev/ufs/rootfs [rw]...
> > mountroot: waiting for device /dev/ufs/rootfs...
> > Mounting from ufs:/dev/ufs/rootfs failed with error 19.
> >
> > The full boot log is here: https://pastebin.com/BVaqnRh9
> >
>
> Hi,
>
> I have zero knowledge about Allwinner D1, however your console log is
> really short, almost no devices here. As it is not possible to mount
> root this way (no device where any file system could reside on), it
> is possible to use memory filesystem (mfs) embedded in kernel for small
> root.
>
> Also, at 'mountroot>' prompt, try pressing '?' to get valid disk boot
> devices list, probably it is empty because lack of devices. Using mfs
> allows boot to multiuser with some minimal filesystem, which is
> important milestone when working on support for new system, in my eyes.
>
> Regards,
> Milan
>

Hi Milan and thanks for your help

> Also, at 'mountroot>' prompt, try pressing '?' to get valid disk boot
> devices list, probably it is empty because lack of devices.

Yes it is empty. I guess there is no MMC driver for the D1 right now.

> is possible to use memory filesystem (mfs) embedded in kernel for small
> root.

I have managed to boot from an mfs root containing /rescue and some symlinks.
I have got a shell prompt but then the D1 resets a few seconds after that.
The log is here: https://pastebin.com/HMCVaHFa

Regards,
Julien