From owner-freebsd-mips@FreeBSD.ORG Sun Apr 3 21:29:26 2011 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40C06106564A for ; Sun, 3 Apr 2011 21:29:26 +0000 (UTC) (envelope-from aduane@juniper.net) Received: from exprod7og114.obsmtp.com (exprod7og114.obsmtp.com [64.18.2.215]) by mx1.freebsd.org (Postfix) with ESMTP id CEA788FC13 for ; Sun, 3 Apr 2011 21:29:25 +0000 (UTC) Received: from source ([66.129.224.36]) (using TLSv1) by exprod7ob114.postini.com ([64.18.6.12]) with SMTP ID DSNKTZjmtfCT+d9bX9v3AVZYzukS2SqSIRLu@postini.com; Sun, 03 Apr 2011 14:29:25 PDT Received: from p-emfe02-wf.jnpr.net (172.28.145.25) by P-EMHUB03-HQ.jnpr.net (172.24.192.37) with Microsoft SMTP Server (TLS) id 8.2.254.0; Sun, 3 Apr 2011 14:27:35 -0700 Received: from EMBX01-WF.jnpr.net ([fe80::1914:3299:33d9:e43b]) by p-emfe02-wf.jnpr.net ([fe80::c126:c633:d2dc:8090%11]) with mapi; Sun, 3 Apr 2011 17:29:13 -0400 From: Andrew Duane To: "mips@freebsd.org" Date: Sun, 3 Apr 2011 17:29:12 -0400 Thread-Topic: Toiling away on booting the new blades Thread-Index: AQHL8kYsPMWbnl7x+ka4JX8mqbSZ3A== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: Subject: Toiling away on booting the new blades X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Apr 2011 21:29:26 -0000 I've made real progress on getting our Octeon blades to boot with the other= bootstraps. After learning all about the app_descriptors and the octeon_bo= otinfo structures, I've decided on a slightly more modular approach. Rathe= r than faking out the code by hand-crafting these structures, I've decided = to teach the Octeon startup code how decode a standard MIPS bootinfo struct= ure. FreeBSD already has this defined, and I can make it do pretty much eve= rything I want. It's also completely deterministic as to which structure yo= u have in "a3" based on the other registers. It turns out this is pretty simple. I added a parallel routine to octeon_pr= ocess_app_desc_ver_6 to parse a bootinfo and call cvmx_sysinfo_minimal_init= ialize with the info I get from it. Very clean and tidy, and minimal disrup= tion. After that, everything else "just works". I even found a routine to c= raft a phy_mem_desc structure, but it doesn't look like I need it. Since the MIPS bootinfo structure is already part of FreeBSD, is this code = in the startup path something you'd be interested in taking in? -- Andrew Duane Juniper Networks 978-589-0551 10 Technology Park Dr aduane@juniper.net Westford, MA 01886-3418 From owner-freebsd-mips@FreeBSD.ORG Sun Apr 3 22:13:26 2011 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 254581065673 for ; Sun, 3 Apr 2011 22:13:26 +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 D9BA68FC0C for ; Sun, 3 Apr 2011 22:13:25 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p33M7cMU066482 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 3 Apr 2011 16:07:43 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Sun, 3 Apr 2011 16:07:37 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <153BB57A-6F99-4E5C-9F39-55D6C3B210FC@bsdimp.com> References: To: Andrew Duane X-Mailer: Apple Mail (2.1082) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 03 Apr 2011 16:07:43 -0600 (MDT) Cc: "mips@freebsd.org" Subject: Re: Toiling away on booting the new blades X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Apr 2011 22:13:26 -0000 On Apr 3, 2011, at 3:29 PM, Andrew Duane wrote: > I've made real progress on getting our Octeon blades to boot with the = other bootstraps. After learning all about the app_descriptors and the = octeon_bootinfo structures, I've decided on a slightly more modular = approach. Rather than faking out the code by hand-crafting these = structures, I've decided to teach the Octeon startup code how decode a = standard MIPS bootinfo structure. FreeBSD already has this defined, and = I can make it do pretty much everything I want. It's also completely = deterministic as to which structure you have in "a3" based on the other = registers. >=20 > It turns out this is pretty simple. I added a parallel routine to = octeon_process_app_desc_ver_6 to parse a bootinfo and call = cvmx_sysinfo_minimal_initialize with the info I get from it. Very clean = and tidy, and minimal disruption. After that, everything else "just = works". I even found a routine to craft a phy_mem_desc structure, but it = doesn't look like I need it. >=20 > Since the MIPS bootinfo structure is already part of FreeBSD, is this = code in the startup path something you'd be interested in taking in? I think I'd be interested. I think this is a decent path to explore, = but would need to see code before committing :) Warner From owner-freebsd-mips@FreeBSD.ORG Sun Apr 3 23:19:54 2011 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F2F57106564A for ; Sun, 3 Apr 2011 23:19:54 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-yi0-f54.google.com (mail-yi0-f54.google.com [209.85.218.54]) by mx1.freebsd.org (Postfix) with ESMTP id BC0708FC0A for ; Sun, 3 Apr 2011 23:19:54 +0000 (UTC) Received: by yie12 with SMTP id 12so2361035yie.13 for ; Sun, 03 Apr 2011 16:19:54 -0700 (PDT) Received: by 10.150.31.15 with SMTP id e15mr3955428ybe.185.1301872794097; Sun, 03 Apr 2011 16:19:54 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.151.13.12 with HTTP; Sun, 3 Apr 2011 16:19:34 -0700 (PDT) In-Reply-To: <153BB57A-6F99-4E5C-9F39-55D6C3B210FC@bsdimp.com> References: <153BB57A-6F99-4E5C-9F39-55D6C3B210FC@bsdimp.com> From: Juli Mallett Date: Sun, 3 Apr 2011 16:19:34 -0700 X-Google-Sender-Auth: 0cW_amQdeCSuylw3-hygYyzmGq8 Message-ID: To: Warner Losh Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "mips@freebsd.org" Subject: Re: Toiling away on booting the new blades X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 03 Apr 2011 23:19:55 -0000 On Sun, Apr 3, 2011 at 15:07, Warner Losh wrote: > On Apr 3, 2011, at 3:29 PM, Andrew Duane wrote: >> Since the MIPS bootinfo structure is already part of FreeBSD, is this co= de in the startup path something you'd be interested in taking in? > > I think I'd be interested. =A0I think this is a decent path to explore, b= ut would need to see code before committing :) Indeed, I think it's worth committing probably, or perhaps committing a modified version that does the same thing. It's easy to imagine that some people will eventually want to just use loader with U-Boot on Octeon so that they can have hints, good UFS support, module loading, etc. Also, Warner, if you touch octeon_machdep.c, could you please move the app boot descriptor thing to a separate header file with the Cavium license? I believe I've touched all of the actual *source code* there, but right now we're possibly violating the license (depending on how big you believe a page is) which requires the license to be at the top of the file. So I think moving the license and struct to a separate header would be sufficient (using the structure from the current SDK would probably be even better?) Juli. From owner-freebsd-mips@FreeBSD.ORG Mon Apr 4 01:30:52 2011 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDC3F1065676; Mon, 4 Apr 2011 01:30:52 +0000 (UTC) (envelope-from tinderbox@freebsd.org) Received: from freebsd-current.sentex.ca (freebsd-current.sentex.ca [64.7.128.98]) by mx1.freebsd.org (Postfix) with ESMTP id 958A98FC13; Mon, 4 Apr 2011 01:30:52 +0000 (UTC) Received: from freebsd-current.sentex.ca (localhost [127.0.0.1]) by freebsd-current.sentex.ca (8.14.4/8.14.4) with ESMTP id p341UpZk029261; Sun, 3 Apr 2011 21:30:51 -0400 (EDT) (envelope-from tinderbox@freebsd.org) Received: (from tinderbox@localhost) by freebsd-current.sentex.ca (8.14.4/8.14.4/Submit) id p341Up9J029232; Mon, 4 Apr 2011 01:30:51 GMT (envelope-from tinderbox@freebsd.org) Date: Mon, 4 Apr 2011 01:30:51 GMT Message-Id: <201104040130.p341Up9J029232@freebsd-current.sentex.ca> X-Authentication-Warning: freebsd-current.sentex.ca: tinderbox set sender to FreeBSD Tinderbox using -f Sender: FreeBSD Tinderbox From: FreeBSD Tinderbox To: FreeBSD Tinderbox , , Precedence: bulk Cc: Subject: [head tinderbox] failure on mips/mips X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2011 01:30:53 -0000 TB --- 2011-04-04 00:32:57 - tinderbox 2.6 running on freebsd-current.sentex.ca TB --- 2011-04-04 00:32:57 - starting HEAD tinderbox run for mips/mips TB --- 2011-04-04 00:32:57 - cleaning the object tree TB --- 2011-04-04 00:33:04 - cvsupping the source tree TB --- 2011-04-04 00:33:04 - /usr/bin/csup -z -r 3 -g -L 1 -h cvsup.sentex.ca /tinderbox/HEAD/mips/mips/supfile TB --- 2011-04-04 00:33:18 - building world TB --- 2011-04-04 00:33:18 - MAKEOBJDIRPREFIX=/obj TB --- 2011-04-04 00:33:18 - PATH=/usr/bin:/usr/sbin:/bin:/sbin TB --- 2011-04-04 00:33:18 - TARGET=mips TB --- 2011-04-04 00:33:18 - TARGET_ARCH=mips TB --- 2011-04-04 00:33:18 - TZ=UTC TB --- 2011-04-04 00:33:18 - __MAKE_CONF=/dev/null TB --- 2011-04-04 00:33:18 - cd /src TB --- 2011-04-04 00:33:18 - /usr/bin/make -B buildworld >>> World build started on Mon Apr 4 00:33:19 UTC 2011 >>> Rebuilding the temporary build tree >>> stage 1.1: legacy release compatibility shims >>> stage 1.2: bootstrap tools >>> stage 2.1: cleaning up the object tree >>> stage 2.2: rebuilding the object tree >>> stage 2.3: build tools >>> stage 3: cross tools >>> stage 4.1: building includes >>> stage 4.2: building libraries >>> stage 4.3: make dependencies >>> stage 4.4: building everything [...] ===> usr.sbin/usbdump (all) cc -O -pipe -G0 -std=gnu99 -Wsystem-headers -Werror -Wall -Wno-format-y2k -W -Wno-unused-parameter -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Wreturn-type -Wcast-qual -Wwrite-strings -Wswitch -Wshadow -Wunused-parameter -Wcast-align -Wno-uninitialized -Wno-pointer-sign -c /src/usr.sbin/usbdump/usbdump.c cc1: warnings being treated as errors /src/usr.sbin/usbdump/usbdump.c: In function 'print_apacket': /src/usr.sbin/usbdump/usbdump.c:339: warning: format '%06ju' expects type 'uintmax_t', but argument 4 has type 'suseconds_t' /src/usr.sbin/usbdump/usbdump.c:347: warning: cast increases required alignment of target type /src/usr.sbin/usbdump/usbdump.c: In function 'print_packets': /src/usr.sbin/usbdump/usbdump.c:393: warning: cast increases required alignment of target type *** Error code 1 Stop in /src/usr.sbin/usbdump. *** Error code 1 Stop in /src/usr.sbin. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. *** Error code 1 Stop in /src. TB --- 2011-04-04 01:30:51 - WARNING: /usr/bin/make returned exit code 1 TB --- 2011-04-04 01:30:51 - ERROR: failed to build world TB --- 2011-04-04 01:30:51 - 2521.65 user 612.70 system 3473.38 real http://tinderbox.freebsd.org/tinderbox-head-HEAD-mips-mips.full From owner-freebsd-mips@FreeBSD.ORG Mon Apr 4 01:46:39 2011 Return-Path: Delivered-To: mips@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D467E106566B; Mon, 4 Apr 2011 01:46:39 +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 8E5A98FC15; Mon, 4 Apr 2011 01:46:39 +0000 (UTC) Received: from [10.0.0.63] (63.imp.bsdimp.com [10.0.0.63]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p341jTD5068103 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Sun, 3 Apr 2011 19:45:32 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Sun, 3 Apr 2011 19:45:29 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: <153BB57A-6F99-4E5C-9F39-55D6C3B210FC@bsdimp.com> To: Juli Mallett X-Mailer: Apple Mail (2.1082) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Sun, 03 Apr 2011 19:45:32 -0600 (MDT) Cc: "mips@freebsd.org" Subject: Re: Toiling away on booting the new blades X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2011 01:46:39 -0000 On Apr 3, 2011, at 5:19 PM, Juli Mallett wrote: > On Sun, Apr 3, 2011 at 15:07, Warner Losh wrote: >> On Apr 3, 2011, at 3:29 PM, Andrew Duane wrote: >>> Since the MIPS bootinfo structure is already part of FreeBSD, is = this code in the startup path something you'd be interested in taking = in? >>=20 >> I think I'd be interested. I think this is a decent path to explore, = but would need to see code before committing :) >=20 > Indeed, I think it's worth committing probably, or perhaps committing > a modified version that does the same thing. It's easy to imagine > that some people will eventually want to just use loader with U-Boot > on Octeon so that they can have hints, good UFS support, module > loading, etc. >=20 > Also, Warner, if you touch octeon_machdep.c, could you please move the > app boot descriptor thing to a separate header file with the Cavium > license? I believe I've touched all of the actual *source code* > there, but right now we're possibly violating the license (depending > on how big you believe a page is) which requires the license to be at > the top of the file. So I think moving the license and struct to a > separate header would be sufficient (using the structure from the > current SDK would probably be even better?) I'll look into it. I inherited the code from the Cavium folks, so if = there's a license violation, they did it to themselves :) Structurally, I think it would be better. I've wanted to have more = modularity in how we hook up the bootloader-> kernel handoff for = embedded systems for a while, and this will help that goal. Warner From owner-freebsd-mips@FreeBSD.ORG Mon Apr 4 13:56:11 2011 Return-Path: Delivered-To: mips@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 40B64106564A; Mon, 4 Apr 2011 13:56:11 +0000 (UTC) (envelope-from aduane@juniper.net) Received: from exprod7og122.obsmtp.com (exprod7og122.obsmtp.com [64.18.2.22]) by mx1.freebsd.org (Postfix) with ESMTP id CC6268FC0C; Mon, 4 Apr 2011 13:56:05 +0000 (UTC) Received: from source ([66.129.224.36]) (using TLSv1) by exprod7ob122.postini.com ([64.18.6.12]) with SMTP ID DSNKTZnN9f79008CU/U5JpeNbXSWZ23fpsEZ@postini.com; Mon, 04 Apr 2011 06:56:10 PDT Received: from p-emfe02-wf.jnpr.net (172.28.145.25) by P-EMHUB02-HQ.jnpr.net (172.24.192.36) with Microsoft SMTP Server (TLS) id 8.2.254.0; Mon, 4 Apr 2011 06:52:39 -0700 Received: from EMBX01-WF.jnpr.net ([fe80::1914:3299:33d9:e43b]) by p-emfe02-wf.jnpr.net ([fe80::c126:c633:d2dc:8090%11]) with mapi; Mon, 4 Apr 2011 09:54:18 -0400 From: Andrew Duane To: Warner Losh , Juli Mallett Date: Mon, 4 Apr 2011 09:54:17 -0400 Thread-Topic: Toiling away on booting the new blades Thread-Index: AcvyaiberMh33B3ET1GWbiFvy7B75AAZBOrb Message-ID: References: <153BB57A-6F99-4E5C-9F39-55D6C3B210FC@bsdimp.com> , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "mips@freebsd.org" Subject: RE: Toiling away on booting the new blades X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 04 Apr 2011 13:56:11 -0000 This is actually something I wanted to understand better. I'm spending a lo= t of time in octeon_machdep.c, and the file seems to be a combination of Ca= vium SDK code (or at least SDK-derived code) and some stuff FreeBSD did its= elf. I'm trying to understand which is which, and what I should try hard to= keep intact for future SDK drops. The file does seem to have a split in th= e middle, with a separate block comment about provenance, and the structure= definitions are a bit muddled. The cvmx_bootinfo_t structure is from Cavium? It has a lot of baggage that = we really don't use. About 3/4 of it is completely unused (some is used in = the Linux application stuff, but not in the kernel), and some of the rest i= s easily derived from querying the hardware. That's what we do in JUNOS. Th= ings like core count, clock speed, etc. are just register reads on the chip= . Even memory size (that dreaded phy_mem_desc_addr) is really much more eas= ily described. The u-boot provided with the SDK allows the user to carve up= memory into different spaces for various things, but that's really not use= d. You just need the "top of memory" which bootinfo provides, then use the = simulator path in octeon_memory_init (which I assume is FreeBSD code?) to a= ssign phys_avail[1], and away you go. But, if the structure is from the SDK, I will leave it be. In fact, I still= have to synthesize a structure so things like the enet driver (mac_addr) a= nd CF driver (compact_flash_common_base_addr) will work. I would just like = to know what code in there is fair game. I've spent a lot of time working o= n Octeon startup code, but we dumped pretty much all of the SDK in this are= a and rolled our own. -- Andrew Duane Juniper Networks 978-589-0551 10 Technology Park Dr aduane@juniper.net Westford, MA 01886-3418 ________________________________________ From: Warner Losh [imp@bsdimp.com] Sent: Sunday, April 03, 2011 9:45 PM To: Juli Mallett Cc: Andrew Duane; mips@freebsd.org Subject: Re: Toiling away on booting the new blades On Apr 3, 2011, at 5:19 PM, Juli Mallett wrote: > On Sun, Apr 3, 2011 at 15:07, Warner Losh wrote: >> On Apr 3, 2011, at 3:29 PM, Andrew Duane wrote: >>> Since the MIPS bootinfo structure is already part of FreeBSD, is this c= ode in the startup path something you'd be interested in taking in? >> >> I think I'd be interested. I think this is a decent path to explore, bu= t would need to see code before committing :) > > Indeed, I think it's worth committing probably, or perhaps committing > a modified version that does the same thing. It's easy to imagine > that some people will eventually want to just use loader with U-Boot > on Octeon so that they can have hints, good UFS support, module > loading, etc. > > Also, Warner, if you touch octeon_machdep.c, could you please move the > app boot descriptor thing to a separate header file with the Cavium > license? I believe I've touched all of the actual *source code* > there, but right now we're possibly violating the license (depending > on how big you believe a page is) which requires the license to be at > the top of the file. So I think moving the license and struct to a > separate header would be sufficient (using the structure from the > current SDK would probably be even better?) I'll look into it. I inherited the code from the Cavium folks, so if there= 's a license violation, they did it to themselves :) Structurally, I think it would be better. I've wanted to have more modular= ity in how we hook up the bootloader-> kernel handoff for embedded systems = for a while, and this will help that goal. Warner From owner-freebsd-mips@FreeBSD.ORG Tue Apr 5 06:55:20 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8B0E1106566B for ; Tue, 5 Apr 2011 06:55:20 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id 21C218FC0A for ; Tue, 5 Apr 2011 06:55:19 +0000 (UTC) Received: by wwk4 with SMTP id 4so2404880wwk.1 for ; Mon, 04 Apr 2011 23:55:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:date:x-google-sender-auth :message-id:subject:from:to:content-type; bh=95mb/4SiIyjocgpJT9oesy4IE8WRkLbiJAamM40tKoQ=; b=il8Zeb2VL0SWAlqQchjnjNYx6Wo4x0zlBZkRnzqNJri4v4viKCkqz5tN46xG9eBJDf hp2AjUNv3AmgP41tKcwSHHCu5OR8wOWjH9QHi4cACWsZFF6PsrltZ+ObGfJZNMgjcM/N /eL8KDdyEpJry74bT/xaxr6EV9WDax+ovGNe0= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=LTPtjHXY8vOXMUWdRtQyLa6jA0Juw4cd9/D7u0bcxlAaFnq2UhpT6ycRIO7PkJ1SSF 6v8aWWei3cxFjvINGPSkgrHtrpGwyX00P3kjYR5au6O6QE4D9iAEFVJ5LIBxdWLiLrCA GhF5D2KiGyrpT1rabSFWJokSDZ+8QUwFe283E= MIME-Version: 1.0 Received: by 10.227.131.9 with SMTP id v9mr2613182wbs.6.1301986518854; Mon, 04 Apr 2011 23:55:18 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.227.132.199 with HTTP; Mon, 4 Apr 2011 23:55:18 -0700 (PDT) Date: Tue, 5 Apr 2011 14:55:18 +0800 X-Google-Sender-Auth: aNJdtLoVMGuniYT2vQwLj90ffHc Message-ID: From: Adrian Chadd To: freebsd-mips@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Subject: please test if_arge! X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 05 Apr 2011 06:55:20 -0000 Hi everyone, I think I've nailed the "TX locks up during load" issue on if_arge. Would people please give it a test in bursty traffic conditions (eg UDP iperf, UDP NFS) and get back to me? Thanks, Adrian From owner-freebsd-mips@FreeBSD.ORG Wed Apr 6 21:00:34 2011 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 437CC106564A for ; Wed, 6 Apr 2011 21:00:34 +0000 (UTC) (envelope-from aduane@juniper.net) Received: from exprod7og115.obsmtp.com (exprod7og115.obsmtp.com [64.18.2.217]) by mx1.freebsd.org (Postfix) with ESMTP id BC1C48FC08 for ; Wed, 6 Apr 2011 21:00:33 +0000 (UTC) Received: from P-EMHUB01-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob115.postini.com ([64.18.6.12]) with SMTP ID DSNKTZzUcOTskzdfYG0vZ3wvWYh6Lg1SYNiX@postini.com; Wed, 06 Apr 2011 14:00:33 PDT Received: from p-emfe02-wf.jnpr.net (172.28.145.25) by P-EMHUB01-HQ.jnpr.net (172.24.192.35) with Microsoft SMTP Server (TLS) id 8.2.254.0; Wed, 6 Apr 2011 13:57:16 -0700 Received: from EMBX01-WF.jnpr.net ([fe80::1914:3299:33d9:e43b]) by p-emfe02-wf.jnpr.net ([fe80::c126:c633:d2dc:8090%11]) with mapi; Wed, 6 Apr 2011 16:58:58 -0400 From: Andrew Duane To: "mips@freebsd.org" Date: Wed, 6 Apr 2011 16:58:57 -0400 Thread-Topic: Trouble making a filesystem Thread-Index: Acv0nXJq107Qs5dyQYeO1VtLodABYA== Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: Subject: Trouble making a filesystem X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Apr 2011 21:00:34 -0000 I'm having trouble making a working filesystem for my OCTEON1 kernel to run= on. I do a "buildworld", but there are three problems: 1) Most of the executables won't execute, they give "Exec format error". Th= e problem seems to be with dynamically linked executables. When I rebuilt "= /bin/sh" as a static executable, it worked OK. I guess I could manually fix= every Makefile to use static linking, but that seems absurd. 2) Some things aren't being populated. For example, that the only thing in = the buildworld output of etc is sendmail. In the installworld output there = are a handful of subdirectorties, but no "rc" files. 3) Eventually, the kernel tips over with: panic: sched_priority: invalid priority 231: nice 0, ticks 1955000 ftick= 14022821 ltick 14023821 tick pri 59 Any thoughts on what I'm missing? -- Andrew Duane Juniper Networks 978-589-0551 10 Technology Park Dr aduane@juniper.net Westford, MA 01886-3418 =20 From owner-freebsd-mips@FreeBSD.ORG Wed Apr 6 21:05:17 2011 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3A88D106564A for ; Wed, 6 Apr 2011 21:05:17 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-yi0-f54.google.com (mail-yi0-f54.google.com [209.85.218.54]) by mx1.freebsd.org (Postfix) with ESMTP id 006C88FC1B for ; Wed, 6 Apr 2011 21:05:16 +0000 (UTC) Received: by yie12 with SMTP id 12so846127yie.13 for ; Wed, 06 Apr 2011 14:05:16 -0700 (PDT) Received: by 10.151.27.16 with SMTP id e16mr81704ybj.356.1302123916109; Wed, 06 Apr 2011 14:05:16 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.151.13.12 with HTTP; Wed, 6 Apr 2011 14:04:56 -0700 (PDT) In-Reply-To: References: From: Juli Mallett Date: Wed, 6 Apr 2011 14:04:56 -0700 X-Google-Sender-Auth: wmRmpCa1tR8NGyl7IBBdEEys1UM Message-ID: To: Andrew Duane Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "mips@freebsd.org" Subject: Re: Trouble making a filesystem X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Apr 2011 21:05:17 -0000 On Wed, Apr 6, 2011 at 13:58, Andrew Duane wrote: > I'm having trouble making a working filesystem for my OCTEON1 kernel to r= un on. I do a "buildworld", but there are three problems: > > 1) Most of the executables won't execute, they give "Exec format error". = The problem seems to be with dynamically linked executables. When I rebuilt= "/bin/sh" as a static executable, it worked OK. I guess I could manually f= ix every Makefile to use static linking, but that seems absurd. It would probably be helpful to include your build scripts and the output of 'file' on one of the troublesome binaries. > 2) Some things aren't being populated. For example, that the only thing i= n the buildworld output of etc is sendmail. In the installworld output ther= e are a handful of subdirectorties, but no "rc" files. You need 'make distribute DESTDIR=3D/whatever'. Or is it make distribution? Something. Then you'll just need to set up fstab and rc.conf > 3) Eventually, the kernel tips over with: > > =A0 panic: sched_priority: invalid priority 231: nice 0, ticks 1955000 ft= ick 14022821 ltick 14023821 tick pri 59 I've never seen this. Sounds like a problem with signed vs. unsigned chars for priorities. Most of those should be fixed these days, though. From owner-freebsd-mips@FreeBSD.ORG Wed Apr 6 21:15:51 2011 Return-Path: Delivered-To: mips@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 39B83106566C; Wed, 6 Apr 2011 21:15:51 +0000 (UTC) (envelope-from aduane@juniper.net) Received: from exprod7og115.obsmtp.com (exprod7og115.obsmtp.com [64.18.2.217]) by mx1.freebsd.org (Postfix) with ESMTP id ACA0F8FC0A; Wed, 6 Apr 2011 21:15:50 +0000 (UTC) Received: from P-EMHUB02-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob115.postini.com ([64.18.6.12]) with SMTP ID DSNKTZzYBoNUAsCf8LEMdQVKEWnf/XaXvtfA@postini.com; Wed, 06 Apr 2011 14:15:50 PDT Received: from p-emfe01-wf.jnpr.net (172.28.145.24) by P-EMHUB02-HQ.jnpr.net (172.24.192.36) with Microsoft SMTP Server (TLS) id 8.2.254.0; Wed, 6 Apr 2011 14:12:57 -0700 Received: from EMBX01-WF.jnpr.net ([fe80::1914:3299:33d9:e43b]) by p-emfe01-wf.jnpr.net ([fe80::d0d1:653d:5b91:a123%11]) with mapi; Wed, 6 Apr 2011 17:14:40 -0400 From: Andrew Duane To: Juli Mallett Date: Wed, 6 Apr 2011 17:14:39 -0400 Thread-Topic: Trouble making a filesystem Thread-Index: Acv0nlZQBcFXrWBpSpCUssnwCWcp0AAALEfw Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "mips@freebsd.org" Subject: RE: Trouble making a filesystem X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Apr 2011 21:15:51 -0000 Some sample files are: /sbin/init: ELF 64-bit MSB MIPS32 rel2 executable, MIPS, version 1 (FreeBSD= ), for FreeBSD 9.0 (900034), statically linked, not stripped /bin/cat: ELF 64-bit MSB MIPS32 rel2 executable, MIPS, version 1 (FreeBSD= ), for FreeBSD 9.0 (900034), dynamically linked (uses shared libs), not str= ipped=20 /sbin/init works, it is statically linked. /bin/cat does not, it is dynamic= ally linked. It could be an issue with the linker not being packaged or som= e other configuration issue, like ldscript not being there. I tried the "make distribute" and it yelled at me for /base not existing. D= ESTDIR is set to my local directory, which worked for installworld, but dis= tribute seems to forcibly override it to /base /Andrew =20 -----Original Message----- From: juli@clockworksquid.com [mailto:juli@clockworksquid.com] On Behalf Of= Juli Mallett Sent: Wednesday, April 06, 2011 5:05 PM To: Andrew Duane Cc: mips@freebsd.org Subject: Re: Trouble making a filesystem On Wed, Apr 6, 2011 at 13:58, Andrew Duane wrote: > I'm having trouble making a working filesystem for my OCTEON1 kernel to r= un on. I do a "buildworld", but there are three problems: > > 1) Most of the executables won't execute, they give "Exec format error". = The problem seems to be with dynamically linked executables. When I rebuilt= "/bin/sh" as a static executable, it worked OK. I guess I could manually f= ix every Makefile to use static linking, but that seems absurd. It would probably be helpful to include your build scripts and the output of 'file' on one of the troublesome binaries. > 2) Some things aren't being populated. For example, that the only thing i= n the buildworld output of etc is sendmail. In the installworld output ther= e are a handful of subdirectorties, but no "rc" files. You need 'make distribute DESTDIR=3D/whatever'. Or is it make distribution? Something. Then you'll just need to set up fstab and rc.conf > 3) Eventually, the kernel tips over with: > > =A0 panic: sched_priority: invalid priority 231: nice 0, ticks 1955000 ft= ick 14022821 ltick 14023821 tick pri 59 I've never seen this. Sounds like a problem with signed vs. unsigned chars for priorities. Most of those should be fixed these days, though. From owner-freebsd-mips@FreeBSD.ORG Wed Apr 6 21:20:17 2011 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2C53C106564A for ; Wed, 6 Apr 2011 21:20:17 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-gy0-f182.google.com (mail-gy0-f182.google.com [209.85.160.182]) by mx1.freebsd.org (Postfix) with ESMTP id E3FCA8FC16 for ; Wed, 6 Apr 2011 21:20:16 +0000 (UTC) Received: by gyg13 with SMTP id 13so846775gyg.13 for ; Wed, 06 Apr 2011 14:20:16 -0700 (PDT) Received: by 10.150.63.19 with SMTP id l19mr119075yba.71.1302124816290; Wed, 06 Apr 2011 14:20:16 -0700 (PDT) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.151.13.12 with HTTP; Wed, 6 Apr 2011 14:19:56 -0700 (PDT) In-Reply-To: References: From: Juli Mallett Date: Wed, 6 Apr 2011 14:19:56 -0700 X-Google-Sender-Auth: tOd5-2fh7ttDB446X5mcvUwaeo0 Message-ID: To: Andrew Duane Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: "mips@freebsd.org" Subject: Re: Trouble making a filesystem X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Apr 2011 21:20:17 -0000 On Wed, Apr 6, 2011 at 14:14, Andrew Duane wrote: > Some sample files are: > > /sbin/init: ELF 64-bit MSB MIPS32 rel2 executable, MIPS, version 1 (FreeB= SD), for FreeBSD 9.0 (900034), statically linked, not stripped > /bin/cat: =A0 ELF 64-bit MSB MIPS32 rel2 executable, MIPS, version 1 (Fre= eBSD), for FreeBSD 9.0 (900034), dynamically linked (uses shared libs), not= stripped > > /sbin/init works, it is statically linked. /bin/cat does not, it is dynam= ically linked. It could be an issue with the linker not being packaged or s= ome other configuration issue, like ldscript not being there. Are you setting TARGET_CPUTYPE during your build? If so, to what? Why not 'octeon'? I'm not sure if that's your culprit, but 64-bit ELF with the MIPS32 ISA should be impossible and is nonsensical. It's possible some recent rtld change broke something, but it seems unlikely. Dynamic binaries have certainly been working for the dozens of other people running n64 MIPS systems, including on Octeon. Seems strange. > I tried the "make distribute" and it yelled at me for /base not existing.= DESTDIR is set to my local directory, which worked for installworld, but d= istribute seems to forcibly override it to /base Oh, right, I meant DISTDIR, sorry. From owner-freebsd-mips@FreeBSD.ORG Wed Apr 6 21:25:15 2011 Return-Path: Delivered-To: mips@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 4F6E91065676 for ; Wed, 6 Apr 2011 21:25:15 +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 0ADDC8FC15 for ; Wed, 6 Apr 2011 21:25:14 +0000 (UTC) Received: from [10.30.101.53] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id p36LGPTa007544 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Wed, 6 Apr 2011 15:16:28 -0600 (MDT) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1082) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Wed, 6 Apr 2011 15:16:19 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Andrew Duane X-Mailer: Apple Mail (2.1082) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Wed, 06 Apr 2011 15:16:28 -0600 (MDT) Cc: "mips@freebsd.org" Subject: Re: Trouble making a filesystem X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Apr 2011 21:25:15 -0000 On Apr 6, 2011, at 2:58 PM, Andrew Duane wrote: > I'm having trouble making a working filesystem for my OCTEON1 kernel = to run on. I do a "buildworld", but there are three problems: >=20 > 1) Most of the executables won't execute, they give "Exec format = error". The problem seems to be with dynamically linked executables. = When I rebuilt "/bin/sh" as a static executable, it worked OK. I guess I = could manually fix every Makefile to use static linking, but that seems = absurd. I've not seen this. However, I did "recently" change the way to build = mips from TARGET_ARCH=3Dmips to TARGET_ARCH=3Dmips64eb. Maybe that's = the issue? > 2) Some things aren't being populated. For example, that the only = thing in the buildworld output of etc is sendmail. In the installworld = output there are a handful of subdirectorties, but no "rc" files. Do you have a make distribution step in your build scripts? That's what = populates the system with most of /etc and a few other oddities... > 3) Eventually, the kernel tips over with: >=20 > panic: sched_priority: invalid priority 231: nice 0, ticks 1955000 = ftick 14022821 ltick 14023821 tick pri 59 >=20 > Any thoughts on what I'm missing? Haven't seen that, but I've not run FreeBSD/mips from source built newer = than mid January. Maybe that's a clue? Warner From owner-freebsd-mips@FreeBSD.ORG Wed Apr 6 21:40:09 2011 Return-Path: Delivered-To: mips@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3FDA81065670 for ; Wed, 6 Apr 2011 21:40:09 +0000 (UTC) (envelope-from PMahan@adaranet.com) Received: from barracuda.adaranet.com (smtp.adaranet.com [72.5.229.2]) by mx1.freebsd.org (Postfix) with ESMTP id 15F838FC12 for ; Wed, 6 Apr 2011 21:40:08 +0000 (UTC) X-ASG-Debug-ID: 1302125251-2c50440d0001-aJzRFu Received: from SJ-EXCH-1.adaranet.com ([10.10.1.29]) by barracuda.adaranet.com with ESMTP id C3d1WA45bhFKcgSU; Wed, 06 Apr 2011 14:27:31 -0700 (PDT) X-Barracuda-Envelope-From: PMahan@adaranet.com Received: from SJ-EXCH-1.adaranet.com ([fe80::7042:d8c2:5973:c523]) by SJ-EXCH-1.adaranet.com ([fe80::7042:d8c2:5973:c523%14]) with mapi; Wed, 6 Apr 2011 14:27:31 -0700 From: Patrick Mahan X-Barracuda-BBL-IP: fe80::7042:d8c2:5973:c523 X-Barracuda-RBL-IP: fe80::7042:d8c2:5973:c523 To: Andrew Duane , Juli Mallett Date: Wed, 6 Apr 2011 14:27:15 -0700 X-ASG-Orig-Subj: RE: Trouble making a filesystem Thread-Topic: Trouble making a filesystem Thread-Index: Acv0nlZQBcFXrWBpSpCUssnwCWcp0AAALEfwAACAnsA= Message-ID: <32AB5C9615CC494997D9ABB1DB12783C024E7F4F1A@SJ-EXCH-1.adaranet.com> References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-cr-hashedpuzzle: BiA1 DGzd DWgX FtSJ JzYu KE1c Nofg Nvnp RTz1 S+fI UQq5 WizL XdrQ Yjqj gNJ7 kGCH; 3; YQBkAHUAYQBuAGUAQABqAHUAbgBpAHAAZQByAC4AbgBlAHQAOwBqAG0AYQBsAGwAZQB0AHQAQABmAHIAZQBlAGIAcwBkAC4AbwByAGcAOwBtAGkAcABzAEAAZgByAGUAZQBiAHMAZAAuAG8AcgBnAA==; Sosha1_v1; 7; {B2CF6A22-9792-4AB5-BBA9-1C8211B61515}; cABtAGEAaABhAG4AQABhAGQAYQByAGEAbgBlAHQALgBjAG8AbQA=; Wed, 06 Apr 2011 21:27:15 GMT; UgBFADoAIABUAHIAbwB1AGIAbABlACAAbQBhAGsAaQBuAGcAIABhACAAZgBpAGwAZQBzAHkAcwB0AGUAbQA= x-cr-puzzleid: {B2CF6A22-9792-4AB5-BBA9-1C8211B61515} acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Barracuda-Connect: UNKNOWN[10.10.1.29] X-Barracuda-Start-Time: 1302125251 X-Barracuda-URL: http://172.16.10.203:8000/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at adaranet.com Cc: "mips@freebsd.org" Subject: RE: Trouble making a filesystem X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Apr 2011 21:40:09 -0000 > -----Original Message----- > From: owner-freebsd-mips@freebsd.org [mailto:owner-freebsd- > mips@freebsd.org] On Behalf Of Andrew Duane > Sent: Wednesday, April 06, 2011 2:15 PM > To: Juli Mallett > Cc: mips@freebsd.org > Subject: RE: Trouble making a filesystem > > Some sample files are: > > /sbin/init: ELF 64-bit MSB MIPS32 rel2 executable, MIPS, version 1 > (FreeBSD), for FreeBSD 9.0 (900034), statically linked, not stripped > /bin/cat: ELF 64-bit MSB MIPS32 rel2 executable, MIPS, version 1 > (FreeBSD), for FreeBSD 9.0 (900034), dynamically linked (uses shared libs= ), > not stripped > > /sbin/init works, it is statically linked. /bin/cat does not, it is > dynamically linked. It could be an issue with the linker not being packag= ed > or some other configuration issue, like ldscript not being there. > > > I tried the "make distribute" and it yelled at me for /base not existing. > DESTDIR is set to my local directory, which worked for installworld, but > distribute seems to forcibly override it to /base > For the dynamically linked images, what does ldd show? Is it possible that the kernel is able to find ldd? I ran into this a couple times when portin= g linux to a new platform and usually when it tried to exec ldd it failed bec= ause ldd was either missing (or in the case of a cavium port, it had failed to b= uild a 64-bit version on a 32-bit host system). Patrick > > /Andrew > > > -----Original Message----- > From: juli@clockworksquid.com [mailto:juli@clockworksquid.com] On Behalf = Of > Juli Mallett > Sent: Wednesday, April 06, 2011 5:05 PM > To: Andrew Duane > Cc: mips@freebsd.org > Subject: Re: Trouble making a filesystem > > On Wed, Apr 6, 2011 at 13:58, Andrew Duane wrote: > > I'm having trouble making a working filesystem for my OCTEON1 kernel to > run on. I do a "buildworld", but there are three problems: > > > > 1) Most of the executables won't execute, they give "Exec format error"= . > The problem seems to be with dynamically linked executables. When I rebui= lt > "/bin/sh" as a static executable, it worked OK. I guess I could manually > fix every Makefile to use static linking, but that seems absurd. > > It would probably be helpful to include your build scripts and the > output of 'file' on one of the troublesome binaries. > > > 2) Some things aren't being populated. For example, that the only thing > in the buildworld output of etc is sendmail. In the installworld output > there are a handful of subdirectorties, but no "rc" files. > > You need 'make distribute DESTDIR=3D/whatever'. Or is it make > distribution? Something. Then you'll just need to set up fstab and > rc.conf > > > 3) Eventually, the kernel tips over with: > > > > panic: sched_priority: invalid priority 231: nice 0, ticks 1955000 > ftick 14022821 ltick 14023821 tick pri 59 > > I've never seen this. Sounds like a problem with signed vs. unsigned > chars for priorities. Most of those should be fixed these days, > though. > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" From owner-freebsd-mips@FreeBSD.ORG Thu Apr 7 00:07:31 2011 Return-Path: Delivered-To: mips@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D068F106564A for ; Thu, 7 Apr 2011 00:07:31 +0000 (UTC) (envelope-from aduane@juniper.net) Received: from exprod7og121.obsmtp.com (exprod7og121.obsmtp.com [64.18.2.20]) by mx1.freebsd.org (Postfix) with ESMTP id 4DB778FC0A for ; Thu, 7 Apr 2011 00:07:27 +0000 (UTC) Received: from P-EMHUB03-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob121.postini.com ([64.18.6.12]) with SMTP ID DSNKTZ0APmSI8YhcX67qLw4jtnpr3hIWjBmF@postini.com; Wed, 06 Apr 2011 17:07:31 PDT Received: from p-emfe02-wf.jnpr.net (172.28.145.25) by P-EMHUB03-HQ.jnpr.net (172.24.192.37) with Microsoft SMTP Server (TLS) id 8.2.254.0; Wed, 6 Apr 2011 17:02:23 -0700 Received: from EMBX01-WF.jnpr.net ([fe80::1914:3299:33d9:e43b]) by p-emfe02-wf.jnpr.net ([fe80::c126:c633:d2dc:8090%11]) with mapi; Wed, 6 Apr 2011 20:04:05 -0400 From: Andrew Duane To: Warner Losh Date: Wed, 6 Apr 2011 20:03:05 -0400 Thread-Topic: Trouble making a filesystem Thread-Index: Acv0oSOxkXoDjeVaQqadL0gVeJOiGwAFgeoU Message-ID: References: , In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "mips@freebsd.org" Subject: RE: Trouble making a filesystem X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2011 00:07:31 -0000 I was trying to follow the instructions on the MIPS wiki page, but they do = seem to be volatile. I will check my build setup tomorrow and see what I ha= ve for TARGET and TARGET_ARCH and all. I didn't do a distribute step, I was= trying to this afternoon and it just failed completely. -- Andrew Duane Juniper Networks 978-589-0551 10 Technology Park Dr aduane@juniper.net Westford, MA 01886-3418 ________________________________________ From: Warner Losh [imp@bsdimp.com] Sent: Wednesday, April 06, 2011 5:16 PM To: Andrew Duane Cc: mips@freebsd.org Subject: Re: Trouble making a filesystem On Apr 6, 2011, at 2:58 PM, Andrew Duane wrote: > I'm having trouble making a working filesystem for my OCTEON1 kernel to r= un on. I do a "buildworld", but there are three problems: > > 1) Most of the executables won't execute, they give "Exec format error". = The problem seems to be with dynamically linked executables. When I rebuilt= "/bin/sh" as a static executable, it worked OK. I guess I could manually f= ix every Makefile to use static linking, but that seems absurd. I've not seen this. However, I did "recently" change the way to build mips= from TARGET_ARCH=3Dmips to TARGET_ARCH=3Dmips64eb. Maybe that's the issue= ? > 2) Some things aren't being populated. For example, that the only thing i= n the buildworld output of etc is sendmail. In the installworld output ther= e are a handful of subdirectorties, but no "rc" files. Do you have a make distribution step in your build scripts? That's what po= pulates the system with most of /etc and a few other oddities... > 3) Eventually, the kernel tips over with: > > panic: sched_priority: invalid priority 231: nice 0, ticks 1955000 ftic= k 14022821 ltick 14023821 tick pri 59 > > Any thoughts on what I'm missing? Haven't seen that, but I've not run FreeBSD/mips from source built newer th= an mid January. Maybe that's a clue? Warner From owner-freebsd-mips@FreeBSD.ORG Thu Apr 7 13:51:30 2011 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBD701065679 for ; Thu, 7 Apr 2011 13:51:30 +0000 (UTC) (envelope-from aduane@juniper.net) Received: from exprod7og124.obsmtp.com (exprod7og124.obsmtp.com [64.18.2.26]) by mx1.freebsd.org (Postfix) with ESMTP id D67898FC1A for ; Thu, 7 Apr 2011 13:51:27 +0000 (UTC) Received: from P-EMHUB03-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob124.postini.com ([64.18.6.12]) with SMTP ID DSNKTZ3BXhmqpe7Euiw+p36KOioyi+XA9yuK@postini.com; Thu, 07 Apr 2011 06:51:30 PDT Received: from p-emfe01-wf.jnpr.net (172.28.145.24) by P-EMHUB03-HQ.jnpr.net (172.24.192.37) with Microsoft SMTP Server (TLS) id 8.2.254.0; Thu, 7 Apr 2011 06:47:41 -0700 Received: from EMBX01-WF.jnpr.net ([fe80::1914:3299:33d9:e43b]) by p-emfe01-wf.jnpr.net ([fe80::d0d1:653d:5b91:a123%11]) with mapi; Thu, 7 Apr 2011 09:49:24 -0400 From: Andrew Duane To: Adrian Chadd Date: Thu, 7 Apr 2011 09:49:22 -0400 Thread-Topic: Trouble making a filesystem Thread-Index: Acv1Kcmo5n/CBrMNSFqMX1/su0zspgAAK5Hw Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "mips@freebsd.org" Subject: RE: Trouble making a filesystem X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2011 13:51:30 -0000 I had already tried the "make $MAKEFLAGS distribution", and it did seem to = add a lot to my filesystem. But the original problem still remains, no dyna= mic executables are executable. Init works, but sh does not, nor anything e= lse..... ................................... Andrew Duane Juniper Networks o +1 978 589 0551 m +1 603-770-7088 aduane@juniper.net From: adrian.chadd@gmail.com [mailto:adrian.chadd@gmail.com] On Behalf Of A= drian Chadd Sent: Thursday, April 07, 2011 9:43 AM To: Andrew Duane Cc: Warner Losh; mips@freebsd.org Subject: Re: Trouble making a filesystem It's "make distribution" :-) Adrian On 7 April 2011 08:03, Andrew Duane > wrote: I was trying to follow the instructions on the MIPS wiki page, but they do = seem to be volatile. I will check my build setup tomorrow and see what I ha= ve for TARGET and TARGET_ARCH and all. I didn't do a distribute step, I was= trying to this afternoon and it just failed completely. -- Andrew Duane Juniper Networks 978-589-0551 10 Technology Park Dr aduane@juniper.net Westford, MA 01886-3418 ________________________________________ From: Warner Losh [imp@bsdimp.com] Sent: Wednesday, April 06, 2011 5:16 PM To: Andrew Duane Cc: mips@freebsd.org Subject: Re: Trouble making a filesystem On Apr 6, 2011, at 2:58 PM, Andrew Duane wrote: > I'm having trouble making a working filesystem for my OCTEON1 kernel to r= un on. I do a "buildworld", but there are three problems: > > 1) Most of the executables won't execute, they give "Exec format error". = The problem seems to be with dynamically linked executables. When I rebuilt= "/bin/sh" as a static executable, it worked OK. I guess I could manually f= ix every Makefile to use static linking, but that seems absurd. I've not seen this. However, I did "recently" change the way to build mips= from TARGET_ARCH=3Dmips to TARGET_ARCH=3Dmips64eb. Maybe that's the issue= ? > 2) Some things aren't being populated. For example, that the only thing i= n the buildworld output of etc is sendmail. In the installworld output ther= e are a handful of subdirectorties, but no "rc" files. Do you have a make distribution step in your build scripts? That's what po= pulates the system with most of /etc and a few other oddities... > 3) Eventually, the kernel tips over with: > > panic: sched_priority: invalid priority 231: nice 0, ticks 1955000 ftic= k 14022821 ltick 14023821 tick pri 59 > > Any thoughts on what I'm missing? Haven't seen that, but I've not run FreeBSD/mips from source built newer th= an mid January. Maybe that's a clue? Warner _______________________________________________ freebsd-mips@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-mips To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" From owner-freebsd-mips@FreeBSD.ORG Thu Apr 7 14:07:15 2011 Return-Path: Delivered-To: mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE5751065673 for ; Thu, 7 Apr 2011 14:07:15 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ww0-f42.google.com (mail-ww0-f42.google.com [74.125.82.42]) by mx1.freebsd.org (Postfix) with ESMTP id 5A3578FC16 for ; Thu, 7 Apr 2011 14:07:14 +0000 (UTC) Received: by wwk4 with SMTP id 4so5127375wwk.1 for ; Thu, 07 Apr 2011 07:07:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Ti6kf5rBlPGpUkK8v7X4G1Grtdgc5CiWLMpcWE+VAVI=; b=SO+qVBDS2JyIOhJA+xvY2uQsIAZvGgjvFZrolC1GwLp65msGBxLcj50ZqroR28QxXr 3YVWp4y5ThAM+6lzAa5yDDYrywaLZT6fZavDtb+tVCVVzfyh/4vwB7y1RVIIVhWS45cz rGVfS3s+mUcAd69QldO0G9F/EB8qE3b6yIbNU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=IELAcczDnsiQfTvgfiRENDUdHy9nG37uW22tz84AeR8CUSKnj5TOEziCncma6GamMs 4D6Iq1Al9tnXQkm1fEB9K76YIGMgZJhEDsn0qboMuDCLTwXyXqUSwQ1Now2vSmmIFka6 WMZc9RkVcF0JVBOwyoIwrr6q+OPWhzoCOU334= MIME-Version: 1.0 Received: by 10.227.131.9 with SMTP id v9mr936844wbs.6.1302183809256; Thu, 07 Apr 2011 06:43:29 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.227.132.199 with HTTP; Thu, 7 Apr 2011 06:43:29 -0700 (PDT) In-Reply-To: References: Date: Thu, 7 Apr 2011 21:43:29 +0800 X-Google-Sender-Auth: lhozsfxGTqlXC8DQkKRrVhUad_I Message-ID: From: Adrian Chadd To: Andrew Duane Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.5 Cc: "mips@freebsd.org" Subject: Re: Trouble making a filesystem X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 07 Apr 2011 14:07:15 -0000 It's "make distribution" :-) Adrian On 7 April 2011 08:03, Andrew Duane wrote: > I was trying to follow the instructions on the MIPS wiki page, but they do > seem to be volatile. I will check my build setup tomorrow and see what I > have for TARGET and TARGET_ARCH and all. I didn't do a distribute step, I > was trying to this afternoon and it just failed completely. > > -- > Andrew Duane Juniper Networks > 978-589-0551 10 Technology Park Dr > aduane@juniper.net Westford, MA 01886-3418 > > ________________________________________ > From: Warner Losh [imp@bsdimp.com] > Sent: Wednesday, April 06, 2011 5:16 PM > To: Andrew Duane > Cc: mips@freebsd.org > Subject: Re: Trouble making a filesystem > > On Apr 6, 2011, at 2:58 PM, Andrew Duane wrote: > > > I'm having trouble making a working filesystem for my OCTEON1 kernel to > run on. I do a "buildworld", but there are three problems: > > > > 1) Most of the executables won't execute, they give "Exec format error". > The problem seems to be with dynamically linked executables. When I rebuilt > "/bin/sh" as a static executable, it worked OK. I guess I could manually fix > every Makefile to use static linking, but that seems absurd. > > I've not seen this. However, I did "recently" change the way to build mips > from TARGET_ARCH=mips to TARGET_ARCH=mips64eb. Maybe that's the issue? > > > 2) Some things aren't being populated. For example, that the only thing > in the buildworld output of etc is sendmail. In the installworld output > there are a handful of subdirectorties, but no "rc" files. > > Do you have a make distribution step in your build scripts? That's what > populates the system with most of /etc and a few other oddities... > > > 3) Eventually, the kernel tips over with: > > > > panic: sched_priority: invalid priority 231: nice 0, ticks 1955000 > ftick 14022821 ltick 14023821 tick pri 59 > > > > Any thoughts on what I'm missing? > > Haven't seen that, but I've not run FreeBSD/mips from source built newer > than mid January. Maybe that's a clue? > > Warner > > _______________________________________________ > freebsd-mips@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" > From owner-freebsd-mips@FreeBSD.ORG Fri Apr 8 07:57:26 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 64F18106564A; Fri, 8 Apr 2011 07:57:26 +0000 (UTC) (envelope-from freebsd-mips@dino.sk) Received: from loki.netlab.sk (ns3.netlab.sk [84.245.65.11]) by mx1.freebsd.org (Postfix) with ESMTP id 1810B8FC15; Fri, 8 Apr 2011 07:57:25 +0000 (UTC) Received: from atom.dino.sk (fw1.dino.sk [84.245.95.252]) (AUTH: LOGIN milan, TLS: TLSv1/SSLv3,128bits,AES128-SHA) by loki.netlab.sk with ESMTPSA; Fri, 08 Apr 2011 09:57:23 +0200 id 00033C18.4D9EBFE3.000053D1 Date: Fri, 8 Apr 2011 09:57:12 +0200 From: Milan Obuch To: Aleksandr Rybalko Message-ID: <20110408095712.1fc36066@atom.dino.sk> In-Reply-To: <20110401005733.3598e82c.ray@ddteam.net> References: <20110331101554.68171eed@atom.dino.sk> <20110331142640.07f2101b@atom.dino.sk> <20110401005733.3598e82c.ray@ddteam.net> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.1; amd64-portbld-freebsd8.2) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEX+/v7++v6YOTrq8PCcuIX989UvOSj++v0BNCbpAAAAB3RJTUUHsQwfFzs7RBhzUQAAAhJJREFUOI1dU8GOqzAMNKIoV1bvwD1i0ysqrHplIdBrVSX7ATSbd03VVvn9tQNtQy0hjAdn7LED4AAcPtWm9RV+MPSfxhBLx9ajd6X/ngB6/mTwnRSZua7i7Ca+0ctZKo4Qmz+JY13X6I3nFZBxIYW1PbgfQ5RP8g0XlltEWGf3cV03joYpRnFbvYDKbXjZlXyyhEZA4lI+cN3NaVXE4VKjSwTExO10eTEkkJVqIAD5z0nUBQJluQDRSQjcrBiHAJxZlAH5CUMBMC7OcJ4LMQNnxhZ1HYPscMc6J4UlWRMNwzOpCcAHKSICd1EDn83abdREIbXsHkD1OinP1aCUCOEVRaa1lMcvywUWdYgk13JQUpYNKmvXQ8Kw5ML9YI5h8SakctBc7E/IYuLhYd/zZIk+1gM1vNweQBvHE0j+oYah3sMqAytQYlZk6+ANaaawJdu3OFzYGMZ3iGpa3qMlq9ZH0VZTgrCtw/ngdYkEIIpSbP1bWQAdFdX9vocBdkH2qVjVmuMu3gI5rjs814EUdrCZgWlPaxZZ3RiLFUtr+ud0PXwp2dnQSNXgePt6AZpBj6UMJ7VQkzN4utVeaSW1Dhn/kblGrKeMvNGnzwX4zuEDarYz1KdPtR60Gul0Gued+515SJXhCsl+Tx/3kY/UDvicPll9mfu50t3tvQ/thZpJYgeuwdSKNJ6tCD98MCgoxLDaPxbwqqwPWaWiAAAAAElFTkSuQmCC X-Face: ak5rwz4-aUa>hPFZlcg,bXxn.(TN}e9DGFrKU\.i_'B[&5=pAd9o"j)5VSUYW:BRQG#^42Ev$Il|; Ztn=,C X-Operating-System: FreeBSD/amd64 8.2-STABLE Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-mips@freebsd.org Subject: Re: [RFC] Re: TP link MR3220 status, boot from flash via u-boot question X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2011 07:57:26 -0000 On Fri, 1 Apr 2011 00:57:33 +0300, Aleksandr Rybalko wrote: > On Thu, 31 Mar 2011 14:26:40 +0200 > Milan Obuch wrote: > > > On Thu, 31 Mar 2011 18:39:36 +0800, Adrian Chadd > > wrote: [ snip ] > > Hi, > > I am watching freebsd-wifi-build on googlecode and just noticed new > > config there... Is your 11n wifi already working too? I would be > > glad to compare your results with mine, so we could unify our > > efforts. Right now, kernel load from flash in u-boot is a show > > stopper for me, so if you could address this one first, it would > > help me really much. > > Draft for wiki page 'Run from NOR flash with U-Boot' > In my case, to be exact, there is SPI flash, actually... > Keywords: U-Boot, embedded > > 1. Ask U-Boot: "what do you support to boot?" > > Normally, U-Boot use special image for kernel/ramfs packing. But we > need to know which compression support U-Boot that fleshed to our > target board. > This one is easy - I can use gzip packed kernel only. If I try other compressing method, u-boot complains with 'bad gzip data' message so this one is clear in this case, I think. > First way: > use mkimage utility (/usr/ports/devel/u-boot) and make test > images for all supported by mkimage compression types. > > mkimage -A ${TARGET} -O linux -T kernel \ > -C ${COMPRESSION_TYPE} \ > -a ${RAM_START_ADDRESS} \ > -e ${RAM_START_ADDRESS} \ > -n 'FreeBSD Kernel Image' \ > -d SOME_SMALL_FILE_NAME \ > test.uboot > > Then for each file, do transfer to board and run from image with > `bootm' command. And check what U-Boot answer you, if answer like > "Unimplemented compression type ?", then you know :). > > Second way: > From running Linux or U-Boot get first 64k block from kernel partition > in flash. > > Break your mkimage utility: avoid exit when we do "show info" (key -i) > CRC failed. And check compression type of 64k file we get from device. > > Or just delete U-Boot image header from file > > dd if=64k.file of=just_kern bs=64 skip=1 > > and check with file(1) utility > > 2. Create image > 2.1. More canonical way, we have mkimage, gzip or bz2 and compiled > kernel, maybe kernel.bin also. > > > gzip --best --force vmlinux.bin > > > for ELF kernel: > > mkimage -A mips -O linux -T kernel \ > -C gzip \ > -a ${LOAD_ADDRESS} \ > -e ${START_ADDRESS} \ > -n 'FreeBSD Kernel Image' \ > -d kernel \ > kernel.uboot > > LOAD_ADDRESS - in most cases this is RAM base address > START_ADDRESS = LOAD_ADDRESS + ELF_HEADER_SIZE (0x1000 for ELF image) > > for kernel.bin: > > LOAD_ADDRESS = RAM_BASE_ADDRESS + 0x1000 > START_ADDRESS = RAM_BASE_ADDRESS + 0x1000 > > Don't forget to check/change KERNLOADADDR of kernel config file. > KERNLOADADDR must be equal to START_ADDRESS. > I tried it various way, no success yet. When I load kernel via TFTP to address set in kernel config (0x80050000 in my case) I can issue a go command to 'start' address, usually 0x80050100, but sometimes it is 0x80050120 - I am checking for this after kernel is built - and kernel boots correctly and works. As already mentioned, there is a mktplinkfw utility, which combines kernel and root fs (or uses kernel with embedded root fs), prepends a required header and pads generated image to full size of flash minus 128 kB for u-boot itself. I am able to flash such image into flash, but bootm tells only about success uncompressing kernel, starting kernel and that's all. ## Booting image at 9f020000 ... Uncompressing Kernel Image ... OK Starting kernel ... Nothing more, powerdown necessary to start again. > 2.2. Longest way, but have smallest footprint, used only if > U-Boot support LZMA. > > Problem 1: Current version of mkimage from ports, don't support LZMA. > So we need new: http://my.ddteam.net/files/u-boot.new.tar.gz > > Problem 2: Devices I know support only old LZMA. > I use LZMA 4.17. > > Then mkimage, like in 2.2., but -C lzma. > > 3. Now we have kernel U-Boot image, so transfer it to device and try > with `bootm' command. > > 4. If all fine, write image to flash kernel partition. > > > Hope this help :) > [ snip ] Not much yet, unfortunatelly... On a side note, there is one thing to be addressed. As my device has only 4 MB flash, I still need to shrink the image I would like to use there. I could put there working kernel, when flash boot issue is solved, but root fs not yet, together they do not fit. I still need to save as much as 600 kB of space... Do you have any tips to share? In some older mails here I saw you managed to do it for other device... Regards, Milan From owner-freebsd-mips@FreeBSD.ORG Fri Apr 8 08:31:41 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D5904106564A; Fri, 8 Apr 2011 08:31:41 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 484348FC08; Fri, 8 Apr 2011 08:31:40 +0000 (UTC) Received: from gw-lan1.kiev.dlink.ua ([192.168.10.10] helo=terran.dlink.ua) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1Q876P-0003t4-Er; Fri, 08 Apr 2011 11:31:37 +0300 Date: Fri, 8 Apr 2011 11:31:32 +0300 From: Aleksandr Rybalko To: Milan Obuch Message-Id: <20110408113132.3c1df0a8.ray@dlink.ua> In-Reply-To: <20110408095712.1fc36066@atom.dino.sk> References: <20110331101554.68171eed@atom.dino.sk> <20110331142640.07f2101b@atom.dino.sk> <20110401005733.3598e82c.ray@ddteam.net> <20110408095712.1fc36066@atom.dino.sk> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Aleksandr Rybalko , freebsd-mips@freebsd.org Subject: Re: [RFC] Re: TP link MR3220 status, boot from flash via u-boot question X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 08 Apr 2011 08:31:41 -0000 On Fri, 8 Apr 2011 09:57:12 +0200 Milan Obuch wrote: >> On Fri, 1 Apr 2011 00:57:33 +0300, Aleksandr Rybalko >> wrote: >> >> > On Thu, 31 Mar 2011 14:26:40 +0200 >> > Milan Obuch wrote: >> > >> > > On Thu, 31 Mar 2011 18:39:36 +0800, Adrian Chadd >> > > wrote: >> >> [ snip ] >> >> > > Hi, >> > > I am watching freebsd-wifi-build on googlecode and just noticed new >> > > config there... Is your 11n wifi already working too? I would be >> > > glad to compare your results with mine, so we could unify our >> > > efforts. Right now, kernel load from flash in u-boot is a show >> > > stopper for me, so if you could address this one first, it would >> > > help me really much. >> > >> > Draft for wiki page 'Run from NOR flash with U-Boot' >> > >> >> In my case, to be exact, there is SPI flash, actually... SPI is a interface, but flash type also NOR, IIRC >> >> > Keywords: U-Boot, embedded >> > >> > 1. Ask U-Boot: "what do you support to boot?" >> > >> > Normally, U-Boot use special image for kernel/ramfs packing. But we >> > need to know which compression support U-Boot that fleshed to our >> > target board. >> > >> >> This one is easy - I can use gzip packed kernel only. If I try other >> compressing method, u-boot complains with 'bad gzip data' message so >> this one is clear in this case, I think. Did you try all lzma typed (oldlzma, lzma and xz)? Because I made 4M system with kernel compressed with LZMA(oldlzma) and fs is iso.ulzma In gzipped kernel case we have kernel partition 200-600 Kb bigger. Then it hard to make usable FS. >> >> > First way: >> > use mkimage utility (/usr/ports/devel/u-boot) and make test >> > images for all supported by mkimage compression types. >> > >> > mkimage -A ${TARGET} -O linux -T kernel \ >> > -C ${COMPRESSION_TYPE} \ >> > -a ${RAM_START_ADDRESS} \ >> > -e ${RAM_START_ADDRESS} \ >> > -n 'FreeBSD Kernel Image' \ >> > -d SOME_SMALL_FILE_NAME \ >> > test.uboot >> > >> > Then for each file, do transfer to board and run from image with >> > `bootm' command. And check what U-Boot answer you, if answer like >> > "Unimplemented compression type ?", then you know :). >> > >> > Second way: >> > From running Linux or U-Boot get first 64k block from kernel partition >> > in flash. >> > >> > Break your mkimage utility: avoid exit when we do "show info" (key -i) >> > CRC failed. And check compression type of 64k file we get from device. >> > >> > Or just delete U-Boot image header from file >> > >> > dd if=64k.file of=just_kern bs=64 skip=1 >> > >> > and check with file(1) utility >> > >> > 2. Create image >> > 2.1. More canonical way, we have mkimage, gzip or bz2 and compiled >> > kernel, maybe kernel.bin also. >> > >> > >> > gzip --best --force vmlinux.bin >> > >> > >> > for ELF kernel: >> > >> > mkimage -A mips -O linux -T kernel \ >> > -C gzip \ >> > -a ${LOAD_ADDRESS} \ >> > -e ${START_ADDRESS} \ >> > -n 'FreeBSD Kernel Image' \ >> > -d kernel \ >> > kernel.uboot >> > >> > LOAD_ADDRESS - in most cases this is RAM base address >> > START_ADDRESS = LOAD_ADDRESS + ELF_HEADER_SIZE (0x1000 for ELF image) >> > >> > for kernel.bin: >> > >> > LOAD_ADDRESS = RAM_BASE_ADDRESS + 0x1000 >> > START_ADDRESS = RAM_BASE_ADDRESS + 0x1000 >> > >> > Don't forget to check/change KERNLOADADDR of kernel config file. >> > KERNLOADADDR must be equal to START_ADDRESS. >> > >> >> I tried it various way, no success yet. When I load kernel via TFTP to >> address set in kernel config (0x80050000 in my case) I can issue a go >> command to 'start' address, usually 0x80050100, but sometimes it is >> 0x80050120 - I am checking for this after kernel is built - and kernel >> boots correctly and works. 0x80050120 - something weird (maybe 0x20 U-Boot or TPlink header size) 0x80050100 - START_ADDRESS in case we use elf to save some space make objcopy -S -O binary kernel kernel.bin then run mkimage with load and start address 0x80050100 >> >> As already mentioned, there is a mktplinkfw utility, which combines >> kernel and root fs (or uses kernel with embedded root fs), prepends a >> required header and pads generated image to full size of flash minus >> 128 kB for u-boot itself. I am able to flash such image into flash, but >> bootm tells only about success uncompressing kernel, starting kernel >> and that's all. I not work with mktplinkfw yet, so I can't hint you about that. >> >> ## Booting image at 9f020000 ... >> Uncompressing Kernel Image ... OK >> >> Starting kernel ... >> >> Nothing more, powerdown necessary to start again. >> >> > 2.2. Longest way, but have smallest footprint, used only if >> > U-Boot support LZMA. >> > >> > Problem 1: Current version of mkimage from ports, don't support LZMA. >> > So we need new: http://my.ddteam.net/files/u-boot.new.tar.gz >> > >> > Problem 2: Devices I know support only old LZMA. >> > I use LZMA 4.17. >> > >> > Then mkimage, like in 2.2., but -C lzma. >> > >> > 3. Now we have kernel U-Boot image, so transfer it to device and try >> > with `bootm' command. >> > >> > 4. If all fine, write image to flash kernel partition. >> > >> > >> > Hope this help :) >> > >> >> [ snip ] >> >> Not much yet, unfortunatelly... >> >> On a side note, there is one thing to be addressed. As my device has >> only 4 MB flash, I still need to shrink the image I would like to use >> there. I could put there working kernel, when flash boot issue is >> solved, but root fs not yet, together they do not fit. I still need to >> save as much as 600 kB of space... Do you have any tips to share? In >> some older mails here I saw you managed to do it for other device... 1. compile with NOSHARED=no 2. delete .h, .a, .o and many other docs and unused binary's (I think that step you know :) ) 3. mkulzma+geom_uncompress instead mkuzip+geom_uzip >> >> Regards, >> Milan WBW -- Alexandr Rybalko aka Alex RAY From owner-freebsd-mips@FreeBSD.ORG Sat Apr 9 12:29:50 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E3320106566B; Sat, 9 Apr 2011 12:29:50 +0000 (UTC) (envelope-from freebsd-mips@dino.sk) Received: from loki.netlab.sk (loki.netlab.sk [84.245.65.11]) by mx1.freebsd.org (Postfix) with ESMTP id 5B4CE8FC12; Sat, 9 Apr 2011 12:29:49 +0000 (UTC) Received: from atom.dino.sk (fw1.dino.sk [84.245.95.252]) (AUTH: LOGIN milan, TLS: TLSv1/SSLv3,128bits,AES128-SHA) by loki.netlab.sk with ESMTPSA; Sat, 09 Apr 2011 14:29:40 +0200 id 00033C04.4DA05134.0000A681 Date: Sat, 9 Apr 2011 14:29:31 +0200 From: Milan Obuch To: Aleksandr Rybalko Message-ID: <20110409142931.3d1884a9@atom.dino.sk> In-Reply-To: <20110408113132.3c1df0a8.ray@dlink.ua> References: <20110331101554.68171eed@atom.dino.sk> <20110331142640.07f2101b@atom.dino.sk> <20110401005733.3598e82c.ray@ddteam.net> <20110408095712.1fc36066@atom.dino.sk> <20110408113132.3c1df0a8.ray@dlink.ua> X-Mailer: Claws Mail 3.7.8 (GTK+ 2.22.1; amd64-portbld-freebsd8.2) Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEX+/v7++v6YOTrq8PCcuIX989UvOSj++v0BNCbpAAAAB3RJTUUHsQwfFzs7RBhzUQAAAhJJREFUOI1dU8GOqzAMNKIoV1bvwD1i0ysqrHplIdBrVSX7ATSbd03VVvn9tQNtQy0hjAdn7LED4AAcPtWm9RV+MPSfxhBLx9ajd6X/ngB6/mTwnRSZua7i7Ca+0ctZKo4Qmz+JY13X6I3nFZBxIYW1PbgfQ5RP8g0XlltEWGf3cV03joYpRnFbvYDKbXjZlXyyhEZA4lI+cN3NaVXE4VKjSwTExO10eTEkkJVqIAD5z0nUBQJluQDRSQjcrBiHAJxZlAH5CUMBMC7OcJ4LMQNnxhZ1HYPscMc6J4UlWRMNwzOpCcAHKSICd1EDn83abdREIbXsHkD1OinP1aCUCOEVRaa1lMcvywUWdYgk13JQUpYNKmvXQ8Kw5ML9YI5h8SakctBc7E/IYuLhYd/zZIk+1gM1vNweQBvHE0j+oYah3sMqAytQYlZk6+ANaaawJdu3OFzYGMZ3iGpa3qMlq9ZH0VZTgrCtw/ngdYkEIIpSbP1bWQAdFdX9vocBdkH2qVjVmuMu3gI5rjs814EUdrCZgWlPaxZZ3RiLFUtr+ud0PXwp2dnQSNXgePt6AZpBj6UMJ7VQkzN4utVeaSW1Dhn/kblGrKeMvNGnzwX4zuEDarYz1KdPtR60Gul0Gued+515SJXhCsl+Tx/3kY/UDvicPll9mfu50t3tvQ/thZpJYgeuwdSKNJ6tCD98MCgoxLDaPxbwqqwPWaWiAAAAAElFTkSuQmCC X-Face: ak5rwz4-aUa>hPFZlcg,bXxn.(TN}e9DGFrKU\.i_'B[&5=pAd9o"j)5VSUYW:BRQG#^42Ev$Il|; Ztn=,C X-Operating-System: FreeBSD/amd64 8.2-STABLE Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Aleksandr Rybalko , freebsd-mips@freebsd.org Subject: Re: [RFC] Re: TP link MR3220 status, boot from flash via u-boot question X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 09 Apr 2011 12:29:51 -0000 On Fri, 8 Apr 2011 11:31:32 +0300, Aleksandr Rybalko wrote: > On Fri, 8 Apr 2011 09:57:12 +0200 > Milan Obuch wrote: > > >> On Fri, 1 Apr 2011 00:57:33 +0300, Aleksandr Rybalko > >> wrote: [ snip ] > >> > Draft for wiki page 'Run from NOR flash with U-Boot' > >> > > >> > >> In my case, to be exact, there is SPI flash, actually... > > SPI is a interface, but flash type also NOR, IIRC > Well, maybe, but I found no mention about that in datasheet from Eon (cFeon) for EN25F32... but this is not that important. > >> > Keywords: U-Boot, embedded > >> > > >> > 1. Ask U-Boot: "what do you support to boot?" > >> > > >> > Normally, U-Boot use special image for kernel/ramfs packing. But > >> > we need to know which compression support U-Boot that fleshed to > >> > our target board. > >> > > >> > >> This one is easy - I can use gzip packed kernel only. If I try > >> other compressing method, u-boot complains with 'bad gzip data' > >> message so this one is clear in this case, I think. > > Did you try all lzma typed (oldlzma, lzma and xz)? > > Because I made 4M system with kernel compressed with LZMA(oldlzma) > and fs is iso.ulzma In gzipped kernel case we have kernel partition > 200-600 Kb bigger. Then it hard to make usable FS. > For lzma, u-boot told 'bad gzip data, must reset'. No joy. I have no idea on old lzma method, will try xz, but I have little hope it will be any better. [ snip ] > >> > 2. Create image > >> > 2.1. More canonical way, we have mkimage, gzip or bz2 and > >> > compiled kernel, maybe kernel.bin also. > >> > > >> > > >> > gzip --best --force vmlinux.bin > >> > > >> > > >> > for ELF kernel: > >> > > >> > mkimage -A mips -O linux -T kernel \ > >> > -C gzip \ > >> > -a ${LOAD_ADDRESS} \ > >> > -e ${START_ADDRESS} \ > >> > -n 'FreeBSD Kernel Image' \ > >> > -d kernel \ > >> > kernel.uboot > >> > > >> > LOAD_ADDRESS - in most cases this is RAM base address > >> > START_ADDRESS = LOAD_ADDRESS + ELF_HEADER_SIZE (0x1000 for ELF > >> > image) > >> > > >> > for kernel.bin: > >> > > >> > LOAD_ADDRESS = RAM_BASE_ADDRESS + 0x1000 > >> > START_ADDRESS = RAM_BASE_ADDRESS + 0x1000 > >> > > >> > Don't forget to check/change KERNLOADADDR of kernel config file. > >> > KERNLOADADDR must be equal to START_ADDRESS. > >> > > >> > >> I tried it various way, no success yet. When I load kernel via > >> TFTP to address set in kernel config (0x80050000 in my case) I can > >> issue a go command to 'start' address, usually 0x80050100, but > >> sometimes it is 0x80050120 - I am checking for this after kernel > >> is built - and kernel boots correctly and works. > > 0x80050120 - something weird (maybe 0x20 U-Boot or TPlink header size) This has nothing to do with u-boot or tplink, yet. It comes from running command 'nm kernel | grep _start'. For some reason sometimes there is somewhat bigger ELF header, no idea why. > 0x80050100 - START_ADDRESS in case we use elf > > to save some space make > objcopy -S -O binary kernel kernel.bin > then run mkimage with load and start address 0x80050100 > Will try with -O binary, actually I am using it now without this option. > >> As already mentioned, there is a mktplinkfw utility, which combines > >> kernel and root fs (or uses kernel with embedded root fs), > >> prepends a required header and pads generated image to full size > >> of flash minus 128 kB for u-boot itself. I am able to flash such > >> image into flash, but bootm tells only about success uncompressing > >> kernel, starting kernel and that's all. > > I not work with mktplinkfw yet, so I can't hint you about that. > > >> > >> ## Booting image at 9f020000 ... > >> Uncompressing Kernel Image ... OK > >> > >> Starting kernel ... > >> > >> Nothing more, powerdown necessary to start again. > >> > >> > 2.2. Longest way, but have smallest footprint, used only if > >> > U-Boot support LZMA. > >> > > >> > Problem 1: Current version of mkimage from ports, don't support > >> > LZMA. So we need new: > >> > http://my.ddteam.net/files/u-boot.new.tar.gz > >> > > >> > Problem 2: Devices I know support only old LZMA. > >> > I use LZMA 4.17. > >> > > >> > Then mkimage, like in 2.2., but -C lzma. > >> > > >> > 3. Now we have kernel U-Boot image, so transfer it to device and > >> > try with `bootm' command. > >> > > >> > 4. If all fine, write image to flash kernel partition. > >> > > >> > > >> > Hope this help :) > >> > > >> > >> [ snip ] > >> > >> Not much yet, unfortunatelly... > >> > >> On a side note, there is one thing to be addressed. As my device > >> has only 4 MB flash, I still need to shrink the image I would like > >> to use there. I could put there working kernel, when flash boot > >> issue is solved, but root fs not yet, together they do not fit. I > >> still need to save as much as 600 kB of space... Do you have any > >> tips to share? In some older mails here I saw you managed to do it > >> for other device... > > 1. compile with NOSHARED=no > 2. delete .h, .a, .o and many other docs and unused binary's (I think > that step you know :) ) 3. mkulzma+geom_uncompress instead > mkuzip+geom_uzip > There are following files at http://my.ddteam.net page: 2011-01-19_add_contrib_xz-embedded.patch 2011-01-19_geom_ulzma_and_mkulzma.patch 2011-01-21_geom_ulzma_and_uzip.diff 2011-01-23_geom_uncompress.diff 2011-01-23_geom_uncompress.patch 2011-01-24_mkulzma.patch Which one should I use? There is no mkulzma in base now... Regards, Milan