我用用emmc的uda分区,uboot2019-10可以正常启动,也可以通过tftp引导内核和busybox。但是我试把uboot放到boot0里面启动,就一直不成功。我用的是A64的板子,emmc用的是KLM8G1GEME-B041。
下面是启动信息:
U-Boot SPL 2019.10 (May 12 2020 - 12:27:13 +0800)
DRAM: 1024 MiB
Trying to boot from MMC2
NOTICE: BL31: v2.0(debug):
NOTICE: BL31: Built : 17:23:43, Feb 19 2020
NOTICE: BL31: Detected Allwinner A64/H64/R18 SoC (1689)
NOTICE: BL31: Found U-Boot DTB at 0x4093fa8, model: FriendlyARM NanoPi A64
INFO: ARM GICv2 driver initialized
INFO: Configuring SPC Controller
NOTICE: BL31: PMIC: Detected AXP803 on RSB.
INFO: PMIC: AXP803: dcdc1 voltage: 3.300V
INFO: PMIC: AXP803: dcdc5 voltage: 1.500V
INFO: PMIC: AXP803: dldo1 voltage: 3.300V
INFO: BL31: Platform setup done
INFO: BL31: Initializing runtime services
INFO: BL31: cortex_a53: CPU workaround for 843419 was applied
INFO: BL31: cortex_a53: CPU workaround for 855873 was applied
INFO: BL31: Preparing for EL3 exit to normal world
INFO: Entry point address = 0x4a000000
INFO: SPSR = 0x3c9
U-Boot 2019.10 (May 12 2020 - 12:27:13 +0800) Allwinner Technology
CPU: Allwinner A64 (SUN50I)
Model: FriendlyARM NanoPi A64
DRAM: 1 GiB
MMC: Device 'mmc@1c11000': seq 1 is in use by 'mmc@1c10000'
mmc@1c0f000: 0, mmc@1c10000: 2, mmc@1c11000: 1
Loading Environment from FAT... OK
In: serial
Out: serial
Err: serial
Net: No ethernet found.
starting USB...
Bus usb@1c1a000: USB EHCI 1.00
Bus usb@1c1a400: USB OHCI 1.0
Bus usb@1c1b000: USB EHCI 1.00
Bus usb@1c1b400: USB OHCI 1.0
scanning bus usb@1c1a000 for devices... 1 USB Device(s) found
scanning bus usb@1c1a400 for devices... 1 USB Device(s) found
scanning bus usb@1c1b000 for devices... 3 USB Device(s) found
scanning bus usb@1c1b400 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
=> setenv serverip 192.168.1.106&&setenv ipaddr 192.168.1.104&&tftpboot 0x50000000 Image && tftpboot 0x52000000 sun50i-a64-nanopi-a64.dtb&&booti 0x50000000 - 0x52000000
Using asix_eth device
TFTP from server 192.168.1.106; our IP address is 192.168.1.104
Filename 'Image'.
Load address: 0x50000000
Loading: #################################################################
后面很长,没有粘贴。
最后内核启动,出现root@/#提示符,里面的Linux指令都可以运行。
就是尝试把uboot写入到emmc的boot0分区启动,一直不成功。
我试了:
echo 0 > /sys/block/mmcblk2boot0/force_ro
dd if=/dev/zero of=/dev/mmcblk2boot0 bs=1K count=4200
dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk2boot0 bs=1K seek=8
dd if=u-boot.itb of=/dev/mmcblk2boot0 bs=1K seek=800
echo 1 > /sys/block/mmcblk2boot0/force_ro
也尝试了通过tftp把u-boot-sunxi-with-spl.bin和u-boot.itb写入内存,然后用mmc dev 1:0 ,mmc write 0xXXXXXXXX 0 640写入到emmc,再用mmc partconf 1 1 1 1,断电重启,没有反应。
mmc list的列表如下:
mmc@1c0f000: 0
mmc@1c10000: 2
mmc@1c11000: 1 (eMMC)
请问我是哪里做错了或者是还有哪些没有做?盼指教,谢谢大家!!!
离线
是呀,我就是用
dd if=u-boot-sunxi-with-spl.bin of=/dev/mmcblk2 bs=1K seek=8
dd if=u-boot.itb of=/dev/mmcblk2 bs=1K seek=800
就能正常启动了
看来这个真是一个坑。
另外,内核中做分区的时候,fdisk创建第一个分区时的起始First sector不能用默认值16,需要根据bin和itb文件大小的总和,采取超出一点的数值,我用的是4096,这样4096*512=2M。请问这样有隐患吗?
离线
@哇酷小二,对那个确实不起作用,我用seek=0也一样。就是对mmcblk2boot0操作后,没有任何效果。但是mmc partconf 1 1 1 1是有效果的,启动不了了,改成mmc partconf 1 1 7 0,转到uda,才能正常
离线
@哇酷小二 刚入门,不好意思,这个我不不清楚之间的区别,用的都是网上开源的代码,dts做了一些改动,代码基本上没有改。
离线