Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 22 Aug 2013 00:20:52 -0700
From:      hiren panchasara <hiren.panchasara@gmail.com>
To:        Adrian Chadd <adrian@freebsd.org>
Cc:        freebsd-embedded <freebsd-embedded@freebsd.org>, ray@freebsd.org
Subject:   Re: Making Picostation m2HP work
Message-ID:  <CALCpEUFXrdST43Nz2m-y__htXjLdmds8B5_JV2P9oFtGCEAr1g@mail.gmail.com>
In-Reply-To: <CAJ-Vmokh4uSy2RkNoyGnYbm9k0B3YBD96B7Kvn5b8zJgU0KVkg@mail.gmail.com>
References:  <CALCpEUHxqyZb1Y5WqsuxjvwY2Pd_xN2%2BoTgsew0DwdRMC6=5Nw@mail.gmail.com> <CALCpEUGbk8mCFqOUp6WxfdcH-kveudG-f4S0muUg4aYy0uqBtA@mail.gmail.com> <CAJ-VmomsSBSs9QumGc6z=aYQ0OUqjGcxBnnsy%2B1NR_F83KUzxg@mail.gmail.com> <CALCpEUG4FR2qugb-ZYHG%2BJ7xcOL34edkPx41yOwU7qK-BynGOw@mail.gmail.com> <CAJ-VmokPNDgkdziRFr3-MnDZudskGb0ykRk9jfY1nWhrxBZEKw@mail.gmail.com> <CAB=2f8yPSSpOZBwOv8Xr5=OtM%2BMq0-h-%2B9-tKTgjR7LvCfX6jQ@mail.gmail.com> <CALCpEUFi6qr8Cox9PpzmkPk69gb0hrhM1vepE81gqot2cVy7tQ@mail.gmail.com> <CAJ-VmonxVF6GQXEZod9XajAK00i9ZP6=s3SSCDEL%2BJR6kgLVWQ@mail.gmail.com> <CALCpEUHEPRDAiCZ2-hFwD1sPPQHqmNVA=E8sJREm5qmB%2BxF5cA@mail.gmail.com> <CAJ-VmokDUhJxN7oWOr0t7T1Zq-Odf43mM9qO%2B5TDyv1DnKAJuQ@mail.gmail.com> <CALCpEUGC1NrWfNZ5%2BfAnbaCvFVpKNCOMZ9Yh6XFYFBqCWehE0Q@mail.gmail.com> <20130729151943.70ce473e14d88588337e57ba@ddteam.net> <CALCpEUEXGrazTbMUUA5jkarr8vH_a9TU-QUy9=w7TFU8ND8B_Q@mail.gmail.com> <CALCpEUGMAHwFEYKPJGyOMx9fNxnqJ=6s2VABGSyCOb-XZz_Fdg@mail.gmail.com> <51F7983C.5090309@dat.pl> <CAKYr3zw-b3f4URh3K5ysStein_P%2BSuKmg8QHmw_UWjnx%2BBNwyA@mail.gmail.com> <CAKYr3zze4LHu3y8go-Q57yZWzFDuUVTow3JBNcOPw5y5bm0RGw@mail.gmail.com> <CALCpEUF8TJUG=5QBQ214P6LKCVCPmmaLR62jCbhDvqqG55Ybdw@mail.gmail.com> <CAJ-Vmo=Tv6v21p%2BetOGpsY4eJZBypGB_18e8r6FQnCdAaj0RKg@mail.gmail.com> <CAKYr3zwY5ezYCQZ5iF-LCG%2Bii_fLoUn9T7xK%2Bfa4WkOfdMsbAA@mail.gmail.com> <CALCpEUGRZ9PW1SkNLEsNqaB83zNx=oA-j4WH7TYu%2Bywi-5s5%2BQ@mail.gmail.com> <CAB=2f8wnCNTrY62wD9OBT-b6ZhwiNvyoR418Kc0uf9M5xDb-LQ@mail.gmail.com> <CALCpEUF7RQ0Ev-CwEukP38Su0mji8woe2QCAQV3PXBDw=d%2BiqA@mail.gmail.com> <CALCpEUHyqyq2WShNfu1ARFGHH6s6yPeojkq3M5Dfg0veaSy7KQ@mail.gmail.com> <CAJ-Vmokh4uSy2RkNoyGnYbm9k0B3YBD96B7Kvn5b8zJgU0KVkg@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, Aug 21, 2013 at 10:02 PM, Adrian Chadd <adrian@freebsd.org> 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.

But weirdly enough, it still created the kernel file out of this run:
kernel.AP91.lzma.uImage

And I've provided that instead of regular kernel.gz in generating final
image but loading that did not yield any different results. It still fails
pretty much the same way.

ar7240> urescue
Setting default IP 192.168.1.20
Starting TFTP server...
Using eth0 (192.168.1.20), address: 0x81000000
Waiting for connection: \
Receiving file from 192.168.1.5:58512
Received 5811199 bytes
Firmware Version: XS2.ar7240.FreeBSD
Setting U-Boot environment variables
Un-Protected 1 sectors
Erasing Flash.... done
Erased 1 sectors
Writing to Flash... done
Protected 1 sectors
Copying partition 'kernel' to flash memory:
        erasing range 0x9F050000..0x9F12FFFF: .............. done
Erased 14 sectors
        writing to address 0x9f050000, length 0x000e0000 ...
Copying partition 'rootfs' to flash memory:
        erasing range 0x9F130000..0x9F5EFFFF:
............................................................................
done
Erased 76 sectors
        writing to address 0x9f130000, length 0x004c0000 ...

Firmware update complete.

Resetting...

U-Boot 1.1.4.2-s564 (Jul 19 2012 - 10:41:56)

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 ...
Bad Magic Number
ar7240>

Thanks,
Hiren



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CALCpEUFXrdST43Nz2m-y__htXjLdmds8B5_JV2P9oFtGCEAr1g>