OpenWrt Forum Archive

Topic: Installing 8.09 on ATNGW100 AVR32 board?

The content of this topic has been archived on 6 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Has anyone done this successfully? I have been running 7.09 with no issues, but following the same install procedure I used there isn't working - I get no output once the kernel is loaded by uBoot, and the it never appears on the network either. Here's what I'm doing:

U-Boot 1.3.3-00248-gae9bc0c (Jul 23 2008 - 14:28:10)

U-Boot code: 00000000 -> 00011360  data: 00017bf8 -> 0004e530
malloc: Using memory from 0x11f71000 to 0x11fb1000
DMA: Using memory from 0x11f6d000 to 0x11f71000
Flash:  8 MB at address 0x00000000
DRAM Configuration:
Bank #0: 10000000 32 MB
In:    serial
Out:   serial
Err:   serial
Net:   macb0, macb1
Press SPACE to abort autoboot in 1 seconds
U-Boot> tftp 0x10000000 openwrt-avr32-squashfs.img
macb0: Starting autonegotiation...
macb0: Autonegotiation complete
macb0: link up, 100Mbps full-duplex (lpa: 0xc5e1)
Using macb0 device
TFTP from server 192.168.65.2; our IP address is 192.168.65.150
Filename 'openwrt-avr32-squashfs.img'.
Load address: 0x10000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         ###################################
done
Bytes transferred = 4325376 (420000 hex)
U-Boot> protect off 0x20000 0x7EFFFF
Un-Protected 125 sectors
U-Boot> erase 0x20000 0x7EFFFF

............................................................................................................................. done
Erased 125 sectors
U-Boot> cp.b 0x10000000 0x20000 0x420000
Copy to Flash... done
U-Boot> printenv
baudrate=115200
ethaddr=00:04:25:1C:7A:42
bootdelay=1
ethact=macb0
eth1addr=00:04:25:1C:7A:43
flash_openwrt=tftp 0x90000000 openwrt-avr32-2.6-squashfs.img;erase 0x20000 +${filesize};cp.b ${fileaddr} 0x20000 ${filesize}
bootcmd=bootm 0x20000
bootargs=console=/dev/ttyS0,115200 root=/dev/mtdblock2 rootfstype=squashfs,jffs2 init=/etc/preinit
stdin=serial
stdout=serial
stderr=serial
filesize=420000
fileaddr=10000000
ipaddr=192.168.65.150
serverip=192.168.65.2

Environment size: 459/65532 bytes
U-Boot> bootm 0x20000
## Booting kernel from Legacy Image at 00020000 ...
   Image Name:   Linux-2.6.25.17
   Image Type:   AVR32 Linux Kernel Image (gzip compressed)
   Data Size:    3129141 Bytes =  3 MB
   Load Address: 10000000
   Entry Point:  90000000
   Verifying Checksum ... OK
   Uncompressing Kernel Image ... OK

Starting kernel at 90000000 (params at 11f71008)...

And that's all she wrote, nothing happens after that. Has the image format changed or something?

I got the same problem, actually a self backed system won't boot up ever :-/

That's my loog after booting a self comiled wrt:

  *** Unhandled exception 8 at PC=0x90000010
    pc: 90000010    lr: c3c3c3c3    sp: 11f6caf4   r12: a2a25441
   r11: 11f71008   r10: 11f6c91b    r9: 00000001    r8: 90000000
    r7: 00000006    r6: 11fc9824    r5: 11f6cfa0    r4: edfebe90
    r3: a1d85968    r2: 11f710e8    r1: 00000004    r0: 8fe14960
Flags: qvNzc
Mode bits: hrje....G
CPU Mode: Supervisor

Stack: (0x11f6caf4 to 0x11f6cfa0)
cae0:                                              90000000 11f71008 
90000000
cb00: 65746834 61646472 00000000 00000000 11f75071 11fb539a 10000000 
11fc9824
cb20: 11f6cfa0 10800000 11fcb0b0 00000001 00000001 00000001 11f6ce8c 
00000002
cb40: 00000000 11fc938c 0031cd50 00020000 00000000 00800000 11fb9a3a 
00000002
cb60: 11fc9824 11f6cfa0 11fb4ff8 11fc938c 11f6cc99 00000000 00000000 
00000000
cb80: 11f6cd99 00000001 00000000 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 
c3c3c3c3
cba0: c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 
c3c3c3c3
cbc0: c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 
c3c3c3c3
cbe0: c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 
c3c3c3c3
cc00: c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 
c3c3c3c3
cc20: c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 8fe14960 c3c3c3c3 
c3c3c3c3
cc40: c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 
c3c3c3c3
cc60: c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 
c3c3c3c3
cc80: c3c3c3c3 c3c3c3c3 c3c3c3c3 626f6f74 6d003078 32303030 30007772 
7400c3c3
cca0: c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 
c3c3c3c3
ccc0: c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 
c3c3c3c3
cce0: c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 
c3c3c3c3
cd00: c3c3c3c3 00000020 00000001 00000000 ffffffff 11fc7124 31c3c3c3 
c3c3c3c3
cd20: c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 c3c3c3c3 
c3c3c3c3
cd40: c3c3c3c3 c3c3c3c3 11fb4d58 0000000a 11fc9824 11f6cfa0 00000000 
11fb4d78
cd60: 11f6cdd7 11fc9824 11f6cfa0 00000000 11fb85a2 00000001 11fc9824 
11f6cfa0
cd80: 00000000 11fb8624 00000001 626f6f74 6d203078 32303030 30008662 
00000001
cda0: 11fc9824 11f6cfa0 00000000 50726573 73205350 41434520 746f2061 
626f7274
cdc0: 20617574 6f626f6f 7420696e 20312073 65636f6e 64730a00 11f850e8 
6d616362
cde0: 31005018 11fc9824 11f6cfa0 11f85018 11fb8624 11f85018 11fc9824 
11f6cfa0
ce00: 11f85018 11fb8662 11f85018 11fc9824 11f6cfa0 11f85018 00000020 
00000001
ce20: 00000000 ffffffff 11fc7124 3123303a 20313030 30303030 30200030 
30303030
ce40: 300a006f 20307831 31663731 3030300a 00783131 11fb8ff4 11fc28ef 
11fc9824
ce60: 00000020 00000001 00000000 ffffffff 11fc7124 31f6cedc 11fc9824 
11f6cfa0
ce80: 00000001 11fb8ff4 11fc68c8 11f6cc8c 11f6cc92 00000000 11fb7802 
11fc68c8
cea0: 11fc9824 11f6cfa0 11fb8ff4 000001c1 11fc9824 11f6cfa0 000001c2 
11fb78e8
cec0: 000001c1 11fc9824 11f6cef0 11fb8772 11fb9e7c 00000001 11fc9824 
11f6cfa0
cee0: 00000000 00000000 11f6cf34 00000000 11f6cf04 00000000 08ad8df0 
11f75189
cf00: 11fc69a0 00000001 00000001 00000000 00000000 00000001 11fc2738 
00000001
cf20: 00000000 00000000 00000000 00000000 11f6cfa0 00000000 11fb85a2 
11f6cfcc
cf40: 11fc9824 0004251c 6ad50000 11f75071 11fb1732 11f6cfcc 11fc9824 
11f6cfa0
cf60: 00000000 11f6cfcc 11fca668 11fca664 11fca660 11fb118c 02000000 
11fc9824
cf80: 24007fb4 11fc2198 cde3089c 11fb1000 00000000 11fc88d8 00000000 
00000000
Unhandled exception

any hints?

okay the first run with a fresh svn build seems to be good

> okay the first run with a fresh svn build seems to be good

Really? I've got no success under v8.09.

I've set up a minimal configuration for the NGW100. The Squash
and JFFS2-Images produce a permanent "Unhandled exception".

I have already done a fresh checkout from the svn.


"openwrt-avr32-uImage-lzma" comes up nicely, but i'm not able
to switch to my root-Image. Is anyone able to give me some advice
to boot v8.09 from the NGW100?

I will give v8.09.1 a try.


marlin

(Last edited by marlin74de on 4 Jun 2009, 00:58)

Hi,

I installed OpenWRT 8.09.1 on ATNGW100. 

I had not success with the squashfs images and the documentation on the wiki. What I did is:

1.- Create a jffs2 image of root fs
2.- Compile OpenWRT

once in u-boot,

tftp the openwrt-avr32-uImage-lzma image into 0x20000 and set the bootm to 0x20000

reset --> you are right ; no root fs ; don't worry we want to see where kernel is looking for the rootfs...

....
....
Creating 4 MTD partitions on "physmap-flash.0":
0x00000000-0x00020000 : "u-boot"
0x00020000-0x00120000 : "kernel"
0x00120000-0x007f0000 : "rootfs"
mtd: partition "rootfs" set to be root filesystem
....
....

As you can see, kernel is looking at 0x120000 for the rootfs

then tftp the jffs2 rootfs image and copy to 0x120000

adjust bootargs in order to use only jffs2 as squashfs is not longer required

regards
Antonio

(Last edited by ajanro on 10 Jul 2009, 09:19)

Thanks to ajanro for the hints.

Some additions:

Since 8.09, the gzip compressed kernel is by far too large: it is about 3MB, and the flash section dedicated to it (0x20000 - 0x120000) is only 1MB. This kernel is also contained in the prebuilt squashfs image, and this is the reason why it does not work.

Therefore, the lzma compressed kernel must be used for OpenWRT 8.09. Unfortunately, the preinstalled U-Boot does not support lzma compression (at least not on my board, which I bought around December 2008).

A version of U-Boot patched for lzma support can be built together with OpenWRT: in make menuconfig, choose Build U-Boot bootloader in the section Target Images. Save the configuraton and make. This should now build U-Boot along with OpenWRT.

U-Boot can then be installed with FlashUpgrade as follows: Download and unpack the Source Code of the FlashUpgrade tool (the pre-built binaries don't include the lzma patch). Copy bin/u-boot-atngw100.bin from your OpenWRT tree into the unpacked source directory. Rename the copy to u-boot.bin. Make and install following the instructions from FlashUpgrade.

You should now have U-Boot 1.3.3 with lzma support. Now follow ajanro's instructions.

I get aweiler's message, and did those steps for my ngw100 board.    i've built openwrt successfully, and have the latest u-boot installed(the one that should have lzma support).   but i don't understand the steps from ajanro's post(i'm a relative linux newbie).    could someone give me some tips on how to implement this?

thanks!

stargeezer wrote:

some tips on how to implement this

Besides the boot loader, you need two more items in the flash
- the compressed Linux image (openwrt-avr32-uImage-lzma)
- the root file system (openwrt-avr32-jffs2-64k.img)

On the NGW100, you need to flash them separately. The jffs filesystem openwrt-avr32-jffs2-64k.img is not available for download from openwrt, so you will have to build it yourself. If you have not yet done so, go back to menuconfig, open the entry "Target Images". Make sure "jffs2" is selected. Save the confguration and make. Copy openwrt-avr32-uImage-lzma and  openwrt-avr32-jffs2-64k.img to your TFTP server.

In Uboot: (bold means that this is something you have to enter, italic means that you have to put your actual value here)

Before we can flash anything, first erase the flash:
Uboot> erase 20000 7effff
............................................................................... done
Erased 125 sectors

Flashing is a two step process
- first load the file to RAM via TFTP
- then copy the loaded contents to the flash
This must be done for both the kernel and the root file system.

Details:

Give your board an IP address
Uboot> set ipaddr someaddressinyournet

Load the kernel into RAM at address 0x10000000:
Uboot> tftpboot 0x10000000 yourTftpServerAddress:openwrt-avr32-uImage-lzma

note the message:
Bytes transferred = 659998 (a121e hex)

The length in hex must be included in the next command

Copy to flash:

Uboot> cp.b 10000000 20000 a121e   replace a121e with the number of bytes transferred above!

You can check whether U-Boot agrees with you:

Uboot> imls
should give something like:

Legacy Image at 00020000:
   Image Name:   OpenWrt Linux-2.6.25.20
   Image Type:   AVR32 Linux Kernel Image (lzma compressed)
   Data Size:    659934 Bytes = 644.5 kB
   Load Address: 10000000
   Entry Point:  90000000
   Verifying Checksum ... OK

Verify that the image type is "lzma compressed" and the data size is less than 1MB.

Now load the root file system into RAM at address 0x10000000:
Uboot> tftpboot 0x10000000 yourTftpServerAddress:openwrt-avr32-jffs2-64k.img

note the message:
Bytes transferred = 4390912 (430000 hex)

Copy to flash:

Uboot> cp.b 10000000 120000 430000   replace 430000 with the number of bytes transferred above!

IMPORTANT
Uboot> set bootargs console=ttyS0,115200 root=/dev/mtdblock2 rootfstype=jffs2 init=/etc/preinit
Uboot> set bootcmd bootm 0x20000
Uboot> saveenv

You may now boot the board.

On the first boot (and only then), you will see messages like this:

jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000000: 0x3000 id
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000004: 0x0061 id
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x0000000c: 0xe3b2 id
jffs2_scan_eraseblock(): Magic bitmask 0x1985 not found at 0x00000010: 0x3001 id

Empty flash at 0x000115fc ends at 0x00011600

(Many more messages like these)

I don't know whether this is a bug or a feature ;-)

You should finally see:

jffs2_scan_eraseblock(): End of filesystem marker found at 0x420000
jffs2_build_filesystem(): unlocking the mtd device... done.
jffs2_build_filesystem(): erasing all blocks after the end marker... done.
VFS: Mounted root (jffs2 filesystem).

You should now have a working OpenWRT on AVR32

BusyBox v1.11.2 (2009-09-04 18:20:59 CEST) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 KAMIKAZE (8.09.1, unknown) ----------------------------
  * 10 oz Vodka       Shake well with ice and strain
  * 10 oz Triple sec  mixture into 10 shot glasses.
  * 10 oz lime juice  Salute!
 ---------------------------------------------------
root@OpenWrt:/# df
Filesystem           1k-blocks      Used Available Use% Mounted on
rootfs                    6976      1468      5508  21% /
/dev/root                 6976      1468      5508  21% /
tmpfs                    15584        28     15556   0% /tmp
tmpfs                      512         0       512   0% /dev
root@OpenWrt:/#

aweiler-  this works!!   many thanks!     the access violation was because i didn't have permissions set up on the files on the tftpboot server(you can definitely tell i'm a newbie).    the console message says KAMIKAZE(bleeding edge, r18778),  i assume this is because i built from the source rather than using a released version.

@aweiler
Can you post this information in a new-wiki page??
http://nuwiki.openwrt.org/

It's a well done step-by-step howto! It might be useful to many others smile

The discussion might have continued from here.