Hi Scott,
First of all, thanks for your interest and help
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/smile.gif
And... here we go
<div class='quotetop'>QUOTE </div>
--- Quote Start ---
1. Please post an objdump of the elf headers. E.g.: $ nios2-elf-objdump -h vmlinux[/b]
--- Quote End ---
$ nios2-elf-objdump -h vmlinux
vmlinux: file format elf32-littlenios2
Sections:
Idx Name Size VMA LMA File off Algn
0 .text 000026c0 01800000 01800000 00000094 2**9
CONTENTS, ALLOC, LOAD, READONLY, CODE
1 .rodata 0000038a 018026c0 018026c0 00002754 2**2
CONTENTS, ALLOC, LOAD, READONLY, DATA
2 .data 00104a63 01802a4c 01802a4c 00002ade 2**0
CONTENTS, ALLOC, LOAD, DATA
3 .got 00000000 019074b0 019074b0 00107541 2**0
CONTENTS
4 .bss 00008434 019074b0 019074b0 00107541 2**2
ALLOC
5 .debug_abbrev 000002d4 0190f8e4 0190f8e4 00107541 2**0
CONTENTS, READONLY, DEBUGGING
6 .debug_info 0000122e 0190fbb8 0190fbb8 00107815 2**0
CONTENTS, READONLY, DEBUGGING
7 .debug_line 00001823 01910de6 01910de6 00108a43 2**0
CONTENTS, READONLY, DEBUGGING
8 .debug_frame 0000018c 0191260c 0191260c 0010a268 2**2
CONTENTS, READONLY, DEBUGGING
9 .debug_pubnames 0000003e 01912798 01912798 0010a3f4 2**0
CONTENTS, READONLY, DEBUGGING
10 .debug_aranges 00000020 019127d6 019127d6 0010a432 2**0
CONTENTS, READONLY, DEBUGGING
11 .debug_ranges 000005b0 019127f6 019127f6 0010a452 2**0
CONTENTS, READONLY, DEBUGGING
12 .debug_str 00000297 01912da6 01912da6 0010aa02 2**0
CONTENTS, READONLY, DEBUGGING
13 .comment 00000012 0191303d 0191303d 0010ac99 2**0
CONTENTS, READONLY
/cygdrive/g/Linux
$
BTW, could you please explain those lines.
<div class='quotetop'>QUOTE </div>
--- Quote Start ---
2. Confirm that the elf image can be loaded and successfully run using nios2-download.[/b]
--- Quote End ---
$ nios2-download -g vmlinux
Using cable "ByteBlasterMV ", device 1, instance 0x00
Pausing target processor: OK
Downloaded 1054KB in 27.2s (38.7KB/s)
Verified OK
Starting processor at address 0x01800000
/cygdrive/g/Linux
$
==> Uncompressing Linux... Ok, booting the kernel.
Linux version 2.6.11-uc0 (MFM@FC5) (gcc version 3.4.6)# 3 Sun May 7 01
T 2006
uClinux/Nios II
Altera Nios II support (C) 2004 Microtronix Datacom Ltd.
Built 1 zonelists
Kernel command line:
PID hash table entries: 128 (order: 7, 2048 bytes)
Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
Memory available: 14148k/16384k RAM, 0k/0k ROM (1470k kernel code, 573k data)
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
NET: Registered protocol family 16
NTFS driver 2.1.22 .
JFFS2 version 2.2. (NAND) (C) 2001-2003 Red Hat, Inc.
NIOS serial driver version 0.0
ttyS0 (irq = 4) is a builtin NIOS UART
io scheduler noop registered
io scheduler deadline registered
smc_probe: 50000 Khz Nios
SMSC LAN91C111 Driver (v2.1), (Linux Kernel 2.6)
eth0: SMC91C11xFD(rev:1) at 0x82110300 IRQ:6 MEMSIZE:8192b NOWAIT:0 ADDR: 00:07:ed:ff:16:c9
smc_probe: 50000 Khz Nios
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
ide: Assuming 50MHz system bus speed for PIO modes; override with idebus=xx
CF: ctl=0
Freeing unused kernel memory: 428k freed (0x117e000 - 0x11e8000)
init started: BusyBox v1.2.0-pre0 (2006.05.06-17:19+0000) multi-call binary
BusyBox v1.2.0-pre0 (2006.05.06-17:19+0000) Built-in shell (msh)
Enter 'help' for a list of built-in commands.#
That's the first time I see µClinux booting on Linux
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/ohmy.gif
Rq: the line eth0: SMC91C11xFD(rev:1) at 0x82110300 IRQ:6 MEMSIZE:8192b NOWAIT:0 ADDR: 00:07:ed:ff:16:c9
That's not my MAC adress !!!!!!!
==> bd
mem start = 0x01000000
mem size = 0x01000000
flash start = 0x00000000
flash size = 0x00800000
flash offset= 0x00000000
sram start = 0x02000000
sram size = 0x00100000
ethaddr = 08:00:3E:26:0A:5B
ip_addr = 192.168.0.62
baudrate = 115200 bps
==>
<div class='quotetop'>QUOTE </div>
--- Quote Start ---
3. Use the elf image to create a binary (nios2-elf-objcopy -O binary). Load the
binary (via nios2-console) to the load address, set the pc to the load address,
then resume execution -- confirm operation.[/b]
--- Quote End ---
1> halt
Processor is already stopped.
2> load bin 1500000 vmlinux.bin
1078447
3> pc 1500000
0x0016E360
4> go
Emulation started.
5>
And nothing happened
http://forum.niosforum.com/work2/style_emoticons/<#EMO_DIR#>/ohmy.gif
<div class='quotetop'>QUOTE </div>
--- Quote Start ---
4. Make the u-boot image with the binary (uncompressed) -- confirm operation.[/b]
--- Quote End ---
$ ./mkimage -d vmlinux.bin -A nios2 -O linux -T kernel -n "Welcome to uClinux with MFM" -a 01000000 -e 01000000 vmlinux.img
Image Name: Welcome to uClinux with MFM
Created: Fri May 12 02:17:25 2006
Image Type: Nios-II Linux Kernel Image (gzip compressed)
Data Size: 1078447 Bytes = 1053.17 kB = 1.03 MB
Load Address: 0x01000000
Entry Point: 0x01000000
/cygdrive/d/u-boot-src/u-boot/mkimage
$
U-Boot 1.1.3 (May 5 2006 - 00:38:14)
CPU : Nios-II
SYSID : f7b67000, Thu Apr 21 03:45:55 2005
BOARD : Altera EP-1S40
==> tftpboot 1500000 vmlinux.img
Using MAC Address 08:00:3E:26:0A:5B
TFTP from server 192.168.0.183; our IP address is 192.168.0.62
Filename 'vmlinux.img'.
Load address: 0x1500000
Loading:# ################################################################
# ################################################################
# ################################################################
# ###############
done
Bytes transferred = 1078511 (1074ef hex)
Automatic boot of image at addr 0x01500000 ...# # Booting image at 01500000 ...
Image Name: Welcome to uClinux with MFM
Image Type: Nios-II Linux Kernel Image (gzip compressed)
Data Size: 1078447 Bytes = 1 MB
Load Address: 01000000
Entry Point: 01000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... Error: Bad gzipped data
GUNZIP ERROR - must RESET board to recover
U-Boot 1.1.3 (May 5 2006 - 00:38:14)
CPU : Nios-II
SYSID : f7b67000, Thu Apr 21 03:45:55 2005
BOARD : Altera EP-1S40
==>
<div class='quotetop'>QUOTE </div>
--- Quote Start ---
5. Compress the binary, and make the u-boot image (compressed) -- confirm operation.[/b]
--- Quote End ---
$ ./mkimage -d vmlinux.bin.gz -A nios2 -O linux -T kernel -n "Welcome to uClinux with MFM" -a 01200000 -e 01200000 -C gzip vmlinux.img
Image Name: Welcome to uClinux with MFM
Created: Fri May 12 02:35:39 2006
Image Type: NIOS II Linux Kernel Image (gzip compressed)
Data Size: 1073467 Bytes = 1048.31 kB = 1.02 MB
Load Address: 0x01200000
Entry Point: 0x01200000
$
Here I got something new, u-boot is rebooting after image beeing uncompressed
U-Boot 1.1.3 (May 5 2006 - 00:38:14)
CPU : Nios-II
SYSID : f7b67000, Thu Apr 21 03:45:55 2005
BOARD : Altera EP-1S40
==> tftpboot 1500000 vmlinux.img
Using MAC Address 08:00:3E:26:0A:5B
TFTP from server 192.168.0.183; our IP address is 192.168.0.62
Filename 'vmlinux.img'.
Load address: 0x1500000
Loading:# ################################################################
# ################################################################
# ################################################################
# ##############
done
Bytes transferred = 1073531 (10617b hex)
Automatic boot of image at addr 0x01500000 ...# # Booting image at 01500000 ...
Image Name: Welcome to uClinux with MFM
Image Type: Nios-II Linux Kernel Image (gzip compressed)
Data Size: 1073467 Bytes = 1 MB
Load Address: 01200000
Entry Point: 01200000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
U-Boot 1.1.3 (May 5 2006 - 00:38:14)
CPU : Nios-II
SYSID : f7b67000, Thu Apr 21 03:45:55 2005
BOARD : Altera EP-1S40
==>