Jump to content

Recommended Posts

Posted (edited)

Hi,

 

I am working on support for running Armbian on the RKM MK39 (based on the Rockchip RK3399 SOC)

 

Strange issue with uboot and I'm wondering if others had encountered the same thing on other RK3399 devices with eMMC

 

I have successfully compiled the kernel and uboot from Rockchips SDK at http://opensource.rock-chips.com/wiki_Linux_user_guide

 

Uboot loads but thats it, it seems like it can't find the kernel on my eMMC.

 

Here's what happens on the serial console:

 

Any ideas??

 

Spoiler

U-Boot 2017.09-01593-gd80d7b5 (Jun 19 2018 - 14:39:51 +0800)                    
                                                                                
Model: Rockchip RK3399 Evaluation Board                                         
DRAM:  3.8 GiB                                                                  
Relocation Offset is: f5c10000                                                  
PMIC:  RK808                                                                    
MMC:   dwmmc@fe320000: 1, sdhci@fe330000: 0                                     
Using default environment                                                       
                                                                                
In:    serial                                                                   
Out:   serial                                                                   
Err:   serial                                                                   
Model: Rockchip RK3399 Evaluation Board                                         
Card did not respond to voltage select!                                         
mmc_init: -95, time 10                                                          
switch to partitions #0, OK                                                     
mmc0(part 0) is current device                                                  
boot mode: normal                                                               
fail to get resource part                                                       
Can't find file:logo.bmp                                                        
failed to display uboot logo                                                    
Net:   eth0: ethernet@fe300000                                                  
Hit any key to stop autoboot:  0                                                
ANDROID: reboot reason: "(none)"                                                
** Invalid Android Image header **                                              
android_bootloader_boot_flow boot part load fail                                
Android boot failed, error -1.                                                  
=Booting Rockchip format image=                                                 
boot_rockchip_image kernel or boot part info error                              
Card did not respond to voltage select!                                         
mmc_init: -95, time 9                                                           
switch to partitions #0, OK                                                     
mmc0(part 0) is current device                                                  
Failed to mount ext2 filesystem...                                              
** Unrecognized filesystem type **                                              
starting USB...                                                                 
USB0:   USB EHCI 1.00                                                           
USB1:   USB EHCI 1.00                                                           
USB2:   Can't get the usbphy register address                                   
probe failed, error -6                                                          
USB3:   Can't get the usbphy register address                                   
probe failed, error -6                                                          
scanning bus 0 for devices... 1 USB Device(s) found                             
scanning bus 1 for devices... 2 USB Device(s) found                             
       scanning usb for storage devices... 0 Storage Device(s) found            
                                                                                
Device 0: unknown device                                                        
DMA reset timeout                                                               
missing environment variable: pxeuuid                                           
missing environment variable: bootfile                                          
Retrieving file: pxelinux.cfg/01-6a-aa-9e-70-26-80                              
DMA reset timeout                                                               
missing environment variable: bootfile                                          
Retrieving file: pxelinux.cfg/00000000                                          
DMA reset timeout                                                               
missing environment variable: bootfile                                          
Retrieving file: pxelinux.cfg/0000000                                           
DMA reset timeout                                                               
missing environment variable: bootfile                                          
Retrieving file: pxelinux.cfg/000000                                            
DMA reset timeout                                                               
missing environment variable: bootfile                                          
Retrieving file: pxelinux.cfg/00000                                             
DMA reset timeout                                                               
missing environment variable: bootfile                                          
Retrieving file: pxelinux.cfg/0000                                              
DMA reset timeout                                                               
missing environment variable: bootfile                                          
Retrieving file: pxelinux.cfg/000                                               
DMA reset timeout                                                               
missing environment variable: bootfile                                          
Retrieving file: pxelinux.cfg/00

 

 

 

Edited by Tido
moved to TV boxes, added Spoiler
Posted

I have no experience with rk3399, but I ported armbian to a tv box with rk3288 and I used mainline u-boot, which is used by armbian too.

 

Something important to let my device boot from eMMC was to create a real partition table (either DOS/MBR or GPT) containing a single partition with type "Linux Filesystem" (fdisk partition type 0x83). But I stress again that this is true for mainline u-boot. I don't know if the same applies to rockchip u-boot, which may stick to their "default" GPT partition table described on the open source documents.

 

To give you some hints, this is my actual partition table on the SD card which boots armbian on my tv box:

Welcome to fdisk (util-linux 2.27.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): p
Disk /dev/mmcblk0: 14.9 GiB, 16021192704 bytes, 31291392 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x28364f79

Device         Boot Start      End  Sectors  Size Id Type
/dev/mmcblk0p1       8192 30978463 30970272 14.8G 83 Linux

you should replicate the same on your eMMC.

 

However I suggest you to do all the experiments on a SD card and then, when things work well, transfer start to experiment with eMMC. I guess rk3399 has the maskrom mode working the same as other rockchip socs.

Posted

Interesting, thanks.

 

How did you write your firmware to the device eMMC? I am using the Android tool program to write the firmware parts to the device over USB. 

 

I also have the same issue for an RK3288 board.

 

Would you mind sharing your firmware parts? RKloader, parameter, etc so I can see how you set it up?

 

Posted
5 hours ago, andykirby said:

Interesting, thanks.

 

How did you write your firmware to the device eMMC? I am using the Android tool program to write the firmware parts to the device over USB. 

 

I also have the same issue for an RK3288 board.

 

Would you mind sharing your firmware parts? RKloader, parameter, etc so I can see how you set it up?

 

 

Writing parts to the eMMC is easy task, rockchip provided rkdeveloptool for such eMMC jobs.

You can find it cloning the rockchip-linux repository from here. rkdeveloptool is inside tools directory where you can also find parameter_gpt.txt file, which can be fed into rkdeveloptool to write the default GPT partition table on the eMMC.

u-boot has to be placed at sector 0x40, the zImage kernel should be placed at sector 0x8000 and if you got some rootfs you have to place it at sector 0x40000. This is all written inside parameter_gpt.txt, you can check it out to be sure.

 

This is all my guessing, I actually never tried it so can't be sure it really works but at least it is a direction. Also there are so many other variables like device trees, uboot and kernel configurations...

 

Armbian works a bit differently. It uses mainline u-boot configured to find all the necessary booting files (kernel, initramfs, device trees, ...) from the first ext4 partition on the media.

Still I suggest you to do all the experimentation on a sdcard instead of the internal eMMC, mostly because the flash memories have a limited number of write cycles and also because swapping sdcards is much faster than uploading each time the data via USB

 

My work on rk3288 is here, where you can also find a mini-guide on rkdeveloptool 

 

Posted
On 6/29/2018 at 11:58 AM, andykirby said:

fail to get resource part 

I have no equipment with RK3399, so all told, that's just my guess. When you build u-boot, you have not made the necessary changes to the Linux startup parameters (ENV variables). And did not create the necessary partition structure (file system) on the media. In the log it is clearly seen that u-boot is not found partition table (standard sections for Android).

 

Stop running u-boot and execute the "help" and "printenv" commands. Show the result here. Or show the source code u-boot, which describes the variables to run.

On 6/29/2018 at 11:58 AM, andykirby said:

Hit any key to stop autoboot: 0

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines