From owner-freebsd-mips@freebsd.org Sun Dec 20 05:25:16 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 39157A4D374 for ; Sun, 20 Dec 2015 05:25:16 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-vk0-x233.google.com (mail-vk0-x233.google.com [IPv6:2607:f8b0:400c:c05::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id EDCB01CB4 for ; Sun, 20 Dec 2015 05:25:15 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by mail-vk0-x233.google.com with SMTP id a189so85809159vkh.2 for ; Sat, 19 Dec 2015 21:25:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=Bz5P782O0xniyjrG0mLO/A0Vlqg0GksZOvVlPD9hkSU=; b=NEaCyRaExzFhmfZvIZVNtdP7E1l2hN6WQv7Tf7n9Ejkfr+04pH85qGocaD1jigdHmp ldSL23/IbbDkyS4ubFCcBBR+jL1oxM6qo6pU/2y0Wu0zzMjUb6JSVp6ZUUxAEOqwy+GM lYn/PDgdGKg9ShhHdRbZ2CsrVWzgTIxHe75YCQsPtaf3NJwjpoFAE9t1DCiPNR4KDSos ghD+b4c/i6XJsmHY3yVLtzUa94HuYH4jmT2c4ato+SpL/8Aanw0SDwEFmfgmI/GXeYIy OtsqcidUF9l8JMikQedb0Qp3DewQTL8XfdWSP8FH5JvQ3sI9em4Urs3hKs8VOCWsE+qh aOKg== MIME-Version: 1.0 X-Received: by 10.31.140.74 with SMTP id o71mr8059031vkd.56.1450589114658; Sat, 19 Dec 2015 21:25:14 -0800 (PST) Received: by 10.31.175.201 with HTTP; Sat, 19 Dec 2015 21:25:14 -0800 (PST) In-Reply-To: References: <1479DFB0-6B63-4886-B9BA-8F95A44A8ED9@gmail.com> Date: Sun, 20 Dec 2015 07:25:14 +0200 Message-ID: Subject: Re: Initial support for MT7620 From: Stanislav Galabov To: freebsd-mips@freebsd.org Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Dec 2015 05:25:16 -0000 Hi all, I went through all the Ralink/Mediatek boards I have at home and at the office and did a quick inventory of the SoCs I have available. Here's what I have: - RT3050F - RT3052F - RT5350F - RT3352F - RT6855 (with a Realtek gigabit switch) - MT7620N - MT7620A (several flavours) - MT7621 Here is what I don't have, but I'd like to add support for: - RT3662 - RT3883 - MT7628 (I may get one of these in the future) - MT7688 (I may get one of these in the future) At the moment I am planning to add support for all of the above with the following functionality, where applicable: - PCI/PCIe - USB - Ethernet - Switch - SPI I would appreciate it, if anyone has RT3662/RT3883 laying around not doing anything, if I could get my hands on these at some point. I'll continue looking on my end as well and see if I can obtain these around here... Also, if anyone has RT6855 datasheet/programming guide, I'd appreciate a copy of that. I think I am pretty much set for the others, with the exception of MT7688, but MT7688 is easier to figure out compared to RT6855. I may have missed some SoCs from the above list - if so, and if someone would like to see support for them - please let me know. I think if we manage to do all the above, FreeBSD will have pretty good support for Ralink/Mediatek router SoCs, especially if/once Adrian manages to work on the WiFi parts :-) Best wishes, Stanislav On Sat, Dec 19, 2015 at 8:31 AM, Stanislav Galabov wrote: > Hi all, > > Just to give an update: MT7620 now boots to multi user with EHCI, SPI and > basic Ethernet support (Ethernet is still a WIP, but at least can be used > now). > Thanks to Aleksandr Rybalko and Aleksandr Mityaev for RT5350 SPI and > ethernet patches they provided - these helped a lot :-) > > For the interested, the changes are here: > > https://github.com/sgalabov/freebsd/tree/local/sgalabov_mt7620/sys/mips/r= t305x > > Next is work on MT7620's PCIe support and fixing remaining issues with > MT7620 ethernet. > > Best wishes, > Stanislav > > > > On Tue, Dec 15, 2015 at 4:58 PM, Stanislav Galabov > wrote: > >> Hi all, >> >> After talking with Adrian off list we decided to start work on >> Mediatek/Ralink more recent SoCs with MT7620 instead of MT7621 (Adrian= =E2=80=99s >> board has MT7620 so it=E2=80=99s easier for him to help with the WiFi pa= rts this >> way). >> >> I=E2=80=99ve done a bit today and I got an MT7620A based board to boot t= o multi >> user with root filesystem on USB stick. >> >> If anyone is interested in the patch, it can be found here: >> https://www.dropbox.com/s/e880eutzvlms8h7/mt7620_patch.diff?dl=3D0 >> >> For the moment there is no support for sys/dev/rt (the Ethernet >> controller) with MT7620. This is going to be left for later. >> Next I am planning to work on SPI and PCI so that Adrian can start >> working on WiFi once I=E2=80=99m done with the SPI part. >> >> I would appreciate it if someone would jump in and help with the if_rt >> support - this way we=E2=80=99ll have something working quicker hopefull= y :-) >> >> I would also appreciate feedback for the attached patch... >> >> Best wishes, >> Stanislav > > > From owner-freebsd-mips@freebsd.org Mon Dec 21 05:02:24 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id D16DDA4BA5B for ; Mon, 21 Dec 2015 05:02:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x234.google.com (mail-ig0-x234.google.com [IPv6:2607:f8b0:4001:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A56B91399 for ; Mon, 21 Dec 2015 05:02:24 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-ig0-x234.google.com with SMTP id m11so24543016igk.1 for ; Sun, 20 Dec 2015 21:02:24 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=vf/4tSRiH8LPOYYqDf2mqvgyUazXtrDb8MvLaH0eP9I=; b=GdORY1RDajlKrDdnU0rxqo9PbvclG+2J+P53DSi+N3EnZ6CGnRfZPLCI63Y0l/pza7 3fexc/z/GJ2L63gbQ9vR7VJcCUdCjpeUVSsIKdZUhDpyzFqKzAR3rjkqVlTYGZb+JE/U UwiAEJh66mT62PWFBrZggjFDz2OBsyMo6kxzrQ4kFR8LpOjn04lg62y9MTJTcMouP5ho XrdUwvl2BB0bZg5owR0IU7+fsUSS46EDncMc8H8USXarD2Jqxd52lQCh7TpvrdknJ8Rx c43Hnsb7sc6Ubj7VqCgoduKcGXcB+l7nAU/YFaviF8V1XR2gjaffYK+HSr4zWkI2FFwS a0zw== MIME-Version: 1.0 X-Received: by 10.50.136.226 with SMTP id qd2mr16273143igb.37.1450674144006; Sun, 20 Dec 2015 21:02:24 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.121.202 with HTTP; Sun, 20 Dec 2015 21:02:23 -0800 (PST) Date: Sun, 20 Dec 2015 21:02:23 -0800 X-Google-Sender-Auth: HGn-fod5dtu5Sn_a6FWy52bMsXo Message-ID: Subject: L2 cache management and busdma - or, "damnit USB, who you not like me" From: Adrian Chadd To: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Dec 2015 05:02:24 -0000 hi, I've been poking at the ci20 port to bring it up to self-booting/running, and this involves using USB1 as a rootfs. Yeah, I know, ohci, but that's what I have for now. Anyway, there was filesystem corruption, so I went digging into it and found that we just weren't taking L2 cache line size into account when doing the busdma bits. The JZ4780 SoC has 32 byte L1 lines, and 128 byte L2 lines. Oops! So, two things are needed: * for the ci20 port, which isn't in the mainline tree yet, we need to use USB_HOST_ALIGN=128, and * we need to teach the busdma code about the maximum line size, not just the L1 line size. Here's a diff that does the latter: https://people.freebsd.org/~adrian/mips/mips-fix-dcache-busdma.diff I'm going to test this out on my L1-only platforms (read: atheros) tomorrow. Does anyone have any comments? Thanks! -a From owner-freebsd-mips@freebsd.org Tue Dec 22 05:09:31 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 49B00A4DBC2 for ; Tue, 22 Dec 2015 05:09:31 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id CE8D31B03; Tue, 22 Dec 2015 05:09:29 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.14.9/8.14.9) with ESMTP id tBM59G7n086887 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT); Tue, 22 Dec 2015 06:09:18 +0100 (CET) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: adrian@freebsd.org Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id tBM59Cdl032662; Tue, 22 Dec 2015 12:09:12 +0700 (KRAT) (envelope-from eugen@grosbein.net) Subject: Re: L2 cache management and busdma - or, "damnit USB, who you not like me" To: Adrian Chadd , "freebsd-mips@freebsd.org" References: From: Eugene Grosbein Message-ID: <5678DAF8.6000807@grosbein.net> Date: Tue, 22 Dec 2015 12:09:12 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=0.3 required=5.0 tests=BAYES_00,LOCAL_FROM, T_DATE_IN_FUTURE_96_Q autolearn=no version=3.3.2 X-Spam-Report: * 0.0 T_DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: * date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on hz.grosbein.net X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 05:09:31 -0000 On 21.12.2015 12:02, Adrian Chadd wrote: > hi, > > I've been poking at the ci20 port to bring it up to > self-booting/running, and this involves using USB1 as a rootfs. Yeah, > I know, ohci, but that's what I have for now. > > Anyway, there was filesystem corruption, so I went digging into it and > found that we just weren't taking L2 cache line size into account when > doing the busdma bits. The JZ4780 SoC has 32 byte L1 lines, and 128 > byte L2 lines. Oops > > So, two things are needed: > > * for the ci20 port, which isn't in the mainline tree yet, we need to > use USB_HOST_ALIGN=128, and > * we need to teach the busdma code about the maximum line size, not > just the L1 line size. > > Here's a diff that does the latter: > > https://people.freebsd.org/~adrian/mips/mips-fix-dcache-busdma.diff > > I'm going to test this out on my L1-only platforms (read: atheros) tomorrow. > > Does anyone have any comments? Can that be the source of my USB problems? Total system hang while doing lots of umass I/O with TP-Link TL-WDR3600? If yes, I'd like to re-run my tests with these new patches. From owner-freebsd-mips@freebsd.org Tue Dec 22 08:12:56 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CF37FA14E01 for ; Tue, 22 Dec 2015 08:12:56 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x231.google.com (mail-ig0-x231.google.com [IPv6:2607:f8b0:4001:c05::231]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A0E99115C for ; Tue, 22 Dec 2015 08:12:56 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-ig0-x231.google.com with SMTP id to4so54901241igc.0 for ; Tue, 22 Dec 2015 00:12:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=oIiGK8T/J0uBqtpyzsJAiLTYu4qGah55J3TmpTq8t0s=; b=QtlHC7PxpRJV9hAf6Gv1phaevkBLkZW2n3ESRBLfxdRGS7YZiAvxN5JQU+VL2iTMib BkKODYghHcxZMeb5XnOaB8v4R0JkNk9R6dZ8Su33YiI0/n9Zs0kUs5a6xACGMn2gk0v9 PIinys7gNDi5upMzdHOU3bPtxrTwt35bDb0wYIM69ZoXSWFm8tJiiX5fYQ4Noo2yDpDo XDa5gxSicl4O7XuKoeREqVWc6OtioQuy8yBSzEm3J6TFQh/tNG+mI294vQ163A5RaZHr U6vckAs32UIcUV2m/K6uwRaP0FYKXPkvX1xzQtuXnBMo1B/ay0SBY4fJMZu3t8H06Oz5 lhUA== MIME-Version: 1.0 X-Received: by 10.50.33.69 with SMTP id p5mr21686581igi.61.1450771976034; Tue, 22 Dec 2015 00:12:56 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.121.202 with HTTP; Tue, 22 Dec 2015 00:12:55 -0800 (PST) In-Reply-To: <5678DAF8.6000807@grosbein.net> References: <5678DAF8.6000807@grosbein.net> Date: Tue, 22 Dec 2015 00:12:55 -0800 X-Google-Sender-Auth: s71KLq0y6jiZgSEEmmsGE5ZK8dg Message-ID: Subject: Re: L2 cache management and busdma - or, "damnit USB, who you not like me" From: Adrian Chadd To: Eugene Grosbein Cc: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 08:12:56 -0000 hi, It shouldn't be - the atheros mips doesn't have l2 cache. I wish I could reproduce your issue. :( -a On 21 December 2015 at 21:09, Eugene Grosbein wrote: > On 21.12.2015 12:02, Adrian Chadd wrote: >> hi, >> >> I've been poking at the ci20 port to bring it up to >> self-booting/running, and this involves using USB1 as a rootfs. Yeah, >> I know, ohci, but that's what I have for now. >> >> Anyway, there was filesystem corruption, so I went digging into it and >> found that we just weren't taking L2 cache line size into account when >> doing the busdma bits. The JZ4780 SoC has 32 byte L1 lines, and 128 >> byte L2 lines. Oops >> >> So, two things are needed: >> >> * for the ci20 port, which isn't in the mainline tree yet, we need to >> use USB_HOST_ALIGN=128, and >> * we need to teach the busdma code about the maximum line size, not >> just the L1 line size. >> >> Here's a diff that does the latter: >> >> https://people.freebsd.org/~adrian/mips/mips-fix-dcache-busdma.diff >> >> I'm going to test this out on my L1-only platforms (read: atheros) tomorrow. >> >> Does anyone have any comments? > > Can that be the source of my USB problems? Total system hang while doing lots of umass I/O > with TP-Link TL-WDR3600? If yes, I'd like to re-run my tests with these new patches. > From owner-freebsd-mips@freebsd.org Tue Dec 22 10:12:38 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73E92A4E97E for ; Tue, 22 Dec 2015 10:12:38 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [31.223.170.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 302C61C16; Tue, 22 Dec 2015 10:12:37 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 59C90153418; Tue, 22 Dec 2015 11:12:18 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id et0q5wfR8wYU; Tue, 22 Dec 2015 11:11:59 +0100 (CET) Received: from [IPv6:2001:4cb8:3:1:3d8c:b8b4:2ad7:8a66] (unknown [IPv6:2001:4cb8:3:1:3d8c:b8b4:2ad7:8a66]) by smtp.digiware.nl (Postfix) with ESMTP id B7B83153408; Tue, 22 Dec 2015 11:11:59 +0100 (CET) Subject: Booting a FreeBSD kernel on the WiTiboard. (Was: Re: Initial support for MT7620) To: Stanislav Galabov , Adrian Chadd References: <1479DFB0-6B63-4886-B9BA-8F95A44A8ED9@gmail.com> <17D0A04B-7164-48AE-9909-107EEBDF72E5@gmail.com> <56716BD0.1080801@digiware.nl> Cc: "freebsd-mips@freebsd.org" From: Willem Jan Withagen Organization: Digiware Management b.v. Message-ID: <567921DD.9060802@digiware.nl> Date: Tue, 22 Dec 2015 11:11:41 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <56716BD0.1080801@digiware.nl> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 10:12:38 -0000 On 16-12-2015 14:49, Willem Jan Withagen wrote: > On 15-12-2015 17:16, Stanislav Galabov wrote: >> WiTi board looks nice, I’d go for it. >> >> I have by no means given up on MT7621 support and rolling it in >> together with RT305x would probably be best if we manage to do it. >> I’d actually like to continue after MT7620 and MT7621 and include >> support for MT7628 and MT7688 as well :-) > > Finally got the time to dig out the board and the serial connector. > This is what my WitiBoard spews at me while booting in Uboot..... > > So now I'm off to finding a suitable system here to put tftp on > and go from there. 'mmmm, After a real serious battle with tftp :( it boots. One thing to note on the WiTi board is that the uboot ethernet interface is the second single keystone/connector, NOT the one next to the power jack. Then the next issue starts: uboot runs at 57600 b/s And as far as I can conclude runs the bootloader at 9600 b/s? And once booted it switches to 115200 b/s? I can not switch cu(1) fast enough to actually watch the boot, but once I'm at 115200 I get: panic: mountroot: unable to (re-)mount root. KDB: enter: panic [ thread pid 1 tid 100001 ] Stopped at kdb_enter+0x4c: lui at,0x8047 db> Which matches the remark that there is need for a bootdisk. doesn't look like it is possible to write uboot commands to flash to actually make it do something different from the stdboot. (The device we once build would allow for a uboot-script, but I've got to refersh my uboot memory. ) So I'll try and set uboot to 9600 b/s and reconnect, ten load the kernel to see what comes of it. But is it possible to actually make the console of just the downloaded kernel image run at 57600 ?? No loader.conf etc. makes life a bit harder.... --WjW From owner-freebsd-mips@freebsd.org Tue Dec 22 11:31:57 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 18D67A4E080 for ; Tue, 22 Dec 2015 11:31:57 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from raven.bwct.de (raven.bwct.de [85.159.14.73]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "raven.bwct.de", Issuer "BWCT" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id BCE491A1B; Tue, 22 Dec 2015 11:31:55 +0000 (UTC) (envelope-from ticso@cicely7.cicely.de) Received: from mail.cicely.de ([10.1.1.37]) by raven.bwct.de (8.13.4/8.13.4) with ESMTP id tBMBR1w7069186 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=FAIL); Tue, 22 Dec 2015 12:27:09 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (cicely7.cicely.de [10.1.1.9]) by mail.cicely.de (8.14.5/8.14.4) with ESMTP id tBMBQtlQ035157 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Tue, 22 Dec 2015 12:26:56 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: from cicely7.cicely.de (localhost [127.0.0.1]) by cicely7.cicely.de (8.15.2/8.15.2) with ESMTP id tBMBQtem021968; Tue, 22 Dec 2015 12:26:55 +0100 (CET) (envelope-from ticso@cicely7.cicely.de) Received: (from ticso@localhost) by cicely7.cicely.de (8.15.2/8.15.2/Submit) id tBMBQsM6021967; Tue, 22 Dec 2015 12:26:54 +0100 (CET) (envelope-from ticso) Date: Tue, 22 Dec 2015 12:26:54 +0100 From: Bernd Walter To: Adrian Chadd Cc: Eugene Grosbein , "freebsd-mips@freebsd.org" Subject: Re: L2 cache management and busdma - or, "damnit USB, who you not like me" Message-ID: <20151222112653.GB21902@cicely7.cicely.de> Reply-To: ticso@cicely.de References: <5678DAF8.6000807@grosbein.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Operating-System: FreeBSD cicely7.cicely.de 10.2-RELEASE amd64 User-Agent: Mutt/1.5.11 X-Spam-Status: No, score=-2.9 required=5.0 tests=ALL_TRUSTED=-1, BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 autolearn=ham version=3.3.0 X-Spam-Checker-Version: SpamAssassin 3.3.0 (2010-01-18) on spamd.cicely.de X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 11:31:57 -0000 On Tue, Dec 22, 2015 at 12:12:55AM -0800, Adrian Chadd wrote: > hi, > > It shouldn't be - the atheros mips doesn't have l2 cache. > > I wish I could reproduce your issue. :( It is strange that you couldn't reproduce the problem. For me It happened on so many HW combinations of sticks and magnetic USB drive, with different AR9331 boards and also with the WDR-4300. On the other hand I know someone with a stable SATA-HDD on USB converter connected to a Carambola2, which is something I couldn't reproduce. Nevertheless, it is not a filesystem corruption thing. To me it is more suspect to corruption in USB controller request memory and not in the bulk payload. However, I have no evidence to proove this theory. > On 21 December 2015 at 21:09, Eugene Grosbein wrote: > > On 21.12.2015 12:02, Adrian Chadd wrote: > >> hi, > >> > >> I've been poking at the ci20 port to bring it up to > >> self-booting/running, and this involves using USB1 as a rootfs. Yeah, > >> I know, ohci, but that's what I have for now. > >> > >> Anyway, there was filesystem corruption, so I went digging into it and > >> found that we just weren't taking L2 cache line size into account when > >> doing the busdma bits. The JZ4780 SoC has 32 byte L1 lines, and 128 > >> byte L2 lines. Oops > >> > >> So, two things are needed: > >> > >> * for the ci20 port, which isn't in the mainline tree yet, we need to > >> use USB_HOST_ALIGN=128, and > >> * we need to teach the busdma code about the maximum line size, not > >> just the L1 line size. > >> > >> Here's a diff that does the latter: > >> > >> https://people.freebsd.org/~adrian/mips/mips-fix-dcache-busdma.diff > >> > >> I'm going to test this out on my L1-only platforms (read: atheros) tomorrow. > >> > >> Does anyone have any comments? > > > > Can that be the source of my USB problems? Total system hang while doing lots of umass I/O > > with TP-Link TL-WDR3600? If yes, I'd like to re-run my tests with these new patches. -- B.Walter http://www.bwct.de Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-mips@freebsd.org Tue Dec 22 11:54:20 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 1A0FBA4E8B9 for ; Tue, 22 Dec 2015 11:54:20 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-wm0-x230.google.com (mail-wm0-x230.google.com [IPv6:2a00:1450:400c:c09::230]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id AB56F1166; Tue, 22 Dec 2015 11:54:19 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by mail-wm0-x230.google.com with SMTP id l126so107085380wml.0; Tue, 22 Dec 2015 03:54:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=hg4N0ALqfXFtJP250z96/l+soSrjEBFsVn6tD+H7pmI=; b=dJPGQXJ03dr2P84OnC4PKadcTCbWOJHkyRv3VE3MutuNOUOYO9i33krZ/VvFFPjO1I o8PSu3B8orYYrQdYhtyuuYlPIaiMJL3W3nN5OvEfh77qBVRMp6IQWhinnCJMKea5kEW5 evHOTPnliNuKGME7FcnUlV/m6xqqXcp1d4X07Wj3zX8U/aZV3YJGoyy9AvJfNylQOsb9 et7dVPAx3BNC3EtHAX14oxKuIt+0dNSAV4IgSz4t2Of7ddrIU6MWtJlxvddVzlZFy+Tf G+tAOKgkQ7ZnXOe7OS35/uEM6vcMHw+rALkssRyh/sjApVLcGZkIeTKhLxzy/Kz12NQ5 XiWw== X-Received: by 10.28.133.8 with SMTP id h8mr27335327wmd.71.1450785258166; Tue, 22 Dec 2015 03:54:18 -0800 (PST) Received: from ?IPv6:2001:67c:2154:ffff:99f8:806d:1931:bcfc? ([2001:67c:2154:ffff:99f8:806d:1931:bcfc]) by smtp.gmail.com with ESMTPSA id w124sm24548840wmg.17.2015.12.22.03.54.17 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Dec 2015 03:54:17 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) Subject: Re: Booting a FreeBSD kernel on the WiTiboard. (Was: Re: Initial support for MT7620) From: Stanislav Galabov In-Reply-To: <567921DD.9060802@digiware.nl> Date: Tue, 22 Dec 2015 13:54:16 +0200 Cc: Stanislav Galabov , Adrian Chadd , "freebsd-mips@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <1F9B0CCD-1C67-45CF-9E1D-390F603A862F@gmail.com> References: <1479DFB0-6B63-4886-B9BA-8F95A44A8ED9@gmail.com> <17D0A04B-7164-48AE-9909-107EEBDF72E5@gmail.com> <56716BD0.1080801@digiware.nl> <567921DD.9060802@digiware.nl> To: Willem Jan Withagen X-Mailer: Apple Mail (2.3094) X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 11:54:20 -0000 > On Dec 22, 2015, at 12:11, Willem Jan Withagen = wrote: >=20 > On 16-12-2015 14:49, Willem Jan Withagen wrote: >> On 15-12-2015 17:16, Stanislav Galabov wrote: >>> WiTi board looks nice, I=E2=80=99d go for it. >>>=20 >>> I have by no means given up on MT7621 support and rolling it in >>> together with RT305x would probably be best if we manage to do it. >>> I=E2=80=99d actually like to continue after MT7620 and MT7621 and = include >>> support for MT7628 and MT7688 as well :-) >>=20 >> Finally got the time to dig out the board and the serial connector. >> This is what my WitiBoard spews at me while booting in Uboot..... >>=20 >> So now I'm off to finding a suitable system here to put tftp on >> and go from there. >=20 > 'mmmm, >=20 > After a real serious battle with tftp :( it boots. > One thing to note on the WiTi board is that the uboot ethernet = interface > is the second single keystone/connector, NOT the one next to the power = jack. >=20 > Then the next issue starts: > uboot runs at 57600 b/s >=20 > And as far as I can conclude runs the bootloader at 9600 b/s? > And once booted it switches to 115200 b/s? >=20 > I can not switch cu(1) fast enough to actually watch the boot, but = once I'm at 115200 I get: >=20 > panic: mountroot: unable to (re-)mount root. > KDB: enter: panic > [ thread pid 1 tid 100001 ] > Stopped at kdb_enter+0x4c: lui at,0x8047 > db> >=20 > Which matches the remark that there is need for a bootdisk. >=20 > doesn't look like it is possible to write uboot commands to flash to > actually make it do something different from the stdboot. > (The device we once build would allow for a uboot-script, but I've got > to refersh my uboot memory. ) >=20 > So I'll try and set uboot to 9600 b/s and reconnect, ten load the = kernel > to see what comes of it. But is it possible to actually make the = console > of just the downloaded kernel image run at 57600 ?? No loader.conf = etc. > makes life a bit harder.... >=20 > --WjW Hi Willem, Can you try with this kernel please: https://www.dropbox.com/s/t1wevprzlsfegr0/kernel.uboot?dl=3D0 Best wishes, Stanislav= From owner-freebsd-mips@freebsd.org Tue Dec 22 12:03:52 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 112D5A4F191 for ; Tue, 22 Dec 2015 12:03:52 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (unknown [IPv6:2001:4cb8:90:ffff::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B5E2F193F; Tue, 22 Dec 2015 12:03:51 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 6880E15340A; Tue, 22 Dec 2015 13:03:47 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hV7Uizm0AXfG; Tue, 22 Dec 2015 13:03:25 +0100 (CET) Received: from [IPv6:2001:4cb8:3:1:3d8c:b8b4:2ad7:8a66] (unknown [IPv6:2001:4cb8:3:1:3d8c:b8b4:2ad7:8a66]) by smtp.digiware.nl (Postfix) with ESMTP id 19102153401; Tue, 22 Dec 2015 13:03:25 +0100 (CET) Subject: Re: Booting a FreeBSD kernel on the WiTiboard. (Was: Re: Initial support for MT7620) To: Stanislav Galabov References: <1479DFB0-6B63-4886-B9BA-8F95A44A8ED9@gmail.com> <17D0A04B-7164-48AE-9909-107EEBDF72E5@gmail.com> <56716BD0.1080801@digiware.nl> <567921DD.9060802@digiware.nl> <1F9B0CCD-1C67-45CF-9E1D-390F603A862F@gmail.com> Cc: Adrian Chadd , "freebsd-mips@freebsd.org" From: Willem Jan Withagen Organization: Digiware Management b.v. Message-ID: <56793BF9.9010200@digiware.nl> Date: Tue, 22 Dec 2015 13:03:05 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <1F9B0CCD-1C67-45CF-9E1D-390F603A862F@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 12:03:52 -0000 On 22-12-2015 12:54, Stanislav Galabov wrote: > Hi Willem, > > Can you try with this kernel please: > https://www.dropbox.com/s/t1wevprzlsfegr0/kernel.uboot?dl=0 That really works. :) Boot output below. Guess I'm going to need to find a disk to hookup to one of the sataports... In the mean time also started a MIPS build for MT7620. But this afternoon is reserved for Xmas shopping, so I won't be back with results for a while. --WjW TIMEOUT_COUNT=10,Load address: 0x80a00000 Loading: Got ARP REPLY, set server/gtwy eth addr (00:30:48:de:97:cd) Got it ################################################################# ################################################################# ################################################ done Bytes transferred = 910255 (de3af hex) NetBootFileXferSize= 000de3af Automatic boot of image at addr 0x80A00000 ... ## Booting image at 80a00000 ... Image Name: FreeBSD Kernel Image Image Type: MIPS Linux Kernel Image (lzma compressed) Data Size: 910191 Bytes = 888.9 kB Load Address: 80100120 Entry Point: 80100120 Verifying Checksum ... OK Uncompressing Kernel Image ... OK No initrd ## Transferring control to Linux (at address 80100120) ... ## Giving linux memsize in MB, 256 Starting kernel ... U-Boot args (from 0 args): None Environment: memsize=256 initrd_start=0x00000000 initrd_size=0x0 flash_start=0x00000000 flash_size=0x1000000 GCRs found at 0x1fbf8000. No L2 sync (4 < 6) MIPS CPC found Local core : 0x00000013 Other core : 0x00000013 Reg0 base : 0x1c000000 Reg0 mask : 0xfc000002 Reg1 base : 0x60000000 Reg1 mask : 0xf0000002 Reg2 base : 0x1c000000 Reg2 mask : 0xfc000002 Reg3 base : 0x1c000000 Reg3 mask : 0xfc000002 GCR Base : 0x1fbf8000 GCR Control: 0x00010001 MVPControl : 0x00000001 VPEConf0 : 0x800f0003 Num IOCUs : 1 Config0 : 0x80200485 Config7 : 0x80090500 GIC Config : 0x08070003 entry: mips_init() Cache info: picache_stride = 4096 picache_loopcount = 8 pdcache_stride = 4096 pdcache_loopcount = 8 cpu0: MIPS Technologies processor v47.153 MMU: Standard TLB, 32 entries L1 i-cache: 4 ways of 256 sets, 32 bytes per line L1 d-cache: 4 ways of 256 sets, 32 bytes per line Config1=0xbea3519e Config3=0x2000242c HW COHERENCY ENABLED! Physical memory chunk(s): 0x489000 - 0xfffffff, 263680000 bytes (64375 pages) Maxmem is 0x10000000 KDB: debugger backends: ddb KDB: current backend: ddb cm_gcr_base: 0x1fbf8000 gic_base: 0x1fbc0000 0x00000180 -> 0x00000000, 0 0x00000200 -> 0x00000000, 0 0x00000380 -> 0x00000000, 0 0x00000568 -> 0x80000000 0x00000400 -> 0x00000000 0x00000480 -> 0x00000000 Copyright (c) 1992-2015 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 11.0-CURRENT #814 ce202b1(master)-dirty: Mon Dec 21 23:41:48 EET 2015 root@stassi-bsd9:/usr/obj/mips.mipsel/usr/current/sys/MT7621 mips gcc version 4.2.1 20070831 patched [FreeBSD] Preloaded elf kernel "kernel" at 0x80482990. real memory = 268435456 (262144K bytes) Physical memory chunk(s): 0x0051d000 - 0x0fb54fff, 258179072 bytes (63032 pages) avail memory = 257130496 (245MB) ULE: setup cpu 0 random: entropy device external interface mem: null: nexus0: clock0: on nexus0 Timecounter "GIC Timer" frequency 880000000 Hz quality 800 Event timer "GIC Timer" frequency 880000000 Hz quality 800 random: harvesting attach, 8 bytes (4 bits) from clock0 obio0 at mem 0xbe000000-0xbeffffff on nexus0 rt305x_sysctl0: at mem 0xbe000000-0xbe0000ff irq 0 on obio0 Chip ID: "MT7621 " SYSCTL_SYSCFG=0x2c22c2 GE0 mode 0 Bypass PLL Clock is 384MHz Boot from 0 Bootstrap test code 34 SRAM_CS mode 0 8mA SDRAM_CLK driving SYSCTL_CLKCFG0=0x40a00000 SDRAM_CLK_SKEW 1ns SYSCTL_CLKCFG1=0x77ffeff8 Pbus clock is 1/2 of System clock USB OTG clock is enabled I2S clock is enabled I2S clock is external I2S clock divider 47 PCM clock is enabled PCM clock is external PCM clock divider 56 SYSCTL_GPIOMODE=0x04042c random: harvesting attach, 8 bytes (4 bits) from rt305x_sysctl0 rt305x_ic0: at mem 0xbe000200-0xbe0002ff on obio0 random: harvesting attach, 8 bytes (4 bits) from rt305x_ic0 uart_ralink_probe(): 0x03 uart_ralink_probe(): 0x00 uart_ralink_probe(): 0x03 uart_ralink_probe(): 0xd0 uart0: at mem 0xbe000c00-0xbe000cff irq 26 on obio0 uart0: console (57870,n,8,1) uart0: PPS capture mode 2 (DCD) random: harvesting attach, 8 bytes (4 bits) from uart0 pcib0 at mem 0xbe140000-0xbe17ffff on obio0 PCIe0 card detected PCIe1 card detected PCIe2 card detected Port 0 N_FTS = 0x1b105000 Port 1 N_FTS = 0x1b105000 Port 2 N_FTS = 0x1b105000 PCI 1:0:0: reg 10: smask=fff00004: addr=60000000 PCI 2:0:0: reg 10: smask=fff00004: addr=60100000 PCI 3:0:0: reg 10: smask=fffffff9: addr=1e160000 PCI 3:0:0: reg 14: smask=fffffffd: addr=1e160008 PCI 3:0:0: reg 18: smask=fffffff9: addr=1e160010 PCI 3:0:0: reg 1c: smask=fffffffd: addr=1e16000c PCI 3:0:0: reg 20: smask=ffffffe1: addr=1e160020 PCI 3:0:0: reg 24: smask=fffffe00: addr=60200000 pci0: on pcib0 pci0: domain=0, physical bus=0 found-> vendor=0x0e8d, dev=0x0801, revid=0x01 domain=0, bus=0, slot=0, func=0 class=06-04-00, hdrtype=0x01, mfdev=0 cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=0 powerspec 3 supports D0 D1 D3 current D0 MSI supports 1 message, 64 bit found-> vendor=0x0e8d, dev=0x0801, revid=0x01 domain=0, bus=0, slot=1, func=0 class=06-04-00, hdrtype=0x01, mfdev=0 cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=0 powerspec 3 supports D0 D1 D3 current D0 MSI supports 1 message, 64 bit found-> vendor=0x0e8d, dev=0x0801, revid=0x01 domain=0, bus=0, slot=2, func=0 class=06-04-00, hdrtype=0x01, mfdev=0 cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=0 powerspec 3 supports D0 D1 D3 current D0 MSI supports 1 message, 64 bit pcib1: irq 4 at device 0.0 on pci0 pcib1: domain 0 pcib1: secondary bus 1 pcib1: subordinate bus 1 pcib1: memory decode 0x60000000-0x67ffffff pci1: on pcib1 pci1: domain=0, physical bus=1 found-> vendor=0x14c3, dev=0x7662, revid=0x00 domain=0, bus=1, slot=0, func=0 class=02-80-00, hdrtype=0x00, mfdev=0 cmdreg=0x0006, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=255 powerspec 3 supports D0 D3 current D0 MSI supports 1 message, 64 bit map[10]: type Memory, range 64, base 0x60000000, size 20, enabled pcib1: requested memory range 0x60000000-0x600fffff: good mt762x_pci_alloc_resource(): mapped to 0xcb600000 pci1: at device 0.0 (no driver attached) random: harvesting attach, 8 bytes (4 bits) from pci1 random: harvesting attach, 8 bytes (4 bits) from pcib1 pcib2: irq 24 at device 1.0 on pci0 pcib2: domain 0 pcib2: secondary bus 2 pcib2: subordinate bus 2 pcib2: memory decode 0x60000000-0x67ffffff pci2: on pcib2 pci2: domain=0, physical bus=2 found-> vendor=0x14c3, dev=0x7662, revid=0x00 domain=0, bus=2, slot=0, func=0 class=02-80-00, hdrtype=0x00, mfdev=0 cmdreg=0x0006, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=255 powerspec 3 supports D0 D3 current D0 MSI supports 1 message, 64 bit map[10]: type Memory, range 64, base 0x60100000, size 20, enabled pcib2: requested memory range 0x60100000-0x601fffff: good mt762x_pci_alloc_resource(): mapped to 0xcb700000 pci2: at device 0.0 (no driver attached) random: harvesting attach, 8 bytes (4 bits) from pci2 random: harvesting attach, 8 bytes (4 bits) from pcib2 pcib3: irq 25 at device 2.0 on pci0 pcib3: domain 0 pcib3: secondary bus 3 pcib3: subordinate bus 3 pcib3: memory decode 0x60000000-0x67ffffff pci3: on pcib3 pci3: domain=0, physical bus=3 found-> vendor=0x1b21, dev=0x0612, revid=0x01 domain=0, bus=3, slot=0, func=0 class=01-06-01, hdrtype=0x00, mfdev=0 cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=0 powerspec 3 supports D0 D3 current D0 MSI supports 1 message map[10]: type I/O Port, range 32, base 0x1e160000, size 3, enabled pci3: pci0:3:0:0 bar 0x10 failed to allocate map[14]: type I/O Port, range 32, base 0x1e160008, size 2, port disabled pci3: pci0:3:0:0 bar 0x14 failed to allocate map[18]: type I/O Port, range 32, base 0x1e160010, size 3, port disabled pci3: pci0:3:0:0 bar 0x18 failed to allocate map[1c]: type I/O Port, range 32, base 0x1e16000c, size 2, port disabled pci3: pci0:3:0:0 bar 0x1c failed to allocate map[20]: type I/O Port, range 32, base 0x1e160020, size 5, port disabled pci3: pci0:3:0:0 bar 0x20 failed to allocate map[24]: type Memory, range 32, base 0x60200000, size 9, enabled pcib3: requested memory range 0x60200000-0x602001ff: good mt762x_pci_alloc_resource(): mapped to 0xc5aff000 pcib3: slot 0 INTA is routed to irq 25 ahci0: mem 0x60200000-0x602001ff irq 25 at device 0.0 on pci3 ahci0: attempting to allocate 1 MSI vectors (1 supported) ahci0: Failed to allocate MSI/MSI-x, falling back to INTx ahci0: AHCI v1.20 with 2 6Gbps ports, Port Multiplier supported ahci0: Caps: 64bit NCQ SNTF SS AL CLO 6Gbps PM PMD SSC PSC 32cmd CCC eSATA 2ports ahci0: Caps2: ahcich0: at channel 0 on ahci0 ahcich0: Caps: HPCP random: harvesting attach, 8 bytes (4 bits) from ahcich0 ahcich1: at channel 1 on ahci0 ahcich1: Caps: HPCP random: harvesting attach, 8 bytes (4 bits) from ahcich1 random: harvesting attach, 8 bytes (4 bits) from ahci0 random: harvesting attach, 8 bytes (4 bits) from pci3 random: harvesting attach, 8 bytes (4 bits) from pcib3 random: harvesting attach, 8 bytes (4 bits) from pci0 random: harvesting attach, 8 bytes (4 bits) from pcib0 random: harvesting attach, 8 bytes (4 bits) from obio0 random: harvesting attach, 8 bytes (4 bits) from nexus0 Device configuration finished. Timecounters tick every 10.000 msec tcp_init: net.inet.tcp.tcbhashsize auto tuned to 4096 ahcich0: AHCI reset... ahcich0: SATA connect timeout time=10000us status=00000000 ahcich0: AHCI reset: device not found ahcich1: AHCI reset... ahcich1: SATA connect timeout time=10000us status=00000000 ahcich1: AHCI reset: device not found Trying to mount root from ufs:/dev/ada0s1 []... mountroot: waiting for device /dev/ada0s1... Mounting from ufs:/dev/ada0s1 failed with error 19. Loader variables: Manual root filesystem specification: : [options] Mount using filesystem and with the specified (optional) option list. eg. ufs:/dev/da0s1a zfs:tank cd9660:/dev/cd0 ro (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) ? List valid disk boot devices . Yield 1 second (for background tasks) Abort manual input mountroot> From owner-freebsd-mips@freebsd.org Tue Dec 22 12:07:32 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id BE2A7A4F233 for ; Tue, 22 Dec 2015 12:07:32 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 56C1719DC; Tue, 22 Dec 2015 12:07:32 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by mail-wm0-x22d.google.com with SMTP id l126so106381713wml.1; Tue, 22 Dec 2015 04:07:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=r1HN/LKyG1eJTl9j9VsIg2cvv8ElFfE8eFzhF1OpD4c=; b=UUOt2+pniCQa1MwZbfH6YZQZdT7JpOVNSw9p/tf5uI7zYtOLC0+x6w3iQn9vqkeHpd 9BjZ/pKIjt+IBH9znz6UkKdYp2YUUFd5kwJ4hipcF/BB2uG0RkcysIqJ8Yi4E4N9UTXM FkXeb3RahiwUCGNLWtIhTbAPL8/w7UkiqXA1DxbOk6XDAmS7mJROVFH/NwVj4okbc27x iAx+t2jMxfHdUvMZrQvUelsCru1aJ3jGZ6/Dc5ybFpm6rJZ3Mfry6ipnsJWxbAv09PcB xd1v2oTm62cuc7a1yc+PEwMpAHDLd1IFeQJ9GOepJPUFlo2+yv2xwsb3pZkq0oa6TG9V X1OQ== X-Received: by 10.28.100.69 with SMTP id y66mr27486236wmb.98.1450786050529; Tue, 22 Dec 2015 04:07:30 -0800 (PST) Received: from macbookpro-894a.hsmt ([193.178.153.131]) by smtp.gmail.com with ESMTPSA id w73sm11210891wmw.21.2015.12.22.04.07.29 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Dec 2015 04:07:29 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) Subject: Re: Booting a FreeBSD kernel on the WiTiboard. (Was: Re: Initial support for MT7620) From: Stanislav Galabov In-Reply-To: <56793BF9.9010200@digiware.nl> Date: Tue, 22 Dec 2015 14:07:28 +0200 Cc: Stanislav Galabov , Adrian Chadd , "freebsd-mips@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <280C77DE-3468-4BA1-86E6-23C567A37D79@gmail.com> References: <1479DFB0-6B63-4886-B9BA-8F95A44A8ED9@gmail.com> <17D0A04B-7164-48AE-9909-107EEBDF72E5@gmail.com> <56716BD0.1080801@digiware.nl> <567921DD.9060802@digiware.nl> <1F9B0CCD-1C67-45CF-9E1D-390F603A862F@gmail.com> <56793BF9.9010200@digiware.nl> To: Willem Jan Withagen X-Mailer: Apple Mail (2.3094) X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 12:07:32 -0000 > On Dec 22, 2015, at 14:03, Willem Jan Withagen = wrote: >=20 > On 22-12-2015 12:54, Stanislav Galabov wrote: >> Hi Willem, >>=20 >> Can you try with this kernel please: >> https://www.dropbox.com/s/t1wevprzlsfegr0/kernel.uboot?dl=3D0 >=20 > That really works. :) > Boot output below. >=20 > Guess I'm going to need to find a disk to hookup to one of the = sataports... > In the mean time also started a MIPS build for MT7620. >=20 > But this afternoon is reserved for Xmas shopping, so I won't be back = with > results for a while. >=20 > --WjW I=E2=80=99m glad it works for you :-) Yeah, I=E2=80=99m probably not going to be around myself starting = tomorrow evening until the beginning of the new year sometime=E2=80=A6 = I=E2=80=99ll read my e-mails, but won=E2=80=99t be able to do any work = most likely. Best wishes, Stanislav= From owner-freebsd-mips@freebsd.org Tue Dec 22 12:14:51 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id CA223A4F402 for ; Tue, 22 Dec 2015 12:14:51 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [31.223.170.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8FF771CB7; Tue, 22 Dec 2015 12:14:51 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 1CFED153418; Tue, 22 Dec 2015 13:14:48 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4Rv5JJoAIVC1; Tue, 22 Dec 2015 13:14:46 +0100 (CET) Received: from [IPv6:2001:4cb8:3:1:3d8c:b8b4:2ad7:8a66] (unknown [IPv6:2001:4cb8:3:1:3d8c:b8b4:2ad7:8a66]) by smtp.digiware.nl (Postfix) with ESMTP id BD7AA15340A; Tue, 22 Dec 2015 13:14:46 +0100 (CET) Subject: Re: Booting a FreeBSD kernel on the WiTiboard. (Was: Re: Initial support for MT7620) To: Stanislav Galabov References: <1479DFB0-6B63-4886-B9BA-8F95A44A8ED9@gmail.com> <17D0A04B-7164-48AE-9909-107EEBDF72E5@gmail.com> <56716BD0.1080801@digiware.nl> <567921DD.9060802@digiware.nl> <1F9B0CCD-1C67-45CF-9E1D-390F603A862F@gmail.com> <56793BF9.9010200@digiware.nl> <280C77DE-3468-4BA1-86E6-23C567A37D79@gmail.com> Cc: Adrian Chadd , "freebsd-mips@freebsd.org" From: Willem Jan Withagen Organization: Digiware Management b.v. Message-ID: <56793EA6.3040401@digiware.nl> Date: Tue, 22 Dec 2015 13:14:30 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <280C77DE-3468-4BA1-86E6-23C567A37D79@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 12:14:51 -0000 On 22-12-2015 13:07, Stanislav Galabov wrote: > >> On Dec 22, 2015, at 14:03, Willem Jan Withagen wrote: >> >> On 22-12-2015 12:54, Stanislav Galabov wrote: >>> Hi Willem, >>> >>> Can you try with this kernel please: >>> https://www.dropbox.com/s/t1wevprzlsfegr0/kernel.uboot?dl=0 >> >> That really works. :) >> Boot output below. >> >> Guess I'm going to need to find a disk to hookup to one of the sataports... >> In the mean time also started a MIPS build for MT7620. >> >> But this afternoon is reserved for Xmas shopping, so I won't be back with >> results for a while. >> >> --WjW > > I’m glad it works for you :-) > Yeah, I’m probably not going to be around myself starting tomorrow evening until the beginning of the new year sometime… I’ll read my e-mails, but won’t be able to do any work most likely. I see that the image searches for a bootdis called: /dev/ada0s1 So if I attach a disk on my build machine slice it up (dangerously) partition it the classic way install the mips stuff on it I run the risk that it will boot. :) Happy holidays, --WjW From owner-freebsd-mips@freebsd.org Tue Dec 22 12:17:18 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8C387A4F4FB for ; Tue, 22 Dec 2015 12:17:18 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 30FC11D1C; Tue, 22 Dec 2015 12:17:18 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id l126so106710041wml.1; Tue, 22 Dec 2015 04:17:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=content-type:mime-version:subject:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to; bh=8wI3AoSQwLwl6/h1gu3kapxh5w469E2Vzo8ZZHNd3og=; b=kYwhUnvvW0G/12gUCBG6s387R98zZRn0SZtmRqmUzeXf/mEtAtEaiqDM1ePEn4IbFg cycKbhFQKre8nX2u4BqLQQeOBfHO7oRI5EjZcssIJKghwMvTTM1mTNiQoOUnFMEGEK7u fN2Dboe4EYW7UJTU7n5wW/yxAHIrp4b52atlYZcQIonapHCtfYLXih/uCSW9c4aUoE7s fcM/bxltegsyYoXKChdGLQDtAv4N6Qk73Wyj3clUHZOneIPn9Xe4ZwZhKfwAlOgjVADf OiUe/bthOGPu2jehmH5lY7sfU6hws+UXgO3RRwe9KVfjlHGSNtyp/xAr3hLkg/dnPo4g KfDA== X-Received: by 10.194.59.108 with SMTP id y12mr27453347wjq.33.1450786636443; Tue, 22 Dec 2015 04:17:16 -0800 (PST) Received: from macbookpro-894a.hsmt ([193.178.153.131]) by smtp.gmail.com with ESMTPSA id w1sm13843164wmd.2.2015.12.22.04.17.15 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Tue, 22 Dec 2015 04:17:15 -0800 (PST) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 9.0 \(3094\)) Subject: Re: Booting a FreeBSD kernel on the WiTiboard. (Was: Re: Initial support for MT7620) From: Stanislav Galabov In-Reply-To: <56793EA6.3040401@digiware.nl> Date: Tue, 22 Dec 2015 14:17:14 +0200 Cc: Stanislav Galabov , Adrian Chadd , "freebsd-mips@freebsd.org" Content-Transfer-Encoding: quoted-printable Message-Id: <91F3818D-0E31-4095-B079-340872300D34@gmail.com> References: <1479DFB0-6B63-4886-B9BA-8F95A44A8ED9@gmail.com> <17D0A04B-7164-48AE-9909-107EEBDF72E5@gmail.com> <56716BD0.1080801@digiware.nl> <567921DD.9060802@digiware.nl> <1F9B0CCD-1C67-45CF-9E1D-390F603A862F@gmail.com> <56793BF9.9010200@digiware.nl> <280C77DE-3468-4BA1-86E6-23C567A37D79@gmail.com> <56793EA6.3040401@digiware.nl> To: Willem Jan Withagen X-Mailer: Apple Mail (2.3094) X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 12:17:18 -0000 > On Dec 22, 2015, at 14:14, Willem Jan Withagen = wrote: >=20 > On 22-12-2015 13:07, Stanislav Galabov wrote: >>=20 >>> On Dec 22, 2015, at 14:03, Willem Jan Withagen = wrote: >>>=20 >>> On 22-12-2015 12:54, Stanislav Galabov wrote: >>>> Hi Willem, >>>>=20 >>>> Can you try with this kernel please: >>>> https://www.dropbox.com/s/t1wevprzlsfegr0/kernel.uboot?dl=3D0 >>>=20 >>> That really works. :) >>> Boot output below. >>>=20 >>> Guess I'm going to need to find a disk to hookup to one of the = sataports... >>> In the mean time also started a MIPS build for MT7620. >>>=20 >>> But this afternoon is reserved for Xmas shopping, so I won't be back = with >>> results for a while. >>>=20 >>> --WjW >>=20 >> I=E2=80=99m glad it works for you :-) >> Yeah, I=E2=80=99m probably not going to be around myself starting = tomorrow evening until the beginning of the new year sometime=E2=80=A6 = I=E2=80=99ll read my e-mails, but won=E2=80=99t be able to do any work = most likely. >=20 > I see that the image searches for a bootdis called: > /dev/ada0s1 >=20 > So if I attach a disk on my build machine > slice it up (dangerously) > partition it the classic way > install the mips stuff on it >=20 > I run the risk that it will boot. :) >=20 > Happy holidays, > --WjW It boots for me. I am using an old laptop HDD with MBR and if I recall = correctly I simply did a newfs on the partition on which I installed the = mips world. Best wishes, Stanislav= From owner-freebsd-mips@freebsd.org Tue Dec 22 14:47:44 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DBB3DA4E6FB for ; Tue, 22 Dec 2015 14:47:43 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-ig0-x235.google.com (mail-ig0-x235.google.com [IPv6:2607:f8b0:4001:c05::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id ABA6C15BB for ; Tue, 22 Dec 2015 14:47:43 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-ig0-x235.google.com with SMTP id mv3so50897040igc.0 for ; Tue, 22 Dec 2015 06:47:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Nl/v3i8etd+xtXgC9AoErCceMev4UaCzIw6+wq0SAok=; b=swyPgqbf9N8TjFZJkJaVeC4r8gek/1wLt0PyuH/QkSgOinm4h+lcUyUTLnlSJizH/w wPWe8wlpg6MKspsuuKugB7Gl8IcoUAuIr4hVt7oN1NicQeNUc7+eHsMzR6BLKOOS34sS jbAwOcQyQYfUkWiMkfryWdJX0ba6tsnEuQNi7BdAu1LjN/YW/aIuBwS7D4LTWZp2bP+S xovATjsjY0n1wKfQhqi1FFBGO9PtlDqSISeWSxZcKxBoXTF9s++QGBa0H1SI3Hybm/vD j1rYjLNKD74j0Ln8OlWqE4rFQOFet0PrsXWDaxoLZfzVCMnQYLOzbPO5qKLRPWZKxoZD kA9Q== MIME-Version: 1.0 X-Received: by 10.50.25.169 with SMTP id d9mr23493706igg.61.1450795663063; Tue, 22 Dec 2015 06:47:43 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.121.202 with HTTP; Tue, 22 Dec 2015 06:47:42 -0800 (PST) In-Reply-To: <20151222112653.GB21902@cicely7.cicely.de> References: <5678DAF8.6000807@grosbein.net> <20151222112653.GB21902@cicely7.cicely.de> Date: Tue, 22 Dec 2015 06:47:42 -0800 X-Google-Sender-Auth: zunnoc_9Gr4NCuYYoOs1pSxJvo4 Message-ID: Subject: Re: L2 cache management and busdma - or, "damnit USB, who you not like me" From: Adrian Chadd To: ticso@cicely.de Cc: Eugene Grosbein , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Dec 2015 14:47:44 -0000 On 22 December 2015 at 03:26, Bernd Walter wrote: > On Tue, Dec 22, 2015 at 12:12:55AM -0800, Adrian Chadd wrote: >> hi, >> >> It shouldn't be - the atheros mips doesn't have l2 cache. >> >> I wish I could reproduce your issue. :( > > It is strange that you couldn't reproduce the problem. > For me It happened on so many HW combinations of sticks and magnetic USB drive, > with different AR9331 boards and also with the WDR-4300. > On the other hand I know someone with a stable SATA-HDD on USB converter connected > to a Carambola2, which is something I couldn't reproduce. > Nevertheless, it is not a filesystem corruption thing. To me it is more suspect > to corruption in USB controller request memory and not in the bulk payload. > However, I have no evidence to proove this theory. When my living situation is saner I'll setup a proper test bench and test lots of combinations. :) -a >> On 21 December 2015 at 21:09, Eugene Grosbein wrote: >> > On 21.12.2015 12:02, Adrian Chadd wrote: >> >> hi, >> >> >> >> I've been poking at the ci20 port to bring it up to >> >> self-booting/running, and this involves using USB1 as a rootfs. Yeah, >> >> I know, ohci, but that's what I have for now. >> >> >> >> Anyway, there was filesystem corruption, so I went digging into it and >> >> found that we just weren't taking L2 cache line size into account when >> >> doing the busdma bits. The JZ4780 SoC has 32 byte L1 lines, and 128 >> >> byte L2 lines. Oops >> >> >> >> So, two things are needed: >> >> >> >> * for the ci20 port, which isn't in the mainline tree yet, we need to >> >> use USB_HOST_ALIGN=128, and >> >> * we need to teach the busdma code about the maximum line size, not >> >> just the L1 line size. >> >> >> >> Here's a diff that does the latter: >> >> >> >> https://people.freebsd.org/~adrian/mips/mips-fix-dcache-busdma.diff >> >> >> >> I'm going to test this out on my L1-only platforms (read: atheros) tomorrow. >> >> >> >> Does anyone have any comments? >> > >> > Can that be the source of my USB problems? Total system hang while doing lots of umass I/O >> > with TP-Link TL-WDR3600? If yes, I'd like to re-run my tests with these new patches. > > -- > B.Walter http://www.bwct.de > Modbus/TCP Ethernet I/O Baugruppen, ARM basierte FreeBSD Rechner uvm. From owner-freebsd-mips@freebsd.org Wed Dec 23 13:37:28 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id A1BF7A4F32D for ; Wed, 23 Dec 2015 13:37:28 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (smtp.digiware.nl [31.223.170.169]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 44E1A1BB1; Wed, 23 Dec 2015 13:37:28 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 3312F15344D; Wed, 23 Dec 2015 14:37:19 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IFWYfC3I9lif; Wed, 23 Dec 2015 14:37:17 +0100 (CET) Received: from [IPv6:2001:4cb8:3:1:15b4:55a8:d3fd:6f27] (unknown [IPv6:2001:4cb8:3:1:15b4:55a8:d3fd:6f27]) by smtp.digiware.nl (Postfix) with ESMTP id 15EAB15340D; Wed, 23 Dec 2015 14:37:17 +0100 (CET) Subject: Re: Booting a FreeBSD kernel on the WiTiboard. (Was: Re: Initial support for MT7620) To: Stanislav Galabov References: <1479DFB0-6B63-4886-B9BA-8F95A44A8ED9@gmail.com> <17D0A04B-7164-48AE-9909-107EEBDF72E5@gmail.com> <56716BD0.1080801@digiware.nl> <567921DD.9060802@digiware.nl> <1F9B0CCD-1C67-45CF-9E1D-390F603A862F@gmail.com> <56793BF9.9010200@digiware.nl> <280C77DE-3468-4BA1-86E6-23C567A37D79@gmail.com> <56793EA6.3040401@digiware.nl> <91F3818D-0E31-4095-B079-340872300D34@gmail.com> Cc: Adrian Chadd , "freebsd-mips@freebsd.org" From: Willem Jan Withagen Organization: Digiware Management b.v. Message-ID: <567AA37A.6020005@digiware.nl> Date: Wed, 23 Dec 2015 14:36:58 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <91F3818D-0E31-4095-B079-340872300D34@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Dec 2015 13:37:28 -0000 On 22-12-2015 13:17, Stanislav Galabov wrote: > >> On Dec 22, 2015, at 14:14, Willem Jan Withagen wrote: >> >> On 22-12-2015 13:07, Stanislav Galabov wrote: >>> >>>> On Dec 22, 2015, at 14:03, Willem Jan Withagen wrote: >>>> >>>> On 22-12-2015 12:54, Stanislav Galabov wrote: >>>>> Hi Willem, >>>>> >>>>> Can you try with this kernel please: >>>>> https://www.dropbox.com/s/t1wevprzlsfegr0/kernel.uboot?dl=0 >>>> >>>> That really works. :) >>>> Boot output below. >>>> >>>> Guess I'm going to need to find a disk to hookup to one of the sataports... >>>> In the mean time also started a MIPS build for MT7620. >>>> >>>> But this afternoon is reserved for Xmas shopping, so I won't be back with >>>> results for a while. >>>> >>>> --WjW >>> >>> I’m glad it works for you :-) >>> Yeah, I’m probably not going to be around myself starting tomorrow evening until the beginning of the new year sometime… I’ll read my e-mails, but won’t be able to do any work most likely. >> >> I see that the image searches for a bootdis called: >> /dev/ada0s1 >> >> So if I attach a disk on my build machine >> slice it up (dangerously) >> partition it the classic way >> install the mips stuff on it >> >> I run the risk that it will boot. :) >> >> Happy holidays, >> --WjW > > It boots for me. I am using an old laptop HDD with MBR and if I recall correctly I simply did a newfs on the partition on which I installed the mips world. That was a nice idea. Had some old cased disk lying about with Seagate USB-SATA convertors. used one of them to load (over USB) and then attached and rebooted. Guess I need to make /etc/fstab... And the openssl took quite some time to actually get thru. --WjW random: harvesting attach, 8 bytes (4 bits) from ahcich0 ahcich1: at channel 1 on ahci0 ahcich1: Caps: HPCP random: harvesting attach, 8 bytes (4 bits) from ahcich1 random: harvesting attach, 8 bytes (4 bits) from ahci0 random: harvesting attach, 8 bytes (4 bits) from pci3 random: harvesting attach, 8 bytes (4 bits) from pcib3 random: harvesting attach, 8 bytes (4 bits) from pci0 random: harvesting attach, 8 bytes (4 bits) from pcib0 random: harvesting attach, 8 bytes (4 bits) from obio0 random: harvesting attach, 8 bytes (4 bits) from nexus0 Device configuration finished. Timecounters tick every 10.000 msec tcp_init: net.inet.tcp.tcbhashsize auto tuned to 4096 ahcich0: AHCI reset... ahcich0: SATA connect time=1800us status=00000113 ahcich0: AHCI reset: device found ahcich0: AHCI reset: device ready after 0ms ahcich1: AHCI reset... ahcich1: SATA connect timeout time=10000us status=00000000 ahcich1: AHCI reset: device not found ada0 at ahcich0 bus 0 scbus0 target 0 lun 0 ada0: ATA8-ACS SATA 1.x device ada0: Serial Number 5VCLCPT0 ada0: 150.000MB/s transfers (SATA 1.x, UDMA6, PIO 8192bytes) ada0: Command Queueing enabled ada0: 238475MB (488397168 512 byte sectors) pass0 at ahcich0 bus 0 scbus0 target 0 lun 0 pass0: ATA8-ACS SATA 1.x device pass0: Serial Number 5VCLCPT0 pass0: 150.000MB/s transfers (SATA 1.x, UDMA6, PIO 8192bytes) pass0: Command Queueing enabled Trying to mount root from ufs:/dev/ada0s1 []... GEOM: new disk ada0 warning: no time-of-day clock registered, system time will not be set accurately start_init: trying /sbin/init /etc/rc: WARNING: hostid: unable to figure out a UUID from DMI data, generating a new one Setting hostuuid: 10796b5d-a979-11e5-b35d-775cc491f70b. Setting hostid: 0x3cfed483. eval: cannot open /etc/fstab: No such file or directory No suitable dump device was found. eval: cannot open /etc/fstab: No such file or directory fstab: /etc/fstab:0: No such file or directory Warning! No /etc/fstab: skipping disk checks. fstab: /etc/fstab:0: No such file or directory Mounting local file systems:fstab: /etc/fstab:0: No such file or directory . /etc/rc: WARNING: $hostname is not set -- see rc.conf(5). Setting up harvesting:[UMA],[FS_ATIME],SWI,INTERRUPT,NET_NG,NET_ETHER,NET_TUN,MOUSE,KEYBOARD,ATTACH,CACHED Feeding entropy:random: unblocking device. . Starting Network: lo0. lo0: flags=8049 metric 0 mtu 16384 options=600003 inet 127.0.0.1 netmask 0xff000000 groups: lo ELF ldconfig path: /lib /usr/lib /usr/lib/compat Starting devd. Generating host.conf. fstab: /etc/fstab:0: No such file or directory fstab: /etc/fstab:0: No such file or directory Creating and/or trimming log files. Starting syslogd. Starting casperd. Clearing /tmp (X related). Updating motd:. Mounting late file systems:fstab: /etc/fstab:0: No such file or directory . fstab: /etc/fstab:0: No such file or directory load: 0.88 cmd: openssl 412 [runnable] 14.47r 14.35u 0.04s 79% 4684k Script /etc/rc.d/sendmail running Starting sendmail_submit. Starting sendmail_msp_queue. Starting cron. eval: cannot open /etc/fstab: No such file or directory Starting background file system checks in 60 seconds. Wed Dec 23 13:29:20 UTC 2015 FreeBSD/mips (Amnesiac) (ttyu0) login: From owner-freebsd-mips@freebsd.org Thu Dec 24 04:09:17 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5BBB0A502C7 for ; Thu, 24 Dec 2015 04:09:17 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22b.google.com (mail-io0-x22b.google.com [IPv6:2607:f8b0:4001:c06::22b]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2DE9617A9 for ; Thu, 24 Dec 2015 04:09:17 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x22b.google.com with SMTP id o67so233231055iof.3 for ; Wed, 23 Dec 2015 20:09:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:date:message-id:subject:from:to:content-type; bh=LY1V7CQw2dsIkHm+LbpQMPvE/SPkwEcHB9CWc1ADvZw=; b=mrlxdDixJ81MtzgH1UTv/XZAP8JPSz434RzulIMaqQBrh8oSd8SBXX+FB5vVjjp5Zv 1TAi6ikjZNqeyArMNqafcLss4RiaY+DCEylVqlDTLPXlilFOdX0H+W2/XYXwzOQrocYC SchHP/x7HXYFlm2NaTAeE2LWEREZ1deRR0PYLNqubbzQjJAuCpcacxN8mD1pvvD5F4vj +TwsB1URKVNYMktIvB7J+5inv/Vmp84VauweX123UjOfF/0x5ed0MZ1Xfw8tXAFWshVQ oB622016FI9xfzsuu8W45q2KkixWg1opyBYHwU+HVv/WNl0XFD8foFJrDaKyIahne4Bc oUsA== MIME-Version: 1.0 X-Received: by 10.107.162.21 with SMTP id l21mr32663975ioe.123.1450930156582; Wed, 23 Dec 2015 20:09:16 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.36.121.202 with HTTP; Wed, 23 Dec 2015 20:09:16 -0800 (PST) Date: Wed, 23 Dec 2015 20:09:16 -0800 X-Google-Sender-Auth: Sob4nDgbAiBfzv5gQFooDucRFrc Message-ID: Subject: mt7620 works! From: Adrian Chadd To: "freebsd-mips@freebsd.org" , Stanislav Galabov Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2015 04:09:17 -0000 Hi, The basic mt7620 bits are up! This is netbooting a tplink archer-c2 router. Time to do some more code review and start getting it into the tree! Thanks Stanslav/Ray! -a U-Boot 1.1.3 (Jun 23 2014 - 15:15:14) Board: Ralink APSoC DRAM: 64 MB relocate_code Pointer at: 83fb0000 enable ephy clock...done. rf reg 29 = 5 SSC disabled. ------------------ Archer C2 v1.0.0 ------------------ spi_wait_nsec: 29 spi device id: ef 40 17 0 0 (40170000) find flash: W25Q64BV ============================================ Ralink UBoot Version: 4.1.2.0 -------------------------------------------- ASIC 7620_MP (Port5<->GigaSW) DRAM component: 512 Mbits DDR, width 16 DRAM bus: 16 bit Total memory: 64 MBytes Flash component: SPI Flash Date:Jun 23 2014 Time:15:15:14 ============================================ icache: sets:512, ways:4, linesz:32 ,total:65536 dcache: sets:256, ways:4, linesz:32 ,total:32768 ##### The CPU freq = 580 MHZ #### estimate memory size =64 Mbytes 0 TODO, Read MAC Address from Flash switch BootType: rt_rtl8367_init(1363):Begin RTL8367RB is ready now! rt_rtl8367_init(1404):Call Func rt_rtl8367_enableRgmii() rt_rtl8367_enableRgmii(931):Begin 4: System Enter Boot Command Line Interface. U-Boot 1.1.3 (Jun 23 2014 - 15:15:14) MT7620 # pltpl MT7620 # tftpboot 0x80050000 kernel.MT7620 netboot_common, argc= 3 NetTxPacket = 0x83FE57C0 KSEG1ADDR(NetTxPacket) = 0xA3FE57C0 NetLoop,call eth_halt ! NetLoop,call eth_init ! Trying Eth0 (10/100-M) Waitting for RX_DMA_BUSY status Start... done ETH_STATE_ACTIVE!! TFTP from server 192.168.0.100; our IP address is 192.168.0.1 Filename 'kernel.MT7620'. TIMEOUT_COUNT=10,Load address: 0x80050000 Loading: Got ARP REPLY, set server/gtwy eth addr (00:21:cc:6a:7d:16) Got it ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ################################################################# ############# done Bytes transferred = 5722431 (57513f hex) NetBootFileXferSize= 0057513f MT7620 # go 0x80050120 ## Starting application at 0x80050120 ... U-Boot args (from 0 args): None Environment: (0x80000010) entry: mips_init() Cache info: picache_stride = 4096 picache_loopcount = 16 pdcache_stride = 4096 pdcache_loopcount = 8 cpu0: MIPS Technologies processor v80.150 MMU: Standard TLB, 32 entries (4K 16K 64K 256K 1M 16M 64M 256M pg sizes) L1 i-cache: 4 ways of 512 sets, 32 bytes per line L1 d-cache: 4 ways of 256 sets, 32 bytes per line L2 cache: disabled Config1=0xbee3519e Config2=0x80000000 Config3=0x2420 Physical memory chunk(s): 0x4f8000 - 0x1ffffff, 28344320 bytes (6920 pages) Maxmem is 0x2000000 KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2015 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 11.0-CURRENT #3 90c00a6(local/adrian_mt7620)-dirty: Wed Dec 23 20:04:04 PST 2015 adrian@victoria:/usr/home/adrian/git/github/erikarn/obj/mipsel_ap/mips.mipsel/usr/home/adrian/git/github/erikarn/freebsd/sys/MT7620 mips gcc version 4.2.1 20070831 patched [FreeBSD] Preloaded elf kernel "kernel" at 0x804f23a0. real memory = 33554432 (32768K bytes) Physical memory chunk(s): 0x0058c000 - 0x01f46fff, 26980352 bytes (6587 pages) avail memory = 26566656 (25MB) ULE: setup cpu 0 random: entropy device external interface nfslock: pseudo-device null: mem: nexus0: clock0: on nexus0 Timecounter "MIPS32" frequency 290000000 Hz quality 800 Event timer "MIPS32" frequency 290000000 Hz quality 800 random: harvesting attach, 8 bytes (4 bits) from clock0 obio0 at mem 0x10000000-0x1fffffff on nexus0 rt305x_sysctl0: at mem 0x10000000-0x100000ff irq 0 on obio0 Chip ID: "MT7620 " SYSCTL_SYSCFG=0x122122 GE0 mode 0 Big Endian Boot from 2 Bootstrap test code 33 SRAM_CS mode 0 8mA SDRAM_CLK driving SYSCTL_CLKCFG0=0x40200000 SDRAM_CLK_SKEW 1ns SYSCTL_CLKCFG1=0x75afffc0 Pbus clock is 1/2 of System clock USB OTG clock is enabled I2S clock is enabled I2S clock is external I2S clock divider 63 PCM clock is enabled PCM clock is external PCM clock divider 0 SYSCTL_GPIOMODE=0x1ab11d random: harvesting attach, 8 bytes (4 bits) from rt305x_sysctl0 rt305x_ic0: at mem 0x10000200-0x100002ff on obio0 random: harvesting attach, 8 bytes (4 bits) from rt305x_ic0 uart0: at mem 0x10000500-0x100005ff irq 5 on obio0 uart0: fast interrupt uart0: PPS capture mode 2 (DCD) random: harvesting attach, 8 bytes (4 bits) from uart0 spi0: at mem 0x10000b00-0x10000bff on obio0 spibus0: on spi0 mx25l0: at cs 0 on spibus0 mx25l0: w25q64, sector 65536 bytes, 128 sectors random: harvesting attach, 8 bytes (4 bits) from mx25l0 random: harvesting attach, 8 bytes (4 bits) from spibus0 random: harvesting attach, 8 bytes (4 bits) from spi0 uart1: at mem 0x10000c00-0x10000cff irq 12 on obio0 uart1: console (115200,n,8,1) uart1: fast interrupt uart1: PPS capture mode 2 (DCD) random: harvesting attach, 8 bytes (4 bits) from uart1 ehci0: at mem 0x101c0000-0x101c0fff irq 18 on obio0 usbus0: EHCI version 1.0 usbus0 on ehci0 ehci0: usbpf: Attached random: harvesting attach, 8 bytes (4 bits) from usbus0 random: harvesting attach, 8 bytes (4 bits) from ehci0 random: harvesting attach, 8 bytes (4 bits) from obio0 pcib0 at mem 0x10140000-0x1016ffff on nexus0 PCI 1:0:0: reg 10: smask=fff00000: addr=20000000 PCI 1:0:1: reg 10: smask=fff00000: addr=20100000 pci0: on pcib0 pci0: domain=0, physical bus=0 found-> vendor=0x1814, dev=0x0801, revid=0x01 domain=0, bus=0, slot=0, func=0 class=06-04-00, hdrtype=0x01, mfdev=0 cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=255 powerspec 3 supports D0 D1 D3 current D0 MSI supports 1 message, 64 bit map[10]: type Memory, range 32, base 0, size 31, enabled pcib1: at device 0.0 on pci0 pcib1: domain 0 pcib1: secondary bus 1 pcib1: subordinate bus 1 pcib1: memory decode 0x20000000-0x2fffffff pci1: on pcib1 pci1: domain=0, physical bus=1 found-> vendor=0x14c3, dev=0x7650, revid=0x00 domain=0, bus=1, slot=0, func=0 class=02-80-00, hdrtype=0x00, mfdev=1 cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=255 powerspec 3 supports D0 D3 current D0 MSI supports 1 message, 64 bit map[10]: type Memory, range 32, base 0x20000000, size 20, enabled pcib1: requested memory range 0x20000000-0x200fffff: good found-> vendor=0x14c3, dev=0x8650, revid=0x00 domain=0, bus=1, slot=0, func=1 class=0d-11-00, hdrtype=0x00, mfdev=1 cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) intpin=a, irq=255 powerspec 3 supports D0 D1 D3 current D0 MSI supports 1 message, 64 bit map[10]: type Memory, range 32, base 0x20100000, size 20, enabled pcib1: requested memory range 0x20100000-0x201fffff: good found-> vendor=0x0000, dev=0x0000, revid=0x00 domain=0, bus=1, slot=0, func=2 class=00-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) found-> vendor=0x0000, dev=0x0000, revid=0x00 domain=0, bus=1, slot=0, func=3 class=00-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) found-> vendor=0x0000, dev=0x0000, revid=0x00 domain=0, bus=1, slot=0, func=4 class=00-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) found-> vendor=0x0000, dev=0x0000, revid=0x00 domain=0, bus=1, slot=0, func=5 class=00-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) found-> vendor=0x0000, dev=0x0000, revid=0x00 domain=0, bus=1, slot=0, func=6 class=00-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) found-> vendor=0x0000, dev=0x0000, revid=0x00 domain=0, bus=1, slot=0, func=7 class=00-00-00, hdrtype=0x00, mfdev=0 cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords) lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) pci1: at device 0.0 (no driver attached) pci1: at device 0.1 (no driver attached) pci1: at device 0.2 (no driver attached) pci1: at device 0.3 (no driver attached) pci1: at device 0.4 (no driver attached) pci1: at device 0.5 (no driver attached) pci1: at device 0.6 (no driver attached) pci1: at device 0.7 (no driver attached) random: harvesting attach, 8 bytes (4 bits) from pci1 random: harvesting attach, 8 bytes (4 bits) from pcib1 random: harvesting attach, 8 bytes (4 bits) from pci0 random: harvesting attach, 8 bytes (4 bits) from pcib0 rt0: at mem 0x10100000-0x1010ffff irq 3 on nexus0 rt0: RT7620 Ethernet MAC (rev 0x00000000) rt0: use hardcoded 00:18:e7:d5:83:90 macaddr rt0: bpf attached rt0: Ethernet address: 00:18:e7:d5:83:90 random: harvesting attach, 8 bytes (4 bits) from rt0 random: harvesting attach, 8 bytes (4 bits) from nexus0 Device configuration finished. Timecounters tick every 10.000 msec vlan: initialized, using hash tables with chaining tcp_init: net.inet.tcp.tcbhashsize auto tuned to 512 lo0: bpf attached GEOM: new disk flash/spi0 usbus0: 480Mbps High Speed USB v2.0 Trying to mount root from ufs:da0s1 []... Root mount waiting for: usbus0 ugen0.1: at usbus0 uhub0: on usbus0 uhub0: 1 port with 1 removable, self powered random: harvesting attach, 8 bytes (4 bits) from uhub0 mountroot: waiting for device da0s1... Mounting from ufs:da0s1 failed with error 19. Loader variables: Manual root filesystem specification: : [options] Mount using filesystem and with the specified (optional) option list. eg. ufs:/dev/da0s1a zfs:tank cd9660:/dev/cd0 ro (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) ? List valid disk boot devices . Yield 1 second (for background tasks) Abort manual input mountroot> From owner-freebsd-mips@freebsd.org Thu Dec 24 10:54:49 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7ACEBA510F1 for ; Thu, 24 Dec 2015 10:54:49 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from smtp.dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id A9EA7189A; Thu, 24 Dec 2015 10:54:48 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from terran (unknown [192.168.99.1]) (Authenticated sender: ray) by smtp.dlink.ua (Postfix) with ESMTPSA id 97AF5C4951; Thu, 24 Dec 2015 12:54:40 +0200 (EET) Date: Thu, 24 Dec 2015 12:55:20 +0200 From: Aleksandr Rybalko To: Adrian Chadd Cc: "freebsd-mips@freebsd.org" , Stanislav Galabov Subject: Re: mt7620 works! Message-Id: <20151224125520.bf2b18bbd7801379f90d80d6@ddteam.net> In-Reply-To: References: X-Mailer: Sylpheed 3.4.2 (GTK+ 2.24.25; amd64-portbld-freebsd10.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2015 10:54:49 -0000 On Wed, 23 Dec 2015 20:09:16 -0800 Adrian Chadd wrote: > Hi, > > The basic mt7620 bits are up! > > This is netbooting a tplink archer-c2 router. > > Time to do some more code review and start getting it into the tree! > > Thanks Stanslav/Ray! You forget to thanks to Aleksandr Mityaev :-D > > -a > > U-Boot 1.1.3 (Jun 23 2014 - 15:15:14) > > Board: Ralink APSoC DRAM: 64 MB > relocate_code Pointer at: 83fb0000 > enable ephy clock...done. rf reg 29 = 5 > SSC disabled. > ------------------ > Archer C2 v1.0.0 > ------------------ > spi_wait_nsec: 29 > spi device id: ef 40 17 0 0 (40170000) > find flash: W25Q64BV > ============================================ > Ralink UBoot Version: 4.1.2.0 > -------------------------------------------- > ASIC 7620_MP (Port5<->GigaSW) > DRAM component: 512 Mbits DDR, width 16 > DRAM bus: 16 bit > Total memory: 64 MBytes > Flash component: SPI Flash > Date:Jun 23 2014 Time:15:15:14 > ============================================ > icache: sets:512, ways:4, linesz:32 ,total:65536 > dcache: sets:256, ways:4, linesz:32 ,total:32768 > > ##### The CPU freq = 580 MHZ #### > estimate memory size =64 Mbytes > 0 > TODO, Read MAC Address from Flash > > switch BootType: > rt_rtl8367_init(1363):Begin > > RTL8367RB is ready now! > rt_rtl8367_init(1404):Call Func rt_rtl8367_enableRgmii() > rt_rtl8367_enableRgmii(931):Begin > > 4: System Enter Boot Command Line Interface. > > U-Boot 1.1.3 (Jun 23 2014 - 15:15:14) > MT7620 # pltpl > MT7620 # tftpboot 0x80050000 kernel.MT7620 > > netboot_common, argc= 3 > > NetTxPacket = 0x83FE57C0 > > KSEG1ADDR(NetTxPacket) = 0xA3FE57C0 > > NetLoop,call eth_halt ! > > NetLoop,call eth_init ! > Trying Eth0 (10/100-M) > > Waitting for RX_DMA_BUSY status Start... done > > > ETH_STATE_ACTIVE!! > TFTP from server 192.168.0.100; our IP address is 192.168.0.1 > Filename 'kernel.MT7620'. > > TIMEOUT_COUNT=10,Load address: 0x80050000 > Loading: Got ARP REPLY, set server/gtwy eth addr (00:21:cc:6a:7d:16) > Got it > ################################################################# > ################################################################# > ################################################################# > ################################################################# > ################################################################# > ################################################################# > ################################################################# > ################################################################# > ################################################################# > ################################################################# > ################################################################# > ################################################################# > ################################################################# > ################################################################# > ################################################################# > ################################################################# > ################################################################# > ############# > done > Bytes transferred = 5722431 (57513f hex) > NetBootFileXferSize= 0057513f > MT7620 # go 0x80050120 > ## Starting application at 0x80050120 ... > U-Boot args (from 0 args): > None > Environment: (0x80000010) > entry: mips_init() > Cache info: > picache_stride = 4096 > picache_loopcount = 16 > pdcache_stride = 4096 > pdcache_loopcount = 8 > cpu0: MIPS Technologies processor v80.150 > MMU: Standard TLB, 32 entries (4K 16K 64K 256K 1M 16M 64M 256M pg sizes) > L1 i-cache: 4 ways of 512 sets, 32 bytes per line > L1 d-cache: 4 ways of 256 sets, 32 bytes per line > L2 cache: disabled Config1=0xbee3519e > Config2=0x80000000 > Config3=0x2420 > Physical memory chunk(s): > 0x4f8000 - 0x1ffffff, 28344320 bytes (6920 pages) > Maxmem is 0x2000000 > KDB: debugger backends: ddb > KDB: current backend: ddb > Copyright (c) 1992-2015 The FreeBSD Project. > Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 > The Regents of the University of California. All rights reserved. > FreeBSD is a registered trademark of The FreeBSD Foundation. > FreeBSD 11.0-CURRENT #3 90c00a6(local/adrian_mt7620)-dirty: Wed Dec 23 > 20:04:04 PST 2015 > adrian@victoria:/usr/home/adrian/git/github/erikarn/obj/mipsel_ap/mips.mipsel/usr/home/adrian/git/github/erikarn/freebsd/sys/MT7620 > mips > gcc version 4.2.1 20070831 patched [FreeBSD] > Preloaded elf kernel "kernel" at 0x804f23a0. > real memory = 33554432 (32768K bytes) > Physical memory chunk(s): > 0x0058c000 - 0x01f46fff, 26980352 bytes (6587 pages) > avail memory = 26566656 (25MB) > ULE: setup cpu 0 > random: entropy device external interface > nfslock: pseudo-device > null: > mem: > nexus0: > clock0: on nexus0 > Timecounter "MIPS32" frequency 290000000 Hz quality 800 > Event timer "MIPS32" frequency 290000000 Hz quality 800 > random: harvesting attach, 8 bytes (4 bits) from clock0 > obio0 at mem 0x10000000-0x1fffffff on nexus0 > rt305x_sysctl0: at mem > 0x10000000-0x100000ff irq 0 on obio0 > Chip ID: "MT7620 " > SYSCTL_SYSCFG=0x122122 > GE0 mode 0 > Big Endian > Boot from 2 > Bootstrap test code 33 > SRAM_CS mode 0 > 8mA SDRAM_CLK driving > SYSCTL_CLKCFG0=0x40200000 > SDRAM_CLK_SKEW 1ns > SYSCTL_CLKCFG1=0x75afffc0 > Pbus clock is 1/2 of System clock > USB OTG clock is enabled > I2S clock is enabled > I2S clock is external > I2S clock divider 63 > PCM clock is enabled > PCM clock is external > PCM clock divider 0 > SYSCTL_GPIOMODE=0x1ab11d > random: harvesting attach, 8 bytes (4 bits) from rt305x_sysctl0 > rt305x_ic0: at mem > 0x10000200-0x100002ff on obio0 > random: harvesting attach, 8 bytes (4 bits) from rt305x_ic0 > uart0: at mem 0x10000500-0x100005ff irq 5 on obio0 > uart0: fast interrupt > uart0: PPS capture mode 2 (DCD) > random: harvesting attach, 8 bytes (4 bits) from uart0 > spi0: at mem 0x10000b00-0x10000bff on obio0 > spibus0: on spi0 > mx25l0: at cs 0 on spibus0 > mx25l0: w25q64, sector 65536 bytes, 128 sectors > random: harvesting attach, 8 bytes (4 bits) from mx25l0 > random: harvesting attach, 8 bytes (4 bits) from spibus0 > random: harvesting attach, 8 bytes (4 bits) from spi0 > uart1: at mem 0x10000c00-0x10000cff irq 12 on obio0 > uart1: console (115200,n,8,1) > uart1: fast interrupt > uart1: PPS capture mode 2 (DCD) > random: harvesting attach, 8 bytes (4 bits) from uart1 > ehci0: at mem > 0x101c0000-0x101c0fff irq 18 on obio0 > usbus0: EHCI version 1.0 > usbus0 on ehci0 > ehci0: usbpf: Attached > random: harvesting attach, 8 bytes (4 bits) from usbus0 > random: harvesting attach, 8 bytes (4 bits) from ehci0 > random: harvesting attach, 8 bytes (4 bits) from obio0 > pcib0 at mem 0x10140000-0x1016ffff on nexus0 > PCI 1:0:0: reg 10: smask=fff00000: addr=20000000 > PCI 1:0:1: reg 10: smask=fff00000: addr=20100000 > pci0: on pcib0 > pci0: domain=0, physical bus=0 > found-> vendor=0x1814, dev=0x0801, revid=0x01 > domain=0, bus=0, slot=0, func=0 > class=06-04-00, hdrtype=0x01, mfdev=0 > cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords) > lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) > intpin=a, irq=255 > powerspec 3 supports D0 D1 D3 current D0 > MSI supports 1 message, 64 bit > map[10]: type Memory, range 32, base 0, size 31, enabled > pcib1: at device 0.0 on pci0 > pcib1: domain 0 > pcib1: secondary bus 1 > pcib1: subordinate bus 1 > pcib1: memory decode 0x20000000-0x2fffffff > pci1: on pcib1 > pci1: domain=0, physical bus=1 > found-> vendor=0x14c3, dev=0x7650, revid=0x00 > domain=0, bus=1, slot=0, func=0 > class=02-80-00, hdrtype=0x00, mfdev=1 > cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords) > lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) > intpin=a, irq=255 > powerspec 3 supports D0 D3 current D0 > MSI supports 1 message, 64 bit > map[10]: type Memory, range 32, base 0x20000000, size 20, enabled > pcib1: requested memory range 0x20000000-0x200fffff: good > found-> vendor=0x14c3, dev=0x8650, revid=0x00 > domain=0, bus=1, slot=0, func=1 > class=0d-11-00, hdrtype=0x00, mfdev=1 > cmdreg=0x0007, statreg=0x0010, cachelnsz=16 (dwords) > lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) > intpin=a, irq=255 > powerspec 3 supports D0 D1 D3 current D0 > MSI supports 1 message, 64 bit > map[10]: type Memory, range 32, base 0x20100000, size 20, enabled > pcib1: requested memory range 0x20100000-0x201fffff: good > found-> vendor=0x0000, dev=0x0000, revid=0x00 > domain=0, bus=1, slot=0, func=2 > class=00-00-00, hdrtype=0x00, mfdev=0 > cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords) > lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) > found-> vendor=0x0000, dev=0x0000, revid=0x00 > domain=0, bus=1, slot=0, func=3 > class=00-00-00, hdrtype=0x00, mfdev=0 > cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords) > lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) > found-> vendor=0x0000, dev=0x0000, revid=0x00 > domain=0, bus=1, slot=0, func=4 > class=00-00-00, hdrtype=0x00, mfdev=0 > cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords) > lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) > found-> vendor=0x0000, dev=0x0000, revid=0x00 > domain=0, bus=1, slot=0, func=5 > class=00-00-00, hdrtype=0x00, mfdev=0 > cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords) > lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) > found-> vendor=0x0000, dev=0x0000, revid=0x00 > domain=0, bus=1, slot=0, func=6 > class=00-00-00, hdrtype=0x00, mfdev=0 > cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords) > lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) > found-> vendor=0x0000, dev=0x0000, revid=0x00 > domain=0, bus=1, slot=0, func=7 > class=00-00-00, hdrtype=0x00, mfdev=0 > cmdreg=0x0000, statreg=0x0000, cachelnsz=0 (dwords) > lattimer=0x00 (0 ns), mingnt=0x00 (0 ns), maxlat=0x00 (0 ns) > pci1: at device 0.0 (no driver attached) > pci1: at device 0.1 (no driver attached) > pci1: at device 0.2 (no driver attached) > pci1: at device 0.3 (no driver attached) > pci1: at device 0.4 (no driver attached) > pci1: at device 0.5 (no driver attached) > pci1: at device 0.6 (no driver attached) > pci1: at device 0.7 (no driver attached) > random: harvesting attach, 8 bytes (4 bits) from pci1 > random: harvesting attach, 8 bytes (4 bits) from pcib1 > random: harvesting attach, 8 bytes (4 bits) from pci0 > random: harvesting attach, 8 bytes (4 bits) from pcib0 > rt0: at mem > 0x10100000-0x1010ffff irq 3 on nexus0 > rt0: RT7620 Ethernet MAC (rev 0x00000000) > rt0: use hardcoded 00:18:e7:d5:83:90 macaddr > rt0: bpf attached > rt0: Ethernet address: 00:18:e7:d5:83:90 > random: harvesting attach, 8 bytes (4 bits) from rt0 > random: harvesting attach, 8 bytes (4 bits) from nexus0 > Device configuration finished. > Timecounters tick every 10.000 msec > vlan: initialized, using hash tables with chaining > tcp_init: net.inet.tcp.tcbhashsize auto tuned to 512 > lo0: bpf attached > GEOM: new disk flash/spi0 > usbus0: 480Mbps High Speed USB v2.0 > Trying to mount root from ufs:da0s1 []... > Root mount waiting for: usbus0 > ugen0.1: at usbus0 > uhub0: on usbus0 > uhub0: 1 port with 1 removable, self powered > random: harvesting attach, 8 bytes (4 bits) from uhub0 > mountroot: waiting for device da0s1... > Mounting from ufs:da0s1 failed with error 19. > > Loader variables: > > Manual root filesystem specification: > : [options] > Mount using filesystem > and with the specified (optional) option list. > > eg. ufs:/dev/da0s1a > zfs:tank > cd9660:/dev/cd0 ro > (which is equivalent to: mount -t cd9660 -o ro /dev/cd0 /) > > ? List valid disk boot devices > . Yield 1 second (for background tasks) > Abort manual input > > mountroot> > _______________________________________________ > freebsd-mips@freebsd.org mailing list > https://lists.freebsd.org/mailman/listinfo/freebsd-mips > To unsubscribe, send any mail to "freebsd-mips-unsubscribe@freebsd.org" -- Aleksandr Rybalko From owner-freebsd-mips@freebsd.org Thu Dec 24 13:36:23 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F2580A50A39 for ; Thu, 24 Dec 2015 13:36:23 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (unknown [IPv6:2001:4cb8:90:ffff::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id BD51B19B2; Thu, 24 Dec 2015 13:36:23 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 6733515344D; Thu, 24 Dec 2015 14:36:19 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id gt5XHu199RmW; Thu, 24 Dec 2015 14:36:02 +0100 (CET) Received: from [IPv6:2001:4cb8:3:1:91d7:9f41:d220:1afc] (unknown [IPv6:2001:4cb8:3:1:91d7:9f41:d220:1afc]) by smtp.digiware.nl (Postfix) with ESMTP id 921E6153413; Thu, 24 Dec 2015 14:36:02 +0100 (CET) Subject: Re: mt7620 works! To: Adrian Chadd , "freebsd-mips@freebsd.org" , Stanislav Galabov References: From: Willem Jan Withagen Organization: Digiware Management b.v. Message-ID: <567BF4AB.9020904@digiware.nl> Date: Thu, 24 Dec 2015 14:35:39 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2015 13:36:24 -0000 On 24-12-2015 05:09, Adrian Chadd wrote: > rt0: at mem > 0x10100000-0x1010ffff irq 3 on nexus0 > rt0: RT7620 Ethernet MAC (rev 0x00000000) > rt0: use hardcoded 00:18:e7:d5:83:90 macaddr > rt0: bpf attached > rt0: Ethernet address: 00:18:e7:d5:83:90 Is looks like this is an onchip ethernet controller. Which is not detected in the boot of my WiTiBoard MT7621. What needs to be done to get it running on this board? Or are this patches not jet in the tree, and/or distributed here? --WjW BTW WITiboard now go through AliExpress: http://www.aliexpress.com/item/WiTi-Board-Extensible-Powerful-Wifi-Router/32523122606.html?spm=2114.01020208.3.8.crUD8y&ws_ab_test=searchweb201556_2_79_78_77_80,searchweb201644_5,searchweb201560_9 From owner-freebsd-mips@freebsd.org Thu Dec 24 14:15:16 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 505F1A51712 for ; Thu, 24 Dec 2015 14:15:16 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-vk0-x22f.google.com (mail-vk0-x22f.google.com [IPv6:2607:f8b0:400c:c05::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 2332D11BD; Thu, 24 Dec 2015 14:15:16 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by mail-vk0-x22f.google.com with SMTP id k1so21178144vkb.2; Thu, 24 Dec 2015 06:15:16 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=wpgfaRFKBE8Zp0roKxgd5o0XwXENpwwYGAYcuPN+24k=; b=MqTsTX1XV19nQA494eg4pTNOT2R2VSYlFWjipRDaaMW92kOMYgnjswRin+Du530Pdp ugCbunDsNc4VMyK6+fHv7mMwyOVLaI0AUahAgsoH4Vb8h46QNBoqhZGOSsQymz088oKo 8JOHcAIz98MXnt/p5I4ualsSakz+B2ArUBslbMx70eBsj6RQyIZYcmKfJLXMbGFOBt/0 65QmZTtIHLe8bGV2QYNLYErvO4ewRaoqqvY/uquHmtzPh1gkamCm7l+UyLinfzGTXGSO 2PX7F8oQJURU69LRuVNFgZxT443Sm5/t2v9NWq+oeeGyvROwRAeMOzfgZRZSrViQXhxg a0cQ== MIME-Version: 1.0 X-Received: by 10.31.179.80 with SMTP id c77mr20737109vkf.50.1450966514968; Thu, 24 Dec 2015 06:15:14 -0800 (PST) Received: by 10.31.175.201 with HTTP; Thu, 24 Dec 2015 06:15:14 -0800 (PST) In-Reply-To: <567BF4AB.9020904@digiware.nl> References: <567BF4AB.9020904@digiware.nl> Date: Thu, 24 Dec 2015 16:15:14 +0200 Message-ID: Subject: Re: mt7620 works! From: Stanislav Galabov To: Willem Jan Withagen Cc: Adrian Chadd , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2015 14:15:16 -0000 On Thu, Dec 24, 2015 at 3:35 PM, Willem Jan Withagen wrote: > On 24-12-2015 05:09, Adrian Chadd wrote: > > rt0: at mem >> 0x10100000-0x1010ffff irq 3 on nexus0 >> rt0: RT7620 Ethernet MAC (rev 0x00000000) >> rt0: use hardcoded 00:18:e7:d5:83:90 macaddr >> rt0: bpf attached >> rt0: Ethernet address: 00:18:e7:d5:83:90 >> > > Is looks like this is an onchip ethernet controller. > Which is not detected in the boot of my WiTiBoard MT7621. > > What needs to be done to get it running on this board? > Or are this patches not jet in the tree, and/or distributed here? > I'll look into this more after the holidays. For now all I can say is I've seen the first packets out of the Ethernet port of my MT7621 board under FreeBSD. :-) Best wishes, Stanislav From owner-freebsd-mips@freebsd.org Thu Dec 24 14:29:43 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 0BAB3A51AB8 for ; Thu, 24 Dec 2015 14:29:43 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (unknown [IPv6:2001:4cb8:90:ffff::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id CB30318E2; Thu, 24 Dec 2015 14:29:42 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id E6D41153466; Thu, 24 Dec 2015 15:29:40 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PKOlVu2uUOYw; Thu, 24 Dec 2015 15:29:22 +0100 (CET) Received: from [IPv6:2001:4cb8:3:1:91d7:9f41:d220:1afc] (unknown [IPv6:2001:4cb8:3:1:91d7:9f41:d220:1afc]) by smtp.digiware.nl (Postfix) with ESMTP id 56358153408; Thu, 24 Dec 2015 15:19:36 +0100 (CET) Subject: Re: mt7620 works! To: Stanislav Galabov References: <567BF4AB.9020904@digiware.nl> Cc: Adrian Chadd , "freebsd-mips@freebsd.org" From: Willem Jan Withagen Organization: Digiware Management b.v. Message-ID: <567BFEE3.6030306@digiware.nl> Date: Thu, 24 Dec 2015 15:19:15 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2015 14:29:43 -0000 On 24-12-2015 15:15, Stanislav Galabov wrote: > On Thu, Dec 24, 2015 at 3:35 PM, Willem Jan Withagen > wrote: > > On 24-12-2015 05:09, Adrian Chadd wrote: > > rt0: at mem > 0x10100000-0x1010ffff irq 3 on nexus0 > rt0: RT7620 Ethernet MAC (rev 0x00000000) > rt0: use hardcoded 00:18:e7:d5:83:90 macaddr > rt0: bpf attached > rt0: Ethernet address: 00:18:e7:d5:83:90 > > > Is looks like this is an onchip ethernet controller. > Which is not detected in the boot of my WiTiBoard MT7621. > > What needs to be done to get it running on this board? > Or are this patches not jet in the tree, and/or distributed here? > > > I'll look into this more after the holidays. For now all I can say is > I've seen the first packets out of the Ethernet port of my MT7621 board > under FreeBSD. :-) Hi Stanislave, Most likely you have them already, but ... If of any use, the documentation of the WiTiBoard is in: http://ftp.mqmaker.com/WiTi/ Which also includes the hardware and software docs of the MT7621, 7612,7602 --WjW From owner-freebsd-mips@freebsd.org Thu Dec 24 14:45:43 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B77B0A4F12E for ; Thu, 24 Dec 2015 14:45:43 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-wm0-x22d.google.com (mail-wm0-x22d.google.com [IPv6:2a00:1450:400c:c09::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 574EA125A; Thu, 24 Dec 2015 14:45:43 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by mail-wm0-x22d.google.com with SMTP id p187so182104589wmp.1; Thu, 24 Dec 2015 06:45:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=dodLkxymq3lt6sSElF0Fscs0nOqmuGl2nE6I6KyKeX0=; b=MvPmd9tEAGHGBCMQjSVpPcjwPkpBGjnEGV5Vdgj/RTcYEdWNSl9XZ4HmAAV8El8dG0 CWz0A8DdDE9l8X1SgNKni9ZrL3T09SMUkfJVhh3IdNez2FQ0IHt8lSpj65uWI4hREtno E9b74rhGpwr350wMGLqpCJMc1P6sbYeXzbCd03tKwG8CG9+BugOFiD5eV6fTXty3wIGP 4vKRg3n1wVBVIN47/gGTdhbsYvoboAmZ5d3mNRe+VhbISiR1dJwO2qt3fz7igQtJ36gw 7QeFBLtdCwZvWI5/OD+CYr+RP732Lj4/RH4ESgvYBkq1PFHm2RZ8mhjbt/02IJuFSUMf khqQ== X-Received: by 10.194.6.37 with SMTP id x5mr17138725wjx.178.1450968341527; Thu, 24 Dec 2015 06:45:41 -0800 (PST) Received: from [10.0.50.3] ([94.155.70.123]) by smtp.gmail.com with ESMTPSA id cs4sm41930888wjc.10.2015.12.24.06.45.40 (version=TLSv1/SSLv3 cipher=OTHER); Thu, 24 Dec 2015 06:45:40 -0800 (PST) References: <567BF4AB.9020904@digiware.nl> <567BFEE3.6030306@digiware.nl> Mime-Version: 1.0 (1.0) In-Reply-To: <567BFEE3.6030306@digiware.nl> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-Id: <73FD8DD1-83DC-4E88-8594-5AEC13159C86@gmail.com> Cc: Adrian Chadd , "freebsd-mips@freebsd.org" X-Mailer: iPad Mail (12A405) From: Stanislav Galabov Subject: Re: mt7620 works! Date: Thu, 24 Dec 2015 16:45:41 +0200 To: Willem Jan Withagen X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2015 14:45:43 -0000 > Hi Stanislave, > > Most likely you have them already, but ... > If of any use, the documentation of the WiTiBoard is in: > http://ftp.mqmaker.com/WiTi/ > Which also includes the hardware and software docs of the MT7621, 7612,7602 > > --WjW I had seen these, but thanks for sharing with the list :-) Best wishes, Stanislav From owner-freebsd-mips@freebsd.org Thu Dec 24 15:25:54 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 46438A500E0 for ; Thu, 24 Dec 2015 15:25:54 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (unknown [IPv6:2001:4cb8:90:ffff::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 0CDB7199A; Thu, 24 Dec 2015 15:25:53 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 4A7F0153465; Thu, 24 Dec 2015 16:25:51 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id aGBEsoUCgPEE; Thu, 24 Dec 2015 16:25:33 +0100 (CET) Received: from [IPv6:2001:4cb8:3:1:91d7:9f41:d220:1afc] (unknown [IPv6:2001:4cb8:3:1:91d7:9f41:d220:1afc]) by smtp.digiware.nl (Postfix) with ESMTP id 97098153401; Thu, 24 Dec 2015 16:25:33 +0100 (CET) Subject: Re: mt7620 works! To: Stanislav Galabov References: <567BF4AB.9020904@digiware.nl> <567BFEE3.6030306@digiware.nl> <73FD8DD1-83DC-4E88-8594-5AEC13159C86@gmail.com> Cc: Adrian Chadd , "freebsd-mips@freebsd.org" From: Willem Jan Withagen Organization: Digiware Management b.v. Message-ID: <567C0E59.9040703@digiware.nl> Date: Thu, 24 Dec 2015 16:25:13 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <73FD8DD1-83DC-4E88-8594-5AEC13159C86@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2015 15:25:54 -0000 My serial port reports strange values: root@:~ # stty -a speed 57870 baud; 0 rows; 0 columns; quite odd baudrate. --WjW From owner-freebsd-mips@freebsd.org Thu Dec 24 18:43:37 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 28D60A50E90 for ; Thu, 24 Dec 2015 18:43:37 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-io0-x22d.google.com (mail-io0-x22d.google.com [IPv6:2607:f8b0:4001:c06::22d]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id F133418AF for ; Thu, 24 Dec 2015 18:43:36 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: by mail-io0-x22d.google.com with SMTP id o67so247845799iof.3 for ; Thu, 24 Dec 2015 10:43:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=6bCsVXAjFJUY1uiTNvgov4D3LfOB4+550CbFfk5fUwY=; b=RAYXYviThwU6s6KQXlYui3JDIGb9Xh8UjFHWv5rew/Jt+kfEHVFJAv25fV9x83ZPVH ZXaYoozAtI+FxwFeVQtmk4KsGF+x3Sduat164EFZ35a9LZAw5uWaI5ZqNSl7ZTdgZt8I aW5kSedxDe9VZ46f0A4ACYnGjsMEYAuPg57Nk/qCKoEH5ucxTyKK5KLa3neH/EvKRtLz zqKl+wd5hxaufoSkcbEyhbSypRmxQ/mIpDWJLIrF8zPQnz8Z5t24rzVuJhz1Rr1HMkiF TGMjAsIMQ/m59K7gcrnYDClj7D/vkXU4oFiqBtTAFq9Iaulh4rhmxQMMCqA+EUSZ82ne NrYw== MIME-Version: 1.0 X-Received: by 10.107.162.21 with SMTP id l21mr35512859ioe.123.1450982616371; Thu, 24 Dec 2015 10:43:36 -0800 (PST) Received: by 10.36.121.202 with HTTP; Thu, 24 Dec 2015 10:43:36 -0800 (PST) Date: Thu, 24 Dec 2015 10:43:36 -0800 Message-ID: Subject: initial rt5350/mt7620 support is in -head From: Adrian Chadd To: "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 24 Dec 2015 18:43:37 -0000 hiya, I've committed the initial rt5350 and mt7620 work from Stanislav and Alexander into -HEAD. This includes changes to rt so networking somewhat works. I'm sure he'd love help figuring out why resetting the ethernet bits stops it working :( I'll finish merging stuff into -HEAD today so we can continue development and tidyup. I'm hoping to leverage working ethernet to bring up the switch driver on the MT7620 and then see about teaching if_ral about this SoC. Thanks everyone! -a From owner-freebsd-mips@freebsd.org Fri Dec 25 14:42:12 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 57FF9A516A4 for ; Fri, 25 Dec 2015 14:42:12 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (unknown [IPv6:2001:4cb8:90:ffff::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 22FA414C9; Fri, 25 Dec 2015 14:42:11 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 02BA4153465; Fri, 25 Dec 2015 15:42:08 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id v5mQEGqfcjGx; Fri, 25 Dec 2015 15:41:48 +0100 (CET) Received: from [IPv6:2001:4cb8:3:1:e175:e31f:fdb8:d9ba] (unknown [IPv6:2001:4cb8:3:1:e175:e31f:fdb8:d9ba]) by smtp.digiware.nl (Postfix) with ESMTP id 382FF15340D; Fri, 25 Dec 2015 15:41:48 +0100 (CET) Subject: Re: mt7620 works! To: Stanislav Galabov References: <567BF4AB.9020904@digiware.nl> <567BFEE3.6030306@digiware.nl> <73FD8DD1-83DC-4E88-8594-5AEC13159C86@gmail.com> Cc: Adrian Chadd , "freebsd-mips@freebsd.org" From: Willem Jan Withagen Organization: Digiware Management b.v. Message-ID: <567D5593.4060302@digiware.nl> Date: Fri, 25 Dec 2015 15:41:23 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <73FD8DD1-83DC-4E88-8594-5AEC13159C86@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Dec 2015 14:42:12 -0000 On 24-12-2015 15:45, Stanislav Galabov wrote: > >> Hi Stanislave, >> >> Most likely you have them already, but ... >> If of any use, the documentation of the WiTiBoard is in: >> http://ftp.mqmaker.com/WiTi/ >> Which also includes the hardware and software docs of the MT7621, 7612,7602 >> >> --WjW > > I had seen these, but thanks for sharing with the list :-) Hi, syslog: freetest tftpd[12135]: 10.10.10.123: read request for //test.bin: success ################################################################# ################################################################# ################################################# done Bytes transferred = 5575489 (551341 hex) NetBootFileXferSize= 00551341 Automatic boot of image at addr 0x80A00000 ... ## Booting image at 80a00000 ... Bad Magic Number,7F454C46 Just build a new kernel, but that is obvious not enough for booting... I used your uboot.kernel which I expect it to be different from just /boot/kernel/kernel?? So how do I get something I can boot from uboot? --WjW From owner-freebsd-mips@freebsd.org Fri Dec 25 18:40:35 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 9BD5BA4F18B for ; Fri, 25 Dec 2015 18:40:35 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-wm0-x22e.google.com (mail-wm0-x22e.google.com [IPv6:2a00:1450:400c:c09::22e]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 35EB6106D; Fri, 25 Dec 2015 18:40:35 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by mail-wm0-x22e.google.com with SMTP id l126so212508430wml.1; Fri, 25 Dec 2015 10:40:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=5QFfpOAw/lfQm5o93U3+gUtQkyDcZ4kqfk1HPExMit4=; b=qw+WMhUYoFfDmmrQloUUfhHR8Py1Sn3asetwpoOGrYs/F8LByMfc6izcEdXKUXS4fk m56ubgskgLJj0kEv/wh4eNLEgeqdoo9hp06aLpkvOlcuk6E9Z4IZhOTM1/6DvUiJWneP yxlLcoLwT9DStAyoufDeY3NqLGvwGWS6OedRI6upoj8S8TS+Tr41FJQ3Rl9OIWZQLPaD upEAiShOFpj54378xFsZr697s8+Nrmo7n0Zb0UlMIj/0ldUpy3XWe3+OxgBdlPO4SSk6 2r4WXRw4ELMVs1pOXGjaK6o0pRG7kBIA+s5cum2lii9ib3IZVqGI/mJMHZhByH1/immN TvMA== X-Received: by 10.194.24.97 with SMTP id t1mr45662820wjf.127.1451068833450; Fri, 25 Dec 2015 10:40:33 -0800 (PST) Received: from [10.0.50.3] ([94.155.70.123]) by smtp.gmail.com with ESMTPSA id 193sm38166405wmp.16.2015.12.25.10.40.32 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 25 Dec 2015 10:40:32 -0800 (PST) References: <567BF4AB.9020904@digiware.nl> <567BFEE3.6030306@digiware.nl> <73FD8DD1-83DC-4E88-8594-5AEC13159C86@gmail.com> <567D5593.4060302@digiware.nl> Mime-Version: 1.0 (1.0) In-Reply-To: <567D5593.4060302@digiware.nl> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-Id: Cc: Adrian Chadd , "freebsd-mips@freebsd.org" X-Mailer: iPad Mail (12A405) From: Stanislav Galabov Subject: Re: mt7620 works! Date: Fri, 25 Dec 2015 20:40:28 +0200 To: Willem Jan Withagen X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Dec 2015 18:40:35 -0000 > On 25.12.2015 =D0=B3., at 16:41, Willem Jan Withagen wro= te: >=20 >> On 24-12-2015 15:45, Stanislav Galabov wrote: >>=20 >>> Hi Stanislave, >>>=20 >>> Most likely you have them already, but ... >>> If of any use, the documentation of the WiTiBoard is in: >>> http://ftp.mqmaker.com/WiTi/ >>> Which also includes the hardware and software docs of the MT7621, 7612,7= 602 >>>=20 >>> --WjW >>=20 >> I had seen these, but thanks for sharing with the list :-) >=20 > Hi, >=20 > syslog: freetest tftpd[12135]: 10.10.10.123: read request for //test.bin: s= uccess >=20 > ################################################################# > ################################################################# > ################################################# > done > Bytes transferred =3D 5575489 (551341 hex) > NetBootFileXferSize=3D 00551341 > Automatic boot of image at addr 0x80A00000 ... > ## Booting image at 80a00000 ... > Bad Magic Number,7F454C46 >=20 >=20 >=20 > Just build a new kernel, but that is obvious not enough for booting... > I used your uboot.kernel which I expect it to be different from just > /boot/kernel/kernel?? >=20 > So how do I get something I can boot from uboot? >=20 > --WjW Hi Willem, A good explanation on how to build u-boot suitable kernel image can be found= here: https://wiki.freebsd.org/FreeBSD/mips/RT3052F But if you're trying to build a kernel for the WiTi board (MT7621) you won't= be able to as the MT7621 bits are still not in -head. The last commits by Adrian only support RT305x and introduce support for RT5= 350 (basic support) and MT7620. The MT7620 is substantially different than t= he MT7621, so it's not a straightforward thing to make it work (UART is diff= erent for one). I'll continue working on Mediatek/Ralink support in the new year, so hopeful= ly things are going to get easier then. Best wishes, Stanislav= From owner-freebsd-mips@freebsd.org Fri Dec 25 22:44:39 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id EE648A5093A for ; Fri, 25 Dec 2015 22:44:38 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (unknown [IPv6:2001:4cb8:90:ffff::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B91331FD1; Fri, 25 Dec 2015 22:44:38 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 260CF1534C7; Fri, 25 Dec 2015 23:44:35 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id oiUEG1Hu_GFX; Fri, 25 Dec 2015 23:44:24 +0100 (CET) Received: from [192.168.10.10] (asus [192.168.10.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id 951EE153413; Fri, 25 Dec 2015 23:12:55 +0100 (CET) Subject: Re: mt7620 works! To: Stanislav Galabov References: <567BF4AB.9020904@digiware.nl> <567BFEE3.6030306@digiware.nl> <73FD8DD1-83DC-4E88-8594-5AEC13159C86@gmail.com> <567D5593.4060302@digiware.nl> Cc: Adrian Chadd , "freebsd-mips@freebsd.org" From: Willem Jan Withagen Message-ID: <567DBF69.6080803@digiware.nl> Date: Fri, 25 Dec 2015 23:12:57 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Dec 2015 22:44:39 -0000 On 25-12-2015 19:40, Stanislav Galabov wrote: > >> On 25.12.2015 г., at 16:41, Willem Jan Withagen wrote: >> >>> On 24-12-2015 15:45, Stanislav Galabov wrote: >>> >>>> Hi Stanislave, >>>> >>>> Most likely you have them already, but ... >>>> If of any use, the documentation of the WiTiBoard is in: >>>> http://ftp.mqmaker.com/WiTi/ >>>> Which also includes the hardware and software docs of the MT7621, 7612,7602 >>>> >>>> --WjW >>> >>> I had seen these, but thanks for sharing with the list :-) >> >> Hi, >> >> syslog: freetest tftpd[12135]: 10.10.10.123: read request for //test.bin: success >> >> ################################################################# >> ################################################################# >> ################################################# >> done >> Bytes transferred = 5575489 (551341 hex) >> NetBootFileXferSize= 00551341 >> Automatic boot of image at addr 0x80A00000 ... >> ## Booting image at 80a00000 ... >> Bad Magic Number,7F454C46 >> >> >> >> Just build a new kernel, but that is obvious not enough for booting... >> I used your uboot.kernel which I expect it to be different from just >> /boot/kernel/kernel?? >> >> So how do I get something I can boot from uboot? >> >> --WjW > > Hi Willem, > > A good explanation on how to build u-boot suitable kernel image can be found here: > https://wiki.freebsd.org/FreeBSD/mips/RT3052F > > But if you're trying to build a kernel for the WiTi board (MT7621) you won't be able to as the MT7621 bits are still not in -head. > > The last commits by Adrian only support RT305x and introduce support for RT5350 (basic support) and MT7620. The MT7620 is substantially different than the MT7621, so it's not a straightforward thing to make it work (UART is different for one). > > I'll continue working on Mediatek/Ralink support in the new year, so hopefully things are going to get easier then. Sort of informative, but the page refers to 'oldlzma'. Which I suspect is needed otherwise Uboot starts complaining about during decompressing and aborts. We're the bits for MT7620 in the patch you pasted? --WjW From owner-freebsd-mips@freebsd.org Sat Dec 26 01:14:12 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 460D0A5184C for ; Sat, 26 Dec 2015 01:14:12 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.chatusa.com) Received: from pdx.rh.CN85.chatusa.com (br1.CN84in.chatusa.com [69.59.192.140]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 800181E83 for ; Sat, 26 Dec 2015 01:14:10 +0000 (UTC) (envelope-from freebsd@pdx.rh.CN85.chatusa.com) Received: from pdx.rh.CN85.chatusa.com (localhost [127.0.0.1]) by pdx.rh.CN85.chatusa.com (8.13.3/8.13.3) with ESMTP id tBQ0ve0s005567; Fri, 25 Dec 2015 16:57:40 -0800 (PST) (envelope-from freebsd@pdx.rh.CN85.chatusa.com) Received: (from freebsd@localhost) by pdx.rh.CN85.chatusa.com (8.13.3/8.13.3/Submit) id tBQ0vcVO005566; Fri, 25 Dec 2015 16:57:38 -0800 (PST) (envelope-from freebsd) From: "Rodney W. Grimes" Message-Id: <201512260057.tBQ0vcVO005566@pdx.rh.CN85.chatusa.com> Subject: Re: mt7620 works! In-Reply-To: <567DBF69.6080803@digiware.nl> To: Willem Jan Withagen Date: Fri, 25 Dec 2015 16:57:38 -0800 (PST) CC: Stanislav Galabov , "freebsd-mips@freebsd.org" X-Mailer: ELM [version 2.4ME+ PL121h (25)] MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Dec 2015 01:14:12 -0000 ... > > But if you're trying to build a kernel for the WiTi board (MT7621) you won't be able to as the MT7621 bits are still not in -head. > > > > The last commits by Adrian only support RT305x and introduce support for RT5350 (basic support) and MT7620. The MT7620 is substantially different than the MT7621, so it's not a straightforward thing to make it work (UART is different for one). > > > > I'll continue working on Mediatek/Ralink support in the new year, so hopefully things are going to get easier then. > > Sort of informative, but the page refers to 'oldlzma'. > Which I suspect is needed otherwise Uboot starts complaining about > during decompressing and aborts. Also I see in the page where some of the magic 0x80xxxxxx addresses come from, but where did the magic number come from for these two commands: tftpboot 0x80800000 DIR-620/kernel.oldlzma.uboot bootm 0x80800000 -- Rod Grimes rgrimes@freebsd.org From owner-freebsd-mips@freebsd.org Sat Dec 26 05:15:37 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 60BACA52058 for ; Sat, 26 Dec 2015 05:15:37 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-wm0-x22f.google.com (mail-wm0-x22f.google.com [IPv6:2a00:1450:400c:c09::22f]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 07E021994 for ; Sat, 26 Dec 2015 05:15:36 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by mail-wm0-x22f.google.com with SMTP id p187so211837315wmp.0 for ; Fri, 25 Dec 2015 21:15:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=references:mime-version:in-reply-to:content-type :content-transfer-encoding:message-id:cc:from:subject:date:to; bh=6wmr/0NtgGE7Y6Iv0v3G9n16maNXY1x95x39AM5LamQ=; b=ZeUwMAAvUoWUNEkd7XoYzwTZafgO2FpiBykK0KFNr4Eby70NSJawt4OxULD7wmSlVV NG16EpJyiKW7i2DT0c4oHQ4UM4ndqj9TrFgLyu0WBLNLB4YTOAPMyGwrlC2F4MkHdK62 PUNbW+9Uycgnf0vcROn+/Q9v92SxRZOynZS8eQJTputlcOuouyioQwOMMunshG8oWBe3 lAZKTCgWjiCugd+Mp3dU8fwI4if33weyLBDenjNIot0RcoFYZmW84iNV9F3d5g5zK15/ 0F03cvbVUF8fB9iG79UvcotyZy/+W9zHQn3zjvMHSs2Chai1oepgcFSpQdUbXPW48V1+ 8zEg== X-Received: by 10.28.49.3 with SMTP id x3mr49583034wmx.53.1451106934591; Fri, 25 Dec 2015 21:15:34 -0800 (PST) Received: from [10.0.50.3] ([94.155.70.123]) by smtp.gmail.com with ESMTPSA id z3sm36460385wjx.38.2015.12.25.21.15.33 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 25 Dec 2015 21:15:33 -0800 (PST) References: <201512260057.tBQ0vcVO005566@pdx.rh.CN85.chatusa.com> Mime-Version: 1.0 (1.0) In-Reply-To: <201512260057.tBQ0vcVO005566@pdx.rh.CN85.chatusa.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Message-Id: <10F858B5-2F48-4E23-996A-E6D9663FEB46@gmail.com> Cc: Willem Jan Withagen , "freebsd-mips@freebsd.org" X-Mailer: iPad Mail (12A405) From: Stanislav Galabov Subject: Re: mt7620 works! Date: Sat, 26 Dec 2015 07:15:33 +0200 To: "Rodney W. Grimes" X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Dec 2015 05:15:37 -0000 > On 26.12.2015 =D0=B3., at 2:57, Rodney W. Grimes wrote: >=20 > ... >>> But if you're trying to build a kernel for the WiTi board (MT7621) you w= on't be able to as the MT7621 bits are still not in -head. >>>=20 >>> The last commits by Adrian only support RT305x and introduce support for= RT5350 (basic support) and MT7620. The MT7620 is substantially different th= an the MT7621, so it's not a straightforward thing to make it work (UART is d= ifferent for one). >>>=20 >>> I'll continue working on Mediatek/Ralink support in the new year, so hop= efully things are going to get easier then. >>=20 >> Sort of informative, but the page refers to 'oldlzma'. >> Which I suspect is needed otherwise Uboot starts complaining about >> during decompressing and aborts. >=20 > Also I see in the page where some of the magic 0x80xxxxxx addresses come f= rom, but where > did the magic number come from for these two commands: >=20 > tftpboot 0x80800000 DIR-620/kernel.oldlzma.uboot > bootm 0x80800000 >=20 >=20 > --=20 > Rod Grimes rgrimes@freebsd= .org 0x80800000 is u-boot's default value for the loadaddr environment variable o= n some Ralink/Mediatek boards. This is the address which is used for loading= stuff via tftp for example. In any case, it could be any valid memory address, which wouldn't cause over= writing u-boot itself while loading a file (kernel image in this case) via t= ftp. U-boot will then properly relocate the loaded file to the address insid= e the image header before booting the kernel as part of executing the bootm c= ommand. I guess the page author didn't think it was necessary to add this informatio= n...= From owner-freebsd-mips@freebsd.org Sat Dec 26 12:05:00 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7D08DA512A8 for ; Sat, 26 Dec 2015 12:05:00 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from smtp.digiware.nl (unknown [IPv6:2001:4cb8:90:ffff::3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 436F01B0E for ; Sat, 26 Dec 2015 12:04:59 +0000 (UTC) (envelope-from wjw@digiware.nl) Received: from rack1.digiware.nl (unknown [127.0.0.1]) by smtp.digiware.nl (Postfix) with ESMTP id 88936153465; Sat, 26 Dec 2015 13:04:55 +0100 (CET) X-Virus-Scanned: amavisd-new at digiware.nl Received: from smtp.digiware.nl ([127.0.0.1]) by rack1.digiware.nl (rack1.digiware.nl [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id xfesoa7wr9qA; Sat, 26 Dec 2015 13:04:24 +0100 (CET) Received: from [192.168.10.10] (asus [192.168.10.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.digiware.nl (Postfix) with ESMTPSA id 196E9153401; Sat, 26 Dec 2015 12:27:05 +0100 (CET) Subject: Re: mt7620 works! To: Stanislav Galabov , "Rodney W. Grimes" References: <201512260057.tBQ0vcVO005566@pdx.rh.CN85.chatusa.com> <10F858B5-2F48-4E23-996A-E6D9663FEB46@gmail.com> Cc: "freebsd-mips@freebsd.org" From: Willem Jan Withagen X-Enigmail-Draft-Status: N1110 Message-ID: <567E798A.3040808@digiware.nl> Date: Sat, 26 Dec 2015 12:27:06 +0100 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <10F858B5-2F48-4E23-996A-E6D9663FEB46@gmail.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Dec 2015 12:05:00 -0000 On 26-12-2015 06:15, Stanislav Galabov wrote: > >> On 26.12.2015 г., at 2:57, Rodney W. Grimes >> wrote: >> >> ... >>>> But if you're trying to build a kernel for the WiTi board >>>> (MT7621) you won't be able to as the MT7621 bits are still not >>>> in -head. >>>> >>>> The last commits by Adrian only support RT305x and introduce >>>> support for RT5350 (basic support) and MT7620. The MT7620 is >>>> substantially different than the MT7621, so it's not a >>>> straightforward thing to make it work (UART is different for >>>> one). >>>> >>>> I'll continue working on Mediatek/Ralink support in the new >>>> year, so hopefully things are going to get easier then. >>> >>> Sort of informative, but the page refers to 'oldlzma'. Which I >>> suspect is needed otherwise Uboot starts complaining about during >>> decompressing and aborts. >> Stanislav, I indeed started used none as compression, which appeased the loader. But getting it to boot is another issue. Just loading it by letting uboot figure it out, does nog show/boot anything. Which I now understand could be because the uart is differntly defined, and as such does not work >> Also I see in the page where some of the magic 0x80xxxxxx addresses >> come from, but where did the magic number come from for these two >> commands: >> >> tftpboot 0x80800000 DIR-620/kernel.oldlzma.uboot bootm 0x80800000 >> > 0x80800000 is u-boot's default value for the loadaddr environment > variable on some Ralink/Mediatek boards. This is the address which is > used for loading stuff via tftp for example. In any case, it could be > any valid memory address, which wouldn't cause overwriting u-boot > itself while loading a file (kernel image in this case) via tftp. > U-boot will then properly relocate the loaded file to the address > inside the image header before booting the kernel as part of > executing the bootm command. I guess the page author didn't think it > was necessary to add this information... That was the other thing I was wondering about. But I would expect that all information in the header added by mkimage would do the trick and make uboot do the "right" thing. I works for the early version for MT7621 that you build. --WjW From owner-freebsd-mips@freebsd.org Sat Dec 26 14:12:10 2015 Return-Path: Delivered-To: freebsd-mips@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 5E246A52A7E for ; Sat, 26 Dec 2015 14:12:10 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: from mail-vk0-x234.google.com (mail-vk0-x234.google.com [IPv6:2607:f8b0:400c:c05::234]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 1D84E1F8D for ; Sat, 26 Dec 2015 14:12:10 +0000 (UTC) (envelope-from sgalabov@gmail.com) Received: by mail-vk0-x234.google.com with SMTP id k1so36994184vkb.2 for ; Sat, 26 Dec 2015 06:12:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=xkP6vBVlszC1PFhQi6vZILCvzNuSnABmDhFYn8Pu9WU=; b=cumAWFbtjFhHFKo9krnr0ZLq5Bp7+qp11s/xzS9Uby02/vbMibpZtC9vXDJo8CVbrM 5gitOualEiIu9SWu5NEIB2Bzrx5915Mbt4aaJRIK+Os897uB9Vnsrfg/tt37OilKcPtc zZfqI/QLkJPFA1bIf4vNp/BLArBzVg941icxQhnlJ/4vLfJCTYPZHYt1HJX3sVeLAwk7 uS3JE2XLobBdkshil+dCOBwP9ncdPSmI4Gnhh/xFWA/xkrFRQS+OBepz2njFiRk8Hbie G2kUppYzYyaJkjMDg9f82x3XUjiNzLszssssOistUP0kdHQonRLkxtucT8AB+UcMvYf/ h0Dw== MIME-Version: 1.0 X-Received: by 10.31.165.71 with SMTP id o68mr26250605vke.67.1451139128749; Sat, 26 Dec 2015 06:12:08 -0800 (PST) Received: by 10.31.175.201 with HTTP; Sat, 26 Dec 2015 06:12:08 -0800 (PST) In-Reply-To: <567E798A.3040808@digiware.nl> References: <201512260057.tBQ0vcVO005566@pdx.rh.CN85.chatusa.com> <10F858B5-2F48-4E23-996A-E6D9663FEB46@gmail.com> <567E798A.3040808@digiware.nl> Date: Sat, 26 Dec 2015 16:12:08 +0200 Message-ID: Subject: Re: mt7620 works! From: Stanislav Galabov To: Willem Jan Withagen Cc: "Rodney W. Grimes" , "freebsd-mips@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.20 X-BeenThere: freebsd-mips@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Porting FreeBSD to MIPS List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Dec 2015 14:12:10 -0000 On Sat, Dec 26, 2015 at 1:27 PM, Willem Jan Withagen wrote: > On 26-12-2015 06:15, Stanislav Galabov wrote: > > > >> On 26.12.2015 =D0=B3., at 2:57, Rodney W. Grimes > >> wrote: > >> > >> ... > >>>> But if you're trying to build a kernel for the WiTi board > >>>> (MT7621) you won't be able to as the MT7621 bits are still not > >>>> in -head. > >>>> > >>>> The last commits by Adrian only support RT305x and introduce > >>>> support for RT5350 (basic support) and MT7620. The MT7620 is > >>>> substantially different than the MT7621, so it's not a > >>>> straightforward thing to make it work (UART is different for > >>>> one). > >>>> > >>>> I'll continue working on Mediatek/Ralink support in the new > >>>> year, so hopefully things are going to get easier then. > >>> > >>> Sort of informative, but the page refers to 'oldlzma'. Which I > >>> suspect is needed otherwise Uboot starts complaining about during > >>> decompressing and aborts. > >> > > Stanislav, > > I indeed started used none as compression, which appeased the loader. > But getting it to boot is another issue. > > Just loading it by letting uboot figure it out, does nog show/boot > anything. > Which I now understand could be because the uart is differntly defined, > and as such does not work > > As I mentioned already, MT7620 and MT7621 are quite different, so you won't be able to boot a MT7620 kernel on the WiTi board, which is based on MT7621. I'll work on adding MT7621 support in the beginning of the new year, so this should make things easier :-) > >> Also I see in the page where some of the magic 0x80xxxxxx addresses > >> come from, but where did the magic number come from for these two > >> commands: > >> > >> tftpboot 0x80800000 DIR-620/kernel.oldlzma.uboot bootm 0x80800000 > >> > > 0x80800000 is u-boot's default value for the loadaddr environment > > variable on some Ralink/Mediatek boards. This is the address which is > > used for loading stuff via tftp for example. In any case, it could be > > any valid memory address, which wouldn't cause overwriting u-boot > > itself while loading a file (kernel image in this case) via tftp. > > U-boot will then properly relocate the loaded file to the address > > inside the image header before booting the kernel as part of > > executing the bootm command. I guess the page author didn't think it > > was necessary to add this information... > > That was the other thing I was wondering about. But I would expect that > all information in the header added by mkimage would do the trick and > make uboot do the "right" thing. > I works for the early version for MT7621 that you build. > > --WjW > > The header file in the image instructs U-Boot about what needs to be done once the image is loaded to the board's memory (e.g., to RAM via TFTP in your particular case). But you need to tell U-Boot where to load the image itself, hence the loadaddr variable or manually specified load address as part of the tftp and bootm comands. If you do not specify the address on the command line then U-Boot will try to use loadaddr from environment or a default hard-coded value. This should work just fine in most cases, so normally you can just skip specifying the load address. I hope I am making things clearer :-) Best wishes, Stanislav