AF:
NF:0
PS:10
SRH:1
SFN:
DSR:
MID:
CFG:
PT:0
S:andy.sharp@lsi.com
RQ:
SSV:mhbs.lsil.com
NSV:
SSH:
R:<Bill.Fisher@lsi.com>,<rendell.fong@lsi.com>
MAID:2
X-Sylpheed-Privacy-System:
X-Sylpheed-Sign:0
SCF:#mh/Mailbox/sent
RMID:#imap/LSI/INBOX	0	4AFB48E5.1050409@lsi.com
X-Sylpheed-End-Special-Headers: 1
Date: Wed, 11 Nov 2009 15:56:24 -0800
From: Andrew Sharp <andy.sharp@lsi.com>
To: "Fisher, Bill" <Bill.Fisher@lsi.com>
Cc: Rendell Fong <rendell.fong@lsi.com>
Subject: Re: load_vmlinux failing on new CF
Message-ID: <20091111155624.264fef6c@ripper.onstor.net>
In-Reply-To: <4AFB48E5.1050409@lsi.com>
References: <4AFB48E5.1050409@lsi.com>
Organization: LSI
X-Mailer: Sylpheed-Claws 2.6.0 (GTK+ 2.8.20; x86_64-pc-linux-gnu)
Mime-Version: 1.0
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit

I'm completely mystified by this one.  Siva came by a couple of days
ago and told me the same thing, and frankly I can't figure out why that
would not work.  Possibly 4.0.2 is missing some changelist that makes
the whole thing work, I don't know.

Try using this kernel:

tftp://10.0.0.42/vmlinux-ssc-pio2.bin

You will have to hand tftp load it and start it with the 'g' command
because it has no command line compiled into it, but I'm loading it
right now and it works just fine.


PROM commands:

PROM> bsd rt add 10.0.0.0 255.255.0.0 10.2.0.1
PROM> load 10.0.0.42 vmlinux-ssc-pio2.bin
PROM> g root=/dev/nfs nfsroot=<ip addr of NFS server>:<path to NFS root>,v3,tcp ip=<your machine's SSC ip addr>:<ip addr of NFS server>:10.2.0.1:255.255.0.0:<nodename for your SSC>:eth0:none


OR

you can boot off the CF:

PROM> g root=/dev/sd[ab]1


and that should do it.



On Wed, 11 Nov 2009 16:29:41 -0700 William Fisher <bill.fisher@lsi.com>
wrote:

> noname:/boot# /usr/local/bin/load_vmlinux ./txrx_cg.bin.new
> writing 3355336 bytes to 0xf81a000000 from 0x2ad20000
> load_vmlinux: block write from offset 0 failed: 22 - Invalid argument
> 
> noname:/boot# ls -l
> total 31644
> drwxr-xr-x  2 root root     4096 Nov 11 23:14 ./
> drwxr-xr-x 25 root root     4096 Nov 11 22:28 ../
> -rw-r--r--  1 root root  2080795 Oct  8 18:38 System.map
> -rwxr-xr-x  1 root root  8643720 Oct  8 18:27 fp_cg.bin*
> -rwxr-xr-x  1 root root 10466520 Oct  8 18:28 txrx_cg.bin*
> -rw-r--r--  1 root root  3355336 Nov 11 23:14 txrx_cg.bin.new
> -rwxr-xr-x  1 root root  4678199 Oct  8 18:38 vmlinux.32*
> -rw-r--r--  1 root root  3096168 Oct  8 18:38 vmlinux.bin
> noname:/boot# /usr/local/bin/load_vmlinux -h
> load_vmlinux: stat failed on -h: 9 - Bad file descriptor
> 
> noname:/boot# /usr/local/bin/load_vmlinux --help
> load_vmlinux: stat failed on --help: 9 - Bad file descriptor
> 
> noname:/boot#
> noname:/boot# /usr/local/bin/load_vmlinux ?
> load_vmlinux: stat failed on ?: 9 - Bad file descriptor
> 
> noname:/boot# /usr/local/bin/load_vmlinux
> load_vmlinux: stat failed on /boot/vmlinux-tuxrx.bin: 9 - Bad file 
> descriptor
> 
> noname:/boot# file  ./txrx_cg.bin.new
> ./txrx_cg.bin.new: data
> noname:/boot# /usr/local/bin/load_vmlinux /boot/txrx_cg.bin.new
> writing 3355336 bytes to 0xf81a000000 from 0x2ad20000
> load_vmlinux: block write from offset 0 failed: 22 - Invalid argument
> 
> noname:/boot# uname -avr
> Linux noname 2.6.22-cg #1 Thu Oct 8 11:38:51 PDT 2009 mips64 GNU/Linux
> noname:/boot#
> inux/tools/../../nfx-tree/Build/cg/opt/bin/load_vmlinux 
> /usr/local/binstor-new/l
> bfisher@10.100.100.20's password:
> /homes/bfisher/.bashrc: line 8: /etc/bashrc: Permission denied
> /homes/bfisher/.bashrc: line 11: /homes/bfisher/.aliases: No such
> file or directory
> load_vmlinux                                  100%   17KB  16.9KB/s
> 00:00 noname:/boot# ls -l /usr/local/bin
> total 28
> drwxrwsr-x  2 root staff  4096 Nov 11 23:17 ./
> drwxrwsr-x 10 root staff  4096 Jul 16 01:10 ../
> -rwxr-xr-x  1 root staff 17305 Nov 11 23:21 load_vmlinux*
> noname:/boot# ls
> ./   System.map  txrx_cg.bin*     vmlinux.32*
> ../  fp_cg.bin*  txrx_cg.bin.new  vmlinux.bin
> noname:/boot# ls -l
> total 31644
> drwxr-xr-x  2 root root     4096 Nov 11 23:14 ./
> drwxr-xr-x 25 root root     4096 Nov 11 22:28 ../
> -rw-r--r--  1 root root  2080795 Oct  8 18:38 System.map
> -rwxr-xr-x  1 root root  8643720 Oct  8 18:27 fp_cg.bin*
> -rwxr-xr-x  1 root root 10466520 Oct  8 18:28 txrx_cg.bin*
> -rw-r--r--  1 root root  3355336 Nov 11 23:14 txrx_cg.bin.new
> -rwxr-xr-x  1 root root  4678199 Oct  8 18:38 vmlinux.32*
> 
> 
> noname:/boot# /usr/local/bin/load_vmlinux /boot/txrx_cg.bin.new
> writing 3355336 bytes to 0xf81a000000 from 0x2ad20000
> 
> load_vmlinux: block write from offset 0 failed: 22 - Invalid argument
> 
> 
> 
> 
> noname:/boot# strace /usr/local/bin/load_vmlinux /boot/txrx_cg.bin.new
> execve("/usr/local/bin/load_vmlinux", ["/usr/local/bin/load_vmlinux", 
> "/boot/txrx_cg.bin.new"], [/* 19 vars */]) = 0
> svr4_syscall()                          = -1 ERRNO_4122 (Unknown
> error 4122) svr4_syscall()                          = -1 ERRNO_4045
> (Unknown error 4045) access("/etc/ld.so.nohwcap", F_OK)      = -1
> ENOENT (No such file or directory)
> old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
> -1, 0) = 0x2aabf000
> access("/etc/ld.so.preload", R_OK)      = -1 ENOENT (No such file or 
> directory)
> open("/onstor/lib/libdl.so.2", O_RDONLY) = -1 ENOENT (No such file or 
> directory)
> stat64(0x7f8b1220, 0x7f8b1258)          = 0
> open("/etc/ld.so.cache", O_RDONLY)      = 3
> fstat64(3, {st_mode=S_IFREG|0644, st_size=8747, ...}) = 0
> old_mmap(NULL, 8747, PROT_READ, MAP_PRIVATE, 3, 0) = 0x2aac0000
> close(3)                                = 0
> access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or 
> directory)
> open("/lib/libdl.so.2", O_RDONLY)       = 3
> read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\200\f"..., 
> 512) = 512
> lseek(3, 596, SEEK_SET)                 = 596
> read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\4\0\0\0"...,
> 32) = 32
> fstat64(3, {st_mode=S_IFREG|0644, st_size=10404, ...}) = 0
> old_mmap(NULL, 270560, PROT_READ|PROT_EXEC,
> MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ab00000
> mprotect(0x2ab02000, 262368, PROT_NONE) = 0
> old_mmap(0x2ab41000, 8192, PROT_READ|PROT_WRITE, 
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x1000) = 0x2ab41000
> close(3)                                = 0
> open("/onstor/lib/libgcc_s.so.1", O_RDONLY) = -1 ENOENT (No such file
> or directory)
> access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or 
> directory)
> open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
> read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\300\34"..., 
> 512) = 512
> fstat64(3, {st_mode=S_IFREG|0644, st_size=78116, ...}) = 0
> old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, 
> -1, 0) = 0x2aac3000
> old_mmap(NULL, 334304, PROT_READ|PROT_EXEC,
> MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ab43000
> mprotect(0x2ab54000, 264672, PROT_NONE) = 0
> old_mmap(0x2ab94000, 4096, PROT_READ|PROT_WRITE, 
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x11000) = 0x2ab94000
> close(3)                                = 0
> open("/onstor/lib/libc.so.6", O_RDONLY) = -1 ENOENT (No such file or 
> directory)
> access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or 
> directory)
> open("/lib/libc.so.6", O_RDONLY)        = 3
> read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\10\0\1\0\0\0\264U\1"..., 
> 512) = 512
> lseek(3, 628, SEEK_SET)                 = 628
> read(3, "\4\0\0\0\20\0\0\0\1\0\0\0GNU\0\0\0\0\0\2\0\0\0\4\0\0\0"...,
> 32) = 32
> fstat64(3, {st_mode=S_IFREG|0755, st_size=1434032, ...}) = 0
> old_mmap(NULL, 1617664, PROT_READ|PROT_EXEC,
> MAP_PRIVATE|MAP_DENYWRITE, 3, 0) = 0x2ab95000
> mprotect(0x2acd5000, 306944, PROT_NONE) = 0
> old_mmap(0x2ad14000, 40960, PROT_READ|PROT_WRITE, 
> MAP_PRIVATE|MAP_FIXED|MAP_DENYWRITE, 3, 0x13f000) = 0x2ad14000
> old_mmap(0x2ad1e000, 7936, PROT_READ|PROT_WRITE, 
> MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x2ad1e000
> close(3)                                = 0
> mprotect(0x2ad14000, 28672, PROT_READ)  = 0
> mprotect(0x2ab41000, 4096, PROT_READ)   = 0
> mprotect(0x2aafe000, 4096, PROT_READ)   = 0
> munmap(0x2aac0000, 8747)                = 0
> open("/boot/txrx_cg.bin.new", O_RDONLY|O_LARGEFILE) = 3
> open("/dev/mipsphys", O_RDWR|O_LARGEFILE) = 4
> pread(4, "\0\0\0\0", 4, 2399141892)     = 4
> _llseek(4, 1065588097024, [1065588097024], SEEK_SET) = 0
> fstat64(3, {st_mode=S_IFREG|0644, st_size=3355336, ...}) = 0
> mmap(NULL, 3355336, PROT_READ, MAP_SHARED|MAP_NORESERVE, 3, 0) =
> 0x2ad20000 fstat64(1, {st_mode=S_IFCHR|0600, st_rdev=makedev(5,
> 1), ...}) = 0 ioctl(1, TIOCNXCL, {B57600 opost isig icanon echo ...})
> = 0 old_mmap(NULL, 65536, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aac4000
> write(1, "writing 3355336 bytes to 0xf81a0"..., 54writing 3355336
> bytes to 0xf81a000000 from 0x2ad20000
> ) = 54
> write(4, "\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0"..., 
> 65536) = -1 EINVAL (Invalid argument)
> brk(0)                                  = 0x442000
> brk(0x463000)                           = 0x463000
> time([1257981743])                      = 1257981743
> open("/etc/localtime", O_RDONLY)        = 5
> fstat64(5, {st_mode=S_IFREG|0644, st_size=56, ...}) = 0
> fstat64(5, {st_mode=S_IFREG|0644, st_size=56, ...}) = 0
> old_mmap(NULL, 65536, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aad4000
> read(5, "TZif\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\1\0\0\0\1\0"..., 
> 4096) = 56
> close(5)                                = 0
> munmap(0x2aad4000, 65536)               = 0
> stat64(0x2accfe74, 0x7f8b1940)          = 0
> stat64(0x2accfe74, 0x7f8b18a8)          = 0
> stat64(0x2accfe74, 0x7f8b18a8)          = 0
> socket(PF_FILE, SOCK_DGRAM, 0)          = 5
> fcntl64(5, F_SETFD, FD_CLOEXEC)         = 0
> connect(5, {sa_family=AF_FILE, path="/dev/log"}, 16) = -1 ENOENT (No 
> such file or directory)
> close(5)                                = 0
> open("/dev/console", O_WRONLY|O_NOCTTY) = 5
> fstat64(5, {st_mode=S_IFCHR|0600, st_rdev=makedev(5, 1), ...}) = 0
> ioctl(5, TIOCNXCL, {B57600 opost isig icanon echo ...}) = 0
> old_mmap(NULL, 65536, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0x2aad4000
> _llseek(5, 0, 0x7f8b1848, SEEK_CUR)     = -1 ESPIPE (Illegal seek)
> write(5, "load_vmlinux: block write from o"..., 70load_vmlinux: block 
> write from offset 0 failed: 22 - Invalid argument
> ) = 70
> write(5, "\r\n", 2
> )                     = 2
> munmap(0x2aad4000, 65536)               = 0
> close(5)                                = 0
> munmap(0x2aac4000, 65536)               = 0
> exit_group(1)                           = ?
> Process 1266 detached
> noname:/boot#
> 
> 
> ==========================
> 
> What am I missing here. This was just built under the new tree
> under linux/tools.
> 
> Later,
> 
> -- Bill
> 
