From owner-freebsd-arm@FreeBSD.ORG Fri Sep 30 15:51:19 2011 Return-Path: Delivered-To: freebsd-arm@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4102D1065674 for ; Fri, 30 Sep 2011 15:51:19 +0000 (UTC) (envelope-from matthieu.kraus@s2008.tu-chemnitz.de) Received: from cora.hrz.tu-chemnitz.de (cora.hrz.tu-chemnitz.de [134.109.228.40]) by mx1.freebsd.org (Postfix) with ESMTP id B2B9C8FC1D for ; Fri, 30 Sep 2011 15:51:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tu-chemnitz.de; s=dkim2010; h=Content-Transfer-Encoding:Content-Type:MIME-Version:In-Reply-To:References:Subject:To:From:Date:Message-ID; bh=diz4KWrmKTz6IKe/e4+jkW1M3JSuqS9ahn9LRfv6yUg=; b=aGSbTwgQGSUDJiAH5QoCm3tYtxi4+oMII7xVtO7B7O3j89+tAS+yh+DzqE+MxV+wIxLUThQV78In73ZfVo41jEeYBSWkyid71XG59BFf+AEvMlvwf2Tk00Em0q7B5RQy/v2+FKZ2ERtQ78lbWTN1UN9Gei1INYfheNe6Zgbh4sc=; Received: from pat.hrz.tu-chemnitz.de ([134.109.133.4] helo=mailbox.hrz.tu-chemnitz.de) by cora.hrz.tu-chemnitz.de with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1R9f53-0004Y6-U8 for freebsd-arm@freebsd.org; Fri, 30 Sep 2011 17:32:53 +0200 Received: from boogie.hrz.tu-chemnitz.de ([134.109.133.10] helo=localhost) by mailbox.hrz.tu-chemnitz.de with esmtp (Exim 4.76) (envelope-from ) id 1R9f53-0004J9-Sn for freebsd-arm@freebsd.org; Fri, 30 Sep 2011 17:32:53 +0200 Received: from camo156-122.hrz.tu-chemnitz.de (camo156-122.hrz.tu-chemnitz.de [134.109.156.122]) by mail.tu-chemnitz.de (Horde Framework) with HTTP; Fri, 30 Sep 2011 17:32:53 +0200 Message-ID: <20110930173253.55166lqso9c8zvad@mail.tu-chemnitz.de> Date: Fri, 30 Sep 2011 17:32:53 +0200 From: Matthieu Kraus To: freebsd-arm@freebsd.org References: <20110930120022.4ABAA10656A7@hub.freebsd.org> In-Reply-To: <20110930120022.4ABAA10656A7@hub.freebsd.org> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_2v0lx7490r7" Content-Transfer-Encoding: 7bit User-Agent: Internet Messaging Program (IMP) H3 (4.3.9) X-Originating-IP: 134.109.156.122 X-Scan-Signature: 4954f28f68788e5fb36ec19f6faa6c6b X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: Re: freebsd-arm Digest, Vol 286, Issue 5 X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the StrongARM Processor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 30 Sep 2011 15:51:19 -0000 This message is in MIME format. --=_2v0lx7490r7 Content-Type: text/plain; charset=UTF-8; DelSp="Yes"; format="flowed" Content-Disposition: inline Content-Transfer-Encoding: 7bit > Message: 4 > Date: Fri, 30 Sep 2011 20:06:23 +1000 > From: Mattia Rossi > Subject: Re: GlobalScale DreamPlug + FreeBSD 8.2 release > To: Naoyuki Tai > Cc: freebsd-arm@freebsd.org > Message-ID: <4E85949F.1000004@swin.edu.au> > Content-Type: text/plain; charset=ISO-8859-1; format=flowed > > On 21/09/11 00:42, Naoyuki Tai wrote: >> On Tue, 20 Sep 2011 10:35:23 -0400, Aleksandr Rybalko wrote: >> >>> On Tue, 20 Sep 2011 10:12:07 -0400 >>> "Naoyuki Tai" wrote: >>> >>>>> On Tue, 20 Sep 2011 09:05:44 -0400, Aleksandr Rybalko >>>>> wrote: >>>>> >>>>> > On Tue, 20 Sep 2011 01:37:10 -0400 >>>>> > Naoyuki Tai wrote: >>>>> > >>>>> >>> Hello, >>>>> >>> >>>>> >>> I'm new to the FreeBSD/arm, bought a DreamPlug from GlobalScale, >>>>> >>> hoping to turn it into a FreeBSD file server. >>>>> >>> >>>>> >>> I followed the "http://wiki.freebsd.org/FreeBSDMarvell", and >>>>> >>> created kernel.bin. After giving it a "go", it hangs. >>>>> >>> >>>>> >>> I must have built the kernel.bin wrong but I have no clue as to >>>>> >>> what I did wrong. >>>>> >>> Any clue/help is appreciated. >>>>> >>> >>>>> >>> Thanks! >>>>> >>> >>>>> >>> -- Tai >>>>> >>> >>>>> >>> U-Boot 2011.06-02334-g8f495d9-dirty (May 31 2011 - 02:06:26) >>>>> >>> Marvell-DreamPlug >>>>> >>> >>>>> >>> SoC: Kirkwood 88F6281_A0 >>>>> >>> CPU running @ 1200Mhz L2 running @ 400Mhz >>>>> >>> SysClock = 400Mhz , TClock = 200Mhz >>>>> >>> DRAM: 512 MiB >>>>> >>> SF: Detected MX25L1606 with page size 256, total 1 MiB >>>>> >>> In: serial >>>>> >>> Out: serial >>>>> >>> Err: serial >>>>> >>> Net: egiga0, egiga1 >>>>> >>> 88E1116 Initialized on egiga0 >>>>> >>> 88E1116 Initialized on egiga1 >>>>> >>> Hit any key to stop autoboot: 0 >>>>> >>> Marvell>> setenv serverip 192.168.10.3 >>>>> >>> Marvell>> setenv ipaddr 192.168.10.55 >>>>> >>> Marvell>> tftpboot 6400000 arm/kernel.bin >>>>> >>> Using egiga0 device >>>>> >>> TFTP from server 192.168.10.3; our IP address is 192.168.10.55 >>>>> >>> Filename 'arm/kernel.bin'. >>>>> >>> Load address: 0x6400000 >>>>> >>> Loading: >>>>> >>> ################################################################# >>>>> >>> ################################################################# >>>>> >>> ################################################################# >>>>> >>> ############################ >>>>> >>> done >>>>> >>> Bytes transferred = 3272884 (31f0b4 hex) >>>>> >>> Marvell>> go 0x6400000 >>>>> >>> ## Starting application at 0x06400000 ... >>>>> >>> >>>>> > >>>>> > Hi, >>>>> > >>>>> > Did you try address 0x900000 instead of 6400000? >>>>> > >>>>> > WBW >>>>> >>>>> I tried 90000 and it works. >>>>> Thanks. >>>>> >>>>> I don't understand the memory space allocation. 640000 is used >>>>> for the linux, and I imagined that's the base address for kernel. >>>>> >>>>> Where can I learn the reason why it's 90000? >>> >>> 0x00000000 is physical memory location, so if MMU turned off, memory >>> operations not translated (virtual <--> physical). Physical memory >>> location may vary between different ARM CPUs, IIRC. >>> But for Kirkwood - this is true. >>> >>> And also important which base we set in kernel while compiling, >>> because code may start to work on every location, but first jump will >>> call some black hole :) >>> >>> >>>>> Thanks! >>>>> >>>>> -- Tai >> >> >> Got it. It is mentioned in >> >> /usr/src/sys/arm/mv/kirkwood/std.kirkwood >> >> makeoptions KERNPHYSADDR=0x00900000 >> >> Thanks. >> > > I don't know.. it just doesn't work for me. > > U-Boot 2011.06-02334-g8f495d9-dirty (Mar 28 2011 - 05:21:06) > Marvell-DreamPlug > > SoC: Kirkwood 88F6281_A0 > DRAM: 512 MiB > SF: Detected MX25L1606 with page size 256, total 1 MiB > In: serial > Out: serial > Err: serial > Net: egiga0, egiga1 > 88E1121 Initialized on egiga0 > 88E1121 Initialized on egiga1 > Hit any key to stop autoboot: 0 > Marvell>> set ipaddr 192.168.12.80 > Marvell>> set serverip 192.168.12.81 > Marvell>> tftpboot 0x900000 kernel.bin > No link on egiga0 > Using egiga1 device > TFTP from server 192.168.12.81; our IP address is 192.168.12.80 > Filename 'kernel.bin'. > Load address: 0x900000 > Loading: ################################################################# > ################################################################# > ################################################################# > ################################### > done > Bytes transferred = 3366392 (335df8 hex) > Marvell>> go 0x900000 > ## Starting application at 0x00900000 ... > > > And there it just hangs. > Kernel compiled with: > KERNCONF=DB-88F6XXX > TARGET=arm > TARGET_ARCH=arm > > Help? > > Mat I've been playing around a bit with FreeBSD on the Dreamplug during the last few days and had some issues as well, however here's what I got so far: first I didn't manage to get it to work with a dynamic fdt, so you'll need a static one (see attachment). second I found a somewhat customized and pretty stripped kernel config more useful, so I'll attach mine as well to give you some guidance. finally for booting on the plug: there are basically two options here: first is to boot via go as you already tried second (which I find nicer) is to use mkimage from the ports collection to create an image file uboot can read which should be issues like this: mkimage -A arm -O linux -T kernel -C none -a 900000 -e 900000 -n "FreeBSD" -d kernel.bin image_name or if you have a compressed kernel: mkimage -A arm -O linux -T kernel -C gzip -a 900000 -e 900000 -n "FreeBSD" -d kernel.bin.gz image_name if you go for the image, you can use the default boot options as guidance (just load the image at 640000 or whatever and boot it - it'll be moved to the prroper place and executed there) note that -O linux isn't required - e.g. -O netbsd works as well - however -O FreeBSD doesn't work as u-boot recognizes it, but doesn't have a bootcmd implemented for it. following that I got most things to work so far (except libertas chip in ap mode as that one is lacking a proper driver - especially an sdio one). RlyDontKnow --=_2v0lx7490r7 Content-Type: text/plain; charset=UTF-8; name="DREAMPLUG" Content-Disposition: attachment; filename="DREAMPLUG" Content-Transfer-Encoding: 7bit # # Custom kernel for Marvell DB-88F6xxx boards. # # $FreeBSD: src/sys/arm/conf/DB-88F6XXX,v 1.12 2011/08/07 20:16:46 rmacklem Exp $ # ident DREAMPLUG include "../mv/kirkwood/std.dreamplug" options SOC_MV_KIRKWOOD makeoptions MODULES_OVERRIDE="zfs opensolaris zlib" #makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols makeoptions WERROR="-Werror" # SCHEDULER options SCHED_4BSD # InterNETworking options INET options INET6 # Filesystems options FFS # Berkeley Fast Filesystem options CD9660 # ISO 9660 Filesystem options MSDOSFS options PSEUDOFS # NFS options NFSCL options NFSD options NFSLOCKD options NFS_ROOT # netboot #options BOOTP #options BOOTP_NFSROOT #options BOOTP_WIRED_TO=mge0 options ROOTDEVNAME=\"ufs:/dev/da1s3a\" # core options options SYSVSHM #SYSV-style shared memory options SYSVMSG #SYSV-style message queues options SYSVSEM #SYSV-style semaphores options _KPOSIX_PRIORITY_SCHEDULING #Posix P1003_1B real-time extensions options MUTEX_NOINLINE options RWLOCK_NOINLINE options NO_FFS_SNAPSHOT options NO_SWAPPING # Debugging #options ALT_BREAK_TO_DEBUGGER #options DDB #options DEADLKRES #Enable the deadlock resolver #options DIAGNOSTIC #options INVARIANTS #Enable calls of extra sanity checking #options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS #options KDB #options WITNESS #Enable checks to detect deadlocks and cycles #options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed #options WITNESS_KDB # PCI device pci # Pseudo devices device loop device md device pty device random device firmware device crypto device bpf # Berkley Packet Filter - required for dhcp # Serial ports device uart # Networking device ether device mii # required by mge device mge # Marvell Gigabit Ethernet controller # USB options USB_DEBUG device usb device ehci device umass device usfs device cdce # USB audio (requires USB) device sound device snd_uaudio # I2C (TWSI) device iic device iicbus # SATA device mvs # CAM/SCSI device scbus device da device ch # WLAN device wlan # 802.11 support device wlan_wep # 802.11 WEP support device wlan_ccmp # 802.11 CCMP support device wlan_tkip # 802.11 TKIP support device malo # Marvell Libertas Chipset # Flattened Device Tree options FDT options FDT_DTB_STATIC makeoptions FDT_DTS_FILE=dreamplug.dts # PF device pf device pflog device pfsync # ALTQ options ALTQ options ALTQ_CBQ # Class Bases Queuing (CBQ) options ALTQ_RED # Random Early Detection (RED) options ALTQ_RIO # RED In/Out options ALTQ_HFSC # Hierarchical Packet Scheduler (HFSC) options ALTQ_PRIQ # Priority Queuing (PRIQ) # IPSEC options IPSEC options IPSEC_NAT_T # GEOM options GEOM_PART_MBR options GEOM_PART_GPT options GEOM_PART_BSD options GEOM_LABEL options GEOM_ELI --=_2v0lx7490r7--