U-boot for Banana Pi

TooMeeK Admin maps at toomeek.waw.pl
Thu Aug 14 10:19:10 UTC 2014


I didn't touched std.a20 .

Card is microSD with SD adapter, 1GB, real size about ~940MB, prepared 
this way:
#1GB card is smaller, so ~940MB available
truncate -s 920M banana.img
mdconfig -f banana.img -u0
gpart create -s mbr md0
#NOTE: invalid partition type, unreadable by u-boot!
#gpart add -s64m -t \!14 md0
gpart add -b 1m -s 64m -t '\!12' md0
gpart set -a active -i 1 md0
gpart add -t freebsd md0
newfs_msdos -F 16 /dev/md0s1
newfs /dev/md0s2
mount /dev/md0s2 /mnt
cd /usr/src
make TARGET_ARCH=armv6 DESTDIR=/mnt installworld distribution
umount /mnt
mount_msdosfs /dev/md0s1 /mnt
cp /usr/obj/arm.armv6/usr/src/sys/BANANAPI/kernel /mnt
echo "fatload mmc 0 0x43000000 script.bin; fatload mmc 0 0x48000000 
kernel; go 0x48000100" > boot.cmd
/usr/src/u-boot-sunxi/tools/mkimage -C none -A arm -T script -d boot.cmd 
boot.scr
cp boot.scr /mnt
mdconfig -d -u0
cd /root/banana
dd if=/usr/src/u-boot-sunxi/u-boot-sunxi-with-spl.bin conv=notrunc 
of=banana.img bs=1024 seek=8

I've already tried: echo "fatload mmc 0 0x40200000 kernel; go 
0x40200100" > boot.cmd, but one more time..:

U-Boot 2014.04-10700-g4e19806 (Aug 13 2014 - 14:44:36) Allwinner Technology

CPU:   Allwinner A20 (SUN7I)
Board: Bananapi
I2C:   ready
DRAM:  1 GiB
MMC:   SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment

In:    serial
Out:   serial
Err:   serial
Net:   dwmac.1c50000
Hit any key to stop autoboot:  2  1  0
reading uEnv.txt
** Unable to read file uEnv.txt **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
Failed to mount ext2 filesystem...
** Unrecognized filesystem type **
reading boot.scr
119 bytes read in 21 ms (4.9 KiB/s)
Jumping to boot.scr
## Executing script at 44000000
reading kernel
Error reading cluster
** Unable to read file kernel **
## Starting application at 0x40200100 ...

Maybe this is still invalid partition type? But if, why then boot.scr is 
loaded?
Removed script.bin from the partition.
I have no eEnv.txt, should I?

Cheers,
TooMeeK
> boot,scr, script.bin, uEnv.txt etc are not really matters now. 
> script.bin is needed for linux, so you don't really need it.
> I think boot.scr, uEnv etc are related to u-boot, so for now you can 
> leave them.
>
> I hope you have SD card and it is FAT formatted and you put there kernel.
> You can try as I said before:
>
> fatload mmc 0 0x40200000 kernel; go 0x40200100
>
> Because if you look /usr/src/sys/arm/allwinner/a20/std.a20 there are 
> lines that defines addresses like KERNPHYSADDR which is 0x40200000.
>
> Please try above command. I hope you didn't change anything in dts file.
>
> Ganbold
>
>



More information about the freebsd-arm mailing list