how to boot, GRUB on ls1012ardb ?

显示  仅  | 搜索替代 

how to boot, GRUB on ls1012ardb ?

1,693 次查看
Contributor III


I am using ls1012ardb rev A and I have requirement that, I should have GRUB to choose which kernel image to boot.

Since we need GRUB on LS1012ARDB  and LS1012ARDB has come with default u-boot image vesrion 2016.01, which does not have loadefi support. To load GRUB image (grubarm64.efi) via bootefi command, we have ported 2016.01 to denx v2017.05. With this, we where able to boot LS1012ARDB and all interface(MMC,QSPI flash and Ethernet interface) are working fine. when i load the GRUB image we are running it following issue.

----------------------uboot log-------------

U-Boot 2017.05-00080-g2f92629-dirty (Jun 14 2017 - 17:00:16 +0530)

SoC: LS1012AE Rev1.0 (0x87040010)
Clock Configuration:
CPU0(A53):800 MHz
Bus: 250 MHz DDR: 1000 MT/s
Reset Configuration Word (RCW):
00000000: 08000008 00000000 00000000 00000000
00000010: 35080000 c000000c 40000000 00001800
00000020: 00000000 00000000 00000000 00014571
00000030: 00000000 18c2a120 00000096 00000000
I2C: ready
DRAM: 1022 MiB
Using SERDES1 Protocol: 13576 (0x3508)
PPA Firmware: Version 0.2
SF: Detected S25FS512S_256K with page size 512 Bytes, erase size 256 KiB, total 64 MiB
In: serial
Out: serial
Err: serial
Model: LS1012A RDB Board
Board: LS1012ARDB Version: RevB, boot from QSPI: bank2
SATA link 0 timeout.
AHCI 0001.0301 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: 64bit ncq pm clo only pmp fbss pio slum part ccc apst
Found 0 device(s).
SCSI: Net: cbus_baseaddr: 0000000004000000, ddr_baseaddr: 0000000083800000, ddr_phys_baseaddr: 03800000
class init complete
tmu init complete
bmu1 init: done
bmu2 init: done
GPI1 init complete
GPI2 init complete
HGPI init complete
hif_tx_desc_init: Tx desc_base: 0000000083e40400, base_pa: 03e40400, desc_count: 64
hif_rx_desc_init: Rx desc base: 0000000083e40000, base_pa: 03e40000, desc_count: 64
HIF tx desc: base_va: 0000000083e40400, base_pa: 03e40400
HIF init complete
bmu1 enabled

bmu2 enabled
pfe_hw_init: done
pfe_load_elf: no of sections: 13
pfe_firmware_init: class firmware loaded
pfe_load_elf: no of sections: 10
pfe_firmware_init: tmu firmware loaded
ls1012a_configure_serdes 0
PCIe0: pcie@3400000 Root Complex: no link
pfe_eth0, pfe_eth1
Hit any key to stop autoboot: 5 ^H^H^H 4 ^H^H^H 3 ^H^H^H 2 ^H^H^H 1 ^H^H^H 0
Stopping PFE...
reading /boot/EFI/BOOT/bootarm64.efi
105984 bytes read in 31 ms (3.3 MiB/s)
reading u-boot.dtb
4728 bytes read in 16 ms (288.1 KiB/s)
## Starting EFI application at a0000000 ...
Scanning disks on scsi...
Scanning disks on usb...
Scanning disks on mmc...
Card did not respond to voltage select!
mmc_init: -95, time 46
MMC Device 2 not found
MMC Device 3 not found
Found 5 disks
Welcome to GRUB!

error: variable `root' isn't set.
Entering rescue mode...
grub rescue>

=================End of log=================== 

Using GRUB 2.02 and referring below link  to bring up GRUB on ls1012ardb.

LEG/Engineering/Kernel/GRUBonUBOOT - Linaro Wiki 

uboot args to load the bootarm64.efi image  :

setenv bootargs "root=/dev/mmcblk0p2 rw rootdelay=5 earlycon=uart8250,0x21c0500,115200 console=ttyS0,115200"
setenv bootcmd "pfe stop; fatload mmc 0 a0000000 /boot/EFI/BOOT/bootarm64.efi && fatload mmc 0 a001B000 u-boot.dtb && bootefi a0000000 a001B000"

Did any one have bring up GRUB on ls1012ardb or its family? if  so please share me link/document  for the same.



2 回复数

1,121 次查看
NXP TechSupport
NXP TechSupport

Please refer to UEFI Bootloader on LS ARMv8 Platforms  about how to run uefi on LS1043A platform.

I confirmed with Linux SDK team, the current Linux SDK has not provided UEFI support on LS1012 platform.

Have a great day,

Note: If this post answers your question, please click the Correct Answer button. Thank you!

1,121 次查看
Contributor III

Hi Yiping wang,

Thanks for your inputs..

I was able to load GRUB(version 2.02) from u-boot(denx v2017.05) and get the grub prompt on LS1012ARDB as shown below

=============Grub log =========

GNU GRUB version 2.02

Minimal BASH-like line editing is supported. For the first word, TAB
lists possible command completions. Anywhere else TAB lists possible
device or file completions.




==================End of grub log ================

 By using following command, i was able to load the grub.cfg from there, i was able to boot Linux kernel. 

grub> configfile (hd0,gpt1)/grub.cfg 

My issue is, when i load the grub image from u-boot, it load's grub and stops in grub  prompt. But in general, it suppose to find  grub.cfg file and load kernel automatically, which is not happening in my case. please let me know, if i am missing anything ? 

I am using SD card as the boot device and following SD card partitions summery  

Device       Start            End              Sectors       Size          Type
/dev/sdb1   2048         4196351         4194304     2G        Microsoft basic data
/dev/sdb2   4196352   31115263      26918912   12.9G    Linux filesystem



0 项奖励