From owner-freebsd-embedded@FreeBSD.ORG Mon Aug 26 21:24:51 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 3DFF4F1F; Mon, 26 Aug 2013 21:24:51 +0000 (UTC) (envelope-from hiren.panchasara@gmail.com) Received: from mail-ea0-x22c.google.com (mail-ea0-x22c.google.com [IPv6:2a00:1450:4013:c01::22c]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 62B6121D4; Mon, 26 Aug 2013 21:24:50 +0000 (UTC) Received: by mail-ea0-f172.google.com with SMTP id r16so1878237ead.31 for ; Mon, 26 Aug 2013 14:24:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=GuWqcFakL8Ulj/JLWg6TxxmJEwuv/zORafzTMMNeYoQ=; b=chdSNZnRVB1phQVCjZLg6QbLLlqQzBp/0DBNmkmK9kCkmSaYMwHSisGyAOGE6hPQQN J1soBaLRLQDM9QP5rgK7m/Jrht3/CDz7POjF3v+YxlekrOw5OJLFEHd4BZEUe0bNQAyX /T+zEda83wJvU6Jw5nSqMW7Lu+bdDmpt4aWacI3uQsNwpLadSxIqiCNBTwptzk429R6v Cjz3fqS8ht5+/ebftCHhqAN45RlOJlpVuCk9vfh6MdGzHztcPXUG18gsqQHMkTwe85k8 WVTb2OEl9rR6Xk0ewzWgNiYmnwsnhKUbtrCWgcHvzUZISxtvzxaAHhRrlAC42y/uQ2aT PO5A== MIME-Version: 1.0 X-Received: by 10.14.2.199 with SMTP id 47mr6100971eef.57.1377552288660; Mon, 26 Aug 2013 14:24:48 -0700 (PDT) Received: by 10.14.105.137 with HTTP; Mon, 26 Aug 2013 14:24:48 -0700 (PDT) In-Reply-To: References: <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <51F7983C.5090309@dat.pl> Date: Mon, 26 Aug 2013 14:24:48 -0700 Message-ID: Subject: Re: Making Picostation m2HP work From: hiren panchasara To: Adrian Chadd Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: freebsd-embedded , ray@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 26 Aug 2013 21:24:51 -0000 On Thu, Aug 22, 2013 at 12:20 AM, hiren panchasara < hiren.panchasara@gmail.com> wrote: > > > > On Wed, Aug 21, 2013 at 10:02 PM, Adrian Chadd wrote: > >> Right! Nice work! >> >> So that tells me that whatever image you've stuffed into the ubiquiti >> firmware isn't setup right. Did you lzma compress the kernel, then wrap >> that in mkimage or whatever the u-boot command is, and then pass _that_ >> output to the ubiquiti firmware builder? >> > > Alright, so as Adrian suggested, I tried to create uboot'ed kernel by > running: > > "# ../build/build/bin/build ap91 uboot" > > which basically runs build_uboot which does following: > > /usr/local/bin/lzma e ${X_KERNEL} /tftpboot/kernel.${KERNCONF}.lzma || > exit 1 > > # Create the firmware > mkimage -A ${UBOOT_ARCH} -O linux -T kernel -C lzma \ > -a ${UBOOT_KERN_LOADADDR} -e ${UBOOT_KERN_STARTADDR} \ > -n "FreeBSD" -d /tftpboot/kernel.${KERNCONF}.lzma \ > /tftpboot/kernel.${KERNCONF}.lzma.uImage \ > || exit 1 > > Now, I had to install /usr/ports/devel/uboot-mkimage/ port to get > "mkimage" binary referenced above. > > But as soon as I run "# ../build/build/bin/build ap91 uboot", the laptop > deadlocks. I have to hard reboot the laptop. I tried it 2 times and it > stops right when its trying to execute mkimage command listed above. > > I am not sure what is the reason behind that. And I see ray@ is the > maintainer of that port so I am cc'ing him to get some insights too. > That was some issue on my laptop. Trying on another laptop worked. I generated final image with kernel.AP91.lzma.uImage inside it instead of plain kernel.gz This is what I am getting now (instead of "bad magic number"): U-Boot 1.1.4.2-s594 (Dec 5 2012 - 15:23:07) Board: Ubiquiti Networks XM board (rev 1.0 e302) DRAM: 32 MB Flash: 8 MB PCIe WLAN Module found (#1). Net: eth0, eth1 Hit any key to stop autoboot: 0 ## Booting image at 9f050000 ... Image Name: FreeBSD Created: 2013-08-24 15:28:06 UTC Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 131085 Bytes = 128 kB Load Address: 80050000 Entry Point: 80050100 Verifying Checksum ... OK Uncompressing Kernel Image ... ERROR, LzmaDecode.c, 332 Decoding error = 1 LZMA ERROR 1 - must RESET board to recover Resetting... Trying to figure out what this means. I _think_ we are real close in making this work :-) cheers, Hiren