From owner-freebsd-mips@FreeBSD.ORG Fri Mar 9 00:47:26 2012 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 2A07F1065679 for ; Fri, 9 Mar 2012 00:47:26 +0000 (UTC) (envelope-from juli@clockworksquid.com) Received: from mail-wi0-f178.google.com (mail-wi0-f178.google.com [209.85.212.178]) by mx1.freebsd.org (Postfix) with ESMTP id BF66D8FC13 for ; Fri, 9 Mar 2012 00:47:25 +0000 (UTC) Received: by wibhq7 with SMTP id hq7so14380wib.13 for ; Thu, 08 Mar 2012 16:47:18 -0800 (PST) Received: by 10.180.78.233 with SMTP id e9mr39517618wix.0.1331252711154; Thu, 08 Mar 2012 16:25:11 -0800 (PST) MIME-Version: 1.0 Sender: juli@clockworksquid.com Received: by 10.180.96.231 with HTTP; Thu, 8 Mar 2012 16:24:51 -0800 (PST) From: Juli Mallett Date: Thu, 8 Mar 2012 16:24:51 -0800 X-Google-Sender-Auth: glw5EjTbS2-qT547TU-4BmAYxuk Message-ID: To: "freebsd-mips@FreeBSD.org" Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQlOVu4Xi0jlOpsR3NaqLvBsJ1btdf3ADFtp3n9qWWQlTRpfVxBqiTMG2ydmaYnhiGcQFrDS Subject: RouterBOOT on RB450G has a 4MB NAND kernel size limit 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, 09 Mar 2012 00:47:26 -0000 Hey folks, I thought it might be useful to share this with others, so they don't waste 6 hours diffing ELF files trying to figure out what the problem is. It turns out that although it can load ELF files of variable size over TFTP, and although the system is configured with a larger kernel NAND partition, RouterBOOT seems to choke (without any clear error, mind you, because that would be gratuitously-sensible) on loading kernels larger than 4MB. Of course, it's hard to figure this out because nothing useful turns up on a quick search for '"setting up elf image..." hang' or '"setting up elf image..." -"setting up elf image... ok"', although once you figure it out, it's easy to confirm with a quick Google along the lines of 'rb450g 4mb kernel'. So, be warned if you're thinking that you'll use an OpenWRT kernel with initramfs over netboot to provision devices to use FreeBSD by copying the kernel to NAND. Or if you've got yaffs patches to your kernel and can just copy over kernels with impunity. Has anyone looked at using U-Boot as a second stage loader on this hardware? In order to make loader useful, we'd have to add an awful lot of infrastructure, including another yaffs implementation, when we don't even have one in-tree yet. What would be most useful, too, would be to have MMC + SPI support in loader (here again, U-Boot is helpful), so that we could load kernels from SD. That's a lot of work on loader, and U-Boot already does it all, right? Any thoughts? (There is an MMC-over-SPI driver coming to the tree Real Soon Now, so booting FreeBSD from these things in production is actually quite trivial, if you can solve the kernel loading dilemma.) Yours in frustration with Mikrotik, Juli.