I have an ARM720T target. with an 8MB linear flash.
The setup I have has been working fine for over a year.
The only thing that changed is an upgrade from 6.2.1 to 6.2.1B,
followed by a rebuild of the image (mkifs + mkefs + mkimage).
I have put display_msg(s) in the buildfile and have determined
that the problem occurs when I try to load the flash driver.
The flash driver has not changed at all in the past year, and in
fact, if I don’t boot from flash (i.e. if I boot serially), the
flash driver works fine.
Here is my build file for serial boot and flash boot, both
reference all of the same files. Since I haven’t changed
anything I am not sure what direction to start heading.
One thing I can’t explain, is that devf-opt22e2 (which is the
same exec in both images), appears to be 4 bytes larger in the
serial boot image (the one where it works).
One note is that the hardware in question changes the addressing
depending on whether it is booting serially or from flash, and this
is the reason for the [argv0=] thing for devf-opto22e (it simply
causes it to use a different base address depending on argv0).
Again, nothing has changed, other than upgrading to 6.2.1B.
---------- SERIAL BOOT -----------------------------
[image=0xc0000000]
[virtual=armle,binary] .bootstrap = {
startup-opto22e2-serial -vvvv
PATH=/proc/boot procnto
}
[+script] .script = {
Initialise the console
devc-sercs89712 &
reopen /dev/ser1
stty +echo +edit </dev/ser1
Read the real-time clock
rtc pcf8593
Start some common servers
pipe &
Start the network
io-net -dcrys8900 ioport=0x50000300,irq=7,nomulticast -ptcpip
Wait for interface to come up
waitfor /dev/io-net/en0
Configure interface (must configure initially, in order for get_ipaddr to work)
ifconfig en0 0.0.0.0
get_ipaddr
Mount remote filesystem
get_smbshare
Start the flash driver
[argv0=devf-opto22e2-sb] devf-opto22e2 -r -b3 -u2 -t4
Start the battery backed RAM driver
devf-opto22e2-batram-serial -u2 -t2
Start the main shell
[+session] sh
}
Redirect console messages
[type=link] /dev/console=/dev/ser1
Programs require the runtime linker (ldqnx.so) to be at a fixed location
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so
[type=link] /usr/lib/libsocket.so=/proc/boot/libsocket.so
[type=link] /lib/dll/devn-crys8900.so=/proc/boot/devn-crys8900.so
[type=link] /lib/dll/npm-tcpip.so=/proc/boot/npm-tcpip.so
Shared libaries
libc.so
libsocket.so
devc-sercs89712
devf-opto22e2-batram-serial
devf-opto22e2
pipe
get_ipaddr
get_smbshare
[data=copy] efs/lib/dll/devn-crys8900.so
[data=copy] npm-tcpip.so=npm-tcpip-v4.so
[data=copy] ls
[data=copy] hd
[data=copy] pidin
[data=copy] flashctl
[data=copy] cp
[data=copy] stty
[data=copy] mount
[data=copy] io-net
[data=copy] fs-cifs
[data=copy] ifconfig
[data=copy] rtc
[data=copy] shutdown
Use the “fat” embedded shell as the default shell
[data=copy] sh=fesh
— DUMPIFS OUTPUT FOR SERIAL BOOT -----------------
Offset Size Name
0 100 Startup-header flags1=0x1 flags2=0 paddr_bias=0
100 9008 startup.*
9108 5c Image-header mountpoint=/
9164 774 Image-directory
---- ---- Root-dirent
---- 17 lib/dll/npm-tcpip.so → /proc/boot/npm-tcpip.so
---- 1b lib/dll/devn-crys8900.so → /proc/boot/devn-crys8900.so
---- 17 usr/lib/libsocket.so → /proc/boot/libsocket.so
---- 12 usr/lib/ldqnx.so.2 → /proc/boot/libc.so
---- 9 dev/console → /dev/ser1
98d8 25c proc/boot/.script
a000 48000 proc/boot/procnto
52000 5c000 proc/boot/libc.so.2
---- 9 proc/boot/libc.so → libc.so.2
ae000 22000 proc/boot/libsocket.so.2
---- e proc/boot/libsocket.so → libsocket.so.2
d0000 852c proc/boot/devc-sercs89712
d9000 19838 proc/boot/devf-opto22e2-batram-serial
f3000 1ae90 proc/boot/devf-opto22e2
10e000 5000 proc/boot/pipe
113000 2000 proc/boot/get_ipaddr
115000 2000 proc/boot/get_smbshare
117000 8000 proc/boot/devn-crys8900.so
11f000 48000 proc/boot/npm-tcpip-v4.so
---- f proc/boot/npm-tcpip.so → npm-tcpip-v4.so
167000 6000 proc/boot/ls
16d000 5cf8 proc/boot/hd
173000 a808 proc/boot/pidin
17e000 31f0 proc/boot/flashctl
182000 88c4 proc/boot/cp
18b000 47f4 proc/boot/stty
190000 3aa0 proc/boot/mount
194000 12104 proc/boot/io-net
1a7000 11490 proc/boot/fs-cifs
1b9000 92d0 proc/boot/ifconfig
1c3000 94d0 proc/boot/rtc
1cd000 3b6c proc/boot/shutdown
1d1000 534c proc/boot/sh
Checksums: image=0x4756ff54 startup=0xd360237e
---------- FLASH BOOT ------------------------------
[image=0x00001000-0x001fffff]
[ram=0xc0040000-0xc1000000]
[virtual=armle,binary] .bootstrap = {
startup-opto22e2-flash
PATH=/proc/boot:/bin:/usr/bin:/sbin:/usr/sbin:/fcu/bin LD_LIBRARY_PATH=/proc/boot:/lib:/usr/lib:/lib/dll:/fcu/lib procnto -ae -F 100
}
[+script] .script = {
Initialise the console
devc-sercs89712 &
waitfor /dev/ser1
reopen /dev/ser1
stty +echo +edit </dev/ser1
display_msg Serial port started and initialized
Start some common servers
pipe &
display_msg Started pipe
Start the flash filesystem
[argv0=devf-opto22e2-fb] devf-opto22e2 -r -b3 -t4
display_msg Started flash filesystem
Wait for it to show up
waitfor /dev/fs0 10
display_msg Flash filesystem up
Setup symbolic links to flash
procmgr_symlink /fs0p1/bin /bin
procmgr_symlink /fs0p1/sbin /sbin
procmgr_symlink /fs0p1/usr/bin /usr/bin
procmgr_symlink /fs0p1/usr/sbin /usr/sbin
procmgr_symlink /fs0p1/lib /lib
procmgr_symlink /fs0p1/lib/dll /lib/dll
procmgr_symlink /fs0p1/etc /etc
procmgr_symlink /fs0p1/fcu /fcu
Read the real-time clock
rtc pcf8593
Start the battery backed-up RAM driver
devf-opto22e2-batram -u2 -t2
Wait for it to show up
waitfor /dev/fs1
Setup symbolic link to batram
procmgr_symlink /fs1p0 /fcu/data
Setup the symbolic link to place project.hw in ram
procmgr_symlink /dev/shmem/project.hw /fcu/data/project.hw
Startup the tcpip stack
sh /fcu/data/io-net.sh
Wait for it to show up
waitfor /dev/io-net/en0
Configure the ip address
sh /fcu/data/ip-cfg.sh
Start the pseudo-tty driver
devc-pty -n1
Start UCOS
PATH=/bin:/usr/bin:/sbin:/usr/sbin:/fcu/bin LD_LIBRARY_PATH=/lib:/usr/lib:/lib/dll:/fcu/lib sh /fcu/data/ucos.sh &
Start the main shell
[+session] PATH=/bin:/usr/bin:/sbin:/usr/sbin:/fcu/bin LD_LIBRARY_PATH=/lib:/usr/lib:/lib/dll:/fcu/lib sh
}
Redirect console messages
[type=link] /dev/console=/dev/ser1
Programs require the runtime linker (ldqnx.so) to be at a fixed location
[type=link] /bin=/fs0p1/bin
[type=link] /usr/lib/ldqnx.so.2=/proc/boot/libc.so
[type=link] /tmp=/dev/shmem
shared libraries
libc.so
fpemu.so.2
basic services
pipe
stty
devc-sercs89712
devf-opto22e2
devf-opto22e2-batram