@Jackzeng can you explain ATF-binary
ATF seems to stand for ARM trusted firmware…https://chromium.googlesource.com/external/github.com/ARM-software/arm-trusted-firmware/+/v0.4-rc2/docs/firmware-design.md
partitoninfo seems not actual because your image uses this partitiontable:
Disk /dev/sdb: 29.7 GiB, 31914983424 bytes, 62333952 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: 0x674a82c6
Device Boot Start End Sectors Size Id Type
/dev/sdb1 204800 729087 524288 256M c W95 FAT32 (LBA)
/dev/sdb2 729088 14940159 14211072 6.8G 83 Linux
your script above says
# partition1 /dev/sdc1 vfat 204800~327679
# partition2 /dev/sdc2 ext4 327680~end
where can be the uboot-environment be saved (1MB on R2 in “user data area”)
how is the difference between emmc and SD (atf needed to)? same as on r2 (preloader to boot0, uboot to user-partition on same location without HEAD0/1)
how can we check from which device r64 has booted? (like we did in uboot for r2)
with bpi-r2 i can do
U-Boot> md.l 0x81DFFFF0 1
81dffff0: 434d4d65 eMMC
to see booted device…here emmc…if booted from sd-card i see this
BPI-R2> md.l 0x81DFFFF0 1
81dffff0: ffffffff ....
currently i don’t see emmc in uboot, but in linux i see mmc1blk1boot0 so i can try to get emmc boot working
have now flashed mt-pack/mtk/bpi-r64/bin/preloader_bpi-r64_forsdcard-2k.img to mmcblk1boot0 and removed sd-card
F0: 102B 0000
F6: 3800 00A0
F3: 4000 0036
F5: 480A 0031
F5: 480A 0031
00: 1005 0000
F6: 3800 00A0
F3: 4000 0036
F5: 480A 0031
F5: 480A 0031
01: 102A 0001
02: 1005 0000
BP: 0000 00C0 [0001]
T0: 0000 0364 [000F]
System halt!
from sdcard this block looks like this:
F0: 102B 0000
F6: 3800 00A0
F3: 4000 0036
F5: 0000 0000
V0: 0000 0000 [0001]
00: 0000 0000
BP: 0000 0041 [0000]
G0: 0190 0000
T0: 0000 0448 [000F]
Jump to BL
is that right? i have not flashed uboot yet (need to compile it in ubuntu 4.14)…
flashed now also atf and uboot…
root@bpi-r64:~# mount /dev/mmcblk0p1 /boot
root@bpi-r64:~# ls /boot/
bananapi preloader_evb7622_64_forsdcard-2k.img
BPI-R2-HEAD1-512b.img System Volume Information
BPI-R2-HEAD440-0k.img u-boot-r64.bin
BPI-R64-atf.img u-boot-r64-fwu.bin
preloader_bpi-r64_forsdcard-2k.img
root@bpi-r64:~# dd of=/dev/mmcblk1 if=/boot/BPI-R64-atf.img bs=1k seek=512
256+0 records in
256+0 records out
262144 bytes (262 kB) copied, 0.0378364 s, 6.9 MB/s
root@bpi-r64:~# dd of=/dev/mmcblk1 if=/boot/u-boot-r64.bin bs=1k seek=768
391+1 records in
391+1 records out
400664 bytes (401 kB) copied, 0.0474521 s, 8.4 MB/s
but still “system halt”, does this mean that preloader is wrong or other bootstage? i also tried to change position of switch next to reset-button to 1…same result looking in log of sd-boot seems that preloader is not started…
T0: 0000 0454 [000F]
Jump to BL
UNIVPLL_CON0 = 0xFE000000!!!
mt_pll_init: Set pll frequency for 25M crystal
[PMIC_WRAP]wrap_init pass,the return value=0.
[pmic_init] Preloader Start..................
other preloader-file does also not work…or is preloader needed also on mmcblk1?
after compiling mmcutils for r64 and read Partitionconfig i see this:
root@bpi-r64:~# ./mmc extcsd read /dev/mmcblk1 | grep 'PARTITION_CONFIG'
Boot configuration bytes [PARTITION_CONFIG: 0x00]
so i tried to set it:
root@bpi-r64:~# ./mmc bootpart enable 1 1 /dev/mmcblk1
root@bpi-r64:~# ./mmc extcsd read /dev/mmcblk1 | grep 'PARTITION_CONFIG'
Boot configuration bytes [PARTITION_CONFIG: 0x48]
but boot is still not possible (also tried with bootswitch and reflashed preloader-bpi-r64-2k.img)…does preloader init emmc??
for sdcard i have it running except uboot…seems to need mtk-headers…with the u-boot-mtk.bin it works
can you explain what this do (what is LK)?
btw. i’ve managed to boot up a sd-card created from scratch (flash headers above, my modified uboot and boostrapped debian stretch) and also get netboot running on r64
uploaded image here:
https://drive.google.com/open?id=1rQCiUaR915BCqYG220DUm75bZQwt5N8i