ROC-RK3399-PC (Renegade Elite)


Recommended Posts

2 hours ago, balbes150 said:

u-boot works correctly and the system is started using extlinux.conf. 

See the output

 

 

 

Remove this from the settings

 

root=/dev/mmcblk1p2

rootfstype=vfat console=uart8250,mmio32,0xff1a0000

 

And show the full contents of the "extlinux.conf" file

 

What exactly image (full image name) are you trying to run, what steps are you doing ?

 

Thank you balbes150

This is the output from u-boot

 

Spoiler


U-Boot SPL 2021.01-rc4 (Dec 31 2020 - 11:50:40 +0000)
Loading Environment from SPIFlash... OK
Trying to boot from SPI
cannot find image node 'atf_1': -1


U-Boot 2021.01-rc4 (Dec 31 2020 - 11:50:40 +0000)

SoC: Rockchip rk3399
Reset cause: POR                                                                
Model: Firefly ROC-RK3399-PC Mezzanine Board                                    
DRAM:  3.9 GiB                                                                  
PMIC:  RK808                                                                    
MMC:   mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0                      
Loading Environment from SPIFlash... SF: Detected w25q128 with page size 256 ByB
OK                                                                              
In:    serial                                                                   
Out:   serial                                                                   
Err:   serial                                                                   
Model: Firefly ROC-RK3399-PC Mezzanine Board                                    
Net:                                                                            
Error: ethernet@fe300000 address not set.                                       
No ethernet found.                                                              
                                                                                
Hit any key to stop autoboot:  0                                                
switch to partitions #0, OK                                                     
mmc1 is current device                                                          
Scanning mmc 1:1...                                                             
Found /extlinux/extlinux.conf                                                   
Retrieving file: /extlinux/extlinux.conf                                        
1438 bytes read in 5 ms (280.3 KiB/s)                                           
1:      Armbian                                                                 
Retrieving file: /uInitrd                                                       
9546946 bytes read in 410 ms (22.2 MiB/s)                                       
Retrieving file: /zImage                                                        
28162560 bytes read in 1198 ms (22.4 MiB/s)                                     
append: root=LABEL=ROOTFS rootflags=data=writeback rootwait rw console=tty0 no_0
Retrieving file: /dtb/rockchip/rk3399-roc-pc-mezzanine.dtb                      
58060 bytes read in 9 ms (6.2 MiB/s)                                            
Moving Image from 0x2080000 to 0x2200000, end=3dd0000                           
## Loading init Ramdisk from Legacy Image at 06000000 ...                       
   Image Name:   uInitrd                                                        
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)                  
   Data Size:    9546882 Bytes = 9.1 MiB                                        
   Load Address: 00000000                                                       
   Entry Point:  00000000                                                       
   Verifying Checksum ... OK                                                    
## Flattened Device Tree blob at 01f00000                                       
   Booting using the fdt blob at 0x1f00000                                      
   Loading Ramdisk to f1602000, end f1f1cc82 ... OK                             
   Loading Device Tree to 00000000f15f0000, end 00000000f16012cb ... OK         
                                                                                
Starting kernel ...

 

And this is extlinux.conf

 

Spoiler

LABEL Armbian
LINUX /zImage
INITRD /uInitrd
#LINUX  /Image
#INITRD /Initrd

# rk-3399
#FDT /dtb/rockchip/rk3399-rock-pi-4b.dtb
#FDT /dtb/rockchip/rk3399-nanopc-t4.dtb
FDT /dtb/rockchip/rk3399-roc-pc-mezzanine.dtb
APPEND root=LABEL=ROOTFS rootflags=data=writeback rootwait rw console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0
#append earlycon=uart8250,mmio32,0xff1a0000 console=tty0 console=ttyS2,1500000 swiotlb=1 root=/dev/mmcblk1p1 rootwait rw rootfstype=vfat init=/sbin/init
#APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=uart8250,mmio32,0xff1a0000 console=tty0 no_console_suspend consoleblank=0 loglevel=7 fsck.fix=yes fsck.repair=yes net.ifnames=0

# rk-3328
#FDT /dtb/rockchip/rk3328-roc-pc.dtb
#FDT /dtb/rockchip/rk3328-box-trn9.dtb
#FDT /dtb/rockchip/rk3328-box.dtb
#APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=uart8250,mmio32,0xff130000 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0

# aw h6
#FDT /dtb/allwinner/sun50i-h6-tanix-tx6.dtb
#APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=ttyS0,115200 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 video=HDMI-A-1:e
#APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=ttyS0,115200 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0 mem=2048M video=HDMI-A-1:e

 

The image is - Armbian_20.11_Arm-64_focal_current_5.10.0-rc4.img

 

ps. Have not studied extlinux yet https://wiki.syslinux.org/wiki/index.php?title=EXTLINUX

 

 

 

 

Link to post
Share on other sites
Donate and support the project!

16 минут назад, denni_isl сказал:

This is the output from u-boot

In this log, everything is fine, u-boot has performed its task correctly, and the kernel is running. What is the problem?

 

17 минут назад, denni_isl сказал:

And this is extlinux.conf

The content is correct, but you can simplify and remove what is not needed (not used) and leave only this

 

 

LABEL Armbian
LINUX /zImage
INITRD /uInitrd
FDT /dtb/rockchip/rk3399-roc-pc-mezzanine.dtb
APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=uart8250,mmio32,0xff1a0000 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0

Link to post
Share on other sites
20 minutes ago, balbes150 said:

In this log, everything is fine, u-boot has performed its task correctly, and the kernel is running. What is the problem?

 

The content is correct, but you can simplify and remove what is not needed (not used) and leave only this

 

 

LABEL Armbian
LINUX /zImage
INITRD /uInitrd
FDT /dtb/rockchip/rk3399-roc-pc-mezzanine.dtb
APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=uart8250,mmio32,0xff1a0000 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0

 

It is still the same u-boot messages.  When booting the roc-rk3399-pc-plus board, there is immediately red light and this message;

 

Quote

Trying to boot from SPI                                                         
cannot find image node 'atf_1': -1

 

Maybe related to this issue from here https://github.com/OE4T/meta-tegra/issues/502

 

commented on Nov 24, 2020

@om26er fwiw, I have an overlay that puts a file in /boot/extlinux/extlinux.conf. As @madisongh mentioned cboot's handling of ext4 is pretty primitive so if you go this route in your do_install you'll want something like the below so cboot can read it ok

dd if=/dev/zero of=./extlinux.conf bs=1 count=1 seek=4095 status=none

 

?

 

Link to post
Share on other sites
1 minute ago, balbes150 said:

The error message can be ignored, u-boot starts the kernel correctly.

 

Somehow the kernel hangs on -

Starting kernel ...                                                           

Link to post
Share on other sites
3 минуты назад, denni_isl сказал:

Somehow the kernel hangs on -

Starting kernel ...    

The kernel does not hang, but works. Enable the full output log and you will see where the stop occurs. How long do you wait for the system to start (HDMI connected)?

Link to post
Share on other sites
22 minutes ago, balbes150 said:

The kernel does not hang, but works. Enable the full output log and you will see where the stop occurs. How long do you wait for the system to start (HDMI connected)?

 

The HDMI output hangs at Starting the kernel....  And the indication light is constant red. 

How does one make the output more verbose in extlinux - can not see it here https://wiki.syslinux.org/wiki/index.php?title=Config ?

Link to post
Share on other sites
20 минут назад, denni_isl сказал:

How does one make the output more verbose in extlinux

You need to find the right parameters for your model.

 

APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=uart8250,mmio32,0xff1a0000 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes

net.ifnames=0

 

What exactly is your model, is there a link ?

Link to post
Share on other sites
39 minutes ago, denni_isl said:

 

The HDMI output hangs at Starting the kernel....  And the indication light is constant red. 

How does one make the output more verbose in extlinux - can not see it here https://wiki.syslinux.org/wiki/index.php?title=Config ?

Did you checked ssh? Could be something like this:

I have similar issue, and ssh works for me, and even Xorg works.

Link to post
Share on other sites
16 minutes ago, balbes150 said:

You need to find the right parameters for your model.

 

APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=uart8250,mmio32,0xff1a0000 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes

net.ifnames=0

 

What exactly is your model, is there a link ?

 

Taking out ,0xff1a0000 did get the kernel further,  now it stops at the yellow screen.   The model is roc-rk3399-pc-plus (en.t-firefly.com).

Link to post
Share on other sites
22 minutes ago, balbes150 said:

You need to find the right parameters for your model.

 

APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=uart8250,mmio32,0xff1a0000 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes

net.ifnames=0

 

What exactly is your model, is there a link ?

 

Taking out ,0xff1a0000 did get the kernel further,  now it stops at the yellow screen (still the red indication light).   The model is roc-rk3399-pc-plus (en.t-firefly.com).

Link to post
Share on other sites
15 minutes ago, balbes150 said:

Show the UART log

 

Spoiler

                                                                       

                                                                                                  
                                                                                                    

CTRL-A Z for help | 1500000 8N1 | NOR | Minicom 2.7.1 | VT102 | Online 2:41 | ttyUSB0                                               
steini@odroidn2:~$ sudo minicom -D /dev/ttyUSB0
[sudo] password for steini:

Welcome to minicom 2.7.1

OPTIONS: I18n
Compiled on Dec 23 2019, 02:06:26.
Port /dev/ttyUSB0, 12:55:52

Press CTRL-A Z for help on special keys


U-Boot TPL 2021.01-rc4 (Dec 31 2020 - 11:50:40)
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2021.01-rc4 (Dec 31 2020 - 11:50:40 +0000)
Loading Environment from SPIFlash... OK
Trying to boot from SPI
cannot find image node 'atf_1': -1


U-Boot 2021.01-rc4 (Dec 31 2020 - 11:50:40 +0000)

SoC: Rockchip rk3399
Reset cause: POR                                                                                                                     
Model: Firefly ROC-RK3399-PC Mezzanine Board                                                                                         
DRAM:  3.9 GiB                                                                                                                       
PMIC:  RK808                                                                                                                         
MMC:   mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0                                                                           
Loading Environment from SPIFlash... SF: Detected w25q128 with page size 256 Bytes, erase size 4 KiB, total 16 MiB                   
OK                                                                                                                                   
In:    serial                                                                                                                        
Out:   vidconsole                                                                                                                    
Err:   vidconsole                                                                                                                    
Model: Firefly ROC-RK3399-PC Mezzanine Board                                                                                         
Net:                                                                                                                                 
Error: ethernet@fe300000 address not set.                                                                                            
No ethernet found.                                                                                                                   
                                                                                                                                     
Hit any key to stop autoboot:  0                                                                                                     
switch to partitions #0, OK                                                                                                          
mmc1 is current device                                                                                                               
Scanning mmc 1:1...                                                                                                                  
Found /extlinux/extlinux.conf                                                                                                        
Retrieving file: /extlinux/extlinux.conf                                                                                             
258 bytes read in 5 ms (49.8 KiB/s)                                                                                                  
1:      Armbian                                                                                                                      
Retrieving file: /uInitrd                                                                                                            
9546946 bytes read in 410 ms (22.2 MiB/s)                                                                                            
Retrieving file: /zImage                                                                                                             
28162560 bytes read in 1198 ms (22.4 MiB/s)                                                                                          
append: root=LABEL=ROOTFS rootflags=data=writeback rw console=uart8250,mmio32 console=tty0 no_console_suspend consoleblank=0 fsck.fi
Retrieving file: /dtb/rockchip/rk3399-roc-pc-mezzanine.dtb                                                                           
58060 bytes read in 8 ms (6.9 MiB/s)                                                                                                 
Moving Image from 0x2080000 to 0x2200000, end=3dd0000                                                                                
## Loading init Ramdisk from Legacy Image at 06000000 ...                                                                            
   Image Name:   uInitrd                                                                                                             
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)                                                                       
   Data Size:    9546882 Bytes = 9.1 MiB                                                                                             
   Load Address: 00000000                                                                                                            
   Entry Point:  00000000                                                                                                            
   Verifying Checksum ... OK                                                                                                         
## Flattened Device Tree blob at 01f00000                                                                                            
   Booting using the fdt blob at 0x1f00000                                                                                           
   Loading Ramdisk to f1602000, end f1f1cc82 ... OK                                                                                  
   Loading Device Tree to 00000000f15f0000, end 00000000f16012cb ... OK                                                              
                                                                                                                                     
Starting kernel ...                                                                                                                  
                                                                                                                                     


CTRL-A Z for help | 1500000 8N1 | NOR | Minicom 2.7.1 | VT102 | Online 0:0 | ttyUSB0                                                                                                          

 

Link to post
Share on other sites
1 minute ago, balbes150 said:

Have you removed this parameter and not replaced it with anything ? Show the contents of extlinux.conf

 

Quote

LABEL Armbian
LINUX /zImage
INITRD /uInitrd
FDT /dtb/rockchip/rk3399-roc-pc-mezzanine.dtb
APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=uart8250,mmio32 console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0

 

Link to post
Share on other sites
19 minutes ago, balbes150 said:

Is this your model ?

http://wiki.t-firefly.com/en/ROC-RK3399-PC-PLUS/debug.html

 

I wrote about changing the value. If you delete a parameter, then you need to delete it all. console=uart8250,mmio32,0xff1a0000

 

 

Yes, this is the board.   

 

Did try bot suggestions balbes150 and PanzerKnacker

 

Quote

LABEL Armbian
LINUX /zImage
INITRD /uInitrd
#
# earlycon=uart8250,mmio32,0xff1a0000 console=tty1 console=ttyS2,1500000

FDT /dtb/rockchip/rk3399-roc-pc-mezzanine.dtb
APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0

 

Can not see it on the network with sudo nmap -sn 192.168.1.0/24

 

Link to post
Share on other sites
4 минуты назад, denni_isl сказал:

Did try bot suggestions

APPEND root=LABEL=ROOTFS rootflags=data=writeback rw earlycon=uart8250,mmio32,0xff1a0000 console=tty1 console=ttyS2,1500000 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0

Link to post
Share on other sites
19 minutes ago, balbes150 said:

APPEND root=LABEL=ROOTFS rootflags=data=writeback rw earlycon=uart8250,mmio32,0xff1a0000 console=tty1 console=ttyS2,1500000 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0

 

Quote

1:      Armbian                                                                                                                      
Retrieving file: /uInitrd                                                                                                            
9546946 bytes read in 410 ms (22.2 MiB/s)                                                                                            
Retrieving file: /zImage                                                                                                             
28162560 bytes read in 1199 ms (22.4 MiB/s)                                                                                          
append: root=LABEL=ROOTFS rootflags=data=writeback rw earlycon=uart8250,mmio32,0xff1a0000 console=tty1 console=ttyS2,1500000 no_cons
Retrieving file: /dtb/rockchip/rk3399-roc-pc-mezzanine.dtb                                                                           
Failed to load '/dtb/rockchip/rk3399-roc-pc-mezzanine.dtb '                                                                          
Skipping Armbian for failure retrieving fdt                                                                                          
SCRIPT FAILED: continuing...                                                                                                         
58060 bytes read in 9 ms (6.2 MiB/s)                                                                                                 

 

 

and extlinux.conf

Quote

LABEL Armbian
LINUX /zImage
INITRD /uInitrd
FDT /dtb/rockchip/rk3399-roc-pc-mezzanine.dtb
APPEND root=LABEL=ROOTFS rootflags=data=writeback rw earlycon=uart8250,mmio32,0xff1a0000 console=tty1 console=ttyS2,1500000 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0
# earlycon=uart8250,mmio32,0xff1a0000 console=tty1 console=ttyS2,1500000
# APPEND root=LABEL=ROOTFS rootflags=data=writeback rw console=tty0 no_console_suspend consoleblank=0 fsck.fix=yes fsck.repair=yes net.ifnames=0

 

The boot directory (/BOOT partition)

 

Quote

steini@odroidn2:/media/steini/BOOT$ ls
armbianEnv.txt                  Initrd
armbianEnv.txt~                 Initrd-5.10.4
armbian_first_run.txt.template  initrd.img-5.10.0-rc4-arm-64
boot.bmp                        rk3399-roc-pc.dtb
config-5.10.0-rc4-arm-64        rk3399-roc-pc.dtb-5.10.4
config-5.10.4                   rk3399-roc-pc-mezzanine.dtb
dtb                             rk3399-roc-pc-mezzanine.dtb-5.10.4
extlinux                        System.map-5.10.0-rc4-arm-64
Image                           uInitrd
Image-5.10.4                    zImage
steini@odroidn2:/media/steini/BOOT$

 

Link to post
Share on other sites
18 минут назад, denni_isl сказал:

Failed to load '/dtb/rockchip/rk3399-roc-pc-mezzanine.dtb '        

Check for the file at the specified path.

/dtb/rockchip/rk3399-roc-pc-mezzanine.dtb

 

 

I see you have dragged the necessary files to the root of the /BOOT partition (this is not correct)

Link to post
Share on other sites
5 hours ago, balbes150 said:

To get rid of all the tails that are now on your SD card, I recommend doing a clean check. Download the image from the link, unzip it and burn it to the SD card. Do not change anything on the SD card, connect to the device and check the launch.

 

https://users.armbian.com/balbes150/firefly_station_p1/

 

Model Fyrefly Station P1 = ROC-RK3399-pc-plus + eMMC module.

 

Armbian_21.02.0-trunk_Station-p1_bullseye_current_5.9.16_xfce_desktop.img.xz  = yellow screen  (etcher)
Armbian_21.02.0-trunk_Station-p1_buster_current_5.9.16_xfce_desktop.img.xz  =  yellow screen   (etcher)

Armbian_21.02.0-trunk_Station-p1_buster_current_5.10.5_xfce_desktop.img.xz = Starting kernel ...  (etcher)

Armbian_20.11.6_Station-p1_bullseye_current_5.9.14.img = yellow screen   (dd)

Link to post
Share on other sites
8 hours ago, balbes150 said:

Where is the UART log ?

Armbian 20.11.6 Bullseye - armbianEnv.txt - verbosity=7

 

Quote

steini@odroidn2:~$ sudo minicom -D /dev/ttyUSB0
[sudo] password for steini:


Welcome to minicom 2.7.1

OPTIONS: I18n
Compiled on Dec 23 2019, 02:06:26.
Port /dev/ttyUSB0, 16:12:38

Press CTRL-A Z for help on special keys


U-Boot TPL 2021.01-rc4 (Dec 31 2020 - 11:50:40)
Trying to boot from BOOTROM
Returning to boot ROM...

U-Boot SPL 2021.01-rc4 (Dec 31 2020 - 11:50:40 +0000)
Loading Environment from SPIFlash... OK
Trying to boot from SPI
cannot find image node 'atf_1': -1


U-Boot 2021.01-rc4 (Dec 31 2020 - 11:50:40 +0000)

SoC: Rockchip rk3399                                            
Reset cause: POR                                                
Model: Firefly ROC-RK3399-PC Mezzanine Board                    
DRAM:  3.9 GiB                                                  
PMIC:  RK808                                                    
MMC:   mmc@fe310000: 2, mmc@fe320000: 1, sdhci@fe330000: 0      
Loading Environment from SPIFlash... SF: Detected w25q128 with B
OK                                                              
In:    serial                                                   
Out:   vidconsole                                               
Err:   vidconsole                                               
Model: Firefly ROC-RK3399-PC Mezzanine Board                    
Net:                                                            
Error: ethernet@fe300000 address not set.                       
No ethernet found.                                              
                                                                
Hit any key to stop autoboot:  0                                
switch to partitions #0, OK                                     
mmc1 is current device                                          
Scanning mmc 1:1...                                             
Found U-Boot script /boot/boot.scr                              
3185 bytes read in 5 ms (622.1 KiB/s)                           
## Executing script at 00500000                                 
Boot script loaded from mmc 1                                   
162 bytes read in 4 ms (39.1 KiB/s)                             
14017362 bytes read in 602 ms (22.2 MiB/s)                      
27507200 bytes read in 1167 ms (22.5 MiB/s)                     
77135 bytes read in 12 ms (6.1 MiB/s)                           
2698 bytes read in 7 ms (376 KiB/s)                             
Applying kernel provided DT fixup script (rockchip-fixup.scr)   
## Executing script at 09000000                                 
Moving Image from 0x2080000 to 0x2200000, end=3cd0000           
## Loading init Ramdisk from Legacy Image at 06000000 ...       
   Image Name:   uInitrd                                        
   Image Type:   AArch64 Linux RAMDisk Image (gzip compressed)  
   Data Size:    14017298 Bytes = 13.4 MiB                      
   Load Address: 00000000                                       
   Entry Point:  00000000                                       
   Verifying Checksum ... OK                                    
## Flattened Device Tree blob at 01f00000                       
   Booting using the fdt blob at 0x1f00000                      
   Loading Ramdisk to f11bf000, end f1f1d312 ... OK             
   Loading Device Tree to 00000000f1143000, end 00000000f11beffK
                                                                
Starting kernel ...                                             
     

 

Link to post
Share on other sites
16 часов назад, denni_isl сказал:

Armbian 20.11.6 Bullseye

This is the official version, look for how to enable output to the UART console in it. What is connected to the HDMI output and how ? Describe in more detail the configuration of the hardware you are using. I know that P1 (board roc-rk3399-pc-plus) users have no problem running images for P1.

Link to post
Share on other sites
1 hour ago, balbes150 said:

This is the official version, look for how to enable output to the UART console in it. What is connected to the HDMI output and how ? Describe in more detail the configuration of the hardware you are using. I know that P1 (board roc-rk3399-pc-plus) users have no problem running images for P1.

 

Using the 4 pin debug (close to usb-C) on the board connected to usb adapter (not the GPIO pins) connected to odroid-n2.   Are you talking about more options through the GPIO pins and a USB adapter like this one

https://www.aliexpress.com/item/1005001589090572.html?spm=a2g0o.productlist.0.0.7a3238aeXZN4i6&algo_pvid=6ca99289-4fc4-4f1a-b243-e1ced9b7863a&algo_expid=6ca99289-4fc4-4f1a-b243-e1ced9b7863a-17&btsid=0b0a555616106170618963449e6cd7&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_

Did fallow fallowing instructions from page 8 on this tread and that must have spoiled the SPI chip somehow, though u-boot seems to be working except the kernel is not functional.

When one make mistakes is when he/she learn -   

 

 

Quote

Posted December 23, 2020

Boot from SPI directly to NVME works:

 

Latest U-Boot v2021.01-rc4 + this patch:

rockchip: roc-pc-rk3399: fix boot from SPI flash on spi1

https://patchwork.kernel.org/project/linux-rockchip/list/?series=403611

 

To build uboot on roc-pc:

make roc-pc-mezzanine-rk3399_defconfig
make -j6
./tools/mkimage -n rk3399 -T rkspi -d tpl/u-boot-tpl.bin:spl/u-boot-spl.bin idbloader-spi.img

 

To deploy uboot on spi:

dd if=idbloader-spi.img of=spi.img

                  (#0x60000 = 393216 = 4096 * 96)

dd if=u-boot.itb of=spi.img bs=4096 seek=96

flashcp -v spi.img /dev/mtd0

 

in U-Boot:

edit boot_targets to have nvme0 as first entry

 

On NVME drive (e.g. Samsung 970EVOPlus):

 

/boot/extlinux/extlinux.conf:

 

label mainline-kernel
    kernel /boot/Image
    initrd /boot/Initrd
#    fdt /rk3399-roc-pc.dtb
    fdt /boot/rk3399-roc-pc-mezzanine.dtb
    append earlycon=uart8250,mmio32,0xff1a0000 console=tty1 console=ttyS2,1500000 swiotlb=1 root=/dev/nvme0n1p1 rootwait rw rootfstype=ext4 init=/sbin/init

 

ls /boot:

Image (Image-5.10.0-next-20201223)

Initrd (Initrd-5.10.0-next-20201223)

rk3399-roc-pc-mezzanine.dtb (rk3399-roc-pc-mezzanine.dtb-5.10.0-next-20201223)

 

Kernel built on roc-pc:

Latest linux-next

 

make -j6
make modules_install

kernelversion=`cat ./include/config/kernel.release`
cp .config /boot/config-$kernelversion

mkinitramfs -c gzip -o ./initramfs-$kernelversion $kernelversion
mkimage -A arm64 -O linux -T ramdisk -C none -a 0 -e 0 -n initramfs -d ./initramfs-$kernelversion ./Initrd

cp arch/arm64/boot/Image /boot/Image
cp Initrd /boot
cp arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtb /boot
cp arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dtb /boot
cp arch/arm64/boot/Image /boot/Image-$kernelversion
cp Initrd /boot/Initrd-$kernelversion
cp arch/arm64/boot/dts/rockchip/rk3399-roc-pc.dtb /boot/rk3399-roc-pc.dtb-$kernelversion
cp arch/arm64/boot/dts/rockchip/rk3399-roc-pc-mezzanine.dtb /boot/rk3399-roc-pc-mezzanine.dtb-$kernelversion

 

example .config:

 

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...