Boot failing mipi_09p: disabling with sdcard.img built from Starfive GitHub

I’m new to the VisionFive 2 as well as embedded devices though I have quite a bit of experience with computer programming. I’m just now learning how to build a Linux kernel and a bootable image. I don’t know anything about U-Boot or firmware downloads or a Linux boot sequence for an embedded device.

I have a VisionFive 2 1.2A board that boots from a 64 GB SD card fine when I use the 202310 Debian OS downloaded from the StarFive drive.

I have been working with this device for several weeks now with my experience captured in the following article, Setting Up a New VisionFive 2 RISC-V SBC.

I’m now experimenting with building an image for the VisionFive 2 and the image is not booting from the 32 GB SD card the way that the official build image does.

The last line is “mipi_09p: disabling” and the boot seems to hang at that point.

I’m pulling the source code from the StarFive VisionFive2 Git repository and following the procedure as outlined in the README.md file. I’m using a processor count of 10 in the following as I have an Intel i5 with 12 processors according to Linux.

make -j10
make buildroot_rootfs -j10
make img

I’ve been wrestling with a number of problems before finally getting to the point where an sdcard.img file was created without seeing any errors.

My worst problem appears to have been the result of a copy paste error when installing the necessary packages for cross compiling the source with Ubuntu on an x86 PC using Windows Subsystem for Linux under Microsoft Windows 10. However there was also the error when I did not have Git LFS installed. I have addressed both of these errors and am now able to do what appears to be a complete image build from the source.

I found a post in this forums from someone having a similar problem, Boot Stuck at mipi_0p9 disabling, but did not see any kind of answer or resolution.

From some posts, it appears that some people have had a problem with firmware that needed to be upgraded however in the boot text displayed on my HDMI 1920x1080 monitor, it appears there is a firmware download being done. There are a number of messages of “[ecrnx] firmware downloading” followed by a percentage that counts up to 100%. The last few lines of this say:

[ecrns] firmware downloading 100%
random: crng init done
random 7 urandom warning(s) missed due to ratelimiting
dl-fw ack fail, magic: 165
firmware download successfully!

What other information can I provide that will be able to help someone point me in the right direction to resolve this?

After the log of mipi_09p,it will be login screen.
What did the serial port show and how long did you wait when this log happen?

@kira I have left it for several hours with nothing further happening. Most of the time I’ve waited for about 5 to 10 minutes. What is this step doing and how long should I wait?

By serial port do you mean using a TTY to USB adapter connected to pins 6/8/10? Is there a different method of being able to see boot information?

I have a TTY to USB adapter however with my Windows 10 laptop, Device Manager says it’s an unknown device that is not responding correctly.

That sounds like the chip in the device is not responding with the appropriate information for Windows to find a device driver. I think I have installed the two drivers that I have come across, PL2303 and CP2110x, which are used with these TTY to USB adapters. I plan to purchase a different cable but until then, no serial.

The actual error when I plug in the USB of the TTY to USB adapter in Device Manager:

Windows has stopped this device because it has reported problems. (Code 43)

A request for the USB device descriptor failed.

This is the information the Properties → Events dialog

Device USB\VID_0000&PID_0002\5&3934238d&0&3 had a problem starting.

Driver Name: usb.inf
Class Guid: {36fc9e60-c465-11cf-8056-444553540000}
Service:
Lower Filters:
Upper Filters:
Problem: 0x2B
Problem Status: 0x0

You should see boot messages within 5 seconds when the UART is configured correctly.

1 Like

Please boot Linux instead. It supports every relevant usb-to-ttl chip and the open source drivers do not care whether they’re “authentic”.

2 Likes

@ganboing and @rvalles thank you for your posts. I’m currently out of town and will return tomorrow, Sunday, at which time I should be able to connect up with a Linux box with the TTY USB adapter and try to establish a UART connection to allow me to see the boot messages.

Once I have something, I will post the logs.

About how to use a usb serial port that you can refer to this link.
Using a USB to Serial Converter (rvspace.org)

1 Like

@kira thank you for the helpful document about connecting the TTY to USB adapter. One issue I ran into is that my adapter does not appear to have the pinout labeled. However I found an article for the Raspberry Pi that described connecting the black, white, and green wires to pins 6, 8, and 10 while leaving the red wire unconnected and that works.

I’m using this on a Lubuntu tablet per the suggestion of @rvalles and it seems to see the USB to TTL chip fine creating /dev/ttyUSB0. I’m using gtkterm instead of minicom, connecting to /dev/ttyUSB0 at 115200 with N, 8, 1 and Xon/Xoff handshaking.

I have a log file of the text coming across the TTY when booting with the SD card image I created from a build of the VisionFive 2 Linux repository.

What would you like for me to do with it?

ganboing the last thing I see on the TTY screen is the last thing I see on the display monitor and I do not see any kind of a login prompt.

Well how about that. I walked back to the Linux box and the gtkterm session which was displaying the line of mipi_0p9: Disabling just like on the monitor. Just for grins, I pressed the enter key on the keyboard and a login prompt appeared:

Welcome to Buildroot
buildroot login:

What do I do now?

Enter user name and password,then you can login
root
starfive

1 Like

@kira I signed in through the TTY interface and took a quick look around. Things look reasonable.

It looks like that in order to have the graphical interface that I normally expect, I need to change the run level in the file /etc/init from what is currently 3 to 5?

What I’d like to see is a normal graphical desktop that appears on the display plugged into the HDMI port of the VisionFive 2 and that I can use with a mouse and keyboard plugged into the USB ports of the VisionFive 2. This graphical desktop would present a login prompt and I could then launch programs such as Gimp and use them without using the TTY interface through a second terminal.

I’m looking at this document, Introduction to Linux → 4.2. Boot process, Init and shutdown.

The first thing that I have done is to enlarge the partition using the TTY CLI from the small size of the image, some 500 MB, to the size of the 32 GB microSD card that I’m using, 31000 MB.

I used the parted command to increase the partition size of partition 4 and then used the resize2fs command to extend the file space into the new area of partition 4.

So correct me if I’m wrong, but I should be able to change the run level in /etc/inittab from 3 to 5 and then reboot and I should have a standard graphical desktop?

Do I need to add the user user account or does it already exist?

Are there any other actions I need to do before changing the run level? Perhaps additional packages to install using apt?

Thank you and everyone else for your assistance.

1.will it show a graphical desktop, if you use the image of debian 202310?
StarFiveTech
2. i don`t konw, what image you have build? if you want some guide, this link may help you?
Building StarFive Debian image | RVspace

3 Likes

HDMI and GPU drivers are currently not mainlined…perhaps that image is built without them?

1 Like

Yes, my VisionFive 2 does boot up with a graphical desktop when I use the Debian 202310 image. The desktop appears on the HDMI display plugged into the board and the mouse and keyboard plugged into the board’s USB ports work. I can sign in with the account of user and can use the applications such as Gimp and FireFox.

I’ll take a look at the Building document you provided a link to. Thank you for that.

@Nightwulf I’m fairly sure the GPU drivers are in the image. The GPU drivers are downloaded as blobs since they are Third Party using Git Large File System and included in the build.

How can I double check for both HDMI and GPU drivers?

@kira I tried changing the run level in /etc/inittab from 3 to 5 and rebooting however there was no change and the graphical desktop still did not appear. That change is supposed to enable X11 however I suppose there is some additional thing that needs to be added to a configuration file somewhere to load in the additional software that provides the graphical desktop through the board connectors of HDMI and USB.

1 Like

HDMI is a kernel patch which is not 3rd party.
If HDMI is detected by the kernel, you could check it in the sysfs:

[totto@archvf2 ~]$ cat /sys/bus/platform/devices/29590000.hdmi/power/runtime_status 
active

1 Like

Wrestling with this build a bit, it appears that this image is little more than the Linux kernel and BusyBox.

Looking at the document that @kira provided the link to, it appears there are additional steps I need to take in order to pull all the necessary bits into the image build environment in order to create a proper image.

I will need a couple of days to read and try out things. I will post a reply into this thread as to my results.

However the immediate question as to what was happening with what appears to be the boot failing has been answered. The boot was not failing, I just needed to have TTY connection in order to sign in because the image I have generated appears to be nothing more than the Linux kernal and Busybox. All of the other components for WiFi, desktop, SSH, etc. are not in this image.

Thank you all for your help and taking the time to provide me assistance. Any new question will be as a new post.

2 Likes

@rickchambers sorry, I owe you the answer on your question for the GPU part. To verify, the driver is loaded, you can check:

[root@archvf2 totto]# cat /sys/kernel/debug/pvr/status 
Driver Status:   OK

Device ID: 0:128
Firmware Status: OK
Server Errors:   0
HWR Event Count: 0
CRR Event Count: 0
SLR Event Count: 0
WGP Error Count: 0
TRP Error Count: 0
FWF Event Count: 0
APM Event Count: 1
GPU Utilisation: 0%
                    VM0
2D    Utilisation:   0% 
GEOM  Utilisation:   0% 
3D    Utilisation:   0% 
CDM   Utilisation:   0% 
RAY   Utilisation:   0% 
GEOM2 Utilisation:   0% 

This of course only works, if kernel debug messages via sysfs are enabled.
If not, you could check that as follows:

[root@archvf2 totto]# ls /sys/devices/platform/soc/18000000.gpu/driver/18000000.gpu/drm/
card0  controlD64  renderD128

@Nightwulf it looks like kernel debug messages are not enabled however when I checked with the ls on the directory path, those files and directories were in the drm folder. So it looks like the GPU is installed.

When I did the cat on the HDMI runtime_status, it displayed active.

@kira I’m working with the two links you provided and it looks like the StarFiveTech link leads to where I pulled the 202310 Debian image I’m using with a different microSD card to use my VisionFive 2 for applications.

It looks like there is an installation script that automates adding additional packages such as chromium, libre office, etc. I was not aware of that script so it’s something for me to investigate.

Looking over the Building Debian image guide, that is kind of intimidating. Some of it looks familiar to what I have done to build the Linux kernel and generate the microSD card image. But there seems to be more to it which I suppose is adding the additional pieces that provide the full graphical desktop and WiFi drivers, etc. in order to boot and run similar to the 202310 Debian image that I have on another microSD card.

I think that somewhere in the guide is the information that tells me how to add the bits I’m missing to fully replicate the 202310 Debian image.

Thank you both.

Are you trying to make an image of the Xorg UI?
Could you provide the details of your compilation procedure?

@kira I’m following the procedure specified in the README.md document of the VisionFive2 repository from StarFive at URL GitHub - starfive-tech/VisionFive2

The procedure in that document has similarities to some of the steps in the document you referenced, Building StarFive Debian image | RVspace

I think that the README.md procedure has various automated steps that replicate some of the manual steps in the document you provided. It also appears that there are steps in the procedure you referenced that are not in the README.md file such as the Copy applications step.

Doing a bit more reading, the StarFive VisionFive2 repository contains source as well as links to source and Third Party binary blobs that as part of the image build process are pulled down, compiled, and inserted into the proper place within a file hierarchy so that it can then be combined into an image.

The repository uses the Buildroot tool “that simplifies and automates the process of building a complete Linux system for an embedded system, using cross-compilation.” See The Buildroot user manual which is the online manual for Buildroot.

The steps mentioned the README file in the buildroot directory of the VisionFive2 repository, GitHub - starfive-tech/buildroot at 22fc8eafe3c9daea42f2cc4be37731fd7b5171d9, are to:

To build and use the buildroot stuff, do the following:

  1. run ‘make menuconfig’
  2. select the target architecture and the packages you wish to compile
  3. run ‘make’
  4. wait while it compiles
  5. find the kernel, bootloader, root filesystem, etc. in output/images

I suppose the menuconfig step allows you to specify the various bits including the desktop, WiFi module, etc.