Hi all,
I tried to make a bootable SD from scratch with preloader_bpi-r64_forsdcard-2k.img
from https://github.com/BPI-SINOVOIP/BPI-R64-bsp-4.19/tree/master/mt-pack/mtk/bpi-r64/bin
but not succeded:
F0: 102B 0000
F5: 4801 0000
F5: 480A 0031
F3: 4002 0000
F2: 300C 0000
00: 1005 0000
F5: 480A 0031
F5: 480A 0031
F3: 4002 0000
F2: 300C 0000
01: 102A 0001
02: 1005 0000
BP: 0000 00C0 [0001]
T0: 0000 037B [000F]
System halt!
The command I used is (to write it after 2Kib from SD’ start):
sudo dd if=../../BPI-R64-bsp-4.19/mt-pack/mtk/bpi-r64/bin/preloader_bpi-r64_forsdcard-2k.img of=/dev/mmcblk0 bs=1k seek=2
As far as I understand the preloader couldn’t start yet. How to fix it?
This is how I tried, full log (without ATF and u-boot):
$ sudo parted -s /dev/mmcblk0 mklabel msdos
$ sudo parted -s /dev/mmcblk0 unit MiB mkpart primary fat32 -- 100MiB 356MiB
$ sudo parted -s /dev/mmcblk0 unit MiB mkpart primary ext2 -- 356MiB 1913MB
$ sudo partprobe /dev/mmcblk0
$ sudo mkfs.fat -F 32 /dev/mmcblk0p1 -n BPI-BOOT
$ sudo mkfs.ext4 -O ^has_journal -E stride=2,stripe-width=1024 -b 4096 /dev/mmcblk0p2 -L BPI-ROOT
$ sudo sync
$ sudo parted -s /dev/mmcblk0 print
Model: SD SB16G (sd/mmc)
Disk /dev/mmcblk0: 15,9GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:
Number Start End Size Type File system Flags
1 105MB 373MB 268MB primary fat32 lba
2 373MB 1913MB 1539MB primary ext2
$ sudo dd if=../../BPI-R64-bsp-4.19/mt-pack/mtk/bpi-r64/bin/preloader_bpi-r64_forsdcard-2k.img of=/dev/mmcblk0 bs=1k seek=2