From owner-freebsd-arm@FreeBSD.ORG Wed Aug 27 12:53:42 2014 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CB9B2F6B for ; Wed, 27 Aug 2014 12:53:42 +0000 (UTC) Received: from mail-ie0-x22f.google.com (mail-ie0-x22f.google.com [IPv6:2607:f8b0:4001:c03::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 943713CAC for ; Wed, 27 Aug 2014 12:53:42 +0000 (UTC) Received: by mail-ie0-f175.google.com with SMTP id x19so188499ier.20 for ; Wed, 27 Aug 2014 05:53:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=ac6HR4eW+vvaiPYt0sUthcgFdNeIGepFfiC1iu81nUU=; b=AalFjmvgHVtSeVaQNjxSdaj++o0PrEIQg2IH9PrFuXz8T+3uUcYjq/lCJC/yboCT8p rLUQrEHRaRdF5Vc8q/h67UheWlkh0h/oCCc9h7lCqYD5R9XZ/RY2Ja6b61ooKAghp3oI F4CWD6siCNIZqOTUGQhUghqSiRERHF63Ufw40zZHxemhUuo+UG16U3e5sK3CJy3IwAXc DT9LDjbc4gxKVcyKp5BNgcilU8Bj0hfDJjGT3Ti24HDhv3tQw5vTEggdxSc2nPqDExtC 4Bt4VmjGfr8LF4pbr6yH5dAmDT51UUM3LIWjDHEwChduA9dOtFRUH6GTdXCZxeCVwy6U ll6A== MIME-Version: 1.0 X-Received: by 10.50.66.133 with SMTP id f5mr25456081igt.38.1409144021299; Wed, 27 Aug 2014 05:53:41 -0700 (PDT) Received: by 10.64.88.163 with HTTP; Wed, 27 Aug 2014 05:53:41 -0700 (PDT) In-Reply-To: <53F27EB9.3090805@toomeek.waw.pl> References: <53EE0F93.6060407@toomeek.waw.pl> <53EE23B1.2020403@toomeek.waw.pl> <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> Date: Wed, 27 Aug 2014 20:53:41 +0800 Message-ID: Subject: Re: U-boot for Banana Pi From: Ganbold Tsagaankhuu To: TooMeeK Admin Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.18-1 Cc: "freebsd-arm@freebsd.org" X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Aug 2014 12:53:42 -0000 On Tue, Aug 19, 2014 at 6:31 AM, TooMeeK Admin 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" >