Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 30 Jan 2011 22:44:09 +0800
From:      Adrian Chadd <adrian@freebsd.org>
To:        freebsd-mips@freebsd.org
Subject:   Ubiquiti LS-SR71 and redboot go vs exec: what's the difference?
Message-ID:  <AANLkTi=x9OaRMxKjquwwam5XDPnaMgnnYr=s9tRiuyWP@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
Hi guys,

I have a strange situation here which I hope someone can shed some light on.

I've built a kernel for the LS-SR71 (AR7131 based) based on what works
on the routerstation/routerstation pro.

If I boot it from the network, everything is fine.

If I boot it from the flash, the envp/argv pointers aren't set right
and thus memory and ethernet MAC address is incorrect.

If I boot it from flash but use "exec" instead of the scripted "go",
it also fails.

I dumped a bit of the debugging into IRC; since I've lost the console
history I'll just paste it here.

TFTP:

22:14 <@adri> RedBoot> load kernel.LSSR71
22:14 <@adri> Using default protocol (TFTP)
22:14 <@adri> Entry point: 0x80060100, address range: 0x80060000-0x804a4624
22:14 <@adri> ok, that's via tftpboot
22:14 <@adri> makeoptions     KERNLOADADDR=0x80060000
22:14 <@adri> ok, and the environment is right
22:14 <@adri> RedBoot> exec
22:14 <@adri> Now booting linux kernel: Base address 0x80050000 Entry
0x80060100 Cmdline : console=ttyS0,115200 init=/init
22:14 <@adri> arguments: a0 = 00000002 a1 = 80050020 a2 = 80050000 a3 = 0000001b

22:14 <@adri> environment and argv are right
22:15 <@adri> now, I'll make up a flash image and flash it

And with the unit being flashed:

22:17 <@adri> Initializing default partitions for 8M flash size.
22:17 <@adri> Created 'kernel' - base: 0xBF030000, mem base;
0x80060000, entry: 0x80060000, size: 0x001D0000
22:17 <@adri> Created 'rootfs' - base: 0xBF200000, mem base;
0xBF100000, entry: 0x00000000, size: 0x00470000

22:19 <@adri> now, from flash:
22:19 <@adri> Trying ZLIB decompression... decompression error:
incorrect data check
22:19 <@adri> Entry point: 0x80060100, address range: 0x80060000-0x804a4624
22:19 <@adri> RedBoot> go
22:19 <@adri> and
22:19 <@adri> arguments: a0 = 80060100 a1 = 80fffff0 a2 = 00000001 a3 = 00000007



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?AANLkTi=x9OaRMxKjquwwam5XDPnaMgnnYr=s9tRiuyWP>