BPI-F3:Booting u-boot - kernel etc

It is looking for a /boot/extlinux/extlinux.conf file. I left an example of one inside the precompiled u-boot archive I linked above. It appears you have BOOT partition, so on the BOOT partition create a dir “extlinux” and inside place the file “extlinux.conf”. Edit the file to fit your needs.

Well I can’t say I’m having any luck booting from NVME. I have started from scratch so many times but nothing yet.

I do have a few more questions. Does the root partition need to be labeled rootfs or does not matter? I noticed in your example for extlinux.conf you have root=UUID which I have also tried.

Right now my NVME has 2 partitions. Partition 1 is boot and partition 2 us root.

I also did out find something interesting. You know when you image bianbu to anything it creates partitions 1 through 4 and each is labeled. Whell instead if the traditional DD command with seek and bs I basically DD the 4 files to their respective partitions and a boot menu appears which is very interesting.

Also while investigating extlinux I found an app call u-boot-menu which sets all the menu options up for you, another interesting find.

Just wanted to let you know that. Franco

It doesn’t matter what the label is. You can actually use root=LABEL= in place of root=PARTUUID= if you prefer.

Yeap. SYSLINUX is basically like a low rent GRUB with very basic menu options.

As for the Bianbu and BPI images, I’ve only ever looked them over, I’ve never booted one before.

I did recently make some changes to my patching and added BOOT SCRIPT support to it. So if you understand boot.scr thats now an option.

Starting the controller
USB XHCI 1.10
scanning bus dwc3@c0a00000 for devices... 4 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found

Partition Map for NVMe device 0  --   Partition Type: DOS

Part	Start Sector	Num Sectors	UUID		Type
  1	204800    	843776    	7ffb5003-01	83
  2	1048576   	499068928 	7ffb5003-02	83
Autoboot in 0 seconds, press <Space> to stop
Loading ...
1642 bytes read in 15 ms (106.4 KiB/s)
## Executing script at 02000000
34006068 bytes read in 2084 ms (15.6 MiB/s)
101542 bytes read in 24 ms (4 MiB/s)
6319892 bytes read in 398 ms (15.1 MiB/s)
26 bytes read in 21 ms (1000 Bytes/s)
Loaded overlay.txt: k1-uart2 k1-qspi
Overlaying k1-uart2 ...
263 bytes read in 21 ms (11.7 KiB/s)
Overlaying k1-qspi ...
262 bytes read in 22 ms (10.7 KiB/s)
Booting BananaPi F3 from mmc 0:1 ...
Bad Linux RISCV Image magic!
Trying bootm ... 

## Loading kernel from FIT Image at 10000000 ...
   Using 'conf-default' configuration
   Verifying Hash Integrity ... OK
   Trying 'kernel' kernel subimage
     Description:  Linux 6.1.97
     Type:         Kernel Image
     Compression:  uncompressed
     Data Start:   0x100000bc
     Data Size:    34004480 Bytes = 32.4 MiB
     Architecture: RISC-V
     OS:           Linux
     Load Address: 0x01400000
     Entry Point:  0x01400000
     Hash algo:    crc32
     Hash value:   582f5d9d
   Verifying Hash Integrity ... crc32+ OK
## Flattened Device Tree blob at 31000000
   Booting using the fdt blob at 0x31000000
   Loading Kernel Image
   Loading Ramdisk to 76ead000, end 76ead106 ... OK
   Loading Device Tree to 0000000076e91000, end 0000000076eacfff ... OK

Starting kernel ...

Actually that’s where I get to as well. How long should I wait for the kernel to boot?

I’ve waited a bit.

Franco

You should see something happening after that right away, unless you have logging and whatnots off. Are you using a custom kernel or something?

Could try removing console=both from the extlinux cmdline and set logging to 7.

I’m actually watching the console. Have the debug cable connected with Minicom. In this example I am loading a custom kernel but I’ve tried loading the default.

root=PARTLABEL=

Works very well

I found out so much information about tools and apps when looking things up, like the u-boot-menu app and the file that can be generated even before you get to u-boot. I’ve been reading so much on the way it boots that I’ve discovered a lot.

I try to update my github with that info too. I’m sure someone might be interested in it.

Franco

Well I can’t say it’s going well, I have no idea what I am doing wrong. It’s booting and stopping at Loading kernel and just stays there.

I have Bianbu installed to the m.2 does it matter what’s installed there? Your emmc is not being used, neither is mine as I am only booting from SD card.

I’ve ordered a Sipeed Lichee Book 4A with 16gigs of RAM. So once I get it that will be my main risc machine.

Franco

Just in general, for any kernel. I do not use riscv (yet).

Partlabel is from gpt and known without mounting.

Label is from the filesystem on the partition.

Hey Patrick,

I’m interested in learning more about extlinux. I installed debian but I don’t see it when I search the apt-cache. Did you install it from source?

Thanks Franco

Debian ARM/RISCV or X86_64?

In a sane u-boot world extlinux is supported out of the box. You only need to create the dir and file.

https://packages.debian.org/search?keywords=syslinux

EDIT: Just to be clear I’ve never installed that syslinux package. I manually create it or use scripting.

Well on some good news I finally got Ubuntu 24.04 booted on my board.

I’m writing the docs on it not but basically I change the initrd file and chroot to the ubuntu root which continues to boot from the NVME.

I have a copy of the init file on my GitHub in the files directory. I also have my scripts that compresses and decompresses the initrd file so you don’t need to do that manually.

The short story is I downloaded Ubuntu 24.04 preinstalled server Risc image from Ubuntu. I started by imaging bianbu to an SD card. Then copied the initrd from it to my machine so I could edit it.

Once edited I put it back on the SD. It just works, I think it can boot any version of linux you want using this method. The only thing you need to do is identify which partition of your NVME is root and then put that value in the initrd. it’s that simple.

The system boots from SD card, scans for devices so it can see the NVME, mounts the NVME and chroots the root directory. When I’m up and running I only see the NVME, which is good because that’s all I want to see.

Let me know if you have any questions. Franco

https://i.imgur.com/s9crx20.png