From owner-freebsd-embedded@FreeBSD.ORG Mon Oct 6 11:06:52 2008 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E7ADB106568E for ; Mon, 6 Oct 2008 11:06:52 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id D64B88FC08 for ; Mon, 6 Oct 2008 11:06:52 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.2/8.14.2) with ESMTP id m96B6qqr035434 for ; Mon, 6 Oct 2008 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.2/8.14.1/Submit) id m96B6qKE035430 for freebsd-embedded@FreeBSD.org; Mon, 6 Oct 2008 11:06:52 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 6 Oct 2008 11:06:52 GMT Message-Id: <200810061106.m96B6qKE035430@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-embedded@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 11:06:53 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o kern/101228 embedded [nanobsd] [patch] Two more entries for FlashDevice.sub o misc/52256 embedded [picobsd] picobsd build script does not read in user/s o kern/42728 embedded [picobsd] many problems in src/usr.sbin/ppp/* after c o misc/15876 embedded [picobsd] PicoBSD message of the day problems 4 problems total. From owner-freebsd-embedded@FreeBSD.ORG Mon Oct 6 17:21:49 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A10571065686 for ; Mon, 6 Oct 2008 17:21:49 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out4.smtp.messagingengine.com (out4.smtp.messagingengine.com [66.111.4.28]) by mx1.freebsd.org (Postfix) with ESMTP id 7904B8FC12 for ; Mon, 6 Oct 2008 17:21:49 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id F22E6175F50 for ; Mon, 6 Oct 2008 13:21:48 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 06 Oct 2008 13:21:48 -0400 X-Sasl-enc: NCjt3y3PQROgtbJ9xgIVVkhw/DKW5Pg8rVVoN2+KZSL2 1223313708 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 9BC44290F9 for ; Mon, 6 Oct 2008 13:21:48 -0400 (EDT) Message-ID: <48EA492B.6040804@incunabulum.net> Date: Mon, 06 Oct 2008 18:21:47 +0100 From: Bruce M Simpson User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: freebsd-embedded@freebsd.org X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Most useful JTAG page ever. X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 17:21:49 -0000 At least two folk have asked me for this link: http://www.freelabs.com/~whitis/electronics/jtag/ He hits the nail on the head, explains clearly the political and economic problems JTAG has faced, and explains graphically how it fits together with clear schematic diagrams. cheers BMS From owner-freebsd-embedded@FreeBSD.ORG Mon Oct 6 21:13:19 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FEBF1065689 for ; Mon, 6 Oct 2008 21:13:19 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: from mail-gx0-f21.google.com (mail-gx0-f21.google.com [209.85.217.21]) by mx1.freebsd.org (Postfix) with ESMTP id 9E8398FC19 for ; Mon, 6 Oct 2008 21:13:18 +0000 (UTC) (envelope-from bahamasfranks@gmail.com) Received: by gxk14 with SMTP id 14so5478747gxk.19 for ; Mon, 06 Oct 2008 14:13:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:reply-to :sender:to:subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references :x-google-sender-auth; bh=jNsSc7/jKjvCKQAYGwWuhuXhnvPgvmx2aAieSQZqSd0=; b=T1ubq0RBAhZgfiGLUmQA5/Sf7avMt2ITtCA0sq8xy5h4rYOhn4tmZ82VbNwK4hgbAc kLfKXOujgkWAzBa6fiDZimlP+kekw6lKQPPVPCXjBf4UsArT7T+u9OXzcQcfZemTtEO8 3IHcg76qXLHq+aa77ijzxMCo8zk5DccCAE2bo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:reply-to:sender:to:subject:cc:in-reply-to :mime-version:content-type:content-transfer-encoding :content-disposition:references:x-google-sender-auth; b=riPqPBpJExeu5Ich265yuWqmaL25icoQYhuhVfuwQLv6gMspX3cH2z0UiG+oUJYq8y a1+n2acUMa8JV8PGLr3B8pi/BOKssaJKlujCuBfB4e7cA0sp15FcKIwPnEajE7bsmWtz P2KGQ+46put4km6LLxuKfiBLh5gRaYlEZQ8Xo= Received: by 10.142.105.13 with SMTP id d13mr2198841wfc.275.1223326102265; Mon, 06 Oct 2008 13:48:22 -0700 (PDT) Received: by 10.142.44.17 with HTTP; Mon, 6 Oct 2008 13:48:22 -0700 (PDT) Message-ID: <539c60b90810061348w5120260fo25762ee06883da77@mail.gmail.com> Date: Mon, 6 Oct 2008 13:48:22 -0700 From: "Steve Franks" Sender: bahamasfranks@gmail.com To: "Bruce M Simpson" In-Reply-To: <48EA492B.6040804@incunabulum.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <48EA492B.6040804@incunabulum.net> X-Google-Sender-Auth: db33ba08989bdd9c Cc: freebsd-embedded@freebsd.org Subject: Re: Most useful JTAG page ever. X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: stevefranks@ieee.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 06 Oct 2008 21:13:19 -0000 On Mon, Oct 6, 2008 at 10:21 AM, Bruce M Simpson wrote: > At least two folk have asked me for this link: > > http://www.freelabs.com/~whitis/electronics/jtag/ > > He hits the nail on the head, explains clearly the political and economic > problems JTAG has faced, and explains graphically how it fits together with > clear schematic diagrams. > > cheers > BMS > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.org" > Note that ports/devel/urjtag has become a relatively comprehensive tool for operating jtag dongles with bsdl & svf files. It operates on alot of the things mentioned as properietary or difficult in this document, but the Xilinx brand cable is still slow (ft2232 cables are best). Yes, I am the new maintainer, so I'm biased ;) Steve From owner-freebsd-embedded@FreeBSD.ORG Tue Oct 7 01:28:18 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4CA61065688 for ; Tue, 7 Oct 2008 01:28:18 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 7B33C8FC15 for ; Tue, 7 Oct 2008 01:28:18 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id A3ABC177C4D; Mon, 6 Oct 2008 21:28:17 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Mon, 06 Oct 2008 21:28:17 -0400 X-Sasl-enc: MthekdJPcEspAOsYqpNZgRVEFbXwmx2e+qDCV6UseyxF 1223342897 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 2C29C31ACA; Mon, 6 Oct 2008 21:28:17 -0400 (EDT) Message-ID: <48EABB2F.8060408@incunabulum.net> Date: Tue, 07 Oct 2008 02:28:15 +0100 From: Bruce M Simpson User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: stevefranks@ieee.org References: <48EA492B.6040804@incunabulum.net> <539c60b90810061348w5120260fo25762ee06883da77@mail.gmail.com> In-Reply-To: <539c60b90810061348w5120260fo25762ee06883da77@mail.gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-embedded@freebsd.org Subject: Re: Most useful JTAG page ever. X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 01:28:18 -0000 Steve Franks wrote: > Note that ports/devel/urjtag has become a relatively comprehensive > tool for operating jtag dongles with bsdl & svf files. It operates on > alot of the things mentioned as properietary or difficult in this > document, but the Xilinx brand cable is still slow (ft2232 cables are > best). Yes, I am the new maintainer, so I'm biased ;) > urjtag has already been a most excellent and useful tool for tracking that flash writes were doing the right thing on Friday (got U-Boot onto the Linksys NSLU2, with help from Rink Springer and Rafal Jaworowski), thanks for taking the helm. I have a USB Altera ByteBlaster clone on order from Hong Kong, I'll see how it fares with urjtag when it arrives. [I hear the BDI3000 is the "must have" fashion accessory this year, for folk who have bankroll though.] At the moment I'm trying to figure out where I've gone wrong with the JTAG pinout for the Freecom FSG3. Its shipping version of RedBoot is a bit friendlier than the NSLU2's. cheers BMS From owner-freebsd-embedded@FreeBSD.ORG Tue Oct 7 01:40:41 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B8B871065687 for ; Tue, 7 Oct 2008 01:40:41 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 8E57E8FC0C for ; Tue, 7 Oct 2008 01:40:41 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 264A41775CE for ; Mon, 6 Oct 2008 21:40:41 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Mon, 06 Oct 2008 21:40:41 -0400 X-Sasl-enc: BU/lwPR1hmh11vAhGEaZcdE4PljV8C/9mTY/Z09gokwm 1223343640 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id A97A226EAB for ; Mon, 6 Oct 2008 21:40:40 -0400 (EDT) Message-ID: <48EABE17.3010104@incunabulum.net> Date: Tue, 07 Oct 2008 02:40:39 +0100 From: Bruce M Simpson User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: freebsd-embedded@freebsd.org X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Problems with NSLU2 and U-Boot X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 01:40:41 -0000 I am trying to get the NSLU2 to natively boot FreeBSD from flash itself w/o any TFTP server. Thanks to Rink and Rafal's help, I managed to get U-Boot installed and working on the Linksys NSLU2. Using hints from the OpenMoko page, I generated a U-Boot image from an NSLU2 kernel build from -CURRENT, and managed to boot it over the network -- however -- the kernel is not coming up. mkimage hints here: http://wiki.openmoko.org/wiki/FreeBSD If I add 'options VERBOSE_SYSINIT' to the kernel config, I can see that the kernel is going off into space... right after init_turnstile0() is called. MMU problems? [I had to track this down with nm, as addr2line seems to only print the first patch.] I saw similar symptoms when trying to boot with the simple ELF trampoline, from both RedBoot and U-Boot on the NSLU2. An ELF kernel loaded into RedBoot seemed to work just fine, providing the load address was given explicitly. [Recall: The problem with RedBoot on the NSLU2 is that its boot-time settings cannot be changed, it is locked into executing a Linux-style image at a hard wired address, so a change of firmware may be necessary in order to boot FreeBSD natively on that platform.] cheers BMS From owner-freebsd-embedded@FreeBSD.ORG Tue Oct 7 04:15:09 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 33A9C1065689 for ; Tue, 7 Oct 2008 04:15:09 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id EA9828FC1A for ; Tue, 7 Oct 2008 04:15:08 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 1E4DE178173 for ; Tue, 7 Oct 2008 00:15:08 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Tue, 07 Oct 2008 00:15:08 -0400 X-Sasl-enc: pDv7zH4FIgZ+NR2LWzdlaPW9b0xX6uRqKXhPfBqcXXqG 1223352907 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 842E4270D5 for ; Tue, 7 Oct 2008 00:15:07 -0400 (EDT) Message-ID: <48EAE24A.2070205@incunabulum.net> Date: Tue, 07 Oct 2008 05:15:06 +0100 From: Bruce M Simpson User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: freebsd-embedded@freebsd.org X-Enigmail-Version: 0.95.6 Content-Type: multipart/mixed; boundary="------------010405070808070703080904" Subject: Freecom FSG3 pc X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 04:15:09 -0000 This is a multi-part message in MIME format. --------------010405070808070703080904 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit I tried booting a kernel on the FSG3 once again. The board will power from both 5V and 12V supply voltages, this is mostly to deal with driving a PATA drive. The default Redboot config can be rewritten with fconfig -l, which is useful -- it expects to load a Linux zImage style kernel from the first partition, see here: http://www.nslu2-linux.org/wiki/FSG3/FisCmds It is necessary to hold down the config reset button at the back to get Redboot to init the network ports. You need to CTRL-C it to stop it loading a recovery Linux kernel image. Kernel config is mostly as per NSLU2, but with some twists. There is an onboard Via VT6421A SATA/PATA controller, and an NEC EHCI controller, however neither of them appear to probe on the PCI bus. it looks like neither of them are activated by the firmware so they most likely need to have base addresses set up from scratch by the PCI code, something I believe we don't yet support? It appears the PHY on board should be supported by the "rlswitch" driver. I keep getting this even with full miibus compiled in: %%% npe0: on ixp0 npe0: [MPSAFE] npe0: [ITHREAD] npe0: using npe.0.mac=A override npe0: using npe.0.mii=A override npe0: remember to fix rx q setup npe0: using npe.0.phy=5 override npe0: Cannot find my PHY. device_attach: npe0 attach returned 6 npe1: on ixp0 npe1: [MPSAFE] npe1: [ITHREAD] npe1: using npe.1.mac=B override npe1: using npe.1.mii=A override npe1: remember to fix rx q setup npe1: using npe.1.phy=4 override npe1: Cannot find my PHY. device_attach: npe1 attach returned 6 %%% I've tried forcing the PHY numbers to what's in a Linux dmesg (5 and 4 respectively), hints look like this: %%% hint.npe.0.at="ixp0" hint.npe.0.mac="A" hint.npe.0.mii="A" hint.npe.0.phy=5 hint.npe.1.at="ixp0" hint.npe.1.mac="B" hint.npe.1.mii="A" hint.npe.1.phy=4 %%% No joy, even if I switch the PHY numbers around. Which datasheets am I going to have to look at? ... I've attached a boot.log for the curious. cheers BMS --------------010405070808070703080904 Content-Type: text/plain; name="boot.log" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="boot.log" +Ethernet eth0: MAC address 00:01:db:00:54:d0 IP: 192.168.123.150/255.255.255.0, Gateway: 192.168.123.1 Default server: 0.0.0.0, DNS server IP: 192.168.123.1 RedBoot(tm) bootstrap and debug environment [ROM] Red Hat certified release, version 1.94 - built 11:47:48, Jun 10 2005 Platform: Freecom Storage Gateway (FSG) (XScale) BE Copyright (C) 2000, 2001, 2002, 2003, 2004 Red Hat, Inc. RAM: 0x00000000-0x04000000, 0x0001db58-0x03fd0000 available FLASH: 0x50000000 - 0x50400000, 32 blocks of 0x00020000 bytes each. FREECOM ermergency button pressed! == Executing boot script in 5.000 seconds - enter ^C to abort ^C RedBoot> help load Load a file load [-r] [-v] [-d] [-h ] [-m ] [-c ] [-b ] RedBoot> load -h 192.168.123.17 -v -b 0x200000 kernel Using default protocol (TFTP) Address offset = 0x40000000 Entry point: 0x00200100, address range: 0x00200000-0x00423518 RedBoot> go GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2008 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 8.0-CURRENT #9: Tue Oct 7 05:08:49 BST 2008 root@anglepoise.lon.incunabulum.net:/home/obj/nanobsd.testusb/arm/home/bms/svn/head/sys/FSG3 Preloaded elf kernel "elf kernel" at 0xc043a2bc. CPU: IXP425 266MHz rev 1 (ARMv5TE) (XScale core) DC enabled IC enabled WB enabled LABT branch prediction enabled 32KB/32B 32-way Instruction cache 32KB/32B 32-way write-back-locking Data cache real memory = 67108864 (64 MB) Physical memory chunk(s): 0x10544000 - 0x13ec5fff, 60301312 bytes (14722 pages) avail memory = 59650048 (56 MB) ULE: setup cpu 0 firmware: 'npe_fw' version 0: 35900 bytes loaded at 0xc0419b04 random: mem: null: ixp0: on motherboard pcib0: on ixp0 pci0: on pcib0 pci0: domain=0, physical bus=0 ixpclk0: on ixp0 ixpiic0: on ixp0 iicbb0: on ixpiic0 iicbus0: on iicbb0 master-only iic0: on iicbus0 x1226rtc0: at addr 0x6f on iicbus0 x1226rtc0: registered as a time-of-day clock (resolution 1000us) ixpwdog0: on ixp0 uart0: on ixp0 uart0: [FILTER] uart0: fast interrupt uart0: console (115200,n,8,1) uart1: on ixp0 uart1: [FILTER] uart1: fast interrupt ixpqmgr0: on ixp0 ixpqmgr0: [MPSAFE] ixpqmgr0: [ITHREAD] ixpqmgr0: [MPSAFE] ixpqmgr0: [ITHREAD] npe0: on ixp0 npe0: [MPSAFE] npe0: [ITHREAD] npe0: using npe.0.mac=A override npe0: using npe.0.mii=A override npe0: remember to fix rx q setup npe0: using npe.0.phy=4 override npe0: Cannot find my PHY. device_attach: npe0 attach returned 6 npe1: on ixp0 npe1: [MPSAFE] npe1: [ITHREAD] npe1: using npe.1.mac=B override npe1: using npe.1.mii=A override npe1: remember to fix rx q setup npe1: using npe.1.phy=5 override npe1: Cannot find my PHY. device_attach: npe1 attach returned 6 ixpclk0: [FILTER] Timecounter "IXP425 Timer" frequency 66666600 Hz quality 1000 Timecounters tick every 10.000 msec lo0: bpf attached Trying to mount root from ufs:/dev/da0s1a Manual root filesystem specification: : Mount using filesystem eg. ufs:/dev/da0a ? List valid disk boot devices Abort manual input mountroot> --------------010405070808070703080904-- From owner-freebsd-embedded@FreeBSD.ORG Tue Oct 7 11:23:35 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A2CFC1065687 for ; Tue, 7 Oct 2008 11:23:35 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from mout3.freenet.de (mout3.freenet.de [IPv6:2001:748:100:40::2:5]) by mx1.freebsd.org (Postfix) with ESMTP id 38E9E8FC12 for ; Tue, 7 Oct 2008 11:23:35 +0000 (UTC) (envelope-from gary.jennejohn@freenet.de) Received: from [195.4.92.22] (helo=12.mx.freenet.de) by mout3.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #65) id 1KnAf4-0006LP-Jp; Tue, 07 Oct 2008 13:23:30 +0200 Received: from mbe70.m.pppool.de ([89.49.190.112]:41212 helo=ernst.jennejohn.org) by 12.mx.freenet.de with esmtpa (ID gary.jennejohn@freenet.de) (port 25) (Exim 4.69 #65) id 1KnAf4-0005PF-BW; Tue, 07 Oct 2008 13:23:30 +0200 Date: Tue, 7 Oct 2008 13:23:22 +0200 From: Gary Jennejohn To: Bruce M Simpson Message-ID: <20081007132322.0fa40197@ernst.jennejohn.org> In-Reply-To: <48EABB2F.8060408@incunabulum.net> References: <48EA492B.6040804@incunabulum.net> <539c60b90810061348w5120260fo25762ee06883da77@mail.gmail.com> <48EABB2F.8060408@incunabulum.net> X-Mailer: Claws Mail 3.5.0 (GTK+ 2.12.11; amd64-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-embedded@freebsd.org Subject: Re: Most useful JTAG page ever. X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: gary.jennejohn@freenet.de List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 07 Oct 2008 11:23:35 -0000 On Tue, 07 Oct 2008 02:28:15 +0100 Bruce M Simpson wrote: > I have a USB Altera ByteBlaster clone on order from Hong Kong, I'll see > how it fares with urjtag when it arrives. [I hear the BDI3000 is the > "must have" fashion accessory this year, for folk who have bankroll though.] > I have a BDI2000. When I asked a colleague, who sells BDIs, whether it was worth upgrading he answered "No" rather emphatically. --- Gary Jennejohn From owner-freebsd-embedded@FreeBSD.ORG Wed Oct 8 18:16:24 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FF7B1065686 for ; Wed, 8 Oct 2008 18:16:24 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id EA1D48FC17 for ; Wed, 8 Oct 2008 18:16:23 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 6DDAC1780E6 for ; Wed, 8 Oct 2008 14:16:23 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute2.internal (MEProxy); Wed, 08 Oct 2008 14:16:23 -0400 X-Sasl-enc: KkMP8/1HfYLf1IQv94tIJHw+7F9V5O8NsMQN3aAE96Mo 1223489783 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 014DDB114 for ; Wed, 8 Oct 2008 14:16:22 -0400 (EDT) Message-ID: <48ECF8F5.8090805@incunabulum.net> Date: Wed, 08 Oct 2008 19:16:21 +0100 From: Bruce M Simpson User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: freebsd-embedded@freebsd.org X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Broadcom MIPS kernel bit-rot X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 18:16:24 -0000 It appears that the build for Broadcom MIPS kernels has bit-rotted. I am able to build a kernel with SENTRY5 config, however it will no longer boot on the WGT634U. The root cause appears to be a change in the ld behaviour. For whatever reason, the linker will now produce an ELF kernel which has offsets pointing backwards in the file, even though it didn't before, and "makeoptions LDSCRIPT_NAME" is being used to coax it to use the config which used to work for CFE. CFE, of course, is unable to load ELF kernels via TFTP, unless their program headers appear in the order in which they are actually accessed. This is purely a limitation of how CFE implements TFTP ELF load. Looking in the Perforce history I can't see anything which could obviously have broken this, it is clear however that ld is now behaving very differently. Questions: Has the version of ld/binutils in FreeBSD changed in -CURRENT since the MIPS code was imported to the main tree? That's all I can really think of at the moment, not much I can try here. U-Boot isn't on the Sentry5. cheers BMS From owner-freebsd-embedded@FreeBSD.ORG Wed Oct 8 21:07:08 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 589A210656AD for ; Wed, 8 Oct 2008 21:07:08 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 151658FC2E for ; Wed, 8 Oct 2008 21:07:08 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from localhost (localhost [127.0.0.1]) by harmony.bsdimp.com (8.14.2/8.14.1) with ESMTP id m98L6EAD035409; Wed, 8 Oct 2008 15:06:14 -0600 (MDT) (envelope-from imp@bsdimp.com) Date: Wed, 08 Oct 2008 15:07:16 -0600 (MDT) Message-Id: <20081008.150716.570083949.imp@bsdimp.com> To: bms@incunabulum.net From: "M. Warner Losh" In-Reply-To: <48ECF8F5.8090805@incunabulum.net> References: <48ECF8F5.8090805@incunabulum.net> X-Mailer: Mew version 5.2 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: freebsd-embedded@freebsd.org Subject: Re: Broadcom MIPS kernel bit-rot X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 21:07:08 -0000 I think this may be a change in the SGI style ELF binaries to a Traditional SYS V style that we did before we imported the code, but after you did the original work on the sentry... Warner In message: <48ECF8F5.8090805@incunabulum.net> Bruce M Simpson writes: : It appears that the build for Broadcom MIPS kernels has bit-rotted. : : I am able to build a kernel with SENTRY5 config, however it will no : longer boot on the WGT634U. : : The root cause appears to be a change in the ld behaviour. For whatever : reason, the linker will now produce an ELF kernel which has offsets : pointing backwards in the file, even though it didn't before, and : "makeoptions LDSCRIPT_NAME" is being used to coax it to use the config : which used to work for CFE. : : CFE, of course, is unable to load ELF kernels via TFTP, unless their : program headers appear in the order in which they are actually accessed. : This is purely a limitation of how CFE implements TFTP ELF load. : : Looking in the Perforce history I can't see anything which could : obviously have broken this, it is clear however that ld is now behaving : very differently. : : Questions: : Has the version of ld/binutils in FreeBSD changed in -CURRENT since the : MIPS code was imported to the main tree? : : That's all I can really think of at the moment, not much I can try here. : U-Boot isn't on the Sentry5. : : cheers : BMS : _______________________________________________ : freebsd-embedded@freebsd.org mailing list : http://lists.freebsd.org/mailman/listinfo/freebsd-embedded : To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.org" : : From owner-freebsd-embedded@FreeBSD.ORG Wed Oct 8 23:23:58 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8DAB71065687 for ; Wed, 8 Oct 2008 23:23:58 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from smtp.ht-systems.ru (mr0.ht-systems.ru [78.110.50.55]) by mx1.freebsd.org (Postfix) with ESMTP id 091018FC20 for ; Wed, 8 Oct 2008 23:23:57 +0000 (UTC) (envelope-from stas@FreeBSD.org) Received: from [85.21.245.235] (helo=orion.SpringDaemons.com) by smtp.ht-systems.ru with esmtpa (Exim 4.62) (envelope-from ) id 1Knhx2-0006gN-OO; Thu, 09 Oct 2008 02:56:16 +0400 Received: from orion (localhost [127.0.0.1]) by orion.SpringDaemons.com (Postfix) with SMTP id F30B9398F1; Thu, 9 Oct 2008 02:56:45 +0400 (MSD) Date: Thu, 9 Oct 2008 02:56:41 +0400 From: Stanislav Sedov To: Bruce M Simpson Message-Id: <20081009025641.e6d015bb.stas@FreeBSD.org> In-Reply-To: <48EABE17.3010104@incunabulum.net> References: <48EABE17.3010104@incunabulum.net> Organization: The FreeBSD Project X-XMPP: ssedov@jabber.ru X-Voice: +7 916 849 20 23 X-PGP-Fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 X-Mailer: carrier-pigeon Mime-Version: 1.0 Content-Type: multipart/signed; protocol="application/pgp-signature"; micalg="PGP-SHA1"; boundary="Signature=_Thu__9_Oct_2008_02_56_41_+0400_1Wip06T1sB.p5Zjm" Cc: freebsd-embedded@freebsd.org Subject: Re: Problems with NSLU2 and U-Boot X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 08 Oct 2008 23:23:58 -0000 --Signature=_Thu__9_Oct_2008_02_56_41_+0400_1Wip06T1sB.p5Zjm Content-Type: text/plain; charset=US-ASCII Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, 07 Oct 2008 02:40:39 +0100 Bruce M Simpson mentioned: > I am trying to get the NSLU2 to natively boot FreeBSD from flash itself=20 > w/o any TFTP server. >=20 > Thanks to Rink and Rafal's help, I managed to get U-Boot installed and=20 > working on the Linksys NSLU2. > Using hints from the OpenMoko page, I generated a U-Boot image from an=20 > NSLU2 kernel build from -CURRENT, and managed to boot it over the=20 > network -- however -- the kernel is not coming up. > mkimage hints here: http://wiki.openmoko.org/wiki/FreeBSD >=20 > If I add 'options VERBOSE_SYSINIT' to the kernel config, I can see that=20 > the kernel is going off into space... right after init_turnstile0() is=20 > called. MMU problems? >=20 > [I had to track this down with nm, as addr2line seems to only print the=20 > first patch.] >=20 > I saw similar symptoms when trying to boot with the simple ELF=20 > trampoline, from both RedBoot and U-Boot on the NSLU2. An ELF kernel=20 > loaded into RedBoot seemed to work just fine, providing the load address= =20 > was given explicitly. >=20 > [Recall: The problem with RedBoot on the NSLU2 is that its boot-time=20 > settings cannot be changed, it is locked into executing a Linux-style=20 > image at a hard wired address, so a change of firmware may be necessary=20 > in order to boot FreeBSD natively on that platform.] >=20 Are you sure that u-boot loads your kernel to correct address. Have you tryed loading a plain ELF image (or binary) and jumping to entry point? --=20 Stanislav Sedov ST4096-RIPE --Signature=_Thu__9_Oct_2008_02_56_41_+0400_1Wip06T1sB.p5Zjm Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEARECAAYFAkjtOq0ACgkQK/VZk+smlYGvyACfZfmiWAWcxe1oJRJTlHWtd3KH wVAAniAQix0ppQQ5m2Ei0oHv45fqsKyI =J7Tc -----END PGP SIGNATURE----- --Signature=_Thu__9_Oct_2008_02_56_41_+0400_1Wip06T1sB.p5Zjm-- From owner-freebsd-embedded@FreeBSD.ORG Sat Oct 11 12:10:33 2008 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 795BF10657A5 for ; Sat, 11 Oct 2008 12:10:33 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 206688FC21 for ; Sat, 11 Oct 2008 12:10:32 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 2BC2817902C for ; Sat, 11 Oct 2008 08:10:32 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Sat, 11 Oct 2008 08:10:32 -0400 X-Sasl-enc: +9mcz8Uay9Xa2KSOj11jgQw4S2+FGj+goD80RRpWimfp 1223727031 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 5110DAFFC for ; Sat, 11 Oct 2008 08:10:31 -0400 (EDT) Message-ID: <48F097B5.8010207@incunabulum.net> Date: Sat, 11 Oct 2008 13:10:29 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) MIME-Version: 1.0 To: freebsd-embedded@FreeBSD.org Content-Type: multipart/mixed; boundary="------------020506050704000407060408" Cc: Subject: FSG3 phy attempt X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2008 12:10:33 -0000 This is a multi-part message in MIME format. --------------020506050704000407060408 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Hi, Here's a diff containing all my work on attempting to get the PHY up on the FSG3. It is unsuccessful but might be a starting point for someone else. I can forward my last mail to Pyun about it if that helps. thanks BMS --------------020506050704000407060408 Content-Type: text/plain; name="fsg3.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="fsg3.diff" Index: dev/mii/rlswitch.c =================================================================== --- dev/mii/rlswitch.c (revision 183760) +++ dev/mii/rlswitch.c (working copy) @@ -59,7 +59,8 @@ #include "miibus_if.h" //#define RL_DEBUG -#define RL_VLAN +//#define RL_VLAN +//#define RL_IS_RTL8305SB static int rlswitch_probe(device_t); static int rlswitch_attach(device_t); @@ -119,6 +120,7 @@ sc->mii_dev = device_get_parent(dev); mii = device_get_softc(sc->mii_dev); +#if 1 /* * We handle all pseudo PHY in a single instance, so never allow * non-zero * instances! @@ -127,6 +129,7 @@ device_printf(dev, "ignoring this PHY, non-zero instance\n"); return (ENXIO); } +#endif LIST_INSERT_HEAD(&mii->mii_phys, sc, mii_list); @@ -359,9 +362,11 @@ MIIBUS_WRITEREG(sc->mii_dev, 4, 25, val); #endif +#if 0 #ifdef RL_DEBUG rlswitch_phydump(dev); #endif +#endif MIIBUS_MEDIAINIT(sc->mii_dev); return (0); } Index: dev/iicbus/x1226rtc.c =================================================================== --- dev/iicbus/x1226rtc.c (revision 0) +++ dev/iicbus/x1226rtc.c (revision 0) @@ -0,0 +1,223 @@ +/*- + * Copyright (c) 2008 Bruce M. Simpson. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. + * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, + * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY + * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF + * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +#include +__FBSDID("$FreeBSD$"); + +/* + * Intersil/Xicor X1226 RTC on I2C "2-wire" bus. + * + * Note: The Linksys NSLU2 actually has an X1205 on the board. + */ +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include + +#include "iicbus_if.h" +#include "clock_if.h" + +#ifndef IIC_M_WR +#define IIC_M_WR 0 /* write operation */ +#endif + +#define X1226_ADDR 0x6f /* slave address */ + +#define X1226_RTC_SIZE 8 /* size of BCD register space */ +#define X1226_SC 0x30 /* base of date registers */ +#define X1226_HR 0x32 /* hours */ +#define X1226_HR_PM 0x20 /* HR: time is PM */ +#define X1226_HR_MIL 0x80 /* HR: time is in 24 hour format */ +#define X1226_SR 0x3f /* status register */ +#define X1226_SR_WEL 0x02 /* SR: write enable latch */ +#define X1226_SR_RWEL 0x04 /* SR: register write enable latch */ + +#define MAX_IIC_DATA_SIZE 7 + +struct x1226rtc_softc { + device_t sc_dev; +}; + +static int +x1226rtc_probe(device_t dev) +{ + + /* XXX really probe? */ + device_set_desc(dev, "Intersil/Xicor X1226 RTC"); + return (0); +} + +static int +x1226rtc_attach(device_t dev) +{ + struct x1226rtc_softc *sc = device_get_softc(dev); + + sc->sc_dev = dev; + + clock_register(dev, 1000); + return (0); +} + +static int +x1226rtc_read(device_t dev, uint8_t address, uint8_t *data, uint8_t size) +{ + struct iic_msg msg[] = { + { X1226_ADDR, IIC_M_WR, 1, &address }, + { X1226_ADDR, IIC_M_RD, size, data }, + }; + + return (iicbus_transfer(dev, msg, 2)); +} + +static int +x1226rtc_write(device_t dev, uint8_t address, uint8_t *data, uint8_t size) +{ + uint8_t buffer[MAX_IIC_DATA_SIZE + 1]; + struct iic_msg msg[] = { + { X1226_ADDR, IIC_M_WR, size + 1, buffer }, + }; + + if (size > MAX_IIC_DATA_SIZE) + return (ENOMEM); + + buffer[0] = address; + memcpy(buffer + 1, data, size); + + return (iicbus_transfer(dev, msg, 1)); +} + +static uint8_t +x1226rtc_get_hours(uint8_t val) +{ + uint8_t ret; + + if ((val & X1226_HR_MIL) != 0) + ret = FROMBCD(val & 0x3f); + else if ((val & X1226_HR_PM) != 0) + ret = FROMBCD(val & 0x1f); + else + ret = FROMBCD(val & 0x1f) + 12; + + return (ret); +} + +static int +x1226rtc_gettime(device_t dev, struct timespec *ts) +{ + uint8_t date[X1226_RTC_SIZE]; + struct clocktime ct; + int error; + + error = x1226rtc_read(dev, X1226_SC, date, X1226_RTC_SIZE); + if (error == 0) { + ct.nsec = 0; + ct.sec = FROMBCD(date[0] & 0x7f); /* SC */ + ct.min = FROMBCD(date[1] & 0x7f); /* MN */ + ct.hour = x1226rtc_get_hours(date[2]); /* HR */ + ct.day = FROMBCD(date[3] & 0x3f); /* DT */ + ct.mon = FROMBCD(date[4] & 0x1f); /* MO */ + ct.year = FROMBCD(date[5]); /* YR */ + ct.dow = FROMBCD(date[6] & 0x07) - 1; /* DW */ + ct.year += (FROMBCD(date[7]) & 0x39) * 100; /* Y2K */ + + error = clock_ct_to_ts(&ct, ts); + if (error) { + device_printf(dev, "error %d converting to timespec\n", + error); + } + } else { + device_printf(dev, "error %d reading SRAM\n", error); + } + + return (error); +} + +static int +x1226rtc_settime(device_t dev, struct timespec *ts) +{ + uint8_t date[X1226_RTC_SIZE]; + uint8_t sr; + struct clocktime ct; + int error; + + clock_ts_to_ct(ts, &ct); + + date[0] = TOBCD(ct.sec); + date[1] = TOBCD(ct.min); + date[2] = TOBCD(ct.hour) | X1226_HR_MIL; + date[3] = TOBCD(ct.day); + date[4] = TOBCD(ct.mon); + date[5] = TOBCD(ct.year % 100); + date[6] = TOBCD(ct.dow); + date[7] = TOBCD(ct.year / 100); + + sr = X1226_SR_WEL; + error = x1226rtc_write(dev, X1226_SR, &sr, 1); + if (error) { + device_printf(dev, "failed to set %s bit\n", "WEL"); + return (EIO); + } + + sr = X1226_SR_WEL | X1226_SR_WEL; + error = x1226rtc_write(dev, X1226_SR, &sr, 1); + if (error) { + device_printf(dev, "failed to set %s bit\n", "RWEL"); + return (EIO); + } + + error = x1226rtc_write(dev, X1226_SC, date, X1226_RTC_SIZE); + if (error) + device_printf(dev, "error %d writing to SRAM\n", error); + + return (error); +} + +static device_method_t x1226rtc_methods[] = { + DEVMETHOD(device_probe, x1226rtc_probe), + DEVMETHOD(device_attach, x1226rtc_attach), + + DEVMETHOD(clock_gettime, x1226rtc_gettime), + DEVMETHOD(clock_settime, x1226rtc_settime), + + {0, 0}, +}; + +static driver_t x1226rtc_driver = { + "x1226rtc", + x1226rtc_methods, + sizeof(struct x1226rtc_softc), +}; +static devclass_t x1226rtc_devclass; + +DRIVER_MODULE(x1226rtc, iicbus, x1226rtc_driver, x1226rtc_devclass, 0, 0); +MODULE_VERSION(x1226rtc, 1); +MODULE_DEPEND(x1226rtc, iicbus, 1, 1, 1); Index: arm/xscale/ixp425/if_npe.c =================================================================== --- arm/xscale/ixp425/if_npe.c (revision 183760) +++ arm/xscale/ixp425/if_npe.c (working copy) @@ -83,6 +83,8 @@ #include #include +#include "miidevs.h" + #include #include "miibus_if.h" @@ -140,6 +142,9 @@ struct npestats *sc_stats; bus_dmamap_t sc_stats_map; bus_addr_t sc_stats_phys; /* phys addr of sc_stats */ + int sc_force_bmsr; + int sc_force_idr1; + int sc_force_idr2; }; /* @@ -244,6 +249,8 @@ static uint32_t npe_getimageid(struct npe_softc *); static int npe_setloopback(struct npe_softc *, int ena); #endif +static int npe_miibus_readreg(device_t dev, int phy, int reg); +static void npe_miibus_writereg(device_t dev, int phy, int reg, int data); /* NB: all tx done processing goes through one queue */ static int tx_doneqid = -1; @@ -733,10 +740,45 @@ if (!override_unit(dev, "phy", &sc->sc_phy, 0, MII_NPHY-1)) sc->sc_phy = npeconfig[unit].phy; + /* + * Allow PHY OUI/model and BMSR to be forced, as some boards have + * a PHY which does not have ID registers (e.g. the RTL8305SB + * on a Freecom FSG3). + */ + if (!override_unit(dev, "force_bmsr", &sc->sc_force_bmsr, 0, 0xFFFF)) + sc->sc_force_bmsr = 0; + if (!override_unit(dev, "force_idr1", &sc->sc_force_idr1, 0, 0xFFFF)) + sc->sc_force_idr1 = 0; + if (!override_unit(dev, "force_idr2", &sc->sc_force_idr2, 0, 0xFFFF)) + sc->sc_force_idr2 = 0; + KASSERT(npes[npeconfig[unit].npeid] == NULL, ("npe %u already setup", npeconfig[unit].npeid)); npes[npeconfig[unit].npeid] = sc; +#if 0 + /* + * Attempt to soft-reset the RTL8305SB. + */ + if ((MII_OUI(sc->sc_force_idr1, sc->sc_force_idr2) == + MII_OUI_xxREALTEK) && + (MII_MODEL(sc->sc_force_idr2) == MII_MODEL_xxREALTEK_RTL8305SC) && + (MII_REV(sc->sc_force_idr2) == 0x01)) { + int i; + + device_printf(sc->sc_dev, + "attempting to soft-reset RTL8305SB\n"); + npe_miibus_writereg(sc->sc_dev, 3, 0x16, 0x8000); + for (i = 0; i <= 4; i++) { + npe_miibus_writereg(sc->sc_dev, i, 0x0, 0x8000); + // restart autoneg, clear powerdown bit + npe_miibus_writereg(sc->sc_dev, i, 0x0, 0x0020); + } + // disable loopback, enable all ports. + npe_miibus_writereg(sc->sc_dev, 3, 0x16, 0x03FF); + } +#endif + return 0; } @@ -1598,6 +1640,20 @@ if (phy != sc->sc_phy) /* XXX no auto-detect */ return 0xffff; + + if (reg == MII_BMSR && sc->sc_force_bmsr != 0x0000) + return (sc->sc_force_bmsr); + if (reg == MII_PHYIDR1 && sc->sc_force_idr1 != 0x0000) + return (sc->sc_force_idr1); + if (reg == MII_PHYIDR2 && sc->sc_force_idr2 != 0x0000) + return (sc->sc_force_idr2); + +#if 1 + /* Do NOT allow PHY 5 to be read. */ + if (sc->sc_force_bmsr != 0x0000 && phy == 5) + return (0xffff); +#endif + v = (phy << NPE_MII_ADDR_SHL) | (reg << NPE_MII_REG_SHL) | NPE_MII_GO; npe_mii_mdio_write(sc, NPE_MAC_MDIO_CMD, v); @@ -1605,6 +1661,7 @@ v = npe_mii_mdio_read(sc, NPE_MAC_MDIO_STS); else v = 0xffff | NPE_MII_READ_FAIL; + return (v & NPE_MII_READ_FAIL) ? 0xffff : (v & 0xffff); #undef MAXTRIES } @@ -1617,6 +1674,13 @@ if (phy != sc->sc_phy) /* XXX */ return; + +#if 1 + /* Do NOT allow PHY 5 to be written. */ + if (sc->sc_force_bmsr != 0x0000 && phy == 5) + return; +#endif + v = (phy << NPE_MII_ADDR_SHL) | (reg << NPE_MII_REG_SHL) | data | NPE_MII_WRITE | NPE_MII_GO; Index: arm/xscale/ixp425/avila_machdep.c =================================================================== --- arm/xscale/ixp425/avila_machdep.c (revision 183760) +++ arm/xscale/ixp425/avila_machdep.c (working copy) @@ -259,6 +259,7 @@ vm_offset_t freemem_after; vm_offset_t lastaddr; uint32_t memsize; + char *p; set_cpufuncs(); lastaddr = fake_preload_metadata(); @@ -475,16 +476,29 @@ phys_avail[i++] = trunc_page(0x10000000 + memsize - 1); phys_avail[i++] = 0; phys_avail[i] = 0; - + + /* use static kernel environment if so configured */ + if (envmode == 1) + kern_envp = static_env; + + /* + * Catch case of boot_verbose set in environment. + */ + if ((p = getenv("boot_verbose")) != NULL) { + if (strcmp(p, "yes") == 0 || strcmp(p, "YES") == 0) { + boothowto |= RB_VERBOSE; + } + freeenv(p); + } + + if (boothowto & RB_VERBOSE) + bootverbose = 1; + /* Do basic tuning, hz etc */ init_param1(); init_param2(physmem); kdb_init(); - /* use static kernel environment if so configured */ - if (envmode == 1) - kern_envp = static_env; - return ((void *)(kernelstack.pv_va + USPACE_SVC_STACK_TOP - sizeof(struct pcb))); } Index: arm/conf/FSG3.hints =================================================================== --- arm/conf/FSG3.hints (revision 0) +++ arm/conf/FSG3.hints (revision 0) @@ -0,0 +1,49 @@ +# $FreeBSD$ + +# +# Device wiring for the Freecom FSG3 +# + +# DBGU is unit 0 +hint.uart.0.at="ixp0" +hint.uart.0.addr=0xc8000000 +hint.uart.0.irq=15 +hint.uart.0.flags=0x10 +# USART0 is unit 1 +hint.uart.1.at="ixp0" +hint.uart.1.addr=0xc8001000 +hint.uart.1.irq=13 + +# NPE Hardware Queue Manager +hint.ixpqmgr.0.at="ixp0" + +# NPE NIC's, requires ixpqmgr +hint.npe.0.at="ixp0" +hint.npe.0.mac="A" +hint.npe.0.mii="A" +hint.npe.0.phy=5 +# XXX BMSR for PHY 5 must always be forced. +# XXX Don't use the rlswitch shared driver +# for this side of the switch; use a different OUI. +hint.npe.0.force_bmsr=0x402C +hint.npe.0.force_idr1=0x000C +hint.npe.0.force_idr2=0xC851 + +hint.npe.1.at="ixp0" +hint.npe.1.mac="B" +hint.npe.1.mii="A" +hint.npe.1.phy=4 +# Realtek RTL8305SB (Rev 1) +# XXX BMSR must always be forced -- RTL8305SB has no ID registers. +hint.npe.1.force_bmsr=0x4024 +hint.npe.1.force_idr1=0x001C +hint.npe.1.force_idr2=0xC851 + +# RTC +hint.x1226rtc.0.at="iicbus0" +hint.x1226rtc.0.addr=0x6f + +#not yet +# Slug LED +# Slug button +# Slug Buzzer Index: arm/conf/FSG3.env =================================================================== --- arm/conf/FSG3.env (revision 0) +++ arm/conf/FSG3.env (revision 0) @@ -0,0 +1 @@ +boot_verbose=YES Index: arm/conf/FSG3 =================================================================== --- arm/conf/FSG3 (revision 0) +++ arm/conf/FSG3 (revision 0) @@ -0,0 +1,153 @@ +# NSLU - kernel configuration file for FreeBSD/arm on Linksys NSLU2 +# + +machine arm +ident FSG3 + +options PHYSADDR=0x10000000 +options KERNPHYSADDR=0x10200000 +options KERNVIRTADDR=0xc0200000 # Used in ldscript.arm +options FLASHADDR=0x50000000 +options LOADERRAMADDR=0x00000000 +options STARTUP_PAGETABLE_ADDR=0x10000000 + +# XXX 0x0 is not free in NSLU2 loader, but it *might* be free +# in the U-Boot loader. +# Allow 4MB (XXX) for kernel image. +# XXX Changing this appears to bloat the tramp, why? +#options FLASHADDR=0x01d00000 +#options LOADERRAMADDR=0x01d00000 + +include "../xscale/ixp425/std.avila" +#To statically compile in device wiring instead of /boot/device.hints +hints "FSG3.hints" #Default places to look for devices. + +# For some reason the kernel ain't bootp-ing. +#env "FSG3.env" # XXX set mountroot + +# XXX need tramp w/o symbols for <1MB +#makeoptions DEBUG=-g #Build kernel with gdb(1) debug symbols +makeoptions DEBUG=-g3 #Build kernel with gdb(1) debug symbols + +makeoptions CONF_CFLAGS=-mcpu=xscale +options HZ=100 +options DEVICE_POLLING + +# XXX +options VERBOSE_SYSINIT + +# Debugging for use in -current +options KDB +options GDB +options DDB #Enable the kernel debugger + +options ALT_BREAK_TO_DEBUGGER + +#options INVARIANTS #Enable calls of extra sanity checking +#options INVARIANT_SUPPORT #Extra sanity checks of internal structures, required by INVARIANTS +#options WITNESS #Enable checks to detect deadlocks and cycles +#options WITNESS_SKIPSPIN #Don't run witness on spinlocks for speed +#options DIAGNOSTIC + +options SCHED_ULE #ULE scheduler +options INET #InterNETworking +#options INET6 #IPv6 communications protocols +options FFS #Berkeley Fast Filesystem +options SOFTUPDATES #Enable FFS soft updates support +options UFS_ACL #Support for access control lists +options UFS_DIRHASH #Improve performance on big directories +#options NFSCLIENT #Network Filesystem Client +#options NFSSERVER #Network Filesystem Server +#options NFSLOCKD #Network Lock Manager +#options NFS_ROOT #NFS usable as /, requires NFSCLIENT +#options MSDOSFS #MSDOS Filesystem +#options CD9660 #ISO 9660 Filesystem +#options PROCFS #Process filesystem (requires PSEUDOFS) +options PSEUDOFS #Pseudo-filesystem framework +options SCSI_DELAY=5000 #Delay (in ms) before probing SCSI +options KTRACE #ktrace(1) support +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 #Mutex inlines are space hogs +options RWLOCK_NOINLINE #rwlock inlines are space hogs +options SX_NOINLINE #sx inliens are space hogs + +# XXX Until we can get disk drivers to attach above, +# we will need to attempt network boot. +options BOOTP +options BOOTP_NFSROOT +options BOOTP_NFSV3 +options BOOTP_WIRED_TO=npe0 +options BOOTP_COMPAT + +options NFSCLIENT #Network Filesystem Client +options NFSLOCKD #Network Lock Manager +options NFS_ROOT #NFS usable as /, requires NFSCLIENT + +#options GEOM_MBR +#options GEOM_PART_MBR + +device mem # Memory and kernel memory devices +device pci +device uart + +# I2C Bus +device iicbus +device iicbb +device iic + +device ixpiic # I2C bus glue +device ixpwdog # watchdog timer + +device x1226rtc # I2C real-time clock + +####### netwerk + +device npe # Network Processing Engine +device npe_fw +device firmware +device qmgr # Q Manager (required by npe) + +# XXX There is an RTL8305SB with 5 physical ports. Two are configured +# as miibus PHYs, however the SB rev does NOT have ID registers, and +# attempting to probe the BMSR seems to cause problems with the PHY. +# +# The rlswitch driver is written for the RTL8305SC, which is a totally +# different chip -- the vlan register setup is not the same. +# +# ukphy is part of mii, we use that for the first port, but reject any +# attempts to read or write PHY ID 5 (npe0). +# +device mii +device rlswitch + +device ether +device bpf + +device pty +device loop + +options XSCALE_CACHE_READ_WRITE_ALLOCATE +device md # XXX .ko candidate? +device random # Entropy device + +#options ARM_USE_SMALL_ALLOC + +# XXX only needed for bootstrap rootfs from usb +#device usb +#options USB_DEBUG # XXX not needed <1MB? +#device ohci +#device ehci +#device umass +#device scbus # SCSI bus (required for SCSI) +#device da # Direct Access (disks) + +# XXX PCI devices have not yet been configured, so +# the kernel never sees the onboard VIA VT6421A. +#device atacore +#device atapci +#device atavia +#device atadisk --------------020506050704000407060408-- From owner-freebsd-embedded@FreeBSD.ORG Sat Oct 11 12:19:34 2008 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4CE51065697 for ; Sat, 11 Oct 2008 12:19:34 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 9756E8FC13 for ; Sat, 11 Oct 2008 12:19:34 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute2.internal (compute2.internal [10.202.2.42]) by out1.messagingengine.com (Postfix) with ESMTP id 2AB08179100 for ; Sat, 11 Oct 2008 08:19:34 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute2.internal (MEProxy); Sat, 11 Oct 2008 08:19:34 -0400 X-Sasl-enc: /3agDi35S489LNn5DLc4Hbu7CygLF2UDSAAXaBjwKfvf 1223727573 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 8B7CC20797 for ; Sat, 11 Oct 2008 08:19:33 -0400 (EDT) Message-ID: <48F099D4.2050302@incunabulum.net> Date: Sat, 11 Oct 2008 13:19:32 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) MIME-Version: 1.0 To: freebsd-embedded@FreeBSD.org Content-Type: multipart/mixed; boundary="------------000708050906040207060303" Cc: Subject: HOWTO: Build NSLU2 U-Boot on FreeBSD X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2008 12:19:34 -0000 This is a multi-part message in MIME format. --------------000708050906040207060303 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Thanks to Rink Springer and Rafal Jaworowski. ---------------------- Building NSLU2 U-boot firmware on FreeBSD hosts Quick start Make sure you have a JTAG adapter as a get-out-of-jail-free card in case = you trash the flash, "portinstall devel/urjtag" to get a driver for it.=20 Recommend getting one like the Olimex OCD as it has heaps more useful=20 functionality than just rewriting the flash, and should also work with=20 OpenOCD. Toolchain setup cd /usr/ports/devel/cross-binutils env TGTARCH=3Darm TGTABI=3Drtems make install cd /usr/ports/devel/cross-gcc env TGTARCH=3Darm TGTABI=3Drtems make install Get stas@FreeBSD.org's updated u-boot tarball: uboot-atamantb.tar.bz2 Untar it Fetch NSLU2 patch set from NSLU2-Linux: http://trac.nslu2-linux.org/kernel/browser/trunk/patches/u-boot/0001-ixp-= Support-for-NSLU2.patch Apply (patch -p1) inside uboot-atamantb. Apply Ix*.diff (provided) inside cpu/ixp/npe. U-Boot doesn't grok being built for an RTEMS target, so it needs some sweet lovin'. Fetch encumbered NPE microcode from Intel: http://downloadcenter.intel.com/ Search for IPL_IXP400NPELIBRARY-2_1.ZIP (Yes yes, I know, we can't redistribute it, for now anyway...there will be a workaround) Unzip... Copy ./cpu/ixp/npe/IxNpeMicrocode.c.orig into uboot-atamantb/cpu/ixp/npe=B7= Remove mkimage from tools/Makefile (it needs rentokil to build on FreeBSD= ; and besides, you can use "portinstall devel/u-boot" to get mkimage) Now: env CROSS_COMPILE=3Darm-rtems- gmake distclean env CROSS_COMPILE=3Darm-rtems- gmake nslu2_config env CROSS_COMPILE=3Darm-rtems- gmake Voila, you should have u-boot firmware images, which you can now use to=20 reflash an NSLU2. --------------000708050906040207060303 Content-Type: text/plain; name="IxOsalEndianess.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="IxOsalEndianess.diff" --- ./cpu/ixp/npe/include/IxOsalEndianess.h.orig 2008-10-03 12:11:18.000000000 +0100 +++ ./cpu/ixp/npe/include/IxOsalEndianess.h 2008-10-03 13:11:48.000000000 +0100 @@ -59,6 +59,32 @@ /* get ntohl/ntohs/htohl/htons macros definitions for WinCE */ #include +#elif defined (__rtems__) + +# ifdef htonl +# undef htonl +# endif +# ifdef ntohl +# undef ntohl +# endif + +# if BYTE_ORDER == BIG_ENDIAN + +# define ntohl(a) (a) +# define htonl(a) (a) +# elif BYTE_ORDER == LITTLE_ENDIAN +# define SWAP_LONG(x) \ + ((__u32)( \ + (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ + (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ + (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ + (((__u32)(x) & (__u32)0xff000000UL) >> 24) )) +# define ntohl(a) SWAP_LONG(a) +# define htonl(a) SWAP_LONG(a) +# else +# error meep +# endif + #else #error Unknown OS, please add a section with the include file for htonl/htons/ntohl/ntohs @@ -123,6 +149,14 @@ #define IX_OSAL_WINCE_LE +#elif defined (__rtems__) && defined (__BIG_ENDIAN) + +#define IX_OSAL_LINUX_BE /* XXX */ + +#elif defined (__rtems__) && defined (__BIG_ENDIAN) + +#define IX_OSAL_LINUX_LE /* XXX */ + #else #error Unknown OS/Endianess combination - only vxWorks BE LE, Linux BE LE, WinCE BE LE are supported --------------000708050906040207060303 Content-Type: text/plain; name="IxOsalMemAccess.diff" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="IxOsalMemAccess.diff" --- ./cpu/ixp/npe/include/IxOsalMemAccess.h.orig 2008-10-03 13:24:52.000000000 +0100 +++ ./cpu/ixp/npe/include/IxOsalMemAccess.h 2008-10-03 13:26:07.000000000 +0100 @@ -324,7 +324,9 @@ #endif /* wince */ -#if defined (__vxworks) || (defined (__linux) && defined (IX_OSAL_STATIC_MEMORY_MAP)) || \ +#if defined (__vxworks) || \ + defined (__rtems__) || \ + (defined (__linux) && defined (IX_OSAL_STATIC_MEMORY_MAP)) || \ (defined (__wince) && defined (IX_OSAL_STATIC_MEMORY_MAP)) #define IX_OSAL_READ_LONG_IO(wAddr) IX_OSAL_READ_LONG_RAW(wAddr) --------------000708050906040207060303-- From owner-freebsd-embedded@FreeBSD.ORG Sat Oct 11 12:41:25 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4E2771065692 for ; Sat, 11 Oct 2008 12:41:25 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 0EFFA8FC0C for ; Sat, 11 Oct 2008 12:41:24 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 4ED4F1779E1; Sat, 11 Oct 2008 08:41:24 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Sat, 11 Oct 2008 08:41:24 -0400 X-Sasl-enc: mGgU3AuiiWVjQL4c9UvmYGvmxNbe/f90woEtDY6+Acts 1223728883 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 8849627C86; Sat, 11 Oct 2008 08:41:23 -0400 (EDT) Message-ID: <48F09EF2.4060709@incunabulum.net> Date: Sat, 11 Oct 2008 13:41:22 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) MIME-Version: 1.0 To: Stanislav Sedov References: <48EABE17.3010104@incunabulum.net> <20081009025641.e6d015bb.stas@FreeBSD.org> In-Reply-To: <20081009025641.e6d015bb.stas@FreeBSD.org> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-embedded@freebsd.org Subject: Re: Problems with NSLU2 and U-Boot X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2008 12:41:25 -0000 Stanislav Sedov wrote: > Are you sure that u-boot loads your kernel to correct address. Have > you tryed loading a plain ELF image (or binary) and jumping to entry > point? > I just tried booting kernel.bin on the NSLU2, as a raw memory image, via tftp, and got exactly the same result. I repeated it with U-Boot. It appears as though it relocates the embedded ELF image to the correct address during load and execution, but I can't be sure because I don't have any OCD capability just now. Again, the hang happens right after init_turnstile0() appears to have been called: %%% DHCP client bound to address 192.168.123.151 Using NPE0 device TFTP from server 192.168.123.17; our IP address is 192.168.123.151 Filename 'kernel.nslu2.ub'. Load address: 0x400000 Loading: ################################################################# ################################################################# ################################################################# ########### done Bytes transferred = 3013309 (2dfabd hex) => bootm ## Booting kernel from Legacy Image at 00400000 ... Image Name: kernel Image Type: ARM Unknown OS Kernel Image (uncompressed) Data Size: 3013245 Bytes = 2.9 MB Load Address: 00200000 Entry Point: 00200100 Verifying Checksum ... OK Loading Kernel Image ... OK OK Starting kernel ... GDB: no debug ports present KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2008 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 8.0-CURRENT #24: Sat Oct 11 13:13:24 BST 2008 root@anglepoise.lon.incunabulum.net:/home/obj/nanobsd.testusb/arm/home/bms/svn/head/sys/MY_NSLU subsystem 900000 0xc028127c(0)... done. subsystem 1000000 0xc0375120(0)... done. 0xc0389700(0)... done. subsystem 1800000 0xc027ecd8(0)... done. 0xc027f0d8(0xc041ca90)... done. 0xc027f0d8(0xc041cc44)... done. 0xc027f0d8(0xc0415c4c)... done. 0xc027f0d8(0xc0416008)... done. 0xc027f0d8(0xc041ce8c)... done. 0xc027f0d8(0xc0416904)... done. 0xc027f0d8(0xc041cfb8)... done. 0xc027f0d8(0xc041d510)... done. 0xc027f0d8(0xc041d96c)... done. 0xc027f0d8(0xc04168c0)... done. 0xc027f0d8(0xc041d6a0)... done. 0xc027f0d8(0xc041d65c)... done. 0xc027f0d8(0xc041d618)... done. 0xc027f0d8(0xc041d5d4)... done. 0xc027f0d8(0xc041d590)... done. 0xc027f0d8(0xc041d9b0)... done. 0xc027f0d8(0xc041687c)... done. 0xc027f0d8(0xc041eb98)... done. 0xc027f0d8(0xc0416dd4)... done. 0xc027f0d8(0xc041ec24)... done. 0xc027f0d8(0xc0416e18)... done. 0xc027f0d8(0xc041f15c)... done. 0xc027f0d8(0xc041f1a4)... done. 0xc027f0d8(0xc041f118)... done. 0xc027f0d8(0xc041f0d4)... done. 0xc027f0d8(0xc041f728)... done. 0xc027f0d8(0xc041f868)... done. 0xc027f0d8(0xc041f8ac)... done. 0xc027f0d8(0xc0416e5c)... done. 0xc027f0d8(0xc04201ac)... done. 0xc027f0d8(0xc04201f0)... done. 0xc027f0d8(0xc0420234)... done. 0xc027f0d8(0xc0420b2c)... done. 0xc027f0d8(0xc0420c50)... done. 0xc027f0d8(0xc0420ec8)... done. 0xc027f0d8(0xc0421614)... done. 0xc027f0d8(0xc0417018)... done. 0xc027f0d8(0xc0421690)... done. 0xc027f0d8(0xc04216d4)... done. 0xc027f0d8(0xc0421964)... done. 0xc027f0d8(0xc0421a68)... done. 0xc027f0d8(0xc0421c48)... done. 0xc027f0d8(0xc0421ea4)... done. 0xc027f0d8(0xc04170ac)... done. 0xc027f0d8(0xc04171c4)... done. 0xc027f0d8(0xc04223e8)... done. 0xc027f0d8(0xc04175d4)... done. 0xc027f0d8(0xc0422590)... done. 0xc027f0d8(0xc04176ec)... done. 0xc027f0d8(0xc0410388)... done. 0xc027f0d8(0xc04137c4)... done. 0xc027f0d8(0xc04227e0)... done. 0xc027f0d8(0xc0422844)... done. 0xc027f0d8(0xc0422a58)... done. 0xc027f0d8(0xc0422ae8)... done. 0xc027f0d8(0xc0422b2c)... done. 0xc027f0d8(0xc0422b70)... done. 0xc027f0d8(0xc0422dc0)... done. 0xc027f0d8(0xc0423298)... done. 0xc027f0d8(0xc0423780)... done. 0xc027f0d8(0xc0423c5c)... done. 0xc027f0d8(0xc0423e58)... done. 0xc027f0d8(0xc04240e4)... done. 0xc027f0d8(0xc042437c)... done. 0xc027f0d8(0xc042469c)... done. 0xc027f0d8(0xc0424700)... done. 0xc027f0d8(0xc0417cdc)... done. 0xc027f0d8(0xc0424898)... done. 0xc027f0d8(0xc0424854)... done. 0xc027f0d8(0xc0424ed4)... done. 0xc027f0d8(0xc04254a0)... done. 0xc027f0d8(0xc0425aa4)... done. 0xc027f0d8(0xc0425c38)... done. 0xc027f0d8(0xc0425c9c)... done. 0xc027f0d8(0xc0425d10)... done. 0xc027f0d8(0xc0414728)... done. 0xc027f0d8(0xc0425e1c)... done. 0xc027f0d8(0xc0425dd8)... done. 0xc027f0d8(0xc0414844)... done. 0xc027f0d8(0xc04264dc)... done. 0xc027f0d8(0xc04269e0)... done. 0xc027f0d8(0xc0426c68)... done. 0xc027f0d8(0xc0426c24)... done. 0xc027f0d8(0xc0426be0)... done. 0xc027f0d8(0xc0426e3c)... done. 0xc027f0d8(0xc0426ea0)... done. 0xc027f0d8(0xc0414888)... done. 0xc027f0d8(0xc04101a4)... done. 0xc027f0d8(0xc04103ec)... done. 0xc027f0d8(0xc0427470)... done. 0xc027f0d8(0xc0427848)... done. 0xc027f0d8(0xc0427934)... done. 0xc027f0d8(0xc0427a48)... done. 0xc027f0d8(0xc0427a8c)... done. 0xc027f0d8(0xc0427ad0)... done. 0xc027f0d8(0xc042845c)... done. 0xc027f0d8(0xc0428b50)... done. 0xc027f0d8(0xc04102e4)... done. 0xc027f0d8(0xc0429330)... done. 0xc027f0d8(0xc04296f4)... done. 0xc027f0d8(0xc042a174)... done. 0xc027f0d8(0xc042a1b8)... done. 0xc027f0d8(0xc042a1fc)... done. 0xc027f0d8(0xc042a240)... done. 0xc027f0d8(0xc042a284)... done. 0xc027f0d8(0xc042a2c8)... done. 0xc027f0d8(0xc042a30c)... done. 0xc027f0d8(0xc042a350)... done. 0xc027f0d8(0xc042a394)... done. 0xc027f0d8(0xc042a3d8)... done. 0xc027f0d8(0xc042a41c)... done. 0xc027f0d8(0xc042a460)... done. 0xc027f0d8(0xc042a4a4)... done. 0xc027f0d8(0xc042a4e8)... done. 0xc027f0d8(0xc042a52c)... done. 0xc027f0d8(0xc042b1c0)... done. 0xc027f0d8(0xc042b32c)... done. 0xc027f0d8(0xc042b3c0)... done. 0xc027f0d8(0xc042b800)... done. 0xc027f0d8(0xc041c084)... done. 0xc027f0d8(0xc04131dc)... done. 0xc027f0d8(0xc04102a0)... done. 0xc027f0d8(0xc042ca28)... done. 0xc027f0d8(0xc041c338)... done. 0xc027f0d8(0xc041c37c)... done. 0xc027f0d8(0xc042d01c)... done. 0xc027f0d8(0xc042d080)... done. 0xc027f0d8(0xc042d1a0)... done. 0xc027f0d8(0xc041c3c0)... done. 0xc027f0d8(0xc041c634)... done. 0xc027f0d8(0xc041c6bc)... done. 0xc027f0d8(0xc041c8a4)... done. 0xc027f0d8(0xc041c9bc)... done. 0xc027f0d8(0xc041025c)... done. 0xc029562c(0)... done. 0xc026b04c(0)... done. subsystem 1a00000 0xc037aa30(0)... done. subsystem 1ac0000 0xc0281388(0)... done. subsystem 1b00000 0xc0266bdc(0)... done. 0xc027cab4(0)... done. 0xc02816e0(0xc042aa2c)... done. 0xc02816e0(0xc0422adc)... done. 0xc02816e0(0xc0421608)... done. 0xc0293110(0xc0413964)... done. 0xc02816e0(0xc0425f14)... done. 0xc02816e0(0xc041745c)... done. 0xc0293110(0xc0417468)... done. 0xc0293110(0xc041bfe8)... done. 0xc02816e0(0xc0417470)... done. 0xc02816e0(0xc041c880)... done. 0xc0293110(0xc0423e48)... done. 0xc02816e0(0xc041c88c)... done. 0xc02816e0(0xc0421d48)... done. 0xc02816e0(0xc041f968)... done. 0xc02816e0(0xc041eb74)... done. 0xc02816e0(0xc0424458)... done. 0xc02816e0(0xc0427284)... done. 0xc02816e0(0xc0427398)... done. 0xc02816e0(0xc04245e0)... done. 0xc02816e0(0xc041eb80)... done. 0xc02816e0(0xc04275ec)... done. 0xc02816e0(0xc041c898)... done. 0xc0293110(0xc04170a4)... done. 0xc02816e0(0xc0427a3c)... done. 0xc02816e0(0xc042ca04)... done. 0xc02816e0(0xc0424a50)... done. 0xc02816e0(0xc0427b94)... done. 0xc02816e0(0xc0424a5c)... done. 0xc02816e0(0xc042ccc8)... done. 0xc02816e0(0xc04175c8)... done. 0xc02816e0(0xc0420b0c)... done. 0xc02816e0(0xc04284e0)... done. 0xc02816e0(0xc04140b8)... done. 0xc0282f2c(0)... done. 0xc02816e0(0xc0425a90)... done. 0xc02816e0(0xc0420d3c)... done. 0xc02816e0(0xc041cc30)... done. 0xc02816e0(0xc042a160)... done. 0xc03897d0(0)... done. 0xc02be458(0)... %%% It also looks as though the DDB symbol lookup isn't working. The dynamic symbol table is present in the ELF image. mkimage simply wraps the ELF image with a U-Boot header. cheers BMS From owner-freebsd-embedded@FreeBSD.ORG Sat Oct 11 12:46:03 2008 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A77AC1065688 for ; Sat, 11 Oct 2008 12:46:03 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 53C8D8FC16 for ; Sat, 11 Oct 2008 12:46:03 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 0AF72178A32 for ; Sat, 11 Oct 2008 08:46:03 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Sat, 11 Oct 2008 08:46:03 -0400 X-Sasl-enc: f4dJ8sfCkOIa1iXrC7AveRm1L1uWO6d+HXXvL7LqOQm+ 1223729162 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 7D51038B11 for ; Sat, 11 Oct 2008 08:46:02 -0400 (EDT) Message-ID: <48F0A008.1040900@incunabulum.net> Date: Sat, 11 Oct 2008 13:46:00 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) MIME-Version: 1.0 To: freebsd-embedded@FreeBSD.org Content-Type: multipart/mixed; boundary="------------070300090805090709040400" Cc: Subject: [Fwd: Re: OpenOCD] X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2008 12:46:03 -0000 This is a multi-part message in MIME format. --------------070300090805090709040400 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Forwarding here as others might also have dongles that work, and debugging NSLU2 ARM would cleary need OCD capability to figure out exactly what is going wrong here. thanks BMS --------------070300090805090709040400 Content-Type: message/rfc822; name="Re: OpenOCD" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Re: OpenOCD" Message-ID: <48F02F27.7030809@incunabulum.net> Date: Sat, 11 Oct 2008 05:44:23 +0100 From: Bruce M Simpson User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: stevefranks@ieee.org Subject: Re: OpenOCD References: <48EA492B.6040804@incunabulum.net> <539c60b90810061348w5120260fo25762ee06883da77@mail.gmail.com> <48EBC8C8.9080902@incunabulum.net> <539c60b90810071403qec57cfeu8431cddbbb79ede8@mail.gmail.com> <48EBEE55.4080102@incunabulum.net> <539c60b90810071715oea7126fyf95b5322b9eab20b@mail.gmail.com> In-Reply-To: <539c60b90810071715oea7126fyf95b5322b9eab20b@mail.gmail.com> X-Enigmail-Version: 0.95.6 Content-Type: multipart/mixed; boundary="------------040900010004050208090308" This is a multi-part message in MIME format. --------------040900010004050208090308 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Steve, Here's a port for OpenOCD. I haven't been able to test it for real, because I don't have a supported JTAG dongle; it seems my Altera USBByteBlaster clone is not supported. You said you had an Olimex, perhaps you can give it a try? Let me know and I'll commit, if you want to take the reins as maintainer let me now. Here are some notes I was gonna put into the commit message (not committing it as I really want to see it work "for real" first) :- %%% Add new port of OpenOCD, an open source on-chip debug utility for ARM and other processor families. Note: I haven't actually tested this with a real dongle yet, but it looks sane. It builds from a locally hosted source snapshot, as OpenOCD doesn't appear to have a release schedule of its own. The diff to svn trunk is extremely minimal. 'gmake dist-gzip' doesn't work right, so a manual tarball was rolled. It appears that the Altera USB ByteBlaster clone I have is not supported. %%% cheers BMS --------------040900010004050208090308 Content-Type: application/octet-stream; name="openocd.tgz" Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename="openocd.tgz" H4sIALou8EgAA+1abW/iOhaer+RXWJr50Oo2IXbeoNruXqbQLnsLVMDcjlYrIScxkNu8KXam MFfz3+9xgJZOSdKVtnO1uxxRkvg8to/POX7smCYpixPPb757Q9F13dF1BFfsWFhepeyumweM dcfUiUMsG+mYmJi8Q9ZbGrWTnAuagSluxCtxD0vGwgr980Gh/6iNbyjJNv4Des/mQcjeog/w h10Rf4xtexd/07YIxN/ULesd0t/CmO/l/zz+79GQPaA0yQRHXhKGzBNBEqNomw5onmTnjW2S KO9RlwqGvIzBxT9vNIiut1Sswwd0d8skgrLGxyz3GBpoaBJEKU9i5T0oP1xljH2cdD/Ak3I7 Gk+HnUHv4rFlWfJrbzzpj4YXRatYhzYvO9Pe9Wjc700uGj77wkJl0JlMe+PZpD+VZR9+33ue 3YwuOzff9iGzyaeP3f74ogHBVUDRH07hr7cp+HlrkZZkC+VyNBj0htOLxggMQqNYvVwGKeoy N18sWKYonya92fWg8wuYvGa8eJxe3mweroefZpej4VX/+tN4q1f6w6vRRQMM3A31m6K8vxv/ MhlfFsVwC4Z9a+4BVKzpivLY0Kw3/PUnwF7e3l7ddK4nF2r/w+/FED92Jr1vzSD2wtxn6F8K uPymu8XcPMOEgbvfYmd8PYEmVZXF1A2ZOheEGGQGqLnwA+Wm/3HW7d32hl2JauTcPd+YNylM LQIgmwTFpldZS8P6YVTRpKLtzPyLy31NppkW3f9V+bOz/ig72fF/er9Qfca97A36qON/Yhk7 /ieObUj+J/jI/z9EpkuGDnIeOtmmximiQcSRSFCaJV8CmMt+AQnixZkSxCpfc8EiqVxkNIqg GNHYR26Sxz7N1ir3aIwE40JqYDlBLHKZ7zMfgeMXTChAGYHHuIakLZsyjmjGUBALls2pB9Cc y9r/mHau0Um/1+tBvphtDZ/CmhWlYUBjoSxp5j9AtTPk5gKJZcBhFVsjlyG2EiwuOkxQIpYw Ni+J4+1KJ9Yp49AV1GDKPBd5xjRFGW3Gjrw8y1gswjXiebpZJe+CxSKU/vHCJGb89AxdTbt9 +JJkilzKoSNpqPJoPj+TjaNOlECJtxlFx/MYtEJFkp0V/pKIa1hWH5LsnqPrO2zrRFP6AtEw TB446owHDjqR39PuoF9UkQ9EF2AB3LULZRueN4+EiDOluLHZbyrfFNo2U6XFnycehcX95PZz h1irM9T/fGuS1WnR6iWMkq3UgaGc3OQQToghmggWhjQDl94MjAI1mcJnYJDT7Yi9JGNFkri7 /GA++PHu7u68sRQiPW82ZT6BOwTXXJaFQcI1n8Ey5kNnLNbSpYjCv4lAhOxCen+2TcjZ4yL8 Z0+V/0nZ53+YSFy8QR81/O9gmDdb/rcAUfC/RY78/yPEDeLmbhMOu7bdfXPFJUM0i6k8W8KM B7LSAPwMtCHrJhVtzFxTp5o3X5QBMhPc0ipDhKlHsFmnnmVeeF+HIdHyaxWGtM0yNaeRsyKW XaoXmYP1Cm0bkzJtzMO8VJmuKLGsGeeiGlGm/brG4N0q98PQYCUohTwEatsrH1hklJq+cuks Y186RqnPI4PbbbvUdpZ6bUPHZeogXcHSVBl00i51OhMrq9wxSURTqyJm0ulOVbwdqzIbYHMC 2x6vNGVlC0ZFC+D2yvrStS1c7rpoZZQqZV3DKZ9ye0kDm4AgomFpAINMlTOHM6vclUvYGgKD lGirDE0DzyBRaQZQP/ccvTxDuOER03zpZHhPjfeZCZKYM6HBG1CQigPIHTfU4TZTsQ615906 aDE160BbAqlBPc3VUshuStS6o6DC2XbXX457lhx1jW6S5DVdG6/oejM/K3FewvdWLxbOn6kf N/DNlGbF2cX3SfSE+E3QxT1bq/CWs66HVSAkb6ilxPGEC7d781dA1O1xzKugJZSybyDQklpn HuweaKLm3FWpTHLVO8DwVeiXRFKKrkJCRsFrVhJXYAoKgJl4YJnYi1sYxFXDpVlUGASlVa4L FjEN118PEOETaB6u+QMVohLk51FUFfokDCJ4r5LpVqSk+nJv9gJcNQbhheDMIAVvgUMLnzVp 4GlQXo/bcJ2zwqT171WQW7HXVEij11mSCfEqXM4pvOmXQ/l2cd7ujF6Jg91rhZnfY9nisAFu ILi7FqzEvDSXuSj/HOFHQR0I0r4WYpYEYQ9iV0O84khhFhkHURGLEuCxg6oomy1ZmLLs8HAz Rn15lF0of/aDLIvQy7eYQ5o98yrUpar9iNWAKtVPSVcPq0KU6A4Wb07dDmgeGeGQslhTDypg ET1Qfjyu+a+QXRT9QB7QzpO36KPm/Ec38NPvv07x+7+Jbf14/vMjZNC1Hk/61d0Prxq4RFt8 PUUXSPcM34JtFmt7xDFJy3JJS2/Zfss0XYIdX5n8vSP/Z6OqDeK229hixCa+4zCHYr+FiQ27 AQtbnq5TnZkuw9hqtXF77sz11tyy4eXCNohJsD3XlUn/n73KHjA2HIvoR845ylGOcpRXyx8Q C0f5ACgAAA== --------------040900010004050208090308-- --------------070300090805090709040400-- From owner-freebsd-embedded@FreeBSD.ORG Sat Oct 11 13:12:11 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7ED651065692 for ; Sat, 11 Oct 2008 13:12:11 +0000 (UTC) (envelope-from outbackdingo@gmail.com) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.152]) by mx1.freebsd.org (Postfix) with ESMTP id D37378FC15 for ; Sat, 11 Oct 2008 13:12:10 +0000 (UTC) (envelope-from outbackdingo@gmail.com) Received: by fg-out-1718.google.com with SMTP id l26so626806fgb.35 for ; Sat, 11 Oct 2008 06:12:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type:references; bh=qmdDI43fygntNaGVLKAOexuqwgJmR2pshwWvQdfDhXI=; b=Aoo+yU83bUAOPhtLIX/L6MCsPgbITpUYAk7pf6N0d/yIangj4dTdLeLb6lLiUdM9MW P3Hia8RHV6Q+qNrNnl2JpVBEbZltK98RrVvnIBw02A5Bme040TI7WruEidk1pDo/q1jB jRzMMfbKk6Q5JtyM9TRgpBrfUaVH181bPVXHw= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:references; b=NLXpFXM3RzsK6wZNikdp1jbuUd2k2b+q2YW2fXjMOCvG455KVPXlWLoc+SUW3SwgxS 06OsB5/ygB0vKJ8xwrTaSmSR/z/Il3dnyFyzYUQrme330AD8btlFpo1Ov8KA1FQdB0ol kpB009cpiBeZScwsi606xdmVaWykMr0bGVmOI= Received: by 10.181.59.6 with SMTP id m6mr2855967bkk.20.1223730729437; Sat, 11 Oct 2008 06:12:09 -0700 (PDT) Received: by 10.181.32.13 with HTTP; Sat, 11 Oct 2008 06:12:09 -0700 (PDT) Message-ID: <5635aa0d0810110612l4a5abf79ic2394885d865c888@mail.gmail.com> Date: Sat, 11 Oct 2008 20:12:09 +0700 From: "Outback Dingo" To: "Bruce M. Simpson" In-Reply-To: <48F099D4.2050302@incunabulum.net> MIME-Version: 1.0 References: <48F099D4.2050302@incunabulum.net> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: freebsd-embedded@freebsd.org Subject: Re: HOWTO: Build NSLU2 U-Boot on FreeBSD X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2008 13:12:11 -0000 I know its a bit off topic but it would be nice to see FreeBSD running on some other pieces of equiptment like a Ubiquiti NS2 or PS2 On Sat, Oct 11, 2008 at 7:19 PM, Bruce M. Simpson wrot= e: > Thanks to Rink Springer and Rafal Jaworowski. > > ---------------------- > > Building NSLU2 U-boot firmware on FreeBSD hosts > > Quick start > > Make sure you have a JTAG adapter as a get-out-of-jail-free card in case > you trash the flash, "portinstall devel/urjtag" to get a driver for it. > Recommend getting one like the Olimex OCD as it has heaps more useful > functionality than just rewriting the flash, and should also work with > OpenOCD. > > Toolchain setup > > cd /usr/ports/devel/cross-binutils > env TGTARCH=3Darm TGTABI=3Drtems make install > > cd /usr/ports/devel/cross-gcc > env TGTARCH=3Darm TGTABI=3Drtems make install > > Get stas@FreeBSD.org's updated u-boot tarball: > uboot-atamantb.tar.bz2 > Untar it > > Fetch NSLU2 patch set from NSLU2-Linux: > > http://trac.nslu2-linux.org/kernel/browser/trunk/patches/u-boot/0001-ixp-= Support-for-NSLU2.patch > > Apply (patch -p1) inside uboot-atamantb. > > Apply Ix*.diff (provided) inside cpu/ixp/npe. > U-Boot doesn't grok being built for an RTEMS target, > so it needs some sweet lovin'. > > Fetch encumbered NPE microcode from Intel: > http://downloadcenter.intel.com/ > Search for IPL_IXP400NPELIBRARY-2_1.ZIP > (Yes yes, I know, we can't redistribute it, for now anyway...there will > be a workaround) > > Unzip... > Copy ./cpu/ixp/npe/IxNpeMicrocode.c.orig into uboot-atamantb/cpu/ixp/npe= =B7 > > Remove mkimage from tools/Makefile (it needs rentokil to build on FreeBSD= ; > and besides, you can use "portinstall devel/u-boot" to get mkimage) > > Now: > > env CROSS_COMPILE=3Darm-rtems- gmake distclean > env CROSS_COMPILE=3Darm-rtems- gmake nslu2_config > env CROSS_COMPILE=3Darm-rtems- gmake > > Voila, you should have u-boot firmware images, which you can now use to > reflash an NSLU2. > > > > --- ./cpu/ixp/npe/include/IxOsalEndianess.h.orig 2008-10-03 > 12:11:18.000000000 +0100 > +++ ./cpu/ixp/npe/include/IxOsalEndianess.h 2008-10-03 > 13:11:48.000000000 +0100 > @@ -59,6 +59,32 @@ > /* get ntohl/ntohs/htohl/htons macros definitions for WinCE */ > #include > > +#elif defined (__rtems__) > + > +# ifdef htonl > +# undef htonl > +# endif > +# ifdef ntohl > +# undef ntohl > +# endif > + > +# if BYTE_ORDER =3D=3D BIG_ENDIAN > + > +# define ntohl(a) (a) > +# define htonl(a) (a) > +# elif BYTE_ORDER =3D=3D LITTLE_ENDIAN > +# define SWAP_LONG(x) \ > + ((__u32)( \ > + (((__u32)(x) & (__u32)0x000000ffUL) << 24) | \ > + (((__u32)(x) & (__u32)0x0000ff00UL) << 8) | \ > + (((__u32)(x) & (__u32)0x00ff0000UL) >> 8) | \ > + (((__u32)(x) & (__u32)0xff000000UL) >> 24) )) > +# define ntohl(a) SWAP_LONG(a) > +# define htonl(a) SWAP_LONG(a) > +# else > +# error meep > +# endif > + > #else > > #error Unknown OS, please add a section with the include file for > htonl/htons/ntohl/ntohs > @@ -123,6 +149,14 @@ > > #define IX_OSAL_WINCE_LE > > +#elif defined (__rtems__) && defined (__BIG_ENDIAN) > + > +#define IX_OSAL_LINUX_BE /* XXX */ > + > +#elif defined (__rtems__) && defined (__BIG_ENDIAN) > + > +#define IX_OSAL_LINUX_LE /* XXX */ > + > #else > > #error Unknown OS/Endianess combination - only vxWorks BE LE, Linux BE L= E, > WinCE BE LE are supported > > --- ./cpu/ixp/npe/include/IxOsalMemAccess.h.orig 2008-10-03 > 13:24:52.000000000 +0100 > +++ ./cpu/ixp/npe/include/IxOsalMemAccess.h 2008-10-03 > 13:26:07.000000000 +0100 > @@ -324,7 +324,9 @@ > > #endif /* wince */ > > -#if defined (__vxworks) || (defined (__linux) && defined > (IX_OSAL_STATIC_MEMORY_MAP)) || \ > +#if defined (__vxworks) || \ > + defined (__rtems__) || \ > + (defined (__linux) && defined > (IX_OSAL_STATIC_MEMORY_MAP)) || \ > (defined (__wince) && defined > (IX_OSAL_STATIC_MEMORY_MAP)) > > #define IX_OSAL_READ_LONG_IO(wAddr) > IX_OSAL_READ_LONG_RAW(wAddr) > > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to "freebsd-embedded-unsubscribe@freebsd.or= g > " > > From owner-freebsd-embedded@FreeBSD.ORG Sat Oct 11 13:29:47 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 75669106569A; Sat, 11 Oct 2008 13:29:47 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 4CCF58FC12; Sat, 11 Oct 2008 13:29:47 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id BF8A8179570; Sat, 11 Oct 2008 09:29:46 -0400 (EDT) Received: from heartbeat2.messagingengine.com ([10.202.2.161]) by compute1.internal (MEProxy); Sat, 11 Oct 2008 09:29:46 -0400 X-Sasl-enc: dwMdikcxpaNT/fOmOrnJNyhDuQkB5YwGI7qs34ATtTze 1223731786 Received: from [192.168.123.18] (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 038FA37D78; Sat, 11 Oct 2008 09:29:45 -0400 (EDT) Message-ID: <48F0AA48.3040008@incunabulum.net> Date: Sat, 11 Oct 2008 14:29:44 +0100 From: "Bruce M. Simpson" User-Agent: Thunderbird 1.5.0.14 (Windows/20071210) MIME-Version: 1.0 To: "Bruce M. Simpson" References: <48EABE17.3010104@incunabulum.net> <20081009025641.e6d015bb.stas@FreeBSD.org> <48F09EF2.4060709@incunabulum.net> In-Reply-To: <48F09EF2.4060709@incunabulum.net> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Stanislav Sedov , freebsd-embedded@freebsd.org Subject: Re: Problems with NSLU2 and U-Boot X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2008 13:29:47 -0000 Bruce M. Simpson wrote: > I just tried booting kernel.bin on the NSLU2, as a raw memory image, > via tftp, and got exactly the same result. > I repeated it with U-Boot. It appears as though it relocates the > embedded ELF image to the correct address during load and execution, > but I can't be sure because I don't have any OCD capability just now. I grabbed the patches for the IXO dude's USB JTAG design here: http://www.ixo.de/info/usb_jtag/ FWIW they apply fine to the snapshot I rolled of OpenOCD, and it appears to talk to the USB Blaster clone OK. Now whilst this appears to detect the chain, I don't have TRST lines pulled out on the board -- I only have VCC, GND, TMS, TCK, TDO and TDI pulled out with teflon coated wire (the *really* thin stuff). So I can't halt the xScale core and capture registers, etc. It seems there is a TRSTn line but I'll have to warm up the iron another time... From owner-freebsd-embedded@FreeBSD.ORG Sat Oct 11 14:53:51 2008 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C77F106568A for ; Sat, 11 Oct 2008 14:53:51 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from out3.smtp.messagingengine.com (out3.smtp.messagingengine.com [66.111.4.27]) by mx1.freebsd.org (Postfix) with ESMTP id 09C5A8FC2A for ; Sat, 11 Oct 2008 14:53:51 +0000 (UTC) (envelope-from bms@incunabulum.net) Received: from compute1.internal (compute1.internal [10.202.2.41]) by out1.messagingengine.com (Postfix) with ESMTP id 6C6F7179616 for ; Sat, 11 Oct 2008 10:53:47 -0400 (EDT) Received: from heartbeat1.messagingengine.com ([10.202.2.160]) by compute1.internal (MEProxy); Sat, 11 Oct 2008 10:53:47 -0400 X-Sasl-enc: HTeFDlDxpNJkV7DHSvZngNR+YSFgU9o74jJxOwG2cT+u 1223736827 Received: from empiric.lon.incunabulum.net (82-35-112-254.cable.ubr07.dals.blueyonder.co.uk [82.35.112.254]) by mail.messagingengine.com (Postfix) with ESMTPSA id 03D1FDB89 for ; Sat, 11 Oct 2008 10:53:46 -0400 (EDT) Message-ID: <48F0BDF9.7080300@incunabulum.net> Date: Sat, 11 Oct 2008 15:53:45 +0100 From: Bruce M Simpson User-Agent: Thunderbird 2.0.0.14 (X11/20080514) MIME-Version: 1.0 To: freebsd-embedded@freebsd.org X-Enigmail-Version: 0.95.6 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Subject: Emprex / Star / Cavium followup X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Oct 2008 14:53:51 -0000 It appears Cavium bought Star Semiconductor in July/August. I've followed up with emails to Cavium and Emprex today asking "Where's the GPLed code release?" re: the NSD-100 "P2P appliance" which made its way onto the market without the source code being released to comply with the terms of the GPL. It's been around 3 months since I originally fired off questions about this, neither Emprex nor Star have replied, perhaps now that Cavium have bought Star, we may be more likely to get answers to these questions. cheers BMS