From owner-freebsd-mips@FreeBSD.ORG Sun Jan 30 14:44:10 2011 Return-Path: Delivered-To: freebsd-mips@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AEA831065693 for ; Sun, 30 Jan 2011 14:44:10 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qy0-f175.google.com (mail-qy0-f175.google.com [209.85.216.175]) by mx1.freebsd.org (Postfix) with ESMTP id 60E368FC0C for ; Sun, 30 Jan 2011 14:44:10 +0000 (UTC) Received: by qyk8 with SMTP id 8so2072906qyk.13 for ; Sun, 30 Jan 2011 06:44:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:date:x-google-sender-auth :message-id:subject:from:to:content-type; bh=DUB2eIozk5IUTRoPBHLNULTl6t5hbhJpnidZ8+HT/Nk=; b=cgDbEiZHjilWKnXrvEZV1RtYisqKzGo4Zu+ouDpovqN0/VcvMdrfCJkM51Phr6EPog RIRJu6kT7/sQK64s/g8Dj2Sh6DDLe/gUicnF6eh0vcXFBR0h/f6UcYljt1Xf0weCZt3b SiUAn1HanIE25VbaeAv3Jle5mnJEL3Rlj9Jho= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:date:x-google-sender-auth:message-id:subject :from:to:content-type; b=vF9/6kKkfYTcw+VH3LJhW9JTyoYzHCB9nbTjmmsp9iEwZzJDHpLLlZr0Q5KuSJMzga YJXAtWfhIqPE+PeOpOj1rTN57QJjQKM+65AU2izlGGVa2ggZT+gxti2yaYUxcn3hxOwh KqYbRe7u9t6SB3djKCmqtP3/FD9uEqAeZMd+Q= MIME-Version: 1.0 Received: by 10.224.67.18 with SMTP id p18mr5385496qai.20.1296398649209; Sun, 30 Jan 2011 06:44:09 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.220.198.203 with HTTP; Sun, 30 Jan 2011 06:44:09 -0800 (PST) Date: Sun, 30 Jan 2011 22:44:09 +0800 X-Google-Sender-Auth: rab5-PqSjMZlwt2-aYQxX1Hzszo Message-ID: From: Adrian Chadd To: freebsd-mips@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 Subject: Ubiquiti LS-SR71 and redboot go vs exec: what's the difference? X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Jan 2011 14:44:10 -0000 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