Date: Wed, 27 Aug 2014 20:53:41 +0800 From: Ganbold Tsagaankhuu <ganbold@gmail.com> To: TooMeeK Admin <maps@toomeek.waw.pl> Cc: "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org> Subject: Re: U-boot for Banana Pi Message-ID: <CAGtf9xNw8EAakGLpYL%2Bxi20QdOYZQMg=_A-QtriU5kqY2jLBUA@mail.gmail.com> In-Reply-To: <53F27EB9.3090805@toomeek.waw.pl> References: <53EE0F93.6060407@toomeek.waw.pl> <53EE23B1.2020403@toomeek.waw.pl> <CAGtf9xNTsQg-WKMu%2BRqNmF3W=vKm8ccvNdcL1VKm9gWwRohsTw@mail.gmail.com> <53EE402D.8000204@toomeek.waw.pl> <20140815214416.GJ60808@cicely7.cicely.de> <53EFCD6C.5000601@toomeek.waw.pl> <53EFD5D5.7010406@toomeek.waw.pl> <53F0E640.5030506@toomeek.waw.pl> <53F14BD7.1050007@fukaumi.org> <53F1A126.1020408@toomeek.waw.pl> <53F1D8FD.9010903@fukaumi.org> <53F27EB9.3090805@toomeek.waw.pl>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, Aug 19, 2014 at 6:31 AM, TooMeeK Admin <maps@toomeek.waw.pl> wrote: > Hello, > > thanks Naoki, but.. this is my script's header for SD booting image: > > #!/bin/bash > cd /root/banana > rm /root/banana/banana.img > truncate -s 940M banana.img > > mdconfig -f banana.img -u0 > gpart create -s mbr md0 > gpart add -b 1m -s 64m -t fat16 md0 > gpart set -a active -i 1 md0 > gpart add -t freebsd md0 > newfs_msdos -F 16 /dev/md0s1 > newfs /dev/md0s2 > > mount_msdosfs /dev/md0s1 /mnt > cp /usr/obj/arm.armv6/usr/src/sys/BANANAPI/kernel /mnt > cd /usr/src/sunxi-tools > echo "fatload mmc 0 0x40200000 kernel; go 0x40200100" > boot.cmd > /usr/src/u-boot-bananapi/tools/mkimage -C none -A arm -T script -d > boot.cmd boot.scr > cp boot.scr /mnt > umount /mnt > > mdconfig -d -u0 > cd /root/banana > # Original Banana Pi U-boot loader > #dd if=/usr/src/u-boot-sunxi/spl/sunxi-spl.bin conv=notrunc of=banana.img > bs=1024 seek=8 > #dd if=/usr/src/u-boot-sunxi/u-boot.bin conv=notrunc of=banana.img > bs=1024 seek=40 > # Lemaker's U-boot loader > dd if=/usr/src/u-boot-bananapi/spl/sunxi-spl.bin conv=notrunc > of=banana.img bs=1024 seek=8 > dd if=/usr/src/u-boot-bananapi/u-boot.bin conv=notrunc of=banana.img > bs=1024 seek=40 > > The script output is similar to this: > > root@freebsd:~/banana # bash prepare_boot.sh > md0 created > md0s1 added > active set on md0s1 > md0s2 added > /dev/md0s1: 130888 sectors in 16361 FAT16 clusters (4096 bytes/cluster) > BytesPerSec=512 SecPerClust=8 ResSectors=1 FATs=2 RootDirEnts=512 > Media=0xf0 FATsecs=64 SecPerTrack=17 Heads=255 HiddenSecs=0 > HugeSectors=131053 > /dev/md0s2: 875.0MB (1792000 sectors) block size 32768, fragment size 4096 > using 4 cylinder groups of 218.78MB, 7001 blks, 28032 inodes. > super-block backups (for fsck -b #) at: > 192, 448256, 896320, 1344384 > Image Name: > Created: Tue Aug 19 02:20:04 2014 > Image Type: ARM Linux Script (uncompressed) > Data Size: 55 Bytes = 0.05 kB = 0.00 MB > Load Address: 00000000 > Entry Point: 00000000 > Contents: > Image 0: 47 Bytes = 0.05 kB = 0.00 MB > 23+1 records in > 23+1 records out > 24064 bytes transferred in 0.003972 secs (6058691 bytes/sec) > 235+1 records in > 235+1 records out > 241544 bytes transferred in 0.003128 secs (77224557 bytes/sec) > > > Original Banana Pi U-boot loader output: > > > U-Boot SPL 2014.04-10704-gf625d1d (Aug 16 2014 - 23:44:23) > Board: Bananapi > DRAM: 1024 MiB > CPU: 960000000Hz, AXI/AHB/APB: 3/2/2 > spl: not an uImage at 1600 > spl: not an uImage at 80 > ### ERROR ### Please RESET the board ### > > And Lemaker's: > > U-Boot SPL 2014.04-10693-gf954935 (Aug 17 2014 - 21:41:27) > > Board: Bananapi > DRAM: 1024 MiB > CPU: 960000000Hz, AXI/AHB/APB: 3/2/2 > spl: not an uImage at 1600 > spl: not an uImage at 80 > ### ERROR ### Please RESET the board ### > > The only way it works is: > # Cubieboard's 2 U-boot loader from FreeBSD Wiki > > dd if=sunxi-spl.bin conv=notrunc of=banana.img bs=1024 seek=8 > dd if=u-boot.bin conv=notrunc of=banana.img bs=1024 seek=32 > > And according to https://github.com/linux-sunxi/u-boot-sunxi/wiki > "If using v2013.07 or earlier then the procedure is slightly different > dd if=spl/sunxi-spl.bin of=/dev/sdX bs=1024 seek=8 > dd if=u-boot.bin of=/dev/sdX bs=1024 seek=32" > > So it SHOULD be seek=40 and it's not working anyway.. > I suspect wrong U-boot may cause these memory problems too (kernel not > booting with 1024MB nad 768MB addressed). > I've just got Banana PI today, and I confirm that Cubieboard2 kernel works just fine detecting 1GB RAM and booting to multi user mode. I run recent Current of course. Ganbold > > Cheers, > TooMeeK > > > > W dniu 2014-08-18 12:44, FUKAUMI Naoki pisze: > >> >> On 08/18/2014 03:45 PM, TooMeeK Admin wrote: >> >>> I'm working on image, not raw device. >>> So "conv=notrun" is needed to avoid destroying it completly.. >>> >>> Note that partitions start outside bootloader, so ~1MB after this data. >>> >> >> please see the number after *seek=* >> >> dd if=/usr/src/u-boot-sunxi/spl/sunxi-spl.bin conv=notrunc of=banana.img >>>>> bs=1024 seek=8 >>>>> dd if=/usr/src/u-boot-sunxi/u-boot.bin conv=notrunc of=banana.img >>>>> bs=1024 seek=32 >>>>> >>>> >>>> from https://github.com/linux-sunxi/u-boot-sunxi/wiki >>>> >>>> dd if=u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8 >>>> >>>> or >>>> >>>> dd if=spl/sunxi-spl.bin of=/dev/sdX bs=1024 seek=8 >>>> dd if=u-boot.img of=/dev/sdX bs=1024 seek=40 >>>> >>> >> > _______________________________________________ > freebsd-arm@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-arm > To unsubscribe, send any mail to "freebsd-arm-unsubscribe@freebsd.org" >
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAGtf9xNw8EAakGLpYL%2Bxi20QdOYZQMg=_A-QtriU5kqY2jLBUA>