/* Note by tjt about location 0x40. * The value here was originally 0x8000 (which is a 64 sector offset, i.e. 32K) * I changed this to 0x10200, which is a 129 sector offset. * This is 1 sector for the partition table or whatever, * Then allows 128 sectors for this thing (bl1), i.e. 64K * This must fit into the 64K SRAM, so surely nothing bigger is needed. * At this time, the size of bl1 is about 35K, * so the old 32K allotment is suspect anyway. */Once this change is done, I recompile and then install this on my SD card via:
dd if=out/bl1-nanopi.bin of=/dev/sdf bs=512 seek=1 conv=fdatasync
#define TJT_NSIH .globl _start _start: b reset #ifdef TJT_NSIH .skip 60 .word 0x00000000 // 0x040 : Device Read Address for next boot .word 0x000A0000 // 0x044 : Load Size for Uboot (640K) .word 0x43c00000 // 0x048 : Load Address for Uboot. .word 0x43c00000 // 0x04C : Launch Address for Uboot. .skip 428 .word 0x4849534E // 0x1FC "NSIH" #endifThe bl1-mmcboot loader will find this, load 640K to address 0x43c00000, and branch to 0x43c00000 to start U-boot running. The current size of uboot.bin is just over 500K, so this will do fine. After adding this bit of code, I recompile U-Boot and install it on my SD card via:
dd if=u-boot.bin of=/dev/sdf bs=512 seek=129 conv=fdatasyncI ignore fip-nonsecure.img entirely.
Tom's electronics pages / [email protected]