9302 cannot boot from usb flash

Hi recently I purchased a development board from olimex 9302.

I tried to boot full debian distribution from usb flash drive but in vain. I formated the drive as ext2 and even ext3 extrected the rootdir filesystem into the drive but received the following error:

RedBoot> fis list  
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0x60000000  0x60000000  0x00040000  0x00000000
RedBoot config    0x60FC0000  0x60FC0000  0x00001000  0x00000000
FIS directory     0x60FE0000  0x60FE0000  0x00020000  0x00000000
netbsd            0x60040000  0x00200000  0x00500000  0x00200000
netbsd_install    0x60540000  0x00200000  0x00500000  0x00200000
ramdisk.gz        0x60A40000  0x00800000  0x00300000  0x00800000
zImage            0x60D40000  0x00080000  0x000E0000  0x00080000
RedBoot> fis load zImage
RedBoot> exec -c "console=ttyAM0 root=/dev/sda1 rootdelay=10"
Using base address 0x00080000 and length 0x000df2ac
Uncompressing Linux............................................................... done, booting the kernel.
Linux version 2.6.8.1-crus2.0.2 (ivan@debian) (gcc version 3.4.1) #10 Wed Sep 6 15:44:21 EEST 2006
CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T)
CPU: D VIVT write-back cache
CPU: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Machine: edb9302
Memory policy: ECC disabled, Data cache writeback
        bank 0 start at 0x00000000, length 0x00800000, mapped to 0xc0000000
        bank 1 start at 0x01000000, length 0x00800000, mapped to 0xc1000000
        bank 2 start at 0x04000000, length 0x00800000, mapped to 0xc4000000
        bank 3 start at 0x05000000, length 0x00800000, mapped to 0xc5000000
Built 1 zonelists
Kernel command line: console=ttyAM0 root=/dev/sda1 rootdelay=10
PID hash table entries: 512 (order 9: 4096 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 8MB 8MB 8MB 8MB = 32MB total
Memory: 30280KB available (1596K code, 415K data, 64K init)
Calibrating delay loop... 99.73 BogoMIPS
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
NetWinder Floating Point Emulator V0.97 (double precision)
ttyAM0 at MMIO 0x808c0000 (irq = 52) is a EP93XX
ttyAM1 at MMIO 0x808d0000 (irq = 54) is a EP93XX
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
ep93xxusb ep93xxusb0: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
Initializing USB Mass Storage driver...
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Cannot open root device "sda1" or unknown-block(0,0)
Please append a correct "root=" boot option
Kernel panic: VFS: Unable to mount root fs on unknown-block(0,0)

Do you have any ideas what I’m doing in the wrong way? I used the same filesystem on other 9302 dev boards and there were no problems.

When the size of your USB drive is more than 512MB you should make partitions of 512MB each. I had the same problem with kernel version 2.6.8, the root file system on the USB drive (sda1) didn’t seem to be recognized.

My USB drive was 1GB. After splitting up into two partitions of 512MB and creating a new file system, it worked well.

It would be better to compile a newer kernel version (like 2.6.24) and put the new zImage in Flash.

I found a useful link here:

http://kamejoko80.wikidot.com/arm

Good luck!

generic:
Hi recently I purchased a development board from olimex 9302.

I tried to boot full debian distribution from usb flash drive but in vain. I formated the drive as ext2 and even ext3 extrected the rootdir filesystem into the drive but received the following error:

RedBoot> fis list  

Name FLASH addr Mem addr Length Entry point
RedBoot 0x60000000 0x60000000 0x00040000 0x00000000
RedBoot config 0x60FC0000 0x60FC0000 0x00001000 0x00000000
FIS directory 0x60FE0000 0x60FE0000 0x00020000 0x00000000
netbsd 0x60040000 0x00200000 0x00500000 0x00200000
netbsd_install 0x60540000 0x00200000 0x00500000 0x00200000
ramdisk.gz 0x60A40000 0x00800000 0x00300000 0x00800000
zImage 0x60D40000 0x00080000 0x000E0000 0x00080000
RedBoot> fis load zImage
RedBoot> exec -c “console=ttyAM0 root=/dev/sda1 rootdelay=10”
Using base address 0x00080000 and length 0x000df2ac
Uncompressing Linux… done, booting the kernel.
Linux version 2.6.8.1-crus2.0.2 (ivan@debian) (gcc version 3.4.1) #10 Wed Sep 6 15:44:21 EEST 2006
CPU: ARM920Tid(wb) [41129200] revision 0 (ARMv4T)
CPU: D VIVT write-back cache
CPU: I cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
CPU: D cache: 16384 bytes, associativity 64, 32 byte lines, 8 sets
Machine: edb9302
Memory policy: ECC disabled, Data cache writeback
bank 0 start at 0x00000000, length 0x00800000, mapped to 0xc0000000
bank 1 start at 0x01000000, length 0x00800000, mapped to 0xc1000000
bank 2 start at 0x04000000, length 0x00800000, mapped to 0xc4000000
bank 3 start at 0x05000000, length 0x00800000, mapped to 0xc5000000
Built 1 zonelists
Kernel command line: console=ttyAM0 root=/dev/sda1 rootdelay=10
PID hash table entries: 512 (order 9: 4096 bytes)
Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
Memory: 8MB 8MB 8MB 8MB = 32MB total
Memory: 30280KB available (1596K code, 415K data, 64K init)
Calibrating delay loop… 99.73 BogoMIPS
Mount-cache hash table entries: 512 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new driver usbfs
usbcore: registered new driver hub
NetWinder Floating Point Emulator V0.97 (double precision)
ttyAM0 at MMIO 0x808c0000 (irq = 52) is a EP93XX
ttyAM1 at MMIO 0x808d0000 (irq = 54) is a EP93XX
RAMDISK driver initialized: 16 RAM disks of 16384K size 1024 blocksize
ep93xxusb ep93xxusb0: new USB bus registered, assigned bus number 1
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 3 ports detected
Initializing USB Mass Storage driver…
usbcore: registered new driver usb-storage
USB Mass Storage support registered.
usbcore: registered new driver usbhid
drivers/usb/input/hid-core.c: v2.0:USB HID core driver
NET: Registered protocol family 2
IP: routing cache hash table of 512 buckets, 4Kbytes
TCP: Hash tables configured (established 2048 bind 4096)
NET: Registered protocol family 1
NET: Registered protocol family 17
VFS: Cannot open root device “sda1” or unknown-block(0,0)
Please append a correct “root=” boot option
Kernel panic: VFS: Unable to mount root fs on unknown-block(0,0)




Do you have any ideas what I'm doing in the wrong way? I used the same filesystem on other 9302 dev boards and there were no problems.

hi again and 10x for the help, but unfortunately your solution did not work for me :frowning:

After splitting my 2GB usb pen-drive into 4 equal partitions of 512MB I got absolutely the same result as before. Then I tried to compile my own kernel following the link you provided which is based on this page http://dev.ivanov.eu/projects/cs-e9302/index.html but no matter which kernel I use 2.6.24.7 or 2.6.24-rc8 or I am modifying the Make file as per http://kamejoko80.wikidot.com/arm or directly executing make ARCH=arm oldconfig which according to me is the same thing, I got this error:

HOSTCC scripts/basic/fixdep

/tmp/ccyv1Se2.o: In function `parse_config_file’:

fixdep.c:(.text+0x392): undefined reference to `__ctype_b’

/tmp/ccyv1Se2.o: In function `parse_dep_file’:

fixdep.c:(.text+0x700): undefined reference to `__ctype_b’

collect2: ld returned 1 exit status

make[1]: *** [scripts/basic/fixdep] Error 1

make: *** [scripts_basic] Error 2

What am I doing wrong? Your help will be highly appreciated!

Hi,

Let’s take it step-by-step…

Did you install build-essential on your host system?

If not, in Ubuntu for exapmle, you can run the Synaptic package manager, search for “build-esential” and mark this for installation.

Another option is to type: apt-get install build-essential

Next step is to go to the ELDK directory and type:

./eldk_init arm

(make sure that this script is executable, type: chmod 755 eldk_init)

Execute the four line you get on your display (copy paste in your terminal window), so the environment variables and search path are set.

Go to the directory with the linux sources and compile the kernel as explained on the websites.

Now you should be able to create the zImage file.

Download this kernel image with a TFTP server on your host.

(With fconfig in RedBoot you should have set the right IP settings)

After downloading your new kernel and installing the corresponding file system on your USB drive you should be able to run the OS, as explained on the websites. :slight_smile:

Succes!

generic:
hi again and 10x for the help, but unfortunately your solution did not work for me :frowning:

After splitting my 2GB usb pen-drive into 4 equal partitions of 512MB I got absolutely the same result as before. Then I tried to compile my own kernel following the link you provided which is based on this page http://dev.ivanov.eu/projects/cs-e9302/index.html but no matter which kernel I use 2.6.24.7 or 2.6.24-rc8 or I am modifying the Make file as per http://kamejoko80.wikidot.com/arm or directly executing make ARCH=arm oldconfig which according to me is the same thing, I got this error:

HOSTCC scripts/basic/fixdep

/tmp/ccyv1Se2.o: In function `parse_config_file’:

fixdep.c:(.text+0x392): undefined reference to `__ctype_b’

/tmp/ccyv1Se2.o: In function `parse_dep_file’:

fixdep.c:(.text+0x700): undefined reference to `__ctype_b’

collect2: ld returned 1 exit status

make[1]: *** [scripts/basic/fixdep] Error 1

make: *** [scripts_basic] Error 2

What am I doing wrong? Your help will be highly appreciated!

Hi again,

I made a small but crucial mistake in my text:

“build-esential” shouls be “build-essential” with double ‘s’…

:wink:

Let me know if it works (or not)… tnx

Hi and 10X 4 the walkthrough.

  1. Yes I did. Usually it is one of the first things I do when I install new OS distribution (I really use Ubuntu 8.04 by the way). Here is the output:

sudo apt-get install build-essential

Reading package lists… Done

Building dependency tree

Reading state information… Done

build-essential is already the newest version.

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

  1. I didn’t use ELDK. I downloaded arm-linux-gcc-4.1.1-920t as decribed in http://dev.ivanov.eu/projects/cs-e9302/index.html I thought it would do the job. I just extracted the files and after that copied the files into /usr/local. I still don’t know what is U-Boot and what it does ? But received this error. After reading your post I tried to install ELDK here is what happened:

Do you really want to install into /home/nas directory[y/n]?: y

Creating directories

Done

Installing cross RPMs

Preparing… ########################################### [100%]

1:rpm ########################################### [100%]

Preparing… ########################################### [100%]

1:rpm-build ########################################### [100%]

Preparing… ########################################### [100%]

1:texinfo ########################################### [100%]

Preparing… ########################################### [100%]

1:crosstool-arm-devel ########################################### [100%]

Preparing… ########################################### [100%]

1:gdb-arm ########################################### [100%]

Preparing… ########################################### [100%]

1:make-arm ########################################### [100%]

Preparing… ########################################### [100%]

1:make-doc ########################################### [100%]

Preparing… ########################################### [100%]

1:ldd-arm ########################################### [100%]

Preparing… ########################################### [100%]

1:mkimage ########################################### [100%]

Preparing… ########################################### [100%]

1:genext2fs ########################################### [100%]

Preparing… ########################################### [100%]

1:mtd_utils ########################################### [100%]

Preparing… ########################################### [100%]

1:mkcramfs ########################################### [100%]

Done

Installing arm target RPMs

Preparing… ########################################### [100%]

1:kernel-headers-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:kernel-source-arm_trg ########################################### [100%]

Configuring kernel…

HOSTCC scripts/basic/fixdep

/tmp/ccZROPrE.o: In function `parse_config_file’:

fixdep.c:(.text+0x388): undefined reference to `__ctype_b’

/tmp/ccZROPrE.o: In function `parse_dep_file’:

fixdep.c:(.text+0x6a0): undefined reference to `__ctype_b’

collect2: ld returned 1 exit status

make[1]: *** [scripts/basic/fixdep] Error 1

make: *** [scripts_basic] Error 2

HOSTCC scripts/basic/fixdep

/tmp/cc2VQDN4.o: In function `parse_config_file’:

fixdep.c:(.text+0x388): undefined reference to `__ctype_b’

/tmp/cc2VQDN4.o: In function `parse_dep_file’:

fixdep.c:(.text+0x6a0): undefined reference to `__ctype_b’

collect2: ld returned 1 exit status

make[2]: *** [scripts/basic/fixdep] Error 1

make[1]: *** [scripts_basic] Error 2

CHK include/linux/version.h

UPD include/linux/version.h

make: *** No rule to make target include/config/auto.conf', needed by include/asm-arm/.arch’. Stop.

CHK include/linux/version.h

Done

Preparing… ########################################### [100%]

1:crosstool-targetcompone########################################### [100%]

Preparing… ########################################### [100%]

1:glib-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:glib-devel-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:libtermcap-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:libtermcap-devel-arm_tr########################################### [100%]

Preparing… ########################################### [100%]

1:cracklib-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:cracklib-dicts-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:popt-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:readline-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:readline-devel-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:cpp-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:gcc-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:gcc-c+±arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:ncurses-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:ncurses-devel-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:db4-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:db4-devel-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:db4-utils-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:glib2-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:glib2-devel-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:pam-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:pam-devel-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:slang-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:slang-devel-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:coreutils-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:mingetty-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:setup-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:gawk-arm_trg ########################################### [100%]

Here I get the same error plus the fact that the installation freezes at the last line and I kill the process.

I,m sure that I messed something but I can’t figure out what it is from that error I see.

Any advice?

  1. seems to be OK.

  2. U-boot is a boot loader, but that is not installed on the Olimex CS_E9302 board. This board comes with Redboot as boot loader.

Your EDK seem to be installed almost completely, but I have no clues where it goes wrong.

what is the complete search path if you enter “echo $PATH” at the command line?

If, for instance, the search path finds the library- or include files of a wrong compiler version first, it could be the cause.

Otherwise I would suggest to (re)install Ubuntu.

Installing Ubuntu take about an hour, while searching for the cause of this problem could take a lot of time. (Although I always would like to know why things go wrong…)

generic:
Hi and 10X 4 the walkthrough.

  1. Yes I did. Usually it is one of the first things I do when I install new OS distribution (I really use Ubuntu 8.04 by the way). Here is the output:

sudo apt-get install build-essential

Reading package lists… Done

Building dependency tree

Reading state information… Done

build-essential is already the newest version.

0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.

  1. I didn’t use ELDK. I downloaded arm-linux-gcc-4.1.1-920t as decribed in http://dev.ivanov.eu/projects/cs-e9302/index.html I thought it would do the job. I just extracted the files and after that copied the files into /usr/local. I still don’t know what is U-Boot and what it does ? But received this error. After reading your post I tried to install ELDK here is what happened:

Do you really want to install into /home/nas directory[y/n]?: y

Creating directories

Done

Installing cross RPMs

Preparing… ########################################### [100%]

1:rpm ########################################### [100%]

Preparing… ########################################### [100%]

1:rpm-build ########################################### [100%]

Preparing… ########################################### [100%]

1:texinfo ########################################### [100%]

Preparing… ########################################### [100%]

1:crosstool-arm-devel ########################################### [100%]

Preparing… ########################################### [100%]

1:gdb-arm ########################################### [100%]

Preparing… ########################################### [100%]

1:make-arm ########################################### [100%]

Preparing… ########################################### [100%]

1:make-doc ########################################### [100%]

Preparing… ########################################### [100%]

1:ldd-arm ########################################### [100%]

Preparing… ########################################### [100%]

1:mkimage ########################################### [100%]

Preparing… ########################################### [100%]

1:genext2fs ########################################### [100%]

Preparing… ########################################### [100%]

1:mtd_utils ########################################### [100%]

Preparing… ########################################### [100%]

1:mkcramfs ########################################### [100%]

Done

Installing arm target RPMs

Preparing… ########################################### [100%]

1:kernel-headers-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:kernel-source-arm_trg ########################################### [100%]

Configuring kernel…

HOSTCC scripts/basic/fixdep

/tmp/ccZROPrE.o: In function `parse_config_file’:

fixdep.c:(.text+0x388): undefined reference to `__ctype_b’

/tmp/ccZROPrE.o: In function `parse_dep_file’:

fixdep.c:(.text+0x6a0): undefined reference to `__ctype_b’

collect2: ld returned 1 exit status

make[1]: *** [scripts/basic/fixdep] Error 1

make: *** [scripts_basic] Error 2

HOSTCC scripts/basic/fixdep

/tmp/cc2VQDN4.o: In function `parse_config_file’:

fixdep.c:(.text+0x388): undefined reference to `__ctype_b’

/tmp/cc2VQDN4.o: In function `parse_dep_file’:

fixdep.c:(.text+0x6a0): undefined reference to `__ctype_b’

collect2: ld returned 1 exit status

make[2]: *** [scripts/basic/fixdep] Error 1

make[1]: *** [scripts_basic] Error 2

CHK include/linux/version.h

UPD include/linux/version.h

make: *** No rule to make target include/config/auto.conf', needed by include/asm-arm/.arch’. Stop.

CHK include/linux/version.h

Done

Preparing… ########################################### [100%]

1:crosstool-targetcompone########################################### [100%]

Preparing… ########################################### [100%]

1:glib-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:glib-devel-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:libtermcap-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:libtermcap-devel-arm_tr########################################### [100%]

Preparing… ########################################### [100%]

1:cracklib-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:cracklib-dicts-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:popt-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:readline-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:readline-devel-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:cpp-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:gcc-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:gcc-c+±arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:ncurses-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:ncurses-devel-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:db4-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:db4-devel-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:db4-utils-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:glib2-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:glib2-devel-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:pam-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:pam-devel-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:slang-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:slang-devel-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:coreutils-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:mingetty-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:setup-arm_trg ########################################### [100%]

Preparing… ########################################### [100%]

1:gawk-arm_trg ########################################### [100%]

Here I get the same error plus the fact that the installation freezes at the last line and I kill the process.

I,m sure that I messed something but I can’t figure out what it is from that error I see.

Any advice?

Hi again,

I,ve managed to compile my kernel but what was the cause of the error I failed to find.

Now I have another problem. How to upload the kernel to the board? Following the guide of http://kamejoko80.wikidot.com/arm when I typed load -r -v -b 0x80000 zImage I get this error: ```
Can’t load ‘zImage’: invalid parameter


Is there a way to upload the kernel fron BusyBox command line and not from RedBoot?

You should have running a TFTP server on a host computer with your zImage in the directory of your TFTP application. Set the IP addresses and network mask in Redboot with command “fconfig” and reset the board.

When you run:

load -r -v -b 0x80000 zImage

from the Redboot command-line, your kernel image should be downloaded from your host PC to the target board.

After downloading you can start your system by running:

exec -c “console-ttyAM root=/dev/sda1 rootdelay=5”

on the command-line in Redboot.

What type of TFTP server are you running?

I used TFTP32 from windows XP, as suggested in the tutorial on the web site.

generic:
Hi again,

I,ve managed to compile my kernel but what was the cause of the error I failed to find.

Now I have another problem. How to upload the kernel to the board? Following the guide of http://kamejoko80.wikidot.com/arm when I typed load -r -v -b 0x80000 zImage I get this error: ```
Can’t load ‘zImage’: invalid parameter




Is there a way to upload the kernel fron BusyBox command line and not from RedBoot?