Debian on Sipeed Lichee RV86

179 views
Skip to first unread message

Bram Stolk

unread,
May 21, 2022, 5:53:52 AM5/21/22
to linux-sunxi
Hi,

I have a Sipeed Lichee RV86 panel.
It basically adds a screen/ethernet/wifi for the Lichee RV compute module (riscv64).

I created an SDCARD using OpenixCard tool and the manufacturer's image: LicheeRV_Debian_86_480p.img

I'm pretty happy with the result. It's pretty nice to have a straightforward linear framebuffer.
So I decided to remove all X11 stuff, and keep it as CLI with framebuffer.


Currently, I am trying to find out what is involved when I want to upgrade the kernel.

I understand it uses U-BOOT.

I am not sure where U-BOOT gets the kernel image from?

mmcblk0     179:0    0   15G  0 disk
├─mmcblk0p1 179:1    0  3.9M  0 part
├─mmcblk0p2 179:2    0  252K  0 part
├─mmcblk0p3 179:3    0  252K  0 part
├─mmcblk0p4 179:4    0 10.1M  0 part
├─mmcblk0p5 179:5    0  504K  0 part
├─mmcblk0p6 179:6    0 13.8M  0 part
└─mmcblk0p7 179:7    0    8G  0 part /

I don't see kernel images in the root filesystem.

I am able to mount mmcblk0p1 but that fs just contains:
bootlogo.bmp
magic.bin

Does the U-BOOT and kernel reside on the SOC maybe? Or is it on the SDCARD as well?

I also tried holding down the "FEL" key when powering up to enter a "DOWNLOAD" mode.
When I do that, I indeed do not get boot output on the serial port. But nothing else shows up on serial. I get no U-BOOT prompt, which I was expecting?

Thanks.



Samuel Holland

unread,
May 24, 2022, 1:52:45 PM5/24/22
to b.s...@gmail.com, linux-sunxi
Hi,

On 5/19/22 5:09 PM, Bram Stolk wrote:
> Hi,
>
> I have a Sipeed Lichee RV86 <https://linux-sunxi.org/Sipeed_Lichee_RV> panel.
> It basically adds a screen/ethernet/wifi for the Lichee RV compute module (riscv64).
>
> I created an SDCARD using OpenixCard <https://github.com/YuzukiTsuru/OpenixCard>
> tool and the manufacturer's image: *LicheeRV_Debian_86_480p.img*
>
> I'm pretty happy with the result. It's pretty nice to have a straightforward
> linear framebuffer.
> So I decided to remove all X11 stuff, and keep it as CLI with framebuffer.
>
>
> Currently, I am trying to find out what is involved when I want to upgrade the
> kernel.

You can upgrade to the mainline-based U-Boot and kernel by following the
instructions here:

https://linux-sunxi.org/Allwinner_Nezha#Manual_build

The only adjustment you need to make is selecting the right devicetree for your
board. You can do that by using `lichee_rv_86_panel_defconfig` instead of
`nezha_defconfig` when building U-Boot.

One thing to note is that mainline Linux does not yet support the LCD panel used
in the Sipeed Lichee RV 86 Panel. The display engine is supported, and I ported
over the panel driver, but for some reason it doesn't work, and I have not
debugged it. So if you switch now, you will lose your display output. (Or this
is an opportunity if you want to help get the panel working on mainline.)

> I understand it uses U-BOOT.
>
> I am not sure where U-BOOT gets the kernel image from?
>
> mmcblk0     179:0    0   15G  0 disk
> ├─mmcblk0p1 179:1    0  3.9M  0 part
> ├─mmcblk0p2 179:2    0  252K  0 part
> ├─mmcblk0p3 179:3    0  252K  0 part
> ├─mmcblk0p4 179:4    0 10.1M  0 part
> ├─mmcblk0p5 179:5    0  504K  0 part
> ├─mmcblk0p6 179:6    0 13.8M  0 part
> └─mmcblk0p7 179:7    0    8G  0 part /
>
> I don't see kernel images in the root filesystem.

Allwinner's downstream BSP U-Boot uses the Android boot flow, so one of those
partitions is an Android boot.img (no filesystem, just the boot.img file written
to the block device). Based on the partition sizes, I am guessing that one or
both of mmcblk0p4 or mmcblk0p6 are boot.img partitions.

Upstream U-Boot loads the kernel from a filesystem, as you would expect.

> I am able to mount mmcblk0p1 but that fs just contains:
> bootlogo.bmp
> magic.bin
>
> Does the U-BOOT and kernel reside on the SOC maybe? Or is it on the SDCARD as well?

U-Boot is on the SD card as well, at specific offsets/sector numbers from the
beginning of the card (sector 16, 256, 24576, or 32800). See the wiki page for
more explanation.

> I also tried holding down the "FEL" key when powering up to enter a "DOWNLOAD" mode.
> When I do that, I indeed do not get boot output on the serial port. But nothing
> else shows up on serial. I get no U-BOOT prompt, which I was expecting?

FEL mode is very minimal and does not itself touch the serial port. It only
communicates over USB. Generally, the way to use FEL is to use it to download
and execute U-Boot. Then you can interact with U-Boot over the serial console.

Regards,
Samuel

Bram Stolk

unread,
May 24, 2022, 7:23:07 PM5/24/22
to Samuel Holland, linux-sunxi
Thanks. This is all very useful information.
I will attempt a build!
I take it that Ethernet does work with a mainline build?
--
Owner/Director of Game Studio Abraham Stolk Inc.
Vancouver BC, Canada

Samuel Holland

unread,
May 24, 2022, 7:35:34 PM5/24/22
to Bram Stolk, linux-sunxi
On 5/24/22 6:22 PM, Bram Stolk wrote:
> Thanks. This is all very useful information.
> I will attempt a build!
> I take it that Ethernet does work with a mainline build?

Yes, Ethernet works fine on the mainline-based branch. The upstream driver did
not even need any changes for D1 support.

Regards,
Samuel
> b.s...@gmail.com <mailto:b.s...@gmail.com>
>

Bram Stolk

unread,
May 24, 2022, 8:45:56 PM5/24/22
to Samuel Holland, linux-sunxi
Thanks.
5.2GB... oof!

But it is not clear to me where I get a kernel configuration from?

Do I just use the src/linux/arch/riscv/configs/defconfig file?
Does that one have everything the rv86 needs?




Samuel Holland

unread,
May 24, 2022, 8:53:55 PM5/24/22
to Bram Stolk, linux-sunxi
On 5/24/22 7:45 PM, Bram Stolk wrote:
> Thanks.
> So I cloned https://github.com/smaeul/linux/commits/riscv/d1-wip
> 5.2GB... oof!
>
> But it is not clear to me where I get a kernel configuration from?
>
> Do I just use the src/linux/arch/riscv/configs/defconfig file?
> Does that one have everything the rv86 needs?

The top commit there adds arch/riscv/configs/nezha_defconfig, which has most if
not all of the relevant drivers enabled. So you can start with:

make ARCH=riscv nezha_defconfig

and adjust options from there. (This is by no means an "official" configuration.
It is just the one I happen to use for testing.)

Regards,
Samuel

> On Tue, May 24, 2022 at 4:35 PM Samuel Holland <sam...@sholland.org
> <mailto:sam...@sholland.org>> wrote:
>
> On 5/24/22 6:22 PM, Bram Stolk wrote:
> > Thanks. This is all very useful information.
> > I will attempt a build!
> > I take it that Ethernet does work with a mainline build?
>
> Yes, Ethernet works fine on the mainline-based branch. The upstream driver did
> not even need any changes for D1 support.
>
> Regards,
> Samuel
>
> > On Tue, May 24, 2022 at 10:52 AM Samuel Holland <sam...@sholland.org
> <mailto:sam...@sholland.org>
> > b.s...@gmail.com <mailto:b.s...@gmail.com> <mailto:b.s...@gmail.com
> <mailto:b.s...@gmail.com>>
> >
>
>
>
> --
> Owner/Director of Game Studio Abraham Stolk Inc.
> Vancouver BC, Canada
> b.s...@gmail.com <mailto:b.s...@gmail.com>
>

Bram Stolk

unread,
May 25, 2022, 1:36:08 PM5/25/22
to Samuel Holland, linux-sunxi
My apologies, I had the master branch checkout out, not yours. I see the config file now.

>an opportunity if you want to help get the panel working on mainline.

I'll give it a shot. So it is the framebuffer device that broke, not the touch input, I assume?

The driver for that, is that CONFIG_VIDEO_SUNXI_CEDRUS or should I look somewhere else for that?

(I plan to use my RV86 with /dev/fb0 btw, not planning to put X on top of that.)


Reply all
Reply to author
Forward
0 new messages