From owner-freebsd-embedded@FreeBSD.ORG Sun Nov 27 15:33:16 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2D552106566C for ; Sun, 27 Nov 2011 15:33:16 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id ECC2B8FC0C for ; Sun, 27 Nov 2011 15:33:15 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id DE71CD0DEA for ; Sun, 27 Nov 2011 16:33:14 +0100 (CET) From: Stefan Bethke Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: quoted-printable Date: Sun, 27 Nov 2011 16:33:14 +0100 Message-Id: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> To: freebsd-embedded@freebsd.org Mime-Version: 1.0 (Apple Message framework v1251.1) X-Mailer: Apple Mail (2.1251.1) Subject: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 27 Nov 2011 15:33:16 -0000 Hey, I'm trying to play around with things a bit more, and figured it would = be easier to just have a full base system via NFS. I've added a couple = bits to the kernel config: options BOOTP options BOOTP_NFSROOT options BOOTP_NFSV3 options BOOTP_WIRED_TO=3Darge0 options NFSCLIENT options NFS_ROOT But it's getting stuck: =85 Sending DHCP Request packet from interface arge0 (74:ea:3a:e4:d9:20) Received DHCP Ack packet on arge0 from 44.128.65.1 (accepted) (got root = path) arge0 at 44.128.65.7 server 44.128.65.1 boot file = TP-WN1043ND.factory.bin subnet mask 255.255.255.192 router 44.128.65.1 root_server 44.128.65.1 = rootfs /p1/netboot/freebsd-mipseb-current hostname whitebox2=20 Adjusted interface arge0 in_scrubprefix: err=3D51, prefix delete failed arpresolve: can't allocate llinfo for 44.128.65.1 krpc_call: sosend: 22 arpresolve: can't allocate llinfo for 44.128.65.1 krpc_call: sosend: 22 panic: nfs_boot: mountd root, error=3D22 KDB: enter: panic [ thread pid 0 tid 100000 ] Stopped at kdb_enter+0x4c: lui at,0x8050 db>=20 I can't seem to find anyting via Google. I've also noticed that the MAC address is different from what u-boot = uses, but I'm not too concerned about that. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 00:32:32 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD1D6106564A for ; Mon, 28 Nov 2011 00:32:32 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 7E8628FC12 for ; Mon, 28 Nov 2011 00:32:32 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so623780vbb.13 for ; Sun, 27 Nov 2011 16:32:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=LQzWFn0v7gREb0sNUFoQzGvXcgIo1uvgQxPOEAqGqiI=; b=FEVYtn5K2xJl/9E+VRPnKOvuLUOSnOIItaxXgBxDbKq/KA0ndPSAdiku85KD5cIG5j SFJI3pUkTyQn//ThBT6NYKF86ElVIQYE/TIV59jDQC/lCGxhOnldZTQyVHZu/PIPLOS9 xy2tvMX0Pen6vM0THOfLkh6HUD6ESJSn8NCvg= MIME-Version: 1.0 Received: by 10.52.26.179 with SMTP id m19mr207506vdg.95.1322440351883; Sun, 27 Nov 2011 16:32:31 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.186.74 with HTTP; Sun, 27 Nov 2011 16:32:31 -0800 (PST) In-Reply-To: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> References: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> Date: Mon, 28 Nov 2011 08:32:31 +0800 X-Google-Sender-Auth: PHwZGBuMzgvfL69hoS-6lEbD_D4 Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 00:32:32 -0000 Hi, Can you verify that you have link-level connectivity? Once it begins booting and has accepted a bootp assignment (which it has, hence why it has an IP address), can you just ping it to ensure that the link is up? The mac is going to be different. I've just copied the eeprom address from the uboot configuration done in openwrt. It's a bit stupid - it reads the value direct from a location in flash, rather than parsing the uboot environment that tplink have stored (read only!) in firmware!) so that's on the TODO list to fix. But you're right, that shouldn't be affecting this. I wonder why its throwing those llinfo errors.. Adrian From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 02:55:43 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8123E106566B; Mon, 28 Nov 2011 02:55:43 +0000 (UTC) (envelope-from gonzo@hq.bluezbox.com) Received: from hq.bluezbox.com (hq.bluezbox.com [70.38.37.145]) by mx1.freebsd.org (Postfix) with ESMTP id 16E3F8FC0C; Mon, 28 Nov 2011 02:55:42 +0000 (UTC) Received: from [24.87.53.93] (helo=[192.168.1.116]) by hq.bluezbox.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.73 (FreeBSD)) (envelope-from ) id 1RUr6p-000Ie3-NJ; Sun, 27 Nov 2011 18:38:20 -0800 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=windows-1252 From: Oleksandr Tymoshenko In-Reply-To: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> Date: Sun, 27 Nov 2011 18:38:19 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> References: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> To: Stefan Bethke X-Mailer: Apple Mail (2.1084) Sender: gonzo@hq.bluezbox.com X-Spam-Level: ---- X-Spam-Report: Spam detection software, running on the system "hq.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: On 2011-11-27, at 7:33 AM, Stefan Bethke wrote: > Hey, > > I'm trying to play around with things a bit more, and figured it would be easier to just have a full base system via NFS. I've added a couple bits to the kernel config: > options BOOTP > options BOOTP_NFSROOT > options BOOTP_NFSV3 > options BOOTP_WIRED_TO=arge0 > options NFSCLIENT > options NFS_ROOT > > > But it's getting stuck: > … > Sending DHCP Request packet from interface arge0 (74:ea:3a:e4:d9:20) > Received DHCP Ack packet on arge0 from 44.128.65.1 (accepted) (got root path) > arge0 at 44.128.65.7 server 44.128.65.1 boot file TP-WN1043ND.factory.bin > subnet mask 255.255.255.192 router 44.128.65.1 root_server 44.128.65.1 rootfs /p1/netboot/freebsd-mipseb-current hostname whitebox2 > Adjusted interface arge0 > in_scrubprefix: err=51, prefix delete failed [...] Content analysis details: (-4.5 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] -0.1 AWL AWL: From: address is in the auto white-list Cc: glebius@freebsd.org, freebsd-embedded@freebsd.org Subject: Re: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 02:55:43 -0000 On 2011-11-27, at 7:33 AM, Stefan Bethke wrote: > Hey, >=20 > I'm trying to play around with things a bit more, and figured it would = be easier to just have a full base system via NFS. I've added a couple = bits to the kernel config: > options BOOTP > options BOOTP_NFSROOT > options BOOTP_NFSV3 > options BOOTP_WIRED_TO=3Darge0 > options NFSCLIENT > options NFS_ROOT >=20 >=20 > But it's getting stuck: > =85 > Sending DHCP Request packet from interface arge0 (74:ea:3a:e4:d9:20) > Received DHCP Ack packet on arge0 from 44.128.65.1 (accepted) (got = root path) > arge0 at 44.128.65.7 server 44.128.65.1 boot file = TP-WN1043ND.factory.bin > subnet mask 255.255.255.192 router 44.128.65.1 root_server 44.128.65.1 = rootfs /p1/netboot/freebsd-mipseb-current hostname whitebox2=20 > Adjusted interface arge0 > in_scrubprefix: err=3D51, prefix delete failed Same here. I tracked it down to r227791. Prior to this revision NFS root = works fine.=20 From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 07:08:48 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 89BCD1065670 for ; Mon, 28 Nov 2011 07:08:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 0E2D38FC0C for ; Mon, 28 Nov 2011 07:08:47 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pAS78iW6061163; Mon, 28 Nov 2011 11:08:44 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pAS78iT6061162; Mon, 28 Nov 2011 11:08:44 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 28 Nov 2011 11:08:44 +0400 From: Gleb Smirnoff To: Oleksandr Tymoshenko Message-ID: <20111128070844.GE44498@glebius.int.ru> References: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-embedded@FreeBSD.org Subject: Re: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 07:08:48 -0000 On Sun, Nov 27, 2011 at 06:38:19PM -0800, Oleksandr Tymoshenko wrote: O> > I'm trying to play around with things a bit more, and figured it would be easier to just have a full base system via NFS. I've added a couple bits to the kernel config: O> > options BOOTP O> > options BOOTP_NFSROOT O> > options BOOTP_NFSV3 O> > options BOOTP_WIRED_TO=arge0 O> > options NFSCLIENT O> > options NFS_ROOT O> > O> > O> > But it's getting stuck: O> > ? O> > Sending DHCP Request packet from interface arge0 (74:ea:3a:e4:d9:20) O> > Received DHCP Ack packet on arge0 from 44.128.65.1 (accepted) (got root path) O> > arge0 at 44.128.65.7 server 44.128.65.1 boot file TP-WN1043ND.factory.bin O> > subnet mask 255.255.255.192 router 44.128.65.1 root_server 44.128.65.1 rootfs /p1/netboot/freebsd-mipseb-current hostname whitebox2 O> > Adjusted interface arge0 O> > in_scrubprefix: err=51, prefix delete failed O> O> Same here. I tracked it down to r227791. Prior to this revision NFS root works fine. I'm sorry for breakage. I'll try to fix it ASAP. -- Totus tuus, Glebius. From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 07:10:47 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1FAB3106564A for ; Mon, 28 Nov 2011 07:10:47 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 9828F8FC14 for ; Mon, 28 Nov 2011 07:10:46 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pAS7AhJN061189; Mon, 28 Nov 2011 11:10:43 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pAS7AhpM061188; Mon, 28 Nov 2011 11:10:43 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 28 Nov 2011 11:10:43 +0400 From: Gleb Smirnoff To: Oleksandr Tymoshenko Message-ID: <20111128071043.GF44498@glebius.int.ru> References: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-embedded@FreeBSD.org Subject: Re: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 07:10:47 -0000 On Sun, Nov 27, 2011 at 06:38:19PM -0800, Oleksandr Tymoshenko wrote: O> > I'm trying to play around with things a bit more, and figured it would be easier to just have a full base system via NFS. I've added a couple bits to the kernel config: O> > options BOOTP O> > options BOOTP_NFSROOT O> > options BOOTP_NFSV3 O> > options BOOTP_WIRED_TO=arge0 O> > options NFSCLIENT O> > options NFS_ROOT O> > O> > O> > But it's getting stuck: O> > ? O> > Sending DHCP Request packet from interface arge0 (74:ea:3a:e4:d9:20) O> > Received DHCP Ack packet on arge0 from 44.128.65.1 (accepted) (got root path) O> > arge0 at 44.128.65.7 server 44.128.65.1 boot file TP-WN1043ND.factory.bin O> > subnet mask 255.255.255.192 router 44.128.65.1 root_server 44.128.65.1 rootfs /p1/netboot/freebsd-mipseb-current hostname whitebox2 O> > Adjusted interface arge0 O> > in_scrubprefix: err=51, prefix delete failed O> O> Same here. I tracked it down to r227791. Prior to this revision NFS root works fine. Stefan, Oleksandr, which revisions have you tried? Revisions between r227791 and r227958 are already known to have problems. Can you please clarify that you have tried revision r227958 or higher? -- Totus tuus, Glebius. From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 07:18:13 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E6C6D106564A; Mon, 28 Nov 2011 07:18:13 +0000 (UTC) (envelope-from gonzo@hq.bluezbox.com) Received: from hq.bluezbox.com (hq.bluezbox.com [70.38.37.145]) by mx1.freebsd.org (Postfix) with ESMTP id ADA728FC0A; Mon, 28 Nov 2011 07:18:13 +0000 (UTC) Received: from [24.87.53.93] (helo=[192.168.1.116]) by hq.bluezbox.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.73 (FreeBSD)) (envelope-from ) id 1RUvTf-000KDF-2d; Sun, 27 Nov 2011 23:18:11 -0800 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Oleksandr Tymoshenko In-Reply-To: <20111128071043.GF44498@glebius.int.ru> Date: Sun, 27 Nov 2011 23:18:10 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <17A73B0C-468D-4BA3-868E-D2E2289A570C@bluezbox.com> References: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> <20111128071043.GF44498@glebius.int.ru> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1084) Sender: gonzo@hq.bluezbox.com X-Spam-Level: ---- X-Spam-Report: Spam detection software, running on the system "hq.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: > O> > Adjusted interface arge0 > O> > in_scrubprefix: err=51, prefix delete failed > O> > O> Same here. I tracked it down to r227791. Prior to this revision NFS root works fine. > > Stefan, Oleksandr, > > which revisions have you tried? Revisions between r227791 and r227958 are already > known to have problems. Can you please clarify that you have tried revision r227958 > or higher? > [...] Content analysis details: (-4.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] -0.3 AWL AWL: From: address is in the auto white-list Cc: freebsd-embedded@freebsd.org Subject: Re: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 07:18:14 -0000 > O> > Adjusted interface arge0 > O> > in_scrubprefix: err=3D51, prefix delete failed > O>=20 > O> Same here. I tracked it down to r227791. Prior to this revision NFS = root works fine.=20 >=20 > Stefan, Oleksandr, >=20 > which revisions have you tried? Revisions between r227791 and r227958 = are already > known to have problems. Can you please clarify that you have tried = revision r227958 > or higher? >=20 My source tree is r227960. I do not see "can't allocate llinfo" = messages, just "in_scrubprefix: err=3D51, prefix delete failed" From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 07:19:53 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B403A1065675 for ; Mon, 28 Nov 2011 07:19:53 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 39EBA8FC16 for ; Mon, 28 Nov 2011 07:19:53 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pAS7JlgJ061279; Mon, 28 Nov 2011 11:19:47 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pAS7JlNC061278; Mon, 28 Nov 2011 11:19:47 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 28 Nov 2011 11:19:47 +0400 From: Gleb Smirnoff To: Oleksandr Tymoshenko Message-ID: <20111128071947.GG44498@glebius.int.ru> References: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> <20111128071043.GF44498@glebius.int.ru> <17A73B0C-468D-4BA3-868E-D2E2289A570C@bluezbox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <17A73B0C-468D-4BA3-868E-D2E2289A570C@bluezbox.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-embedded@FreeBSD.org Subject: Re: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 07:19:53 -0000 On Sun, Nov 27, 2011 at 11:18:10PM -0800, Oleksandr Tymoshenko wrote: O> > O> > Adjusted interface arge0 O> > O> > in_scrubprefix: err=51, prefix delete failed O> > O> O> > O> Same here. I tracked it down to r227791. Prior to this revision NFS root works fine. O> > O> > Stefan, Oleksandr, O> > O> > which revisions have you tried? Revisions between r227791 and r227958 are already O> > known to have problems. Can you please clarify that you have tried revision r227958 O> > or higher? O> > O> O> My source tree is r227960. I do not see "can't allocate llinfo" messages, just "in_scrubprefix: err=51, prefix delete failed" Are other messages the same? krpc_call: sosend: 22 krpc_call: sosend: 22 KDB: enter: panic [ thread pid 0 tid 100000 ] Stopped at kdb_enter+0x4c: lui at,0x8050 db> -- Totus tuus, Glebius. From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 07:32:48 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2F79106566C for ; Mon, 28 Nov 2011 07:32:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 2E9168FC13 for ; Mon, 28 Nov 2011 07:32:47 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pAS7Wjh6061375; Mon, 28 Nov 2011 11:32:45 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pAS7WjwC061374; Mon, 28 Nov 2011 11:32:45 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 28 Nov 2011 11:32:45 +0400 From: Gleb Smirnoff To: Oleksandr Tymoshenko Message-ID: <20111128073244.GH44498@glebius.int.ru> References: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> <20111128071043.GF44498@glebius.int.ru> <17A73B0C-468D-4BA3-868E-D2E2289A570C@bluezbox.com> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="yNb1oOkm5a9FJOVX" Content-Disposition: inline In-Reply-To: <17A73B0C-468D-4BA3-868E-D2E2289A570C@bluezbox.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-embedded@FreeBSD.org Subject: Re: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 07:32:48 -0000 --yNb1oOkm5a9FJOVX Content-Type: text/plain; charset=koi8-r Content-Disposition: inline On Sun, Nov 27, 2011 at 11:18:10PM -0800, Oleksandr Tymoshenko wrote: O> > Stefan, Oleksandr, O> > O> > which revisions have you tried? Revisions between r227791 and r227958 are already O> > known to have problems. Can you please clarify that you have tried revision r227958 O> > or higher? O> O> My source tree is r227960. I do not see "can't allocate llinfo" messages, just "in_scrubprefix: err=51, prefix delete failed" Can you please obtain backtrace to determine which codepath causes error. Patch attached. -- Totus tuus, Glebius. --yNb1oOkm5a9FJOVX Content-Type: text/x-diff; charset=koi8-r Content-Disposition: attachment; filename="in.c.diff" Index: netinet/in.c =================================================================== --- netinet/in.c (revision 228049) +++ netinet/in.c (working copy) @@ -34,9 +34,11 @@ __FBSDID("$FreeBSD$"); #include "opt_mpath.h" +#include "opt_kdb.h" #include #include +#include #include #include #include @@ -1195,8 +1197,12 @@ error = rtinit(&(target->ia_ifa), (int)RTM_DELETE, rtinitflags(target)); if (error == 0) target->ia_flags &= ~IFA_ROUTE; - else + else { log(LOG_INFO, "in_scrubprefix: err=%d, prefix delete failed\n", error); +#ifdef KDB + kdb_backtrace(); +#endif + } return (error); } --yNb1oOkm5a9FJOVX-- From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 07:40:49 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EF74E106564A; Mon, 28 Nov 2011 07:40:49 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id B58968FC0A; Mon, 28 Nov 2011 07:40:49 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 857681112EA; Mon, 28 Nov 2011 08:40:47 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Stefan Bethke In-Reply-To: <20111128073244.GH44498@glebius.int.ru> Date: Mon, 28 Nov 2011 08:40:46 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> <20111128071043.GF44498@glebius.int.ru> <17A73B0C-468D-4BA3-868E-D2E2289A570C@bluezbox.com> <20111128073244.GH44498@glebius.int.ru> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1251.1) Cc: freebsd-embedded@FreeBSD.org Subject: Re: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 07:40:50 -0000 Am 28.11.2011 um 08:32 schrieb Gleb Smirnoff: > Can you please obtain backtrace to determine which codepath causes = error. Patch > attached. Without the patch and on r228049, I can't build the kernel anymore, even = from an empty obj. stb@diesel:~/working/tp-wr1043/src$ ../build/build/bin/build tl-wr1043nd = buildkernel ... cc -c -O -pipe -march=3Dmips32 -std=3Dc99 -g -Wall -Wredundant-decls = -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes = -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign = -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option = -nostdinc -I. -I/home/stb/working/tp-wr1043/src/sys = -I/home/stb/working/tp-wr1043/src/sys/contrib/altq = -I/home/stb/working/tp-wr1043/src/sys/contrib/libfdt -D_KERNEL = -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common = -finline-limit=3D8000 --param inline-unit-growth=3D10000 --param = large-function-growth=3D100000 --param max-inline-insns-single=3D10000 = -fno-pic -mno-abicalls -G0 -march=3Dmips32 -msoft-float -ffreestanding = -Werror = /home/stb/working/tp-wr1043/src/sys/mips/atheros/uart_bus_ar71xx.c cc1: warnings being treated as errors /home/stb/working/tp-wr1043/src/sys/mips/atheros/if_arge.c: In function = 'arge_flush_ddr': /home/stb/working/tp-wr1043/src/sys/mips/atheros/if_arge.c:195: warning: = implicit declaration of function 'ar71xx_device_flush_ddr_ge0' /home/stb/working/tp-wr1043/src/sys/mips/atheros/if_arge.c:195: warning: = nested extern declaration of 'ar71xx_device_flush_ddr_ge0' = [-Wnested-externs] /home/stb/working/tp-wr1043/src/sys/mips/atheros/if_arge.c:197: warning: = implicit declaration of function 'ar71xx_device_flush_ddr_ge1' /home/stb/working/tp-wr1043/src/sys/mips/atheros/if_arge.c:197: warning: = nested extern declaration of 'ar71xx_device_flush_ddr_ge1' = [-Wnested-externs] *** Error code 1 1 error *** Error code 2 1 error *** Error code 2 1 error stb@diesel:~/working/tp-wr1043/src$ svn info Path: . Working Copy Root Path: /home/stb/working/tp-wr1043/src URL: svn://svn.freebsd.org/base/head Repository Root: svn://svn.freebsd.org/base Repository UUID: ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 228049 Node Kind: directory Schedule: normal Last Changed Author: trociny Last Changed Rev: 228049 Last Changed Date: 2011-11-28 08:09:29 +0100 (Mon, 28 Nov 2011) --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 08:10:48 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CE159106564A for ; Mon, 28 Nov 2011 08:10:48 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 3603F8FC21 for ; Mon, 28 Nov 2011 08:10:48 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pAS8AeCB061734; Mon, 28 Nov 2011 12:10:40 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pAS8Aerc061733; Mon, 28 Nov 2011 12:10:40 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 28 Nov 2011 12:10:40 +0400 From: Gleb Smirnoff To: Stefan Bethke Message-ID: <20111128081040.GJ44498@glebius.int.ru> References: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> <20111128071043.GF44498@glebius.int.ru> <17A73B0C-468D-4BA3-868E-D2E2289A570C@bluezbox.com> <20111128073244.GH44498@glebius.int.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-embedded@FreeBSD.org Subject: Re: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 08:10:48 -0000 On Mon, Nov 28, 2011 at 08:40:46AM +0100, Stefan Bethke wrote: S> Am 28.11.2011 um 08:32 schrieb Gleb Smirnoff: S> S> > Can you please obtain backtrace to determine which codepath causes error. Patch S> > attached. S> S> Without the patch and on r228049, I can't build the kernel anymore, even from an empty obj. S> S> stb@diesel:~/working/tp-wr1043/src$ ../build/build/bin/build tl-wr1043nd buildkernel S> ... S> cc -c -O -pipe -march=mips32 -std=c99 -g -Wall -Wredundant-decls -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign -fformat-extensions -Wmissing-include-dirs -fdiagnostics-show-option -nostdinc -I. -I/home/stb/working/tp-wr1043/src/sys -I/home/stb/working/tp-wr1043/src/sys/contrib/altq -I/home/stb/working/tp-wr1043/src/sys/contrib/libfdt -D_KERNEL -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common -finline-limit=8000 --param inline-unit-growth=10000 --param large-function-growth=100000 --param max-inline-insns-single=10000 -fno-pic -mno-abicalls -G0 -march=mips32 -msoft-float -ffreestanding -Werror /home/stb/working/tp-wr1043/src/sys/mips/atheros/uart_bus_ar71xx.c S> cc1: warnings being treated as errors S> /home/stb/working/tp-wr1043/src/sys/mips/atheros/if_arge.c: In function 'arge_flush_ddr': S> /home/stb/working/tp-wr1043/src/sys/mips/atheros/if_arge.c:195: warning: implicit declaration of function 'ar71xx_device_flush_ddr_ge0' S> /home/stb/working/tp-wr1043/src/sys/mips/atheros/if_arge.c:195: warning: nested extern declaration of 'ar71xx_device_flush_ddr_ge0' [-Wnested-externs] S> /home/stb/working/tp-wr1043/src/sys/mips/atheros/if_arge.c:197: warning: implicit declaration of function 'ar71xx_device_flush_ddr_ge1' S> /home/stb/working/tp-wr1043/src/sys/mips/atheros/if_arge.c:197: warning: nested extern declaration of 'ar71xx_device_flush_ddr_ge1' [-Wnested-externs] S> *** Error code 1 S> 1 error S> *** Error code 2 S> 1 error S> *** Error code 2 S> 1 error I have just fixed this. Please try r228050. -- Totus tuus, Glebius. From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 08:13:43 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7294D106566C; Mon, 28 Nov 2011 08:13:43 +0000 (UTC) (envelope-from gonzo@hq.bluezbox.com) Received: from hq.bluezbox.com (hq.bluezbox.com [70.38.37.145]) by mx1.freebsd.org (Postfix) with ESMTP id 345F28FC17; Mon, 28 Nov 2011 08:13:42 +0000 (UTC) Received: from [24.87.53.93] (helo=[192.168.1.116]) by hq.bluezbox.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.73 (FreeBSD)) (envelope-from ) id 1RUwLJ-000KUB-Kc; Mon, 28 Nov 2011 00:13:41 -0800 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Oleksandr Tymoshenko In-Reply-To: <20111128073244.GH44498@glebius.int.ru> Date: Mon, 28 Nov 2011 00:13:36 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> <20111128071043.GF44498@glebius.int.ru> <17A73B0C-468D-4BA3-868E-D2E2289A570C@bluezbox.com> <20111128073244.GH44498@glebius.int.ru> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1084) Sender: gonzo@hq.bluezbox.com X-Spam-Level: ---- X-Spam-Report: Spam detection software, running on the system "hq.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: On 2011-11-27, at 11:32 PM, Gleb Smirnoff wrote: > On Sun, Nov 27, 2011 at 11:18:10PM -0800, Oleksandr Tymoshenko wrote: > O> > Stefan, Oleksandr, > O> > > O> > which revisions have you tried? Revisions between r227791 and r227958 are already > O> > known to have problems. Can you please clarify that you have tried revision r227958 > O> > or higher? > O> > O> My source tree is r227960. I do not see "can't allocate llinfo" messages, just "in_scrubprefix: err=51, prefix delete failed" > > Can you please obtain backtrace to determine which codepath causes error. Patch > attached. [...] Content analysis details: (-4.7 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] -0.4 AWL AWL: From: address is in the auto white-list Cc: freebsd-embedded@FreeBSD.org Subject: Re: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 08:13:43 -0000 On 2011-11-27, at 11:32 PM, Gleb Smirnoff wrote: > On Sun, Nov 27, 2011 at 11:18:10PM -0800, Oleksandr Tymoshenko wrote: > O> > Stefan, Oleksandr, > O> >=20 > O> > which revisions have you tried? Revisions between r227791 and = r227958 are already > O> > known to have problems. Can you please clarify that you have = tried revision r227958 > O> > or higher? > O>=20 > O> My source tree is r227960. I do not see "can't allocate llinfo" = messages, just "in_scrubprefix: err=3D51, prefix delete failed" >=20 > Can you please obtain backtrace to determine which codepath causes = error. Patch > attached. Sure, here it is: in_scrubprefix+57c (?,?,?,?) ra 80435d28 sp a12980 sz 160 in_ifinit+38 (?,?,?,?) ra 80437328 sp a12a20 sz 96 in_control+bf8 (?,?,?,?) ra 8040ebb4 sp a12a80 sz 112 ifioctl+1974 (17ee000,?,?,?) ra 804add20 sp a12af0 sz 192 bootpc_init+1be0 (?,?,?,?) ra 802a642c sp a12bb0 sz 320 mi_startup+20c (?,?,?,?) ra 80100134 sp a12cf0 sz 32 From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 08:20:50 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 951A5106566C for ; Mon, 28 Nov 2011 08:20:50 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 197568FC1B for ; Mon, 28 Nov 2011 08:20:49 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pAS8Kg1V061956; Mon, 28 Nov 2011 12:20:42 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pAS8KgqC061955; Mon, 28 Nov 2011 12:20:42 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 28 Nov 2011 12:20:42 +0400 From: Gleb Smirnoff To: Oleksandr Tymoshenko Message-ID: <20111128082042.GK44498@glebius.int.ru> References: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> <20111128071043.GF44498@glebius.int.ru> <17A73B0C-468D-4BA3-868E-D2E2289A570C@bluezbox.com> <20111128073244.GH44498@glebius.int.ru> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-embedded@FreeBSD.org Subject: Re: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 08:20:50 -0000 On Mon, Nov 28, 2011 at 12:13:36AM -0800, Oleksandr Tymoshenko wrote: O> O> On 2011-11-27, at 11:32 PM, Gleb Smirnoff wrote: O> O> > On Sun, Nov 27, 2011 at 11:18:10PM -0800, Oleksandr Tymoshenko wrote: O> > O> > Stefan, Oleksandr, O> > O> > O> > O> > which revisions have you tried? Revisions between r227791 and r227958 are already O> > O> > known to have problems. Can you please clarify that you have tried revision r227958 O> > O> > or higher? O> > O> O> > O> My source tree is r227960. I do not see "can't allocate llinfo" messages, just "in_scrubprefix: err=51, prefix delete failed" O> > O> > Can you please obtain backtrace to determine which codepath causes error. Patch O> > attached. O> O> Sure, here it is: O> O> in_scrubprefix+57c (?,?,?,?) ra 80435d28 sp a12980 sz 160 O> in_ifinit+38 (?,?,?,?) ra 80437328 sp a12a20 sz 96 O> in_control+bf8 (?,?,?,?) ra 8040ebb4 sp a12a80 sz 112 O> ifioctl+1974 (17ee000,?,?,?) ra 804add20 sp a12af0 sz 192 O> bootpc_init+1be0 (?,?,?,?) ra 802a642c sp a12bb0 sz 320 O> mi_startup+20c (?,?,?,?) ra 80100134 sp a12cf0 sz 32 Compiler have inlined bootpc_adjust_interface & bootpc_fakeup_interface into bootpc_init so I can't determine which one is failing. Can you please rebuild with: make COPTFLAGS= DEBUG_FLAGS=-g buildkernel -- Totus tuus, Glebius. From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 08:43:58 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7B2DA106566B; Mon, 28 Nov 2011 08:43:58 +0000 (UTC) (envelope-from gonzo@hq.bluezbox.com) Received: from hq.bluezbox.com (hq.bluezbox.com [70.38.37.145]) by mx1.freebsd.org (Postfix) with ESMTP id 1F0C18FC13; Mon, 28 Nov 2011 08:43:57 +0000 (UTC) Received: from [24.87.53.93] (helo=[192.168.1.116]) by hq.bluezbox.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.73 (FreeBSD)) (envelope-from ) id 1RUwoZ-000KjH-0Q; Mon, 28 Nov 2011 00:43:56 -0800 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Oleksandr Tymoshenko In-Reply-To: <20111128082042.GK44498@glebius.int.ru> Date: Mon, 28 Nov 2011 00:43:50 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <349DB179-A627-4305-9348-9F3A97C4E1AC@bluezbox.com> References: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> <20111128071043.GF44498@glebius.int.ru> <17A73B0C-468D-4BA3-868E-D2E2289A570C@bluezbox.com> <20111128073244.GH44498@glebius.int.ru> <20111128082042.GK44498@glebius.int.ru> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1084) Sender: gonzo@hq.bluezbox.com X-Spam-Level: ---- X-Spam-Report: Spam detection software, running on the system "hq.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: On 2011-11-28, at 12:20 AM, Gleb Smirnoff wrote: > On Mon, Nov 28, 2011 at 12:13:36AM -0800, Oleksandr Tymoshenko wrote: > O> > O> On 2011-11-27, at 11:32 PM, Gleb Smirnoff wrote: > O> > O> > On Sun, Nov 27, 2011 at 11:18:10PM -0800, Oleksandr Tymoshenko wrote: > O> > O> > Stefan, Oleksandr, > O> > O> > > O> > O> > which revisions have you tried? Revisions between r227791 and r227958 are already > O> > O> > known to have problems. Can you please clarify that you have tried revision r227958 > O> > O> > or higher? > O> > O> > O> > O> My source tree is r227960. I do not see "can't allocate llinfo" messages, just "in_scrubprefix: err=51, prefix delete failed" > O> > > O> > Can you please obtain backtrace to determine which codepath causes error. Patch > O> > attached. > O> > O> Sure, here it is: > O> > O> in_scrubprefix+57c (?, ?, ?, ?) ra 80435d28 sp a12980 sz 160 > O> in_ifinit+38 (?, ?, ?, ?) ra 80437328 sp a12a20 sz 96 > O> in_control+bf8 (?, ?, ?, ?) ra 8040ebb4 sp a12a80 sz 112 > O> ifioctl+1974 (17ee000, ?, ?, ?) ra 804add20 sp a12af0 sz 192 > O> bootpc_init+1be0 (?, ?, ?, ?) ra 802a642c sp a12bb0 sz 320 > O> mi_startup+20c (?, ?, ?, ?) ra 80100134 sp a12cf0 sz 32 > > Compiler have inlined bootpc_adjust_interface & bootpc_fakeup_interface into > bootpc_init so I can't determine which one is failing. [...] Content analysis details: (-4.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] -0.4 AWL AWL: From: address is in the auto white-list Cc: freebsd-embedded@freebsd.org Subject: Re: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 08:43:58 -0000 On 2011-11-28, at 12:20 AM, Gleb Smirnoff wrote: > On Mon, Nov 28, 2011 at 12:13:36AM -0800, Oleksandr Tymoshenko wrote: > O>=20 > O> On 2011-11-27, at 11:32 PM, Gleb Smirnoff wrote: > O>=20 > O> > On Sun, Nov 27, 2011 at 11:18:10PM -0800, Oleksandr Tymoshenko = wrote: > O> > O> > Stefan, Oleksandr, > O> > O> >=20 > O> > O> > which revisions have you tried? Revisions between r227791 = and r227958 are already > O> > O> > known to have problems. Can you please clarify that you have = tried revision r227958 > O> > O> > or higher? > O> > O>=20 > O> > O> My source tree is r227960. I do not see "can't allocate = llinfo" messages, just "in_scrubprefix: err=3D51, prefix delete failed" > O> >=20 > O> > Can you please obtain backtrace to determine which codepath = causes error. Patch > O> > attached. > O>=20 > O> Sure, here it is: > O>=20 > O> in_scrubprefix+57c (?,?,?,?) ra 80435d28 sp a12980 sz 160 > O> in_ifinit+38 (?,?,?,?) ra 80437328 sp a12a20 sz 96 > O> in_control+bf8 (?,?,?,?) ra 8040ebb4 sp a12a80 sz 112 > O> ifioctl+1974 (17ee000,?,?,?) ra 804add20 sp a12af0 sz 192 > O> bootpc_init+1be0 (?,?,?,?) ra 802a642c sp a12bb0 sz 320 > O> mi_startup+20c (?,?,?,?) ra 80100134 sp a12cf0 sz 32 >=20 > Compiler have inlined bootpc_adjust_interface & = bootpc_fakeup_interface into > bootpc_init so I can't determine which one is failing. It's bootpc_adjust_interface From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 09:10:04 2011 Return-Path: Delivered-To: embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F310106566B for ; Mon, 28 Nov 2011 09:10:04 +0000 (UTC) (envelope-from ask@develooper.com) Received: from mbox1.develooper.com (mbox1.develooper.com [207.171.7.178]) by mx1.freebsd.org (Postfix) with ESMTP id 537918FC13 for ; Mon, 28 Nov 2011 09:10:04 +0000 (UTC) Received: (qmail 20620 invoked from network); 28 Nov 2011 08:43:23 -0000 Received: from cpe-76-172-28-38.socal.res.rr.com (HELO embla.bn.dev) (ask@mail.dev@76.172.28.38) by smtp.develooper.com with ESMTPA; 28 Nov 2011 08:43:23 -0000 Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=windows-1252 From: =?iso-8859-1?Q?Ask_Bj=F8rn_Hansen?= In-Reply-To: <4E4B6E39.6030008@uffe.org> Date: Mon, 28 Nov 2011 00:43:23 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4874688C-7D3D-428D-B654-C500A4F61DA2@develooper.com> <4E4B6E39.6030008@uffe.org> To: Uffe Jakobsen X-Mailer: Apple Mail (2.1251.1) Cc: embedded@freebsd.org Subject: Re: "gpart set -a active" not changing boot loader X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 09:10:04 -0000 On Aug 17, 2011, at 0:31, Uffe Jakobsen wrote: >> However, when booting I get: >>=20 >> 1 FreeBSD >> 2 FreeBSD >>=20 >> Default: 1 >>=20 >> =85 and `gpart show` now shows the first partition as the active one. >>=20 >> Is my boot loader too old or some such? This is a NanoBSD system = that might have been upgraded since some 6.x version. >>=20 >=20 > boot0 setting and the active partition mark in the partition table is = having the usual disagreements... I've never come around to get the = completely picture of the problem - but see the problem it quite often. I was fussing with a bit again now. It seems that at least with boot0 = v2.0 (as per boot0cfg -v) it does boot on the active (as per gpart) = partition, but the output it shows when booting says the default is = whatever number boot0cfg -v displays. Ask= From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 09:33:20 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D8B89106564A for ; Mon, 28 Nov 2011 09:33:20 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 3F0E08FC0A for ; Mon, 28 Nov 2011 09:33:20 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pAS9XEeD062859; Mon, 28 Nov 2011 13:33:14 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pAS9XE4M062858; Mon, 28 Nov 2011 13:33:14 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 28 Nov 2011 13:33:13 +0400 From: Gleb Smirnoff To: Oleksandr Tymoshenko Message-ID: <20111128093313.GM44498@glebius.int.ru> References: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> <20111128071043.GF44498@glebius.int.ru> <17A73B0C-468D-4BA3-868E-D2E2289A570C@bluezbox.com> <20111128073244.GH44498@glebius.int.ru> <20111128082042.GK44498@glebius.int.ru> <349DB179-A627-4305-9348-9F3A97C4E1AC@bluezbox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <349DB179-A627-4305-9348-9F3A97C4E1AC@bluezbox.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-embedded@FreeBSD.org Subject: Re: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 09:33:20 -0000 On Mon, Nov 28, 2011 at 12:43:50AM -0800, Oleksandr Tymoshenko wrote: O> O> On 2011-11-28, at 12:20 AM, Gleb Smirnoff wrote: O> O> > On Mon, Nov 28, 2011 at 12:13:36AM -0800, Oleksandr Tymoshenko wrote: O> > O> O> > O> On 2011-11-27, at 11:32 PM, Gleb Smirnoff wrote: O> > O> O> > O> > On Sun, Nov 27, 2011 at 11:18:10PM -0800, Oleksandr Tymoshenko wrote: O> > O> > O> > Stefan, Oleksandr, O> > O> > O> > O> > O> > O> > which revisions have you tried? Revisions between r227791 and r227958 are already O> > O> > O> > known to have problems. Can you please clarify that you have tried revision r227958 O> > O> > O> > or higher? O> > O> > O> O> > O> > O> My source tree is r227960. I do not see "can't allocate llinfo" messages, just "in_scrubprefix: err=51, prefix delete failed" O> > O> > O> > O> > Can you please obtain backtrace to determine which codepath causes error. Patch O> > O> > attached. O> > O> O> > O> Sure, here it is: O> > O> O> > O> in_scrubprefix+57c (?,?,?,?) ra 80435d28 sp a12980 sz 160 O> > O> in_ifinit+38 (?,?,?,?) ra 80437328 sp a12a20 sz 96 O> > O> in_control+bf8 (?,?,?,?) ra 8040ebb4 sp a12a80 sz 112 O> > O> ifioctl+1974 (17ee000,?,?,?) ra 804add20 sp a12af0 sz 192 O> > O> bootpc_init+1be0 (?,?,?,?) ra 802a642c sp a12bb0 sz 320 O> > O> mi_startup+20c (?,?,?,?) ra 80100134 sp a12cf0 sz 32 O> > O> > Compiler have inlined bootpc_adjust_interface & bootpc_fakeup_interface into O> > bootpc_init so I can't determine which one is failing. O> O> It's bootpc_adjust_interface Can you please try r227790 (one before r227791) to check whether this printf from in_scrubprefix() existed before. It looks to me that this message is harmless, and the real problem is sosend() returning EINVAL. That is probably also fallout from r227791, but I suspect that digging into in_scrubprefix() is a wrong direction. -- Totus tuus, Glebius. From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 10:44:28 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5222A1065670 for ; Mon, 28 Nov 2011 10:44:28 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id CA6BB8FC1B for ; Mon, 28 Nov 2011 10:44:27 +0000 (UTC) Received: from [192.168.99.1] (helo=terran.dlink.ua) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1RUyQa-0003BF-MD; Mon, 28 Nov 2011 12:27:14 +0200 Date: Mon, 28 Nov 2011 12:26:51 +0200 From: Aleksandr Rybalko To: Stefan Bethke Message-Id: <20111128122651.eca6c65a.ray@dlink.ua> In-Reply-To: References: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> <20111128071043.GF44498@glebius.int.ru> <17A73B0C-468D-4BA3-868E-D2E2289A570C@bluezbox.com> <20111128073244.GH44498@glebius.int.ru> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: Gleb Smirnoff , freebsd-embedded@FreeBSD.org Subject: Re: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 10:44:28 -0000 On Mon, 28 Nov 2011 08:40:46 +0100 Stefan Bethke wrote: >> Am 28.11.2011 um 08:32 schrieb Gleb Smirnoff: >> >> > Can you please obtain backtrace to determine which codepath causes >> > error. Patch attached. >> >> Without the patch and on r228049, I can't build the kernel anymore, >> even from an empty obj. >> >> stb@diesel:~/working/tp-wr1043/src$ ../build/build/bin/build >> tl-wr1043nd buildkernel ... >> cc -c -O -pipe -march=mips32 -std=c99 -g -Wall -Wredundant-decls >> -Wnested-externs -Wstrict-prototypes -Wmissing-prototypes >> -Wpointer-arith -Winline -Wcast-qual -Wundef -Wno-pointer-sign >> -fformat-extensions -Wmissing-include-dirs >> -fdiagnostics-show-option -nostdinc -I. >> -I/home/stb/working/tp-wr1043/src/sys >> -I/home/stb/working/tp-wr1043/src/sys/contrib/altq >> -I/home/stb/working/tp-wr1043/src/sys/contrib/libfdt -D_KERNEL >> -DHAVE_KERNEL_OPTION_HEADERS -include opt_global.h -fno-common >> -finline-limit=8000 --param inline-unit-growth=10000 --param >> large-function-growth=100000 --param max-inline-insns-single=10000 >> -fno-pic -mno-abicalls -G0 -march=mips32 -msoft-float -ffreestanding >> -Werror /home/stb/working/tp-wr1043/src/sys/mips/atheros/uart_bus_ar71xx.c >> cc1: warnings being treated as >> errors /home/stb/working/tp-wr1043/src/sys/mips/atheros/if_arge.c: >> In function >> 'arge_flush_ddr': /home/stb/working/tp-wr1043/src/sys/mips/atheros/if_arge.c:195: >> warning: implicit declaration of function >> 'ar71xx_device_flush_ddr_ge0' /home/stb/working/tp-wr1043/src/sys/mips/atheros/if_arge.c:195: >> warning: nested extern declaration of >> 'ar71xx_device_flush_ddr_ge0' [-Wnested-externs] /home/stb/working/tp-wr1043/src/sys/mips/atheros/if_arge.c:197: >> warning: implicit declaration of function >> 'ar71xx_device_flush_ddr_ge1' /home/stb/working/tp-wr1043/src/sys/mips/atheros/if_arge.c:197: >> warning: nested extern declaration of >> 'ar71xx_device_flush_ddr_ge1' [-Wnested-externs] *** Error code 1 1 >> error *** Error code 2 1 error *** Error code 2 1 error >> stb@diesel:~/working/tp-wr1043/src$ svn info Path: . Working Copy >> Root Path: /home/stb/working/tp-wr1043/src URL: >> svn://svn.freebsd.org/base/head Repository Root: >> svn://svn.freebsd.org/base Repository UUID: >> ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f Revision: 228049 Node Kind: >> directory Schedule: normal Last Changed Author: trociny Last Changed >> Rev: 228049 Last Changed Date: 2011-11-28 08:09:29 +0100 (Mon, 28 >> Nov 2011) >> >> >> -- >> Stefan Bethke Fon +49 151 14070811 >> >> >> >> _______________________________________________ >> freebsd-embedded@freebsd.org mailing list >> http://lists.freebsd.org/mailman/listinfo/freebsd-embedded >> To unsubscribe, send any mail to >> "freebsd-embedded-unsubscribe@freebsd.org" Hi, it is my breakage, sorry! WBW -- Alexandr Rybalko aka Alex RAY From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 11:07:17 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69A50106567C for ; Mon, 28 Nov 2011 11:07:17 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id 57B608FC14 for ; Mon, 28 Nov 2011 11:07:17 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id pASB7HHg042481 for ; Mon, 28 Nov 2011 11:07:17 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id pASB7GZg042464 for freebsd-embedded@FreeBSD.org; Mon, 28 Nov 2011 11:07:16 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 28 Nov 2011 11:07:16 GMT Message-Id: <201111281107.pASB7GZg042464@freefall.freebsd.org> X-Authentication-Warning: freefall.freebsd.org: gnats set sender to owner-bugmaster@FreeBSD.org using -f From: FreeBSD bugmaster To: freebsd-embedded@FreeBSD.org Cc: Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 11:07:17 -0000 Note: to view an individual PR, use: http://www.freebsd.org/cgi/query-pr.cgi?pr=(number). The following is a listing of current problems submitted by FreeBSD users. These represent problem reports covering all versions including experimental development code and obsolete releases. S Tracker Resp. Description -------------------------------------------------------------------------------- o misc/52256 embedded [picobsd] picobsd build script does not read in user/s o kern/42728 embedded [picobsd] many problems in src/usr.sbin/ppp/* after c 2 problems total. From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 13:31:29 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0653B106566B for ; Mon, 28 Nov 2011 13:31:29 +0000 (UTC) (envelope-from glebius@FreeBSD.org) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.64.117]) by mx1.freebsd.org (Postfix) with ESMTP id 6B6728FC17 for ; Mon, 28 Nov 2011 13:31:28 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.5/8.14.5) with ESMTP id pASDVPqp065354; Mon, 28 Nov 2011 17:31:25 +0400 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.5/8.14.5/Submit) id pASDVPli065353; Mon, 28 Nov 2011 17:31:25 +0400 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 28 Nov 2011 17:31:25 +0400 From: Gleb Smirnoff To: Oleksandr Tymoshenko Message-ID: <20111128133125.GO44498@glebius.int.ru> References: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=koi8-r Content-Disposition: inline In-Reply-To: <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> User-Agent: Mutt/1.5.21 (2010-09-15) Cc: freebsd-embedded@FreeBSD.org Subject: Re: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 13:31:29 -0000 On Sun, Nov 27, 2011 at 06:38:19PM -0800, Oleksandr Tymoshenko wrote: O> > I'm trying to play around with things a bit more, and figured it would be easier to just have a full base system via NFS. I've added a couple bits to the kernel config: O> > options BOOTP O> > options BOOTP_NFSROOT O> > options BOOTP_NFSV3 O> > options BOOTP_WIRED_TO=arge0 O> > options NFSCLIENT O> > options NFS_ROOT O> > O> > O> > But it's getting stuck: O> > ? O> > Sending DHCP Request packet from interface arge0 (74:ea:3a:e4:d9:20) O> > Received DHCP Ack packet on arge0 from 44.128.65.1 (accepted) (got root path) O> > arge0 at 44.128.65.7 server 44.128.65.1 boot file TP-WN1043ND.factory.bin O> > subnet mask 255.255.255.192 router 44.128.65.1 root_server 44.128.65.1 rootfs /p1/netboot/freebsd-mipseb-current hostname whitebox2 O> > Adjusted interface arge0 O> > in_scrubprefix: err=51, prefix delete failed O> O> Same here. I tracked it down to r227791. Prior to this revision NFS root works fine. I've fixed the problem in 228062. Please inform me if r228062 doesn't work for you. -- Totus tuus, Glebius. From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 14:00:28 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5C7F41065676 for ; Mon, 28 Nov 2011 14:00:08 +0000 (UTC) (envelope-from aduane@juniper.net) Received: from exprod7og122.obsmtp.com (exprod7og122.obsmtp.com [64.18.2.22]) by mx1.freebsd.org (Postfix) with ESMTP id 10DCF8FC12 for ; Mon, 28 Nov 2011 14:00:07 +0000 (UTC) Received: from P-EMHUB03-HQ.jnpr.net ([66.129.224.36]) (using TLSv1) by exprod7ob122.postini.com ([64.18.6.12]) with SMTP ID DSNKTtOT5/MJVLumfBg62aM2oZE2wZtBs9IE@postini.com; Mon, 28 Nov 2011 06:00:08 PST Received: from p-emfe01-wf.jnpr.net (172.28.145.24) by P-EMHUB03-HQ.jnpr.net (172.24.192.37) with Microsoft SMTP Server (TLS) id 8.3.213.0; Mon, 28 Nov 2011 05:45:42 -0800 Received: from EMBX01-WF.jnpr.net ([fe80::1914:3299:33d9:e43b]) by p-emfe01-wf.jnpr.net ([fe80::d0d1:653d:5b91:a123%11]) with mapi; Mon, 28 Nov 2011 08:45:42 -0500 From: Andrew Duane To: Adrian Chadd , Nenhum_de_Nos Date: Mon, 28 Nov 2011 08:45:40 -0500 Thread-Topic: tplink TL-WR1043ND access point is now ready (was Re: svn commit: r227926 - head/sys/mips/conf) Thread-Index: Acyr3O/ovuGrcy7cQ4CSA18B0P5+agB9sFWg Message-ID: References: <4ECFF854.5050602@swin.edu.au> <4010BC72-2896-4AD0-AECB-60768C82F549@lassitu.de> In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Cc: "freebsd-embedded@freebsd.org" Subject: RE: tplink TL-WR1043ND access point is now ready (was Re: svn commit: r227926 - head/sys/mips/conf) X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 14:00:28 -0000 FWIW, I once went through the code and attempted to find all the endian-spe= cific places in UFS/FFS, and rapidly went insane. I also tried a pass of ma= king a utility to swap an existing filesystem around, exactly so I could cr= eate one on an i386 then mount it on MIPS. That also quickly turned into a = fool's errand.=20 =A0................................... Andrew Duane Juniper Networks +1 978-589-0551 (o) +1 603-770-7088 (m) aduane@juniper.net > -----Original Message----- > From: owner-freebsd-embedded@freebsd.org [mailto:owner-freebsd- embedded@= freebsd.org] On Behalf Of Adrian Chadd > Sent: Friday, November 25, 2011 8:44 PM > To: Nenhum_de_Nos > Cc: freebsd-embedded@freebsd.org > Subject: Re: tplink TL-WR1043ND access point is now ready (was Re: svn > commit: r227926 - head/sys/mips/conf) >=20 > On 26 November 2011 09:22, Nenhum_de_Nos wrote= : >=20 > > is there a way to make it have ufs ? > > and any TL-WR1043ND will do, or must have hw version of some specific n= umber ? >=20 > It's a UFS, compressed on the flash. But uzip is read-only, and doing > lots of modifications to a cheap NOR flash is not likely a smart move. > You can attach an FFS formatted flash disk and run a read/write > filesystem on that. >=20 > Just keep in mind (and here's something I should write up on the wiki) > that the filesystem endianness is _not_ the same as intel. You can't > just simply create a FS on an intel box and mount it on MIPS. It'd be > nice if someone went over the UFS/FFS code and introduced endian > configurability, but that's definitely not in the scope of my current wor= k. From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 15:27:30 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D6908106564A; Mon, 28 Nov 2011 15:27:30 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id 9EB778FC12; Mon, 28 Nov 2011 15:27:30 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 1DAD7111D74; Mon, 28 Nov 2011 16:27:29 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Stefan Bethke In-Reply-To: <20111128133125.GO44498@glebius.int.ru> Date: Mon, 28 Nov 2011 16:27:28 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <87527FBF-645E-46F5-A02E-4B62AD648914@lassitu.de> <09F858C3-92A7-4EA7-8745-69F7866AA675@bluezbox.com> <20111128133125.GO44498@glebius.int.ru> To: Gleb Smirnoff X-Mailer: Apple Mail (2.1251.1) Cc: freebsd-embedded@FreeBSD.org Subject: Re: TP-WR1043: trying NFS root X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 15:27:30 -0000 Am 28.11.2011 um 14:31 schrieb Gleb Smirnoff: > I've fixed the problem in 228062. Please inform me if r228062 doesn't = work for you. Works like a charm, thank you! Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 22:12:57 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A4942106564A for ; Mon, 28 Nov 2011 22:12:57 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id 53DB48FC15 for ; Mon, 28 Nov 2011 22:12:57 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 224961131CA for ; Mon, 28 Nov 2011 23:12:56 +0100 (CET) From: Stefan Bethke Content-Type: multipart/mixed; boundary="Apple-Mail=_1774D2C1-62A7-427A-8EA3-CA8CD3BF121E" Date: Mon, 28 Nov 2011 23:12:55 +0100 Message-Id: To: freebsd-embedded@freebsd.org Mime-Version: 1.0 (Apple Message framework v1251.1) X-Mailer: Apple Mail (2.1251.1) Subject: TL-WR1043: LEDs X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 22:12:57 -0000 --Apple-Mail=_1774D2C1-62A7-427A-8EA3-CA8CD3BF121E Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Here's a quick and dirty hack to use the ar71xx GPIO module to get the = pin configuration from a hint. Add device gpio device gpioled to your kernel config to enable these. See gpioctl(1) and led(4) for = how to control them. The buttons can be polled with gpioctl. --=20 Stefan Bethke Fon +49 151 14070811 --Apple-Mail=_1774D2C1-62A7-427A-8EA3-CA8CD3BF121E Content-Disposition: attachment; filename=patch-tl-wr1043nd-leds.txt Content-Type: text/plain; name="patch-tl-wr1043nd-leds.txt" Content-Transfer-Encoding: quoted-printable Index: mips/atheros/ar71xx_gpio.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- mips/atheros/ar71xx_gpio.c (revision 228073) +++ mips/atheros/ar71xx_gpio.c (working copy) @@ -349,6 +349,50 @@ } =20 static int +ar71xx_gpio_configure_from_hint(device_t dev) +{ + struct ar71xx_gpio_softc *sc =3D device_get_softc(dev); + const char *c, *d; + int i; +=09 + if (resource_string_value(device_get_name(dev),=20 + device_get_unit(dev), "pins", &c)) + return (ENXIO); + device_printf(dev, "pins=3D%s\n", c); + i =3D 0; + /* "1=3Do:usb,2=3Do:sys,3=3Di:reset,5=3Do:qss,7=3Di:qss,9=3Do:wlan= " */ + while (c) { + d =3D strchr(c, '=3D'); + if (d =3D=3D NULL) + return (ENXIO); + sc->gpio_pins[i].gp_pin =3D strtol(c, NULL, 10); + sc->gpio_pins[i].gp_caps =3D DEFAULT_CAPS; + sc->gpio_pins[i].gp_flags =3D 0; + d++; + if (d[0] !=3D 'i' && d[0] !=3D 'o' && d[1] !=3D ':') + return (ENXIO); + ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], + d[0] =3D=3D 'o' ? GPIO_PIN_OUTPUT : = GPIO_PIN_INPUT); + d +=3D 2; + c =3D d; + d =3D strchr(d, ','); + if (d !=3D NULL) { + strncpy(sc->gpio_pins[i].gp_name, c, + d - c < GPIOMAXNAME ? d - c : = GPIOMAXNAME); + c =3D d; + c++; + } else { + strncpy(sc->gpio_pins[i].gp_name, c, GPIOMAXNAME); + c =3D NULL; + } + device_printf(dev, "pin %0x=3D%s\n", = sc->gpio_pins[i].gp_pin, sc->gpio_pins[i].gp_name); + i++; + } + sc->gpio_npins =3D i; + return (0); +} + +static int ar71xx_gpio_attach(device_t dev) { struct ar71xx_gpio_softc *sc =3D device_get_softc(dev); @@ -393,20 +437,21 @@ /* Configure all pins as input */ /* disable interrupts for all pins */ GPIO_WRITE(sc, AR71XX_GPIO_INT_MASK, 0); - pinp =3D ar71xx_gpio_pins; - i =3D 0; - while (pinp->name) { - strncpy(sc->gpio_pins[i].gp_name, pinp->name, = GPIOMAXNAME); - sc->gpio_pins[i].gp_pin =3D pinp->pin; - sc->gpio_pins[i].gp_caps =3D DEFAULT_CAPS; - sc->gpio_pins[i].gp_flags =3D 0; - ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], = pinp->flags); - pinp++; - i++; + if (ar71xx_gpio_configure_from_hint(dev)) { + pinp =3D ar71xx_gpio_pins; + i =3D 0; + while (pinp->name) { + strncpy(sc->gpio_pins[i].gp_name, pinp->name, GPIOMAXNAME); + sc->gpio_pins[i].gp_pin =3D pinp->pin; + sc->gpio_pins[i].gp_caps =3D DEFAULT_CAPS; + sc->gpio_pins[i].gp_flags =3D 0; + ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], = pinp->flags); + pinp++; + i++; + } + sc->gpio_npins =3D i; } =20 - sc->gpio_npins =3D i; - device_add_child(dev, "gpioc", device_get_unit(dev)); device_add_child(dev, "gpiobus", device_get_unit(dev)); return (bus_generic_attach(dev)); Index: mips/conf/TP-WN1043ND.hints =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- mips/conf/TP-WN1043ND.hints (revision 228073) +++ mips/conf/TP-WN1043ND.hints (working copy) @@ -75,3 +75,27 @@ hint.map.4.end=3D0x00800000 hint.map.4.name=3D"art" hint.map.4.readonly=3D1 + +# GPIO +hint.gpio.0.at=3D"apb0" +hint.gpio.0.maddr=3D0x18040000 +hint.gpio.0.msize=3D0x10000 +hint.gpio.0.irq=3D2 +hint.gpio.0.pins=3D"1=3Do:usb,2=3Do:sys,3=3Di:reset,5=3Do:qss,7=3Di:qss,9= =3Do:wlan" + +# LEDs +hint.gpioled.0.at=3D"gpiobus0" +hint.gpioled.0.name=3D"usb" +hint.gpioled.0.pins=3D0x0002 + +hint.gpioled.1.at=3D"gpiobus0" +hint.gpioled.1.name=3D"sys" +hint.gpioled.1.pins=3D0x0004 + +hint.gpioled.2.at=3D"gpiobus0" +hint.gpioled.2.name=3D"qss" +hint.gpioled.2.pins=3D0x0020 + +hint.gpioled.3.at=3D"gpiobus0" +hint.gpioled.3.name=3D"wlan" +hint.gpioled.3.pins=3D0x0200 --Apple-Mail=_1774D2C1-62A7-427A-8EA3-CA8CD3BF121E-- From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 22:18:07 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8E865106564A for ; Mon, 28 Nov 2011 22:18:07 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id 5A0988FC14 for ; Mon, 28 Nov 2011 22:18:07 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id A96FF11346F for ; Mon, 28 Nov 2011 23:18:06 +0100 (CET) From: Stefan Bethke Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Date: Mon, 28 Nov 2011 23:18:06 +0100 Message-Id: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> To: freebsd-embedded@freebsd.org Mime-Version: 1.0 (Apple Message framework v1251.1) X-Mailer: Apple Mail (2.1251.1) Subject: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 22:18:07 -0000 So with the GPIOs working, the next step would be to attach a = bit-banging I2C device to GPIO 18 and 19. My kernel foo is probably not = up to creating the appropriate newbus attachment myself. Anybody want = to give me a hint? I'd start by copying lpbb, replacing the parallel = port code with appropirate gpio calls. I haven't taken a detailed look at the OpenWrt code, but the datasheet = for the RTL8366 can be googled, including a full register map and a = description of the VLAN configuration (which I'm most interested in). = With a working I2C bus, that shouldn't be too hard, I'd think. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 22:23:27 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 889BA106564A for ; Mon, 28 Nov 2011 22:23:27 +0000 (UTC) (envelope-from mbalmer@NetBSD.org) Received: from sleipnir.msys.ch (unknown [IPv6:2001:4060:c0de:f000::3]) by mx1.freebsd.org (Postfix) with ESMTP id 213308FC17 for ; Mon, 28 Nov 2011 22:23:26 +0000 (UTC) Received: from mail.msys.ch (smtp.msys.ch [157.161.101.10]) by sleipnir.msys.ch (8.14.3/8.14.3) with ESMTP id pASMNOEN006753 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 28 Nov 2011 23:23:25 +0100 (CET) Received: from macbook.vnode.ch (macbook.vnode.ch [62.12.170.149] (may be forged)) (authenticated bits=0) by mail.msys.ch (8.14.3/8.14.1) with ESMTP id pASMNNO9011438 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NOT) for ; Mon, 28 Nov 2011 23:23:24 +0100 (CET) Message-ID: <4ED409DB.3000401@NetBSD.org> Date: Mon, 28 Nov 2011 23:23:23 +0100 From: Marc Balmer Organization: The NetBSD Foundation User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: freebsd-embedded@freebsd.org References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> In-Reply-To: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-SMTP-Vilter-Version: 1.3.6 X-Spamd-Symbols: AWL,RCVD_IN_DNSWL_LOW Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 22:23:27 -0000 Am 28.11.11 23:18, schrieb Stefan Bethke: > So with the GPIOs working, the next step would be to attach a bit-banging I2C device to GPIO 18 and 19. My kernel foo is probably not up to creating the appropriate newbus attachment myself. Anybody want to give me a hint? I'd start by copying lpbb, replacing the parallel port code with appropirate gpio calls. > > I haven't taken a detailed look at the OpenWrt code, but the datasheet for the RTL8366 can be googled, including a full register map and a description of the VLAN configuration (which I'm most interested in). With a working I2C bus, that shouldn't be too hard, I'd think. Maybe take a look at NetBSD -current. It has all that you want. It is a pity FreeBSD did not take theNetBSD GPIO framework, but shoehorned its own (although they cleary took code and concepts from them). From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 22:29:33 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 10924106564A for ; Mon, 28 Nov 2011 22:29:33 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id CE5858FC0A for ; Mon, 28 Nov 2011 22:29:32 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id C41B91134B9 for ; Mon, 28 Nov 2011 23:29:31 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1251.1) From: Stefan Bethke In-Reply-To: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> Date: Mon, 28 Nov 2011 23:29:31 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> To: freebsd-embedded@freebsd.org X-Mailer: Apple Mail (2.1251.1) Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 22:29:33 -0000 Am 28.11.2011 um 23:18 schrieb Stefan Bethke: > So with the GPIOs working, the next step would be to attach a = bit-banging I2C device to GPIO 18 and 19. My kernel foo is probably not = up to creating the appropriate newbus attachment myself. Anybody want = to give me a hint? I'd start by copying lpbb, replacing the parallel = port code with appropirate gpio calls. >=20 > I haven't taken a detailed look at the OpenWrt code, but the datasheet = for the RTL8366 can be googled, including a full register map and a = description of the VLAN configuration (which I'm most interested in). = With a working I2C bus, that shouldn't be too hard, I'd think. Further looking around, we already have dev/gpio/gpioiic.c. I'll see if = I can get it to attach. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 22:54:56 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5641D106566B for ; Mon, 28 Nov 2011 22:54:56 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id 1F6758FC08 for ; Mon, 28 Nov 2011 22:54:56 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 6677011354C; Mon, 28 Nov 2011 23:54:55 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=us-ascii From: Stefan Bethke In-Reply-To: <20111129005126.4679cecc.ray@ddteam.net> Date: Mon, 28 Nov 2011 23:54:54 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <2725731E-300E-445B-B9E5-E5230AFAB875@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <20111129005126.4679cecc.ray@ddteam.net> To: Aleksandr Rybalko X-Mailer: Apple Mail (2.1251.1) Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 22:54:56 -0000 Am 28.11.2011 um 23:51 schrieb Aleksandr Rybalko: > On Mon, 28 Nov 2011 23:18:06 +0100 > Stefan Bethke wrote: >=20 > can you do me a favor? check please (if box open already) are pins > 66,67 of RTL8366 wired? >=20 > I ask because (maybe you know) I work on switch framework and already > have partial support for RTL8366, but in my box it connected with MDIO > (pins 66,67) >=20 > Thank you! I'll take it apart again tomorrow, but my understanding from the OpenWrt = code and the datasheet is that register access to the switch = configuration is through the I2C bus, not through MDIO. I'm not certain = though. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 23:05:11 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7A1FC1065670 for ; Mon, 28 Nov 2011 23:05:11 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 133E68FC08 for ; Mon, 28 Nov 2011 23:05:10 +0000 (UTC) Received: by faak28 with SMTP id k28so725341faa.13 for ; Mon, 28 Nov 2011 15:05:10 -0800 (PST) Received: by 10.204.15.208 with SMTP id l16mr42335114bka.100.1322521509936; Mon, 28 Nov 2011 15:05:09 -0800 (PST) Received: from rnote.ddteam.net (34-187-133-95.pool.ukrtel.net. [95.133.187.34]) by mx.google.com with ESMTPS id c4sm32874912bkk.13.2011.11.28.15.05.07 (version=SSLv3 cipher=OTHER); Mon, 28 Nov 2011 15:05:08 -0800 (PST) Date: Tue, 29 Nov 2011 01:05:05 +0200 From: Aleksandr Rybalko To: Stefan Bethke Message-Id: <20111129010505.f97e3adc.ray@ddteam.net> In-Reply-To: <2725731E-300E-445B-B9E5-E5230AFAB875@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <20111129005126.4679cecc.ray@ddteam.net> <2725731E-300E-445B-B9E5-E5230AFAB875@lassitu.de> X-Mailer: Sylpheed 3.1.0 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 23:05:11 -0000 On Mon, 28 Nov 2011 23:54:54 +0100 Stefan Bethke wrote: > Am 28.11.2011 um 23:51 schrieb Aleksandr Rybalko: > > > On Mon, 28 Nov 2011 23:18:06 +0100 > > Stefan Bethke wrote: > > > > can you do me a favor? check please (if box open already) are pins > > 66,67 of RTL8366 wired? > > > > I ask because (maybe you know) I work on switch framework and > > already have partial support for RTL8366, but in my box it > > connected with MDIO (pins 66,67) > > > > Thank you! > > I'll take it apart again tomorrow, but my understanding from the > OpenWrt code and the datasheet is that register access to the switch > configuration is through the I2C bus, not through MDIO. I'm not > certain though. > That case must be even more interesting :) I bet there is switch interrupt also on some of gpio :) > > Stefan > > -- > Stefan Bethke Fon +49 151 14070811 > > > -- Aleksandr Rybalko From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 23:19:01 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D78B5106564A for ; Mon, 28 Nov 2011 23:19:01 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 677328FC13 for ; Mon, 28 Nov 2011 23:19:01 +0000 (UTC) Received: by bkbzs8 with SMTP id zs8so11386054bkb.13 for ; Mon, 28 Nov 2011 15:19:00 -0800 (PST) Received: by 10.204.155.76 with SMTP id r12mr44300126bkw.115.1322520693159; Mon, 28 Nov 2011 14:51:33 -0800 (PST) Received: from rnote.ddteam.net (34-187-133-95.pool.ukrtel.net. [95.133.187.34]) by mx.google.com with ESMTPS id j9sm32843161bkd.2.2011.11.28.14.51.29 (version=SSLv3 cipher=OTHER); Mon, 28 Nov 2011 14:51:30 -0800 (PST) Date: Tue, 29 Nov 2011 00:51:26 +0200 From: Aleksandr Rybalko To: Stefan Bethke Message-Id: <20111129005126.4679cecc.ray@ddteam.net> In-Reply-To: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> X-Mailer: Sylpheed 3.1.0 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 23:19:01 -0000 On Mon, 28 Nov 2011 23:18:06 +0100 Stefan Bethke wrote: > So with the GPIOs working, the next step would be to attach a > bit-banging I2C device to GPIO 18 and 19. My kernel foo is probably > not up to creating the appropriate newbus attachment myself. Anybody > want to give me a hint? I'd start by copying lpbb, replacing the > parallel port code with appropirate gpio calls. > > I haven't taken a detailed look at the OpenWrt code, but the > datasheet for the RTL8366 can be googled, including a full register > map and a description of the VLAN configuration (which I'm most > interested in). With a working I2C bus, that shouldn't be too hard, > I'd think. > > > Stefan > > -- > Stefan Bethke Fon +49 151 14070811 > > > > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to > "freebsd-embedded-unsubscribe@freebsd.org" Hi Stefan, can you do me a favor? check please (if box open already) are pins 66,67 of RTL8366 wired? I ask because (maybe you know) I work on switch framework and already have partial support for RTL8366, but in my box it connected with MDIO (pins 66,67) Thank you! WBW -- Aleksandr Rybalko From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 28 23:38:07 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id CFB47106564A for ; Mon, 28 Nov 2011 23:38:07 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id 983918FC0C for ; Mon, 28 Nov 2011 23:38:07 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 7DD57113DDD for ; Tue, 29 Nov 2011 00:38:06 +0100 (CET) Content-Type: text/plain; charset=windows-1252 Mime-Version: 1.0 (Apple Message framework v1251.1) From: Stefan Bethke In-Reply-To: <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> Date: Tue, 29 Nov 2011 00:38:05 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <5483EFA1-9D7B-4EE6-B888-F024BD1FF3A5@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> To: freebsd-embedded@freebsd.org X-Mailer: Apple Mail (2.1251.1) Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 28 Nov 2011 23:38:07 -0000 Am 28.11.2011 um 23:29 schrieb Stefan Bethke: > Am 28.11.2011 um 23:18 schrieb Stefan Bethke: >=20 >> So with the GPIOs working, the next step would be to attach a = bit-banging I2C device to GPIO 18 and 19. My kernel foo is probably not = up to creating the appropriate newbus attachment myself. Anybody want = to give me a hint? I'd start by copying lpbb, replacing the parallel = port code with appropirate gpio calls. >>=20 >> I haven't taken a detailed look at the OpenWrt code, but the = datasheet for the RTL8366 can be googled, including a full register map = and a description of the VLAN configuration (which I'm most interested = in). With a working I2C bus, that shouldn't be too hard, I'd think. >=20 > Further looking around, we already have dev/gpio/gpioiic.c. I'll see = if I can get it to attach. With gpioiic and these hints: hint.gpioiic.0.at=3D"gpiobus0" hint.gpioiic.0.pins=3D0xc0000 I'm getting this: gpio0: [GIANT-LOCKED] gpioc0: on gpio0 gpiobus0: on gpio0 gpioled0: at pin(s) 1 on gpiobus0 gpioled1: at pin(s) 2 on gpiobus0 gpioled2: at pin(s) 5 on gpiobus0 gpioled3: at pin(s) 9 on gpiobus0 gpioiic0: at pin(s) 18-19 on gpiobus0 iicbb0: on gpioiic0 iicbus0: on iicbb0 master-only iic0: on iicbus0 =85 # i2c -a 4 -d r -c 2 error sending stop condtion ioctl: error sending start condition#=20 # i2c -r panic: rb_cpldbus: cannot serialize the access to device. KDB: enter: panic [ thread pid 753 tid 100043 ] Stopped at kdb_enter+0x4c: lui at,0x8054 db>=20 The panic comes from gpiobus.c Also, gpioiic.c assumes that SCL is pin 0 and SDA is pin 1. Are pins = addressed relative to the child device, or are the pin numbers absolute = wrt the actual gpio device? Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Tue Nov 29 00:32:05 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 209DA1065673 for ; Tue, 29 Nov 2011 00:32:05 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id CD7A08FC08 for ; Tue, 29 Nov 2011 00:32:04 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so5480113vcb.13 for ; Mon, 28 Nov 2011 16:32:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=Qx6EQ8CGD7lToI0IZ814fEEv5gMVyZehiPsR0qCo8Mo=; b=i52C3vcV4IN+C0Yfxe6q0x5jXuJ5XvE7bJy0wjG4XOVk+RpfTDCrrXjPG1ePE6SNPl c13XIfnostDsLOKU9y/px+KrRvkEoT6BLqIZkOBMFAw5wZFGIwO7q2VS2t3E34CAuPoE 6oH+mL22fkiHUJc8YgpGqnZeLevIfv/hfrIhU= MIME-Version: 1.0 Received: by 10.220.108.197 with SMTP id g5mr5252988vcp.44.1322526723528; Mon, 28 Nov 2011 16:32:03 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.186.74 with HTTP; Mon, 28 Nov 2011 16:32:03 -0800 (PST) In-Reply-To: References: Date: Tue, 29 Nov 2011 08:32:03 +0800 X-Google-Sender-Auth: k68mvScBSpVGAZORlGqfBVswSCE Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: LEDs X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 00:32:05 -0000 On 29 November 2011 06:12, Stefan Bethke wrote: > Here's a quick and dirty hack to use the ar71xx GPIO module to get the pi= n configuration from a hint. > > Add > =A0device =A0gpio > =A0device =A0gpioled > to your kernel config to enable these. =A0See gpioctl(1) and led(4) for h= ow to control them. =A0The buttons can be polled with gpioctl. The trouble is that the gpio lines themselves are hard-coded/enumerated in the chip specific gpio driver (eg sys/mips/atheros/ar71xx_gpio.c). ray@ and I have discussed fleshing out a way to use hints to enumerate: * which gpio lines to configure; * what their default "flavour" should be (in, out, pullup, pulldown, etc); As well as cpu specific hints: * chip specific gpio setup - ie, for CPUs whose GPIO pins share functions, a way to configure a per-board function mask (since some boards may disable things like USB and enable those as GPIO lines.) That way we can fully customise what's going on through a kernel configuration file and hints file, without having to patch the kernel for different boards. If someone would like to tackle the above generic GPIO hints stuff (the LED code lets you define LED lines, but I couldn't figure out how to do the same with the GPIO lines themselves) then we'll be in a much better position to ship functional images. I really would like to be able to ship functioning buttons on these units so I can enable failover and WPS. :) Thanks, Adrian From owner-freebsd-embedded@FreeBSD.ORG Tue Nov 29 00:34:24 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 17653106566B; Tue, 29 Nov 2011 00:34:24 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id D3F8C8FC17; Tue, 29 Nov 2011 00:34:23 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id EEF50111883; Tue, 29 Nov 2011 01:34:22 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=windows-1252 From: Stefan Bethke In-Reply-To: Date: Tue, 29 Nov 2011 01:34:20 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: To: Adrian Chadd X-Mailer: Apple Mail (2.1251.1) Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: LEDs X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 00:34:24 -0000 Am 29.11.2011 um 01:32 schrieb Adrian Chadd: > If someone would like to tackle the above generic GPIO hints stuff > (the LED code lets you define LED lines, but I couldn't figure out how > to do the same with the GPIO lines themselves) then we'll be in a much > better position to ship functional images. I really would like to be > able to ship functioning buttons on these units so I can enable > failover and WPS. :) Did you look at my patch? It's ugly, but it's working=85 Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Tue Nov 29 00:39:06 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 7CAEC106566C for ; Tue, 29 Nov 2011 00:39:06 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3265C8FC13 for ; Tue, 29 Nov 2011 00:39:06 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so1937135vbb.13 for ; Mon, 28 Nov 2011 16:39:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=iFsHuT4ueoJga3QvAZNo7NaRLYtSQSz0sxSDV1jAfP0=; b=sKgkjE0NKkKnGrZ3Zkwf8EddHCXM9FsnnzaV+XlNStIPVDSNF/QZ4NjtbREcmaNXPZ 1K5gBMnsEbDABT4Sjrsi+YM0BMO/i5xStIns2h7T+5NDGN/hD4aBo7gitviiwQjRz6HK /+HLKLsTfBxHZTnfhIcpDTxXkH7TR+HESmhOs= MIME-Version: 1.0 Received: by 10.52.26.179 with SMTP id m19mr4934777vdg.95.1322527144302; Mon, 28 Nov 2011 16:39:04 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.186.74 with HTTP; Mon, 28 Nov 2011 16:39:04 -0800 (PST) In-Reply-To: <5483EFA1-9D7B-4EE6-B888-F024BD1FF3A5@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <5483EFA1-9D7B-4EE6-B888-F024BD1FF3A5@lassitu.de> Date: Tue, 29 Nov 2011 08:39:04 +0800 X-Google-Sender-Auth: 8ukuQ3E6IhEmSa_JZCe3wJiOu6g Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 00:39:06 -0000 It looks like the code hard-codes: #define SCL_PIN 0 /* gpiobus mapped pin 6 */ #define SDA_PIN 1 /* gpiobus mapped pin 7 */ You could add some printf()s to sys/mips/atheros/ar71xx_gpio.c and log which GPIO pins are being twiddled. That'd answer your question immediately. Are they around the correct way? The wiki says that pin 18 is data and pin 19 is clock, but gpioiic has clock as pin '0' and data as pin '1'. You could try swapping the values of SCL_PIN and SDA_PIN. Ideally the gpiobus assignment above should specify which pins are clock and data via hints, eg: hint.gpioiic.0.at="gpiobus0" hint.gpioiic.0.pins=0xc0000 # Which pin range is being requested; this is parsed by the code in gpiobus? hint.gpioiic.0.datapin=0 # Relative to the above pin set hint.gpioiic.0.clockpin=1 # Relative to the above pin set Adrian From owner-freebsd-embedded@FreeBSD.ORG Tue Nov 29 00:51:13 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2EE36106566B for ; Tue, 29 Nov 2011 00:51:13 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id E2D738FC0A for ; Tue, 29 Nov 2011 00:51:12 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so1946307vbb.13 for ; Mon, 28 Nov 2011 16:51:12 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=sIANfQu0PZmuGLZLhINNDZyBltKeE8YisR5c8+wEfwI=; b=AAJD0WJ5qc9xCIuQi4wdlBXlAE183kRf/YyDhVodlN3hDp/bNcQFEzHY5ydBa30Z1y PJXwXyQv4hzVTCv4f2nvGRwmbAMAJ6dFWd80EYpEpGJH9IN4NlF6oMy5AXZvrCz0oZRM R/Cwc27kSQ/W6pqPaCya2TwaZOk6ZAjNIhfNA= MIME-Version: 1.0 Received: by 10.52.91.237 with SMTP id ch13mr45600402vdb.129.1322527872179; Mon, 28 Nov 2011 16:51:12 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.186.74 with HTTP; Mon, 28 Nov 2011 16:51:12 -0800 (PST) In-Reply-To: References: Date: Tue, 29 Nov 2011 08:51:12 +0800 X-Google-Sender-Auth: 0Sr4vdPfBLQ0FYHm4JC71GftqXs Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: LEDs X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 00:51:13 -0000 Oh there's a patch too. Oops. I definitely have to put thinking about this on hold for a couple weeks, sorry. But at this point, just delete ar71xx_gpio_pins and fix up or remove the code that references it. :) Adrian From owner-freebsd-embedded@FreeBSD.ORG Tue Nov 29 22:59:10 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0C612106564A for ; Tue, 29 Nov 2011 22:59:10 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id C9F358FC1C for ; Tue, 29 Nov 2011 22:59:09 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id B4E3A10B0BA for ; Tue, 29 Nov 2011 23:59:08 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1251.1) From: Stefan Bethke In-Reply-To: <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> Date: Tue, 29 Nov 2011 23:59:08 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> To: freebsd-embedded@freebsd.org X-Mailer: Apple Mail (2.1251.1) Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 29 Nov 2011 22:59:10 -0000 Am 28.11.2011 um 23:29 schrieb Stefan Bethke: > Am 28.11.2011 um 23:18 schrieb Stefan Bethke: >=20 >> So with the GPIOs working, the next step would be to attach a = bit-banging I2C device to GPIO 18 and 19. My kernel foo is probably not = up to creating the appropriate newbus attachment myself. Anybody want = to give me a hint? I'd start by copying lpbb, replacing the parallel = port code with appropirate gpio calls. >>=20 >> I haven't taken a detailed look at the OpenWrt code, but the = datasheet for the RTL8366 can be googled, including a full register map = and a description of the VLAN configuration (which I'm most interested = in). With a working I2C bus, that shouldn't be too hard, I'd think. >=20 > Further looking around, we already have dev/gpio/gpioiic.c. I'll see = if I can get it to attach. I couldn't get iic to work, so I rolled my own userland bitbanging = utility, based roughly on the OpenWrt code (minus some small bugs) and = the datasheet. I can read and write registers, but to my consternation, most of the = functionality (MIB counters, ST controls, etc.) seems to be somehow = disabled or just plain missing. I'll try to get a basic utility up and running to use the basic VLAN = mode (not the table-based mode) tomorrow. Once that's working = suffiently well, I could make it into a stand-alone driver, or see if it = can be integrated into Aleksandrs work. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 30 01:06:51 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 69F241065670; Wed, 30 Nov 2011 01:06:51 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id D75EB8FC0A; Wed, 30 Nov 2011 01:06:50 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so3470693vbb.13 for ; Tue, 29 Nov 2011 17:06:50 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=5i7KiSAfuCglX+g9x0vBpa8DrvUvIr8aLDmJqvIiSyw=; b=KPcqqOtOAuJi4l6ddVgCtHYB9dYwnDn6VuKeWzy2XoInDovXIDCxWnwr+/AIjWwyO3 7ICW4p3lH0iRq1YpKgM/9YJ4O3CIUXm5MS41LwhYuYdj3Hb0cANDDETx7VolQRqbgfoN LsbmoUBDhClOVAsExErMynmbBaPyYfS5GC83c= MIME-Version: 1.0 Received: by 10.52.34.211 with SMTP id b19mr110100vdj.112.1322615209764; Tue, 29 Nov 2011 17:06:49 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.186.74 with HTTP; Tue, 29 Nov 2011 17:06:49 -0800 (PST) In-Reply-To: <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> Date: Wed, 30 Nov 2011 09:06:49 +0800 X-Google-Sender-Auth: sWqFwJxWSB4g8X6fbBs4YVOcmvU Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Marius Strobl , Aleksandr Rybalko , freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 01:06:51 -0000 On 30 November 2011 06:59, Stefan Bethke wrote: > I couldn't get iic to work, so I rolled my own userland bitbanging utilit= y, based roughly on the OpenWrt code (minus some small bugs) and the datash= eet. > > I can read and write registers, but to my consternation, most of the func= tionality (MIB counters, ST controls, etc.) seems to be somehow disabled or= just plain missing. > > I'll try to get a basic utility up and running to use the basic VLAN mode= (not the table-based mode) tomorrow. =A0Once that's working suffiently wel= l, I could make it into a stand-alone driver, or see if it can be integrate= d into Aleksandrs work. Cool! Let's see if we can at least use it as a test point to compare ray's switch framework code against. Ideally it'll be another switch driver, perhaps split into three bits - core, i2c glue, miibus glue. I wonder why the iic driver doesn't work. I'd ideally like to glue the switch core to either an i2c bus (for those switches which sit on i2c) or via an MII PHY, where appropriate. ray@ and marius@ may have a better idea about how to handle this. Thanks for your interest and development work with this! I'll be back on track in a couple of weeks and we can integrate all this stuff back into -HEAD. Adrian From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 30 09:33:25 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8F2261065670; Wed, 30 Nov 2011 09:33:25 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 145FF8FC0C; Wed, 30 Nov 2011 09:33:24 +0000 (UTC) Received: from [192.168.99.1] (helo=terran.dlink.ua) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1RVgXa-0003OU-Gx; Wed, 30 Nov 2011 11:33:22 +0200 Date: Wed, 30 Nov 2011 11:33:42 +0200 From: Aleksandr Rybalko To: Adrian Chadd Message-Id: <20111130113342.a532b953.ray@dlink.ua> In-Reply-To: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Cc: Marius Strobl , Rybalko , Aleksandr, freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 09:33:25 -0000 On Wed, 30 Nov 2011 09:06:49 +0800 Adrian Chadd wrote: >> On 30 November 2011 06:59, Stefan Bethke wrote: >> >> > I couldn't get iic to work, so I rolled my own userland bitbanging >> > utility, based roughly on the OpenWrt code (minus some small bugs) >> > and the datasheet. >> > >> > I can read and write registers, but to my consternation, most of >> > the functionality (MIB counters, ST controls, etc.) seems to be >> > somehow disabled or just plain missing. You are not alone :) I even wrote sh scripts that works with gpioctl, and that way it works but reeeeeeally slow :) I think we will fix it, but don't know yet when it will happen :) >> > >> > I'll try to get a basic utility up and running to use the basic >> > VLAN mode (not the table-based mode) tomorrow.  Once that's >> > working suffiently well, I could make it into a stand-alone >> > driver, or see if it can be integrated into Aleksandrs work. Please try to break to DDB, find address of MDIO access and check all PHY's on both arge (IIRC by default both arge use same register, but you need to check on MDIO access registers of both arge). I believe that RTL have binding to MDIO :) And i was looked into openwrt pages, and it seems peoples solder additional wires to work with gpio i2c. >> >> Cool! >> >> Let's see if we can at least use it as a test point to compare ray's >> switch framework code against. Ideally it'll be another switch >> driver, perhaps split into three bits - core, i2c glue, miibus glue. Yeah, that will be very good, since i still not hear any suggestions or opinions about my work on switch framework :( >> >> I wonder why the iic driver doesn't work. I'd ideally like to glue >> the switch core to either an i2c bus (for those switches which sit >> on i2c) or via an MII PHY, where appropriate. ray@ and marius@ may >> have a better idea about how to handle this. >> >> Thanks for your interest and development work with this! I'll be back >> on track in a couple of weeks and we can integrate all this stuff >> back into -HEAD. >> >> >> Adrian WBW -- Alexandr Rybalko aka Alex RAY From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 30 10:18:53 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EDD631065676 for ; Wed, 30 Nov 2011 10:18:53 +0000 (UTC) (envelope-from freebsd@psconsult.nl) Received: from mx1.psconsult.nl (mx1.iaf.psconsult.nl [80.89.238.138]) by mx1.freebsd.org (Postfix) with ESMTP id 6EBCC8FC16 for ; Wed, 30 Nov 2011 10:18:53 +0000 (UTC) Received: from mx1.psconsult.nl (mx1.iaf.psconsult.nl [80.89.238.138]) by mx1.psconsult.nl (8.14.4/8.14.4) with ESMTP id pAU9gCrl088442 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 30 Nov 2011 10:42:17 +0100 (CET) (envelope-from freebsd@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.4/8.14.4/Submit) id pAU9gCqh088441 for freebsd-embedded@freebsd.org; Wed, 30 Nov 2011 10:42:12 +0100 (CET) (envelope-from freebsd@psconsult.nl) X-Authentication-Warning: mx1.psconsult.nl: paul set sender to freebsd@psconsult.nl using -f Date: Wed, 30 Nov 2011 10:42:12 +0100 From: Paul Schenkeveld To: freebsd-embedded@freebsd.org Message-ID: <20111130094212.GA76927@psconsult.nl> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Subject: Re: tplink TL-WR1043ND access point is now ready (was Re: svn commit: r227926 - head/sys/mips/conf) X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 10:18:54 -0000 On Thu, Nov 24, 2011 at 03:47:56PM +0800, Adrian Chadd wrote: > And with this particular commit, all the bits needed to get > FreeBSD-HEAD running natively on this unit are now in the tree. > > The process is documented here: > > http://code.google.com/p/freebsd-wifi-build/wiki/TpLinkTLWR1043ND Hi Adrian, this is great work it think! I've been looking for something like this for a long time and I'm now about to buy a TL-WR1043ND to try it out, I've successfully built and image that's now sitting ans waiting for hardware in my /tftpboot! One question, hopefully not too silly, is there any way of reverting a TL-WR1043ND back to it's original firmware after installing FreeBSD on it? I.e., can I somehow upload the contents of flash to my tftp server before I download the FreeBSD image? Kind regards, Paul Schenkeveld From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 30 10:54:16 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 20FB1106566B for ; Wed, 30 Nov 2011 10:54:16 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id DD2AC8FC0C for ; Wed, 30 Nov 2011 10:54:15 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 2F56410081C; Wed, 30 Nov 2011 11:54:15 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Stefan Bethke In-Reply-To: <20111130094212.GA76927@psconsult.nl> Date: Wed, 30 Nov 2011 11:54:14 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <10FF4425-2A77-4A91-A656-645188929E16@lassitu.de> References: <20111130094212.GA76927@psconsult.nl> To: Paul Schenkeveld X-Mailer: Apple Mail (2.1084) Cc: freebsd-embedded@freebsd.org Subject: Re: tplink TL-WR1043ND access point is now ready (was Re: svn commit: r227926 - head/sys/mips/conf) X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 10:54:16 -0000 Am 30.11.2011 um 10:42 schrieb Paul Schenkeveld: > On Thu, Nov 24, 2011 at 03:47:56PM +0800, Adrian Chadd wrote: >> And with this particular commit, all the bits needed to get >> FreeBSD-HEAD running natively on this unit are now in the tree. >>=20 >> The process is documented here: >>=20 >> http://code.google.com/p/freebsd-wifi-build/wiki/TpLinkTLWR1043ND >=20 > Hi Adrian, this is great work it think! I've been looking for = something > like this for a long time and I'm now about to buy a TL-WR1043ND to = try > it out, I've successfully built and image that's now sitting ans = waiting > for hardware in my /tftpboot! >=20 > One question, hopefully not too silly, is there any way of reverting > a TL-WR1043ND back to it's original firmware after installing FreeBSD > on it? I.e., can I somehow upload the contents of flash to my tftp > server before I download the FreeBSD image? The OpenWrt wiki page explains how to revert back to the original = firmware. http://wiki.openwrt.org/toh/tp-link/tl-wr1043nd TP-LINK make the firmware available for download on their site, so you = don't need to save the one that's in the flash. = http://www.tp-link.com/en/support/download/?model=3DTL-WR1043ND&version=3D= V1#tbl_j At this time, it is highly recommended to have a serial console cable = soldered to the router. Again, the OpenWrt wiki has information on = that. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 30 11:05:54 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id F0185106564A for ; Wed, 30 Nov 2011 11:05:54 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id 79FC68FC1F for ; Wed, 30 Nov 2011 11:05:54 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id AA6361009A1 for ; Wed, 30 Nov 2011 12:05:53 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) From: Stefan Bethke In-Reply-To: <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> Date: Wed, 30 Nov 2011 12:05:53 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> To: freebsd-embedded@freebsd.org X-Mailer: Apple Mail (2.1084) Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 11:05:55 -0000 Am 29.11.2011 um 23:59 schrieb Stefan Bethke: > Am 28.11.2011 um 23:29 schrieb Stefan Bethke: >=20 >> Am 28.11.2011 um 23:18 schrieb Stefan Bethke: >>=20 >>> So with the GPIOs working, the next step would be to attach a = bit-banging I2C device to GPIO 18 and 19. My kernel foo is probably not = up to creating the appropriate newbus attachment myself. Anybody want = to give me a hint? I'd start by copying lpbb, replacing the parallel = port code with appropirate gpio calls. >>>=20 >>> I haven't taken a detailed look at the OpenWrt code, but the = datasheet for the RTL8366 can be googled, including a full register map = and a description of the VLAN configuration (which I'm most interested = in). With a working I2C bus, that shouldn't be too hard, I'd think. >>=20 >> Further looking around, we already have dev/gpio/gpioiic.c. I'll see = if I can get it to attach. >=20 > I couldn't get iic to work, so I rolled my own userland bitbanging = utility, based roughly on the OpenWrt code (minus some small bugs) and = the datasheet. >=20 > I can read and write registers, but to my consternation, most of the = functionality (MIB counters, ST controls, etc.) seems to be somehow = disabled or just plain missing. >=20 > I'll try to get a basic utility up and running to use the basic VLAN = mode (not the table-based mode) tomorrow. Once that's working = suffiently well, I could make it into a stand-alone driver, or see if it = can be integrated into Aleksandrs work. Either I'm doing something wrong, or the RTL8366 is working a lot = differently from the datasheet. I've put the source as well as a binary = up for download; could someone with a running WR1043 run the command and = post the results here? http://www.lassitu.de/freebsd/rtl.tbz Here's my output directly after reboot: # ./rtl -D 00 0830 0000 0000 0000 00b0 2805 0000 0000=20 08 0000 0f45 83ed 0101 0000 0200 0000 0001=20 10 ffff ffff ffff ffff 7660 6060 fe76 6060=20 18 0000 0000 0000 0000 0000 0000 0000 0000=20 20 0001 ffff 0000 0002 0000 0000 0003 0000=20 28 0000 0004 0000 0000 0005 0000 0000 0006=20 30 0000 0000 0007 0000 0000 0008 0000 0000=20 38 0009 0000 0000 000a 0000 0000 000b 0000=20 40 0000 000c 0000 0000 000d 0000 0000 000e=20 48 0000 0000 000f 0000 0000 0010 0000 0000=20 50 ffff ffff ffff ffff ffff ffff ffff ffff=20 58 0000 0000 0000 0000 5937 0000 0000 0000=20 60 0000 0000 0000 0000 0000 0000 0000 0000=20 68 0000 0000 0000 0000 0000 0000 0000 0000=20 70 0000 0000 0000 0000 0000 0000 0000 0000=20 78 0000 0000 0000 0000 0000 0000 0000 0000=20 # ./rtl -v VTCR0[0] EN_VLAN =3D enabled VTCR0[1] VLAN_TAG_AWARE =3D disabled VTCR0[2] VLAN_TAG_ADMIT =3D enabled VTCR0[3] EN_INGRESS_RULE =3D disabled VTCR0[4] EN_UC_LEAKY =3D disabled VTCR0[5] EN_ARP_LEAKY =3D disabled VTCR0[6] EN_IPMC_LEAKY =3D disabled VTCR0[12] EN_TG_DROP =3D disabled WAN 1 2 3 4 CPU = =20 Tagging keep keep keep keep keep keep = =20 00=3D 3702 - - - - - * = =20 01=3D 0 - - - - - - = =20 02=3D 0 - - - - - - = =20 03=3D 0 - - - - - - = =20 04=3D 0 - - - - - - = =20 05=3D 1 * * * * * * = =20 06=3D 0 - * - - - - = =20 07=3D 0 - - - - - - = =20 08=3D 3 - - - - - - = =20 09=3D 0 - - * - - - = =20 10=3D 0 - - - - - - = =20 11=3D 5 - - - - - - = =20 12=3D 0 - * * - - - = =20 13=3D 0 - - - - - - = =20 14=3D 7 - - - - - - = =20 15=3D 0 - - - * - - = =20 Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 30 12:32:56 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 65D921065679 for ; Wed, 30 Nov 2011 12:32:56 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id 2D3738FC0C for ; Wed, 30 Nov 2011 12:32:56 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id E2F64B53D4 for ; Wed, 30 Nov 2011 13:32:54 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1084) From: Stefan Bethke In-Reply-To: <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> Date: Wed, 30 Nov 2011 13:32:54 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> To: freebsd-embedded@freebsd.org X-Mailer: Apple Mail (2.1084) Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 12:32:56 -0000 Am 30.11.2011 um 12:05 schrieb Stefan Bethke: > Either I'm doing something wrong, or the RTL8366 is working a lot = differently from the datasheet.=20 The datasheet I found is for the RTL8366, while the TL-WR1043ND uses a = RTL8366RB. While they seem to share quite a bit of the general = architecture, the register map differs. (There's also a RTL8366S.) The best source on registers and their function then would be the = OpenWrt source. = https://dev.openwrt.org/browser/trunk/target/linux/generic/files/drivers/n= et/phy/ rtl8366_smi.c is the bitbanging interface, while rtl8366rb.c contains = the actual configuration functions. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 30 13:48:56 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 032C2106564A for ; Wed, 30 Nov 2011 13:48:56 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id B3E948FC15 for ; Wed, 30 Nov 2011 13:48:55 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so556098vbb.13 for ; Wed, 30 Nov 2011 05:48:55 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=d1YgHEKk0l2tTkX2QL0BN2w9yK1i8Rih6/abngLtshU=; b=gVIjiTlgC9AD4qee1ENXUY/wA32LLWpaK3iHegzE+pjcZ9RozcdAppSnaLH4ZSgEUC j2r+rMyQW8x8v+E9J6YJDVPtV5at8umID72kAxdkFlWuswVFwMUSxE22QSP4X0FlPG+l XIjR0L1jBoexlWre0G3Y9hl1BIHPXmMCT51Zk= MIME-Version: 1.0 Received: by 10.52.33.69 with SMTP id p5mr1988658vdi.78.1322660934930; Wed, 30 Nov 2011 05:48:54 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.186.74 with HTTP; Wed, 30 Nov 2011 05:48:54 -0800 (PST) In-Reply-To: <10FF4425-2A77-4A91-A656-645188929E16@lassitu.de> References: <20111130094212.GA76927@psconsult.nl> <10FF4425-2A77-4A91-A656-645188929E16@lassitu.de> Date: Wed, 30 Nov 2011 21:48:54 +0800 X-Google-Sender-Auth: 9nvHfMWxTOfXyS1Unpp-OE1DIlo Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: tplink TL-WR1043ND access point is now ready (was Re: svn commit: r227926 - head/sys/mips/conf) X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 13:48:56 -0000 +1 on the serial console. Yes, you can revert to the original firmware. Well, I haven't yet tftp -uploaded- what's in the flash, but what I suggest you do is this: * modify my tplink config file to have an mdroot of 6 meg (and change the rootfs to be /dev/md0.uzip * when building the firmware, build "buildkernel installkernel mfsroot fsimage netboot" - that'll blit the uzip mfsroot into the kernel, leaving you with TP-WN1043ND.netboot * you can then netboot the kernel: > tftpboot 0x80050000 kernel.TP-WN1043ND.netboot > go 0x80050100 .. then use dd and netcat to take a complete flash backup, something like: # dd if=/dev/flash/spi0 bs=64k | nc That should leave you with an 8 megabyte image. Finally, the trick to restoring the original firmware is to trim out the first 128k and the last 64k of the firmware image. You can likely use dd to do that. I haven't the time to think of the way to do it, but something like this. * skip the first 128k - that's uboot * skip the last 128k - that's the config partition (ignore) and the last 64k there is the radio calibration data $ dd if=backup-image.bin of=firmware.bin bs=64k skip=2 count=124 .. I think that's right. That should leave you with an image you can reflash later on: > erase 0xbf020000 +7c0000 # I _think_ this is right, check with the openwrt wiki! > tftpboot 0x81000000 backup-image.bin > cp.b 0x81000000 0xbf020000 +7c0000 > bootm 0xbf020000 I -think- that's right. I'd appreciate it if someone else would double-check my figures. But I've done that in the past so I have a complete copy of the flash contents, including the radio calibration data, in case I somehow screw it up. Good luck! Adrian From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 30 16:05:55 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B2D251065672 for ; Wed, 30 Nov 2011 16:05:55 +0000 (UTC) (envelope-from rcm@fuzzwad.org) Received: from mail.volente.us (unknown [IPv6:2001:470:7:d47::2]) by mx1.freebsd.org (Postfix) with ESMTP id 750998FC0A for ; Wed, 30 Nov 2011 16:05:55 +0000 (UTC) Received: from zombie.fuzzwad.net (localhost [127.0.0.1]) by mail.volente.us (8.14.4/8.14.4) with ESMTP id pAUG5rpk022771; Wed, 30 Nov 2011 10:05:54 -0600 (CST) (envelope-from rcm@fuzzwad.org) Message-ID: <4ED65461.5080304@fuzzwad.org> Date: Wed, 30 Nov 2011 10:05:53 -0600 From: Ron McDowell User-Agent: Thunderbird 2.0.0.23 (Macintosh/20090812) MIME-Version: 1.0 To: Stefan Bethke References: <20111130094212.GA76927@psconsult.nl> <10FF4425-2A77-4A91-A656-645188929E16@lassitu.de> In-Reply-To: <10FF4425-2A77-4A91-A656-645188929E16@lassitu.de> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: freebsd-embedded@freebsd.org Subject: Re: tplink TL-WR1043ND access point is now ready (was Re: svn commit: r227926 - head/sys/mips/conf) X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 16:05:55 -0000 Stefan Bethke wrote: > TP-LINK make the firmware available for download on their site, so you don't need to save the one that's in the flash. > http://www.tp-link.com/en/support/download/?model=TL-WR1043ND&version=V1#tbl_j > I have run into cases where when I needed a piece of code like this, it was gone from the manufacturers site...now I grab things like this and keep them locally. Just saying... -- Ron McDowell San Antonio TX From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 30 16:09:06 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6BCAB1065673 for ; Wed, 30 Nov 2011 16:09:06 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 21BA68FC12 for ; Wed, 30 Nov 2011 16:09:05 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so823209vcb.13 for ; Wed, 30 Nov 2011 08:09:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=RypiiixmMC9HjmDc0NZfqgr8hsGEtXulARDU/Qhoq4k=; b=btuxBdXWP8WizAqzIfg5AF7tdFpQKx0e9bOrsCHs1cJOYlKWRGbzr1JnadwYK31NDw /RvjvNoKz014k4Wtu4Duit0nzbEtmCFw1l9hTHI/13VeftYyrLpkH+lijwg7qB+gt/+T NOXcMA59R1+U3wPnMe8la5Jern2Mi3xVfKgok= MIME-Version: 1.0 Received: by 10.220.108.197 with SMTP id g5mr510111vcp.44.1322669344741; Wed, 30 Nov 2011 08:09:04 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.186.74 with HTTP; Wed, 30 Nov 2011 08:09:04 -0800 (PST) In-Reply-To: <4ED65461.5080304@fuzzwad.org> References: <20111130094212.GA76927@psconsult.nl> <10FF4425-2A77-4A91-A656-645188929E16@lassitu.de> <4ED65461.5080304@fuzzwad.org> Date: Thu, 1 Dec 2011 00:09:04 +0800 X-Google-Sender-Auth: bOe4Qr4Fhc43GPOiHXGQiI7lxN8 Message-ID: From: Adrian Chadd To: Ron McDowell Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: tplink TL-WR1043ND access point is now ready (was Re: svn commit: r227926 - head/sys/mips/conf) X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 16:09:06 -0000 On 1 December 2011 00:05, Ron McDowell wrote: > Stefan Bethke wrote: >> >> TP-LINK make the firmware available for download on their site, so you >> don't need to save the one that's in the flash. >> >> http://www.tp-link.com/en/support/download/?model=TL-WR1043ND&version=V1#tbl_j >> > > I have run into cases where when I needed a piece of code like this, it was > gone from the manufacturers site...now I grab things like this and keep them > locally. It may not be a bad idea to have a local repository on the FreeBSD wiki. Volunteers welcome. :) Adrian From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 30 19:44:02 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 086441065672 for ; Wed, 30 Nov 2011 19:44:02 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id C1D378FC12 for ; Wed, 30 Nov 2011 19:44:01 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 4BF3F1131A5 for ; Wed, 30 Nov 2011 20:44:00 +0100 (CET) Content-Type: text/plain; charset=us-ascii Mime-Version: 1.0 (Apple Message framework v1251.1) From: Stefan Bethke In-Reply-To: <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> Date: Wed, 30 Nov 2011 20:43:59 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> To: freebsd-embedded@freebsd.org X-Mailer: Apple Mail (2.1251.1) Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 19:44:02 -0000 One step closer: http://www.lassitu.de/freebsd/rtl8366ctl.tbz The starting point for a configuration utility. I've implemented two = "drivers": direct bitbanging access via gpio(4), or I2C access via = iic(4). The I2C framework makes a faulty assumption that the read/not-write bit = of the first byte (the address) indicates whether reads or writes are to = follow. While many simple I2C devices usually will follow this rule, = it's not prescribed by the protocol (AFAICT), and is incompatible with = the way the RTL8366 familiy uses the bus: after sending the = address+read/not-write byte, two register address bytes are sent, then = the 16-bit register value is sent or received. While the register write = access can be performed as a 4-byte write, the read access requires the = read bit to be set, but the first two bytes for the register address = then need to be transmitted. This patch removes the faulty check: Index: sys/dev/iicbus/iiconf.c =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- sys/dev/iicbus/iiconf.c (revision 228073) +++ sys/dev/iicbus/iiconf.c (working copy) @@ -244,7 +244,7 @@ struct iicbus_softc *sc =3D (struct iicbus_softc = *)device_get_softc(bus); =09 /* a slave must have been started with the appropriate address = */ - if (!sc->started || (sc->started & LSB)) + if (!sc->started) return (EINVAL); =20 return (IICBUS_WRITE(device_get_parent(bus), buf, len, sent, = timeout)); @@ -262,7 +262,7 @@ struct iicbus_softc *sc =3D (struct iicbus_softc = *)device_get_softc(bus); =09 /* a slave must have been started with the appropriate address = */ - if (!sc->started || !(sc->started & LSB)) + if (!sc->started) return (EINVAL); =20 return (IICBUS_READ(device_get_parent(bus), buf, len, read, = last, delay)); While trying to figure this out, I also came across the panic in = sys/dev/gpio/gpiobus.c:panic("rb_cpldbus: cannot serialize the access to = device."). I'm not sure how I triggered it (the backtrace wasn't = immediately revealing to me), but I'm speculating that the I2C fails to = relinquish the GPIO when a bus transaction is aborted. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 30 20:01:21 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id ACE5E106566C for ; Wed, 30 Nov 2011 20:01:21 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 4EE5B8FC08 for ; Wed, 30 Nov 2011 20:01:21 +0000 (UTC) Received: from [10.30.101.60] ([209.117.142.2]) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id pAUJwJcf076055 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Wed, 30 Nov 2011 12:58:21 -0700 (MST) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> Date: Wed, 30 Nov 2011 12:58:14 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> To: Stefan Bethke X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Wed, 30 Nov 2011 12:58:22 -0700 (MST) Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 20:01:21 -0000 On Nov 30, 2011, at 12:43 PM, Stefan Bethke wrote: > One step closer: >=20 > http://www.lassitu.de/freebsd/rtl8366ctl.tbz >=20 > The starting point for a configuration utility. I've implemented two = "drivers": direct bitbanging access via gpio(4), or I2C access via = iic(4). >=20 > The I2C framework makes a faulty assumption that the read/not-write = bit of the first byte (the address) indicates whether reads or writes = are to follow. While many simple I2C devices usually will follow this = rule, it's not prescribed by the protocol (AFAICT), and is incompatible = with the way the RTL8366 familiy uses the bus: after sending the = address+read/not-write byte, two register address bytes are sent, then = the 16-bit register value is sent or received. While the register write = access can be performed as a 4-byte write, the read access requires the = read bit to be set, but the first two bytes for the register address = then need to be transmitted. I thought that was spelled out in the i2c spec fairly clearly... Do you = have the data sheet showing this timing? Warner > This patch removes the faulty check: > Index: sys/dev/iicbus/iiconf.c > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- sys/dev/iicbus/iiconf.c (revision 228073) > +++ sys/dev/iicbus/iiconf.c (working copy) > @@ -244,7 +244,7 @@ > struct iicbus_softc *sc =3D (struct iicbus_softc = *)device_get_softc(bus); > =09 > /* a slave must have been started with the appropriate address = */ > - if (!sc->started || (sc->started & LSB)) > + if (!sc->started) > return (EINVAL); >=20 > return (IICBUS_WRITE(device_get_parent(bus), buf, len, sent, = timeout)); > @@ -262,7 +262,7 @@ > struct iicbus_softc *sc =3D (struct iicbus_softc = *)device_get_softc(bus); > =09 > /* a slave must have been started with the appropriate address = */ > - if (!sc->started || !(sc->started & LSB)) > + if (!sc->started) > return (EINVAL); >=20 > return (IICBUS_READ(device_get_parent(bus), buf, len, read, = last, delay)); >=20 > While trying to figure this out, I also came across the panic in = sys/dev/gpio/gpiobus.c:panic("rb_cpldbus: cannot serialize the access to = device."). I'm not sure how I triggered it (the backtrace wasn't = immediately revealing to me), but I'm speculating that the I2C fails to = relinquish the GPIO when a bus transaction is aborted. >=20 >=20 > Stefan >=20 > --=20 > Stefan Bethke Fon +49 151 14070811 >=20 >=20 >=20 > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to = "freebsd-embedded-unsubscribe@freebsd.org" >=20 >=20 From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 30 20:16:53 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 462EC1065670 for ; Wed, 30 Nov 2011 20:16:53 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id 0A0FC8FC13 for ; Wed, 30 Nov 2011 20:16:53 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id DCB1D113AFB; Wed, 30 Nov 2011 21:16:51 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=windows-1252 From: Stefan Bethke In-Reply-To: <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> Date: Wed, 30 Nov 2011 21:16:51 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <2ED0CD2A-7D7B-438D-AE00-B9DF947D01B3@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> To: Warner Losh X-Mailer: Apple Mail (2.1251.1) Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 20:16:53 -0000 Am 30.11.2011 um 20:58 schrieb Warner Losh: > On Nov 30, 2011, at 12:43 PM, Stefan Bethke wrote: >=20 >> The I2C framework makes a faulty assumption that the read/not-write = bit of the first byte (the address) indicates whether reads or writes = are to follow. While many simple I2C devices usually will follow this = rule, it's not prescribed by the protocol (AFAICT), and is incompatible = with the way the RTL8366 familiy uses the bus: after sending the = address+read/not-write byte, two register address bytes are sent, then = the 16-bit register value is sent or received. While the register write = access can be performed as a 4-byte write, the read access requires the = read bit to be set, but the first two bytes for the register address = then need to be transmitted. >=20 > I thought that was spelled out in the i2c spec fairly clearly=85 You are of course correct. > Do you have the data sheet showing this timing? I don't have one for the 8366RB, but the 8366 and 8366S chips appear to = follow the same timing. See=20 http://realtek.info/pdf/rtl8366_8369_datasheet_1-1.pdf (9.2, page 44) http://realtek.info/pdf/rtl8366s_8366sr_datasheet_vpre-1.4_20071022.pdf = (9.2, page 66) I think it would be beneficial to either remove this constraint in = iicconf.c entirely, or make it optional, so that we can use the = infrastructure for devices that "almost" speak I2C. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 30 21:13:18 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B0D1D1065677 for ; Wed, 30 Nov 2011 21:13:18 +0000 (UTC) (envelope-from ray@ddteam.net) Received: from mail-fx0-f54.google.com (mail-fx0-f54.google.com [209.85.161.54]) by mx1.freebsd.org (Postfix) with ESMTP id 407BB8FC12 for ; Wed, 30 Nov 2011 21:13:18 +0000 (UTC) Received: by faak28 with SMTP id k28so1367486faa.13 for ; Wed, 30 Nov 2011 13:13:17 -0800 (PST) Received: by 10.204.157.151 with SMTP id b23mr4228333bkx.30.1322687597010; Wed, 30 Nov 2011 13:13:17 -0800 (PST) Received: from rnote.ddteam.net (241-186-133-95.pool.ukrtel.net. [95.133.186.241]) by mx.google.com with ESMTPS id z7sm6653275bka.1.2011.11.30.13.13.14 (version=SSLv3 cipher=OTHER); Wed, 30 Nov 2011 13:13:15 -0800 (PST) Date: Wed, 30 Nov 2011 23:13:11 +0200 From: Aleksandr Rybalko To: Warner Losh Message-Id: <20111130231311.4a154bc5.ray@ddteam.net> In-Reply-To: <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> X-Mailer: Sylpheed 3.1.0 (GTK+ 2.24.5; amd64-portbld-freebsd9.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Nov 2011 21:13:18 -0000 Hi, On Wed, 30 Nov 2011 12:58:14 -0700 Warner Losh wrote: > > On Nov 30, 2011, at 12:43 PM, Stefan Bethke wrote: > > > One step closer: > > > > http://www.lassitu.de/freebsd/rtl8366ctl.tbz > > > > The starting point for a configuration utility. I've implemented > > two "drivers": direct bitbanging access via gpio(4), or I2C access > > via iic(4). > > > > The I2C framework makes a faulty assumption that the read/not-write > > bit of the first byte (the address) indicates whether reads or > > writes are to follow. While many simple I2C devices usually will > > follow this rule, it's not prescribed by the protocol (AFAICT), and > > is incompatible with the way the RTL8366 familiy uses the bus: > > after sending the address+read/not-write byte, two register address > > bytes are sent, then the 16-bit register value is sent or > > received. While the register write access can be performed as a > > 4-byte write, the read access requires the read bit to be set, but > > the first two bytes for the register address then need to be > > transmitted. Now I recall my problems with iic :) > > I thought that was spelled out in the i2c spec fairly clearly... Do > you have the data sheet showing this timing? > I found the same in other Realtek switches, that rules applied also to RTL8367, 8370. IIRC Realtek even don't name this bus as I2C :) This usage maybe related with use of this bus to access i2c EEPROM for initialization. > Warner > > > This patch removes the faulty check: > > Index: sys/dev/iicbus/iiconf.c > > =================================================================== > > --- sys/dev/iicbus/iiconf.c (revision 228073) > > +++ sys/dev/iicbus/iiconf.c (working copy) > > @@ -244,7 +244,7 @@ > > struct iicbus_softc *sc = (struct iicbus_softc > > *)device_get_softc(bus); > > /* a slave must have been started with the appropriate > > address */ > > - if (!sc->started || (sc->started & LSB)) > > + if (!sc->started) > > return (EINVAL); > > > > return (IICBUS_WRITE(device_get_parent(bus), buf, len, > > sent, timeout)); @@ -262,7 +262,7 @@ > > struct iicbus_softc *sc = (struct iicbus_softc > > *)device_get_softc(bus); > > /* a slave must have been started with the appropriate > > address */ > > - if (!sc->started || !(sc->started & LSB)) > > + if (!sc->started) > > return (EINVAL); > > > > return (IICBUS_READ(device_get_parent(bus), buf, len, read, > > last, delay)); > > > > While trying to figure this out, I also came across the panic in > > sys/dev/gpio/gpiobus.c:panic("rb_cpldbus: cannot serialize the > > access to device."). I'm not sure how I triggered it (the > > backtrace wasn't immediately revealing to me), but I'm speculating > > that the I2C fails to relinquish the GPIO when a bus transaction is > > aborted. > > > > > > Stefan > > > > -- > > Stefan Bethke Fon +49 151 14070811 > > > > > > > > _______________________________________________ > > freebsd-embedded@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > > To unsubscribe, send any mail to > > "freebsd-embedded-unsubscribe@freebsd.org" > > > > > > _______________________________________________ > freebsd-embedded@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-embedded > To unsubscribe, send any mail to > "freebsd-embedded-unsubscribe@freebsd.org" -- Aleksandr Rybalko From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 1 04:06:34 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DBD2D106567A for ; Thu, 1 Dec 2011 04:06:34 +0000 (UTC) (envelope-from gonzo@hq.bluezbox.com) Received: from hq.bluezbox.com (hq.bluezbox.com [70.38.37.145]) by mx1.freebsd.org (Postfix) with ESMTP id A5A9C8FC22 for ; Thu, 1 Dec 2011 04:06:34 +0000 (UTC) Received: from localhost ([127.0.0.1]) by hq.bluezbox.com with esmtpsa (TLSv1:CAMELLIA256-SHA:256) (Exim 4.73 (FreeBSD)) (envelope-from ) id 1RVxup-000NIJ-VO for freebsd-embedded@freebsd.org; Wed, 30 Nov 2011 20:06:33 -0800 Message-ID: <4ED6FD47.6050704@bluezbox.com> Date: Wed, 30 Nov 2011 20:06:31 -0800 From: Oleksandr Tymoshenko User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:8.0) Gecko/20111105 Thunderbird/8.0 MIME-Version: 1.0 To: freebsd-embedded@freebsd.org Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Sender: gonzo@hq.bluezbox.com X-Spam-Level: ---- X-Spam-Report: Spam detection software, running on the system "hq.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: I've been tinkering with ports cross-compilation for a couple of days and decided to summarize this experience. It might start some discussion, or, with any luck, some action. I had embedded platforms on my mind and for this use-case we do not need all the ports to be cross-compilable. What we need is set of tools to make cross-compilation possible and with these tols porters can start adopting existing ports and explicitly marking them as cross-compilable. [...] Content analysis details: (-4.1 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] 0.3 AWL AWL: From: address is in the auto white-list Subject: Ports cross-compilation X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 04:06:34 -0000 I've been tinkering with ports cross-compilation for a couple of days and decided to summarize this experience. It might start some discussion, or, with any luck, some action. I had embedded platforms on my mind and for this use-case we do not need all the ports to be cross-compilable. What we need is set of tools to make cross-compilation possible and with these tols porters can start adopting existing ports and explicitly marking them as cross-compilable. With this objective I started to add hacks to ports/Mk and tried to create several generic applications. Here is what I have discovered so far: - xdev-generated compilers can be used as toolchains for ports cross-compilation. Some adaptation are required due to different platform naming in GNU configure (e.g. mips64eb vs mips64) - Ports lack "buildroot" notion. There is no distinction between TARGET directory and PREFIX. Target directory is always assumed to be root directory. DESTDIR knob tries to fix this but it's more of a shortcut than proper solution - it just places installation process in chrooted environment leaving it agnostic of real target directory - Dependencies should be split in two groups: host dependencies (build tools) and target dependencies (libraries) - Package builder works only on installed port. It allows some ports to make no distinction between two steps: (a) generate files tree for packaging and (b) generate files during installation. e.g. pre-compiling function files for shells/zsh: port tries to do it as a part of post-install target instead of placing this functionality in pkg-install script - Some ports rely on autoconf's ac_try_run test to get some information about target platform. It fails for cross compilation of course. Few fail graciously by asking developer to provide this information as #define, some just stick with default value, some bluntly crash. This should be dealt with at per-port basis. - Different sets of patches are required for cross-compilation and native build (use PATCHFILES?) - More often than not it's easier to have one more Makefile for cross-platform port instead of adding .if/.endif to existing one - bsd.port.mk is too monolithic to squeeze cross-platform stuff into it. Now, I have somewhat limited experience with cross-platform packaging: only as a user, not as a creator. So I might have overlooked some pitfalls. But as I see the plan of action, it's something like this ** actual names for files, variables, targets are irrelevant ATM ** - Add BUILDROOT variable and make all installation targets use it. May be not all but affected by cross-compilation. - Create bare-bone version of bsd.port.mk called bsd.xdev.mk. It should contain target called "xpackage" that would manage dependencies, install port to ${BUILDROOT}, generate package-related files and create a package. No package registration. We have a lot of stuff in bsd.port.mk that could be reused - fetch/checksum/dependencies. Writing them from scratch makes no sence. - Makefile for cross-compilable port should be split into three parts: common, native, cross. It's not clear who should maintain cross part though. Hope it makes any sense P.S. I apologize for the abuse of "cross-" prefix. There is way too much of it in this email. I'll work on my writing skill. From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 1 07:44:52 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9456D106564A for ; Thu, 1 Dec 2011 07:44:52 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id 5D88B8FC08 for ; Thu, 1 Dec 2011 07:44:52 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 94726113D63; Thu, 1 Dec 2011 08:44:50 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=windows-1252 From: Stefan Bethke In-Reply-To: <4ED6FD47.6050704@bluezbox.com> Date: Thu, 1 Dec 2011 08:44:49 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <96407605-79A9-4AE3-AC2F-13BD97943153@lassitu.de> References: <4ED6FD47.6050704@bluezbox.com> To: Oleksandr Tymoshenko X-Mailer: Apple Mail (2.1251.1) Cc: freebsd-embedded@freebsd.org Subject: Re: Ports cross-compilation X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 07:44:52 -0000 Am 01.12.2011 um 05:06 schrieb Oleksandr Tymoshenko: > I've been tinkering with ports cross-compilation for a couple of days = and decided to summarize this experience. It might start some = discussion, or, with any luck, some action. Excellent points! > - Package builder works only on installed port. Have you looked at pkgng yet? The wiki page says it can create a = package from a separate directory tree. > - Makefile for cross-compilable port should be split into three parts: > common, native, cross. It's not clear who should maintain cross part > though. =46rom many previous discussions, people are reluctant to add files to = all ports because of the filesystem and VCS bloat that causes. Also, = considering the number of ports there are in the tree, and how well = maintained many of the lesser ones are, any solution that requires no or = very little changes to each port would stand a much bigger chance of = being implemented successfully. Has anyone set up a ports build for mips yet, perhaps in an emulator? = It would be very interesting to see which ports build at all on mips. (I naively installed editors/joe from my TL-WR1043ND, which took about a = day mainly because it pulls in perl, and the perl build tools grow to = around 100 MB memory size. Most of the time was spent paging=85) Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 1 07:49:22 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DDB60106566B for ; Thu, 1 Dec 2011 07:49:22 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9876A8FC0C for ; Thu, 1 Dec 2011 07:49:22 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so1836751vbb.13 for ; Wed, 30 Nov 2011 23:49:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=mpydAvdhYgjhI8dXDuVoRaxZbHl6d2S++mHfv0pdL68=; b=OY+XGj9ZoIQcCWYaEsfvwMuAvZjFAEmXgBEmzcoNNTsKDmo4mtj+a2kAKmfoISkRtJ AlCD8yRRfOsZHKgcJRl7dUoV3lWeh62+dZ7iA3rWblpOKx5tiVanhR6j7KC9OGVN+ze2 g237e+re4pz6+9BDsH1y54JH6BXUpZozAp//A= MIME-Version: 1.0 Received: by 10.52.65.102 with SMTP id w6mr4983625vds.129.1322725761853; Wed, 30 Nov 2011 23:49:21 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.186.74 with HTTP; Wed, 30 Nov 2011 23:49:21 -0800 (PST) In-Reply-To: <96407605-79A9-4AE3-AC2F-13BD97943153@lassitu.de> References: <4ED6FD47.6050704@bluezbox.com> <96407605-79A9-4AE3-AC2F-13BD97943153@lassitu.de> Date: Thu, 1 Dec 2011 15:49:21 +0800 X-Google-Sender-Auth: I6lPgLOnVnfKzT15hIzI2F998rE Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: Ports cross-compilation X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 07:49:22 -0000 The ports I need build fine on MIPS. I do it all the time on my routerstation pro (680mhz mips24k, 128mb RAM.) Be careful if you compile C++ code, the paging hurts. :) Cross-compiling though, that'd be nice. :) Adrian From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 1 08:00:17 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id DA261106564A for ; Thu, 1 Dec 2011 08:00:17 +0000 (UTC) (envelope-from gonzo@hq.bluezbox.com) Received: from hq.bluezbox.com (hq.bluezbox.com [70.38.37.145]) by mx1.freebsd.org (Postfix) with ESMTP id 874388FC1B for ; Thu, 1 Dec 2011 08:00:17 +0000 (UTC) Received: from [24.87.53.93] (helo=[192.168.1.116]) by hq.bluezbox.com with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.73 (FreeBSD)) (envelope-from ) id 1RW1Z0-000OLL-Pk; Thu, 01 Dec 2011 00:00:15 -0800 Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Oleksandr Tymoshenko In-Reply-To: <96407605-79A9-4AE3-AC2F-13BD97943153@lassitu.de> Date: Thu, 1 Dec 2011 00:00:13 -0800 Content-Transfer-Encoding: quoted-printable Message-Id: <447CC818-CEA3-46B9-A15F-E0FA737B0EB4@bluezbox.com> References: <4ED6FD47.6050704@bluezbox.com> <96407605-79A9-4AE3-AC2F-13BD97943153@lassitu.de> To: Stefan Bethke X-Mailer: Apple Mail (2.1084) Sender: gonzo@hq.bluezbox.com X-Spam-Level: ---- X-Spam-Report: Spam detection software, running on the system "hq.bluezbox.com", has identified this incoming email as possible spam. The original message has been attached to this so you can view it (if it isn't spam) or label similar future email. If you have any questions, see The administrator of that system for details. Content preview: > >> - Package builder works only on installed port. > > Have you looked at pkgng yet? The wiki page says it can create a package from a separate directory tree. No, not yet. By "Package builder" I meant package-building targets of ports Makefiles. pkg_create can work on directory tree + setof pre-generated files. It's just that at the moment we use "pkg_create -b" to create package archive. [...] Content analysis details: (-4.4 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.8 ALL_TRUSTED Passed through trusted hosts only via SMTP -2.6 BAYES_00 BODY: Bayesian spam probability is 0 to 1% [score: 0.0000] Cc: freebsd-embedded@freebsd.org Subject: Re: Ports cross-compilation X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 08:00:18 -0000 >=20 >> - Package builder works only on installed port. >=20 > Have you looked at pkgng yet? The wiki page says it can create a = package from a separate directory tree. No, not yet. By "Package builder" I meant package-building=20 targets of ports Makefiles. pkg_create can work on directory=20 tree + setof pre-generated files. It's just that at the moment=20 we use "pkg_create -b" to create package archive. >> - Makefile for cross-compilable port should be split into three = parts: >> common, native, cross. It's not clear who should maintain cross part >> though. >=20 > =46rom many previous discussions, people are reluctant to add files to = all ports because of the filesystem and VCS bloat that causes. Also, = considering the number of ports there are in the tree, and how well = maintained many of the lesser ones are, any solution that requires no or = very little changes to each port would stand a much bigger chance of = being implemented successfully. As I told - getting all ports cross-compilable is impossible.=20 We're talking about most-used in embedded environment ports. I'd say=20 it's a couple of hundreds. So we need modify only these ports and only=20= if it's really required. Simple ports like converters/base64 will not=20 require modification at all.=20= From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 1 08:15:58 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3F141106566C for ; Thu, 1 Dec 2011 08:15:58 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id F1D598FC15 for ; Thu, 1 Dec 2011 08:15:57 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so1858238vbb.13 for ; Thu, 01 Dec 2011 00:15:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Zb+BpPLXTE8yOeM84MQLAZ0t7Az2KdSwP+eR3CYP084=; b=gB2KfsjAVja84fy22ahr/xJCE1Tm8rdhR/TLaXxLrrfRlsdSsNTigPPqPBz/l8mnTH b+0t2dcz+9hWk++djc6Z3ecy6LeRhJPNjfvnzEpZu1pMILbkE/4hTFIFqx6kZmU3QYY0 Zs5ncxU1nt9gvA0VEC57IVsCHW6qvx9FERTqM= MIME-Version: 1.0 Received: by 10.52.33.69 with SMTP id p5mr5095314vdi.78.1322727356864; Thu, 01 Dec 2011 00:15:56 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.186.74 with HTTP; Thu, 1 Dec 2011 00:15:56 -0800 (PST) In-Reply-To: <447CC818-CEA3-46B9-A15F-E0FA737B0EB4@bluezbox.com> References: <4ED6FD47.6050704@bluezbox.com> <96407605-79A9-4AE3-AC2F-13BD97943153@lassitu.de> <447CC818-CEA3-46B9-A15F-E0FA737B0EB4@bluezbox.com> Date: Thu, 1 Dec 2011 16:15:56 +0800 X-Google-Sender-Auth: tgBwOojymTKXpBv00PR7CkRyEtk Message-ID: From: Adrian Chadd To: Oleksandr Tymoshenko Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: Ports cross-compilation X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 08:15:58 -0000 .. hm. thinking about it, why not have a port variable flag that marks a port as "cross compiles" ? Then we could (in theory) do a cross-compile test run based on which ports in the ports tree have this variable set? Adrian From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 1 09:51:20 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id A037C1065672 for ; Thu, 1 Dec 2011 09:51:20 +0000 (UTC) (envelope-from lev@FreeBSD.org) Received: from onlyone.friendlyhosting.spb.ru (onlyone.friendlyhosting.spb.ru [IPv6:2a01:4f8:131:60a2::2]) by mx1.freebsd.org (Postfix) with ESMTP id 420CC8FC08 for ; Thu, 1 Dec 2011 09:51:20 +0000 (UTC) Received: from lion.home.serebryakov.spb.ru (unknown [IPv6:2001:470:923f:1:69b8:2555:9d19:7f7b]) (Authenticated sender: lev@serebryakov.spb.ru) by onlyone.friendlyhosting.spb.ru (Postfix) with ESMTPA id 9EC114AC31; Thu, 1 Dec 2011 13:51:18 +0400 (MSK) Date: Thu, 1 Dec 2011 13:51:08 +0400 From: Lev Serebryakov Organization: FreeBSD X-Priority: 3 (Normal) Message-ID: <335302292.20111201135108@serebryakov.spb.ru> To: Oleksandr Tymoshenko In-Reply-To: <4ED6FD47.6050704@bluezbox.com> References: <4ED6FD47.6050704@bluezbox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=windows-1251 Content-Transfer-Encoding: quoted-printable Cc: freebsd-embedded@freebsd.org Subject: Re: Ports cross-compilation X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: lev@FreeBSD.org List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 09:51:20 -0000 Hello, Oleksandr. You wrote 1 =E4=E5=EA=E0=E1=F0=FF 2011 =E3., 8:06:31: > - Some ports rely on autoconf's ac_try_run test to get some information > about target platform. It fails for cross compilation of course. > Few fail graciously by asking developer to provide this information > as #define, some just stick with default value, some bluntly crash. > This should be dealt with at per-port basis. ...by upstream maintainers= :) --=20 // Black Lion AKA Lev Serebryakov From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 1 16:12:00 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AB22C1065670 for ; Thu, 1 Dec 2011 16:12:00 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 3E22F8FC1B for ; Thu, 1 Dec 2011 16:12:00 +0000 (UTC) Received: from 150.imp.bsdimp.com (150.imp.bsdimp.com [10.0.0.150] (may be forged)) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id pB1G9rfe091015 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Thu, 1 Dec 2011 09:09:54 -0700 (MST) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <447CC818-CEA3-46B9-A15F-E0FA737B0EB4@bluezbox.com> Date: Thu, 1 Dec 2011 09:09:53 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: References: <4ED6FD47.6050704@bluezbox.com> <96407605-79A9-4AE3-AC2F-13BD97943153@lassitu.de> <447CC818-CEA3-46B9-A15F-E0FA737B0EB4@bluezbox.com> To: Oleksandr Tymoshenko X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Thu, 01 Dec 2011 09:09:54 -0700 (MST) Cc: freebsd-embedded@FreeBSD.org Subject: Re: Ports cross-compilation X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 16:12:00 -0000 On Dec 1, 2011, at 1:00 AM, Oleksandr Tymoshenko wrote: >>=20 >>> - Package builder works only on installed port. >>=20 >> Have you looked at pkgng yet? The wiki page says it can create a = package from a separate directory tree. > No, not yet. By "Package builder" I meant package-building=20 > targets of ports Makefiles. pkg_create can work on directory=20 > tree + setof pre-generated files. It's just that at the moment=20 > we use "pkg_create -b" to create package archive. >=20 >=20 >>> - Makefile for cross-compilable port should be split into three = parts: >>> common, native, cross. It's not clear who should maintain cross part >>> though. >>=20 >> =46rom many previous discussions, people are reluctant to add files = to all ports because of the filesystem and VCS bloat that causes. Also, = considering the number of ports there are in the tree, and how well = maintained many of the lesser ones are, any solution that requires no or = very little changes to each port would stand a much bigger chance of = being implemented successfully. >=20 > As I told - getting all ports cross-compilable is impossible.=20 > We're talking about most-used in embedded environment ports. I'd say=20= > it's a couple of hundreds. So we need modify only these ports and only=20= > if it's really required. Simple ports like converters/base64 will not=20= > require modification at all. When I experimented with this years ago, I found that only a small = number of ports needed extra files. Many worked because they were = either (a) so trivial that they just needed a different compiler or (b) = had complete enough cross support that hacks inside the ports = infratructure and/or a couple of tweaks to existing files were all that = was needed. Some were hopeless. I tried about 50 ports. Many of the = autoconf ports worked great. I don't think we need to have a separate Makefile, except in exceptional = cases. Warner= From owner-freebsd-embedded@FreeBSD.ORG Thu Dec 1 16:19:37 2011 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id EEE63106564A; Thu, 1 Dec 2011 16:19:37 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from harmony.bsdimp.com (bsdimp.com [199.45.160.85]) by mx1.freebsd.org (Postfix) with ESMTP id 983B38FC0C; Thu, 1 Dec 2011 16:19:37 +0000 (UTC) Received: from 150.imp.bsdimp.com (150.imp.bsdimp.com [10.0.0.150] (may be forged)) (authenticated bits=0) by harmony.bsdimp.com (8.14.4/8.14.3) with ESMTP id pB1GCj0S091048 (version=TLSv1/SSLv3 cipher=DHE-DSS-AES128-SHA bits=128 verify=NO); Thu, 1 Dec 2011 09:12:46 -0700 (MST) (envelope-from imp@bsdimp.com) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Thu, 1 Dec 2011 09:12:45 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <3B91BA0A-F5E8-4C57-8F09-0583B375C6D9@bsdimp.com> References: <4ED6FD47.6050704@bluezbox.com> <96407605-79A9-4AE3-AC2F-13BD97943153@lassitu.de> <447CC818-CEA3-46B9-A15F-E0FA737B0EB4@bluezbox.com> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.0.1 (harmony.bsdimp.com [10.0.0.6]); Thu, 01 Dec 2011 09:12:46 -0700 (MST) Cc: freebsd-embedded@FreeBSD.org Subject: Re: Ports cross-compilation X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 16:19:38 -0000 On Dec 1, 2011, at 1:15 AM, Adrian Chadd wrote: > .. hm. thinking about it, why not have a port variable flag that marks > a port as "cross compiles" ? >=20 > Then we could (in theory) do a cross-compile test run based on which > ports in the ports tree have this variable set? In the doodle I did years ago, I had a CROSS_BUILD_FLAVOR =3D {trivial, = gnuconf, custom} and had that drive some of the infrastructure. This = didn't make it into the final hack we used at symmetricom, however. = Some of that can be inferred from other variables, but we didn't bother = to try to build stuff we didn't need and that might not be working. Warner From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 2 14:39:33 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 932E3106566B for ; Fri, 2 Dec 2011 14:39:33 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 458828FC1D for ; Fri, 2 Dec 2011 14:39:32 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so3755470vbb.13 for ; Fri, 02 Dec 2011 06:39:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=zrQ/RuRAYwf6hwHsCEFizKJVNS65DURnJAu9vq+VtqA=; b=cNNERH6LZDyuItW0+mG2uqMWjIE9uAgb3+yDpTF9a9nO4xo6a885EZDWEzi5Rf09a1 eoSP/d+4Upb66ct1mHezhR2wMNyjrZA5hFynYLtn5/XbzhWNfq56oS0m/FGRag3LaZWd shG9j4Ns4F31TcrWVGx91Nfdt5rAFK7xqX140= MIME-Version: 1.0 Received: by 10.52.20.35 with SMTP id k3mr70694vde.34.1322836772425; Fri, 02 Dec 2011 06:39:32 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.109.10 with HTTP; Fri, 2 Dec 2011 06:39:32 -0800 (PST) In-Reply-To: <20111130231311.4a154bc5.ray@ddteam.net> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> <20111130231311.4a154bc5.ray@ddteam.net> Date: Fri, 2 Dec 2011 22:39:32 +0800 X-Google-Sender-Auth: jtmS0xrRdzSbBaQPbeMUz5RaKIc Message-ID: From: Adrian Chadd To: Aleksandr Rybalko Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 14:39:33 -0000 .. erk. Well, what shall we do? Create a different driver? Or just enable a "quirk" or configuration paramater, which allows the device to be not-quite-i2c? Adrian From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 2 14:45:11 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id E43D1106564A; Fri, 2 Dec 2011 14:45:11 +0000 (UTC) (envelope-from ray@dlink.ua) Received: from dlink.ua (smtp.dlink.ua [193.138.187.146]) by mx1.freebsd.org (Postfix) with ESMTP id 9BF658FC1A; Fri, 2 Dec 2011 14:45:11 +0000 (UTC) Received: from [192.168.99.1] (helo=terran.dlink.ua) by dlink.ua with esmtpsa (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.63) (envelope-from ) id 1RWUMP-0005Iz-8C; Fri, 02 Dec 2011 16:45:09 +0200 Date: Fri, 2 Dec 2011 16:45:39 +0200 From: Aleksandr Rybalko To: Adrian Chadd Message-Id: <20111202164539.fff3ea91.ray@dlink.ua> In-Reply-To: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> <20111130231311.4a154bc5.ray@ddteam.net> Organization: D-Link X-Mailer: Sylpheed 2.7.1 (GTK+ 2.20.1; i386-portbld-freebsd8.0) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 14:45:12 -0000 On Fri, 2 Dec 2011 22:39:32 +0800 Adrian Chadd wrote: >> .. erk. >> >> Well, what shall we do? Create a different driver? Or just enable a >> "quirk" or configuration paramater, which allows the device to be >> not-quite-i2c? It's too specific to Realtek, so from one point better to have separate driver, but from another point it have i2c EEPROM on same bus. So if we want to have access to both, we need quirk. >> >> >> Adrian WBW -- Alexandr Rybalko aka Alex RAY From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 2 14:47:42 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 2079A106566C for ; Fri, 2 Dec 2011 14:47:42 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id C38AE8FC17 for ; Fri, 2 Dec 2011 14:47:41 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so3765262vbb.13 for ; Fri, 02 Dec 2011 06:47:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=08g8RMpmY02yzT4XJ1NMHbZFpJLy2BPBjP558aSK4ng=; b=HUVaObC7FMB9cnvQKxfSXwFkzGWdJ2YUPEn0OfcffcCjRjgVsViIMt5AOWf41U3oAk Fbfjyj3lOHsmlPrtFL7/KDQghhgWlsOWtj5Wbybd7KmSWM0jKMF4Qh28RyksiixfOrza upyPw+ZwfOF3Nxcz+UhPSoM7tnwuOKMVNp+H0= MIME-Version: 1.0 Received: by 10.52.94.227 with SMTP id df3mr10005057vdb.51.1322837261138; Fri, 02 Dec 2011 06:47:41 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.109.10 with HTTP; Fri, 2 Dec 2011 06:47:41 -0800 (PST) In-Reply-To: <20111202164539.fff3ea91.ray@dlink.ua> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> <20111130231311.4a154bc5.ray@ddteam.net> <20111202164539.fff3ea91.ray@dlink.ua> Date: Fri, 2 Dec 2011 22:47:41 +0800 X-Google-Sender-Auth: NWJ28kkjDPjhhvq8tHetiqeRfR4 Message-ID: From: Adrian Chadd To: Aleksandr Rybalko Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 14:47:42 -0000 On 2 December 2011 22:45, Aleksandr Rybalko wrote: > It's too specific to Realtek, so from one point better to have > separate driver, but from another point it have i2c EEPROM on same bus. > So if we want to have access to both, we need quirk. Ok. Hm, can someone do up a proof of concept and make it all work? Pretty please? :) Adrian From owner-freebsd-embedded@FreeBSD.ORG Fri Dec 2 19:45:22 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 997D4106566B for ; Fri, 2 Dec 2011 19:45:22 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate.funkthat.com [70.36.235.232]) by mx1.freebsd.org (Postfix) with ESMTP id 70FF18FC17 for ; Fri, 2 Dec 2011 19:45:22 +0000 (UTC) Received: from h2.funkthat.com (localhost [127.0.0.1]) by h2.funkthat.com (8.14.3/8.14.3) with ESMTP id pB2JBMw0000895 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Dec 2011 11:11:23 -0800 (PST) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id pB2JBMSX000894; Fri, 2 Dec 2011 11:11:22 -0800 (PST) (envelope-from jmg) Date: Fri, 2 Dec 2011 11:11:22 -0800 From: John-Mark Gurney To: Aleksandr Rybalko Message-ID: <20111202191122.GK25601@funkthat.com> Mail-Followup-To: Aleksandr Rybalko , Adrian Chadd , freebsd-embedded@freebsd.org References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> <20111130231311.4a154bc5.ray@ddteam.net> <20111202164539.fff3ea91.ray@dlink.ua> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20111202164539.fff3ea91.ray@dlink.ua> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-Files: The truth is out there X-URL: http://resnet.uoregon.edu/~gurney_j/ X-Resume: http://resnet.uoregon.edu/~gurney_j/resume.html X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Fri, 02 Dec 2011 11:11:23 -0800 (PST) Cc: freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Dec 2011 19:45:22 -0000 Aleksandr Rybalko wrote this message on Fri, Dec 02, 2011 at 16:45 +0200: > On Fri, 2 Dec 2011 22:39:32 +0800 > Adrian Chadd wrote: > > >> .. erk. > >> > >> Well, what shall we do? Create a different driver? Or just enable a > >> "quirk" or configuration paramater, which allows the device to be > >> not-quite-i2c? > > It's too specific to Realtek, so from one point better to have > separate driver, but from another point it have i2c EEPROM on same bus. > So if we want to have access to both, we need quirk. Not to complicate things, but you could have a custom bus driver that provides an attachment for the standard i2c bus, and another attachment for the Realtek part... This custom bus driver would mediate access between the two... -- John-Mark Gurney Voice: +1 415 225 5579 "All that I will do, has been done, All that I have, has not." From owner-freebsd-embedded@FreeBSD.ORG Sat Dec 3 00:02:49 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8A3AE1065677 for ; Sat, 3 Dec 2011 00:02:49 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id 4BC488FC16 for ; Sat, 3 Dec 2011 00:02:49 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 1F3F0106DD7; Sat, 3 Dec 2011 01:02:48 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=windows-1252 From: Stefan Bethke In-Reply-To: <20111202191122.GK25601@funkthat.com> Date: Sat, 3 Dec 2011 01:02:47 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> <20111130231311.4a154bc5.ray@ddteam.net> <20111202164539.fff3ea91.ray@dlink.ua> <20111202191122.GK25601@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.1251.1) Cc: Aleksandr Rybalko , freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 00:02:49 -0000 Am 02.12.2011 um 20:11 schrieb John-Mark Gurney: > Aleksandr Rybalko wrote this message on Fri, Dec 02, 2011 at 16:45 = +0200: >> On Fri, 2 Dec 2011 22:39:32 +0800 >> Adrian Chadd wrote: >>=20 >>>> .. erk. >>>>=20 >>>> Well, what shall we do? Create a different driver? Or just enable a >>>> "quirk" or configuration paramater, which allows the device to be >>>> not-quite-i2c? >>=20 >> It's too specific to Realtek, so from one point better to have >> separate driver, but from another point it have i2c EEPROM on same = bus. >> So if we want to have access to both, we need quirk. >=20 > Not to complicate things, but you could have a custom bus driver that > provides an attachment for the standard i2c bus, and another = attachment > for the Realtek part... This custom bus driver would mediate access > between the two=85 I'm of two minds. One the one hand, the one concrete example for the = driver has only the switch chip connected to the bit-banging interface = (gpioiic). We can easily attach directly to gpioiic. Heck, even code = duplication is not that bad, since I believe the finer points of I2C can = be ignored for this part. (I have to check whether clock stretching on = the ack needs to be taken into account, but it seems even that is not = necessary.) On the other hand, the Realtek "almost I2C" seems to me to be compatible = with real I2C devices, so coexistence shouldn't be a problem. I believe = that "arbitration" is not necessary, since the Realtek part follows the = I2C semantics for slave selection fully (AFAICT). The TL-WR1043ND has an unpopulated spot for an EEPROM. Being able to = use the existing code infrastructure to quickly add fun parts as a quick = had would certainly be nice. I see two ways to make iicbus play with the Realtek "System Management = Interface" protocol: either make the patch I suggested optional via a = hint, or let a slave device somehow indicate that it wants the relaxed = semantics. The hint is likely the option that is easier to implement. = Writing a new go-between bus driver is likely too complicated for me to = accomplish right now. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Sat Dec 3 00:06:48 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1AC55106564A for ; Sat, 3 Dec 2011 00:06:48 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id D057A8FC13 for ; Sat, 3 Dec 2011 00:06:47 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 1C754106DF3; Sat, 3 Dec 2011 01:06:47 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=windows-1252 From: Stefan Bethke In-Reply-To: Date: Sat, 3 Dec 2011 01:06:46 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <86BABED7-FC39-4BD7-B0F4-FD65F4A8EB1A@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> <20111130231311.4a154bc5.ray@ddteam.net> <20111202164539.fff3ea91.ray@dlink.ua> <20111202191122.GK25601@funkthat.com> To: John-Mark Gurney X-Mailer: Apple Mail (2.1251.1) Cc: Aleksandr Rybalko , freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 00:06:48 -0000 Am 03.12.2011 um 01:02 schrieb Stefan Bethke: > I see two ways to make iicbus play with the Realtek "System Management = Interface" protocol Serial Management Interface. --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Sat Dec 3 00:36:09 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D324E106564A for ; Sat, 3 Dec 2011 00:36:09 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 873FC8FC08 for ; Sat, 3 Dec 2011 00:36:09 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so4369391vcb.13 for ; Fri, 02 Dec 2011 16:36:08 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=q3eBPzJY+zaeJLs92ROKVF5gcuiY3ZcHiQmgj+/ArRE=; b=Uhi0oGbXQ/z1+Q2FFptEDEySYAmhL8PvKxmfNON1TbAHlvvztWPHtVo2VuONHhnfeK VgpkgqYs6dxfdxA7Eu1FZJ0DNitkHPOVtk1awVUPa0pZbEqG3GRPlsIWSlS2MgZ4dDaQ GtbyQeLoQp1Af0XqYGvXgnmQku+C58+HPvunk= MIME-Version: 1.0 Received: by 10.52.94.227 with SMTP id df3mr326567vdb.51.1322872568682; Fri, 02 Dec 2011 16:36:08 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.109.10 with HTTP; Fri, 2 Dec 2011 16:36:08 -0800 (PST) In-Reply-To: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> <20111130231311.4a154bc5.ray@ddteam.net> <20111202164539.fff3ea91.ray@dlink.ua> <20111202191122.GK25601@funkthat.com> Date: Sat, 3 Dec 2011 08:36:08 +0800 X-Google-Sender-Auth: 8nryj-NmacbpOLyxw1FBbXLMZxM Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: Aleksandr Rybalko , freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 00:36:09 -0000 On 3 December 2011 08:02, Stefan Bethke wrote: > I see two ways to make iicbus play with the Realtek "System Management In= terface" protocol: either make the patch I suggested optional via a hint, o= r let a slave device somehow indicate that it wants the relaxed semantics. = =A0The hint is likely the option that is easier to implement. =A0Writing a = new go-between bus driver is likely too complicated for me to accomplish ri= ght now. I think exposing it via a quirk somehow, so the iicbus code knows that for this particular child device, the relaxed semantics are required. That way an i2c eeprom will be fine using the existing code and semantics; the switch PHY child will use your relaxed semantics. As there's a few more realtek switch PHYs to write code for, I can only see this as being needed. :) Think you could code that up for review? Adrian From owner-freebsd-embedded@FreeBSD.ORG Sat Dec 3 00:37:38 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6E03C106566B; Sat, 3 Dec 2011 00:37:38 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id 2D7288FC1A; Sat, 3 Dec 2011 00:37:38 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 65D95C2957; Sat, 3 Dec 2011 01:37:37 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=iso-8859-1 From: Stefan Bethke In-Reply-To: Date: Sat, 3 Dec 2011 01:37:36 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: <56F2AC5C-06F3-4E63-BC3D-06759FC63ED7@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> <20111130231311.4a154bc5.ray@ddteam.net> <20111202164539.fff3ea91.ray@dlink.ua> <20111202191122.GK25601@funkthat.com> To: Adrian Chadd X-Mailer: Apple Mail (2.1251.1) Cc: Aleksandr Rybalko , freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 00:37:38 -0000 Am 03.12.2011 um 01:36 schrieb Adrian Chadd: > On 3 December 2011 08:02, Stefan Bethke wrote: >> I see two ways to make iicbus play with the Realtek "System = Management Interface" protocol: either make the patch I suggested = optional via a hint, or let a slave device somehow indicate that it = wants the relaxed semantics. The hint is likely the option that is = easier to implement. Writing a new go-between bus driver is likely too = complicated for me to accomplish right now. >=20 > I think exposing it via a quirk somehow, so the iicbus code knows that > for this particular child device, the relaxed semantics are required. >=20 > That way an i2c eeprom will be fine using the existing code and > semantics; the switch PHY child will use your relaxed semantics. > As there's a few more realtek switch PHYs to write code for, I can > only see this as being needed. :) >=20 > Think you could code that up for review? I'll try to do that tommorrow. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Sat Dec 3 00:49:03 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 8D4FD106566B for ; Sat, 3 Dec 2011 00:49:03 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 42ACB8FC19 for ; Sat, 3 Dec 2011 00:49:02 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so4373397vbb.13 for ; Fri, 02 Dec 2011 16:49:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=bq0Yw9Ai/2uoFoKUE7W4j/s+hf4+1PTj4N6vNVtyNp4=; b=AW+p467OHikia5xU94krmx+vkDiznIhwVHvyx95cZOpsGgt8pwiLEkvZMQhq56nj39 Vs2NkJOWwdvlnxpP1N++gZMnqGNuMcLLbnjF6gwOaR2ti0wP3+5qOauUXwOITQHxqXZu Mwv3Amp004XL5S+XcVDizmtRy0/6yrGIWCPxY= MIME-Version: 1.0 Received: by 10.52.66.35 with SMTP id c3mr378934vdt.17.1322873342438; Fri, 02 Dec 2011 16:49:02 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.109.10 with HTTP; Fri, 2 Dec 2011 16:49:02 -0800 (PST) In-Reply-To: <56F2AC5C-06F3-4E63-BC3D-06759FC63ED7@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> <20111130231311.4a154bc5.ray@ddteam.net> <20111202164539.fff3ea91.ray@dlink.ua> <20111202191122.GK25601@funkthat.com> <56F2AC5C-06F3-4E63-BC3D-06759FC63ED7@lassitu.de> Date: Sat, 3 Dec 2011 08:49:02 +0800 X-Google-Sender-Auth: Q7UWqnaQJsPZuoCHF7iuk4JRYUI Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: Aleksandr Rybalko , freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 00:49:03 -0000 On 3 December 2011 08:37, Stefan Bethke wrote: >> That way an i2c eeprom will be fine using the existing code and >> semantics; the switch PHY child will use your relaxed semantics. >> As there's a few more realtek switch PHYs to write code for, I can >> only see this as being needed. :) >> >> Think you could code that up for review? > > I'll try to do that tommorrow. Sweet, thanks. Luis has given me a set of patches for GPIO hinting too. I'll get those merged mid-December when I've finished relocating. It looks like we're on track for a good Christmas.. :) Adrian From owner-freebsd-embedded@FreeBSD.ORG Sat Dec 3 13:48:35 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 76947106564A; Sat, 3 Dec 2011 13:48:35 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id D8C9F8FC0A; Sat, 3 Dec 2011 13:48:34 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id B36EA113AE5; Sat, 3 Dec 2011 14:48:33 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: multipart/mixed; boundary="Apple-Mail=_AB0956E1-BED7-4759-848C-82B934189B43" From: Stefan Bethke In-Reply-To: Date: Sat, 3 Dec 2011 14:48:33 +0100 Message-Id: <2DB1EAFF-BFEA-4104-8F5A-E4D00BFDF8F9@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> <20111130231311.4a154bc5.ray@ddteam.net> <20111202164539.fff3ea91.ray@dlink.ua> <20111202191122.GK25601@funkthat.com> To: Adrian Chadd X-Mailer: Apple Mail (2.1251.1) Cc: Aleksandr Rybalko , freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 13:48:35 -0000 --Apple-Mail=_AB0956E1-BED7-4759-848C-82B934189B43 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=iso-8859-1 Am 03.12.2011 um 01:36 schrieb Adrian Chadd: > On 3 December 2011 08:02, Stefan Bethke wrote: >> I see two ways to make iicbus play with the Realtek "System = Management Interface" protocol: either make the patch I suggested = optional via a hint, or let a slave device somehow indicate that it = wants the relaxed semantics. The hint is likely the option that is = easier to implement. Writing a new go-between bus driver is likely too = complicated for me to accomplish right now. >=20 > I think exposing it via a quirk somehow, so the iicbus code knows that > for this particular child device, the relaxed semantics are required. >=20 > That way an i2c eeprom will be fine using the existing code and > semantics; the switch PHY child will use your relaxed semantics. > As there's a few more realtek switch PHYs to write code for, I can > only see this as being needed. :) >=20 > Think you could code that up for review? Attached, as well as at = http://www.lassitu.de/freebsd/iicbus-for-realtek.patch The relevant hints are: # GPIO hint.gpio.0.at=3D"apb0" hint.gpio.0.maddr=3D0x18040000 hint.gpio.0.msize=3D0x10000 hint.gpio.0.irq=3D2 = hint.gpio.0.pins=3D"1=3Do:usb,2=3Do:sys,3=3Di:reset,5=3Do:qss,7=3Di:qss,9=3D= o:wlan,18=3Di:sda,19=3Di:scl" hint.iicbus.0.strict=3D0 and you need this in your kernel config: device gpio device gpioiic device iicbb device iicbus device iic Stefan --=20 Stefan Bethke Fon +49 151 14070811 --Apple-Mail=_AB0956E1-BED7-4759-848C-82B934189B43 Content-Disposition: attachment; filename=iicbus-for-realtek.patch Content-Type: application/octet-stream; name="iicbus-for-realtek.patch" Content-Transfer-Encoding: 7bit Index: sys/dev/iicbus/iiconf.c =================================================================== --- sys/dev/iicbus/iiconf.c (revision 228073) +++ sys/dev/iicbus/iiconf.c (working copy) @@ -243,8 +243,8 @@ { struct iicbus_softc *sc = (struct iicbus_softc *)device_get_softc(bus); - /* a slave must have been started with the appropriate address */ - if (!sc->started || (sc->started & LSB)) + /* a slave must have been started for writing */ + if (sc->started == 0 || (sc->strict != 0 && (sc->started & LSB) != 0)) return (EINVAL); return (IICBUS_WRITE(device_get_parent(bus), buf, len, sent, timeout)); @@ -261,8 +261,8 @@ { struct iicbus_softc *sc = (struct iicbus_softc *)device_get_softc(bus); - /* a slave must have been started with the appropriate address */ - if (!sc->started || !(sc->started & LSB)) + /* a slave must have been started for reading */ + if (sc->started == 0 || (sc->strict != 0 && (sc->started & LSB) == 0)) return (EINVAL); return (IICBUS_READ(device_get_parent(bus), buf, len, read, last, delay)); Index: sys/dev/iicbus/iicbus.c =================================================================== --- sys/dev/iicbus/iicbus.c (revision 228073) +++ sys/dev/iicbus/iicbus.c (working copy) @@ -92,10 +92,17 @@ unsigned char addr; #endif struct iicbus_softc *sc = IICBUS_SOFTC(dev); + int strict; sc->dev = dev; mtx_init(&sc->lock, "iicbus", NULL, MTX_DEF); iicbus_reset(dev, IIC_FASTEST, 0, NULL); + if (resource_int_value(device_get_name(dev), + device_get_unit(dev), "strict", &strict) == 0) + sc->strict = strict; + else + sc->strict = 1; + device_printf(dev, "strict=%d\n", sc->strict); /* device probing is meaningless since the bus is supposed to be * hot-plug. Moreover, some I2C chips do not appreciate random Index: sys/dev/iicbus/iicbus.h =================================================================== --- sys/dev/iicbus/iicbus.h (revision 228073) +++ sys/dev/iicbus/iicbus.h (working copy) @@ -41,6 +41,8 @@ device_t owner; /* iicbus owner device structure */ u_char started; /* address of the 'started' slave * 0 if no start condition succeeded */ + u_char strict; /* deny operations that violate the + * I2C protocol */ struct mtx lock; }; Index: sys/dev/gpio/gpioiic.c =================================================================== --- sys/dev/gpio/gpioiic.c (revision 228073) +++ sys/dev/gpio/gpioiic.c (working copy) @@ -48,8 +48,6 @@ #include "iicbb_if.h" -#define SCL_PIN 0 /* gpiobus mapped pin 6 */ -#define SDA_PIN 1 /* gpiobus mapped pin 7 */ struct gpioiic_softc { @@ -57,6 +55,8 @@ device_t sc_busdev; struct mtx sc_mtx; struct cdev *sc_leddev; + int scl_pin; + int sda_pin; }; static int gpioiic_probe(device_t); @@ -88,6 +88,14 @@ sc->sc_dev = dev; sc->sc_busdev = device_get_parent(dev); + device_printf(dev, "parent %s\n", device_get_name(device_get_parent(dev))); + if (resource_int_value(device_get_name(dev), + device_get_unit(dev), "scl", &sc->scl_pin)) + sc->scl_pin = 0; + if (resource_int_value(device_get_name(dev), + device_get_unit(dev), "sda", &sc->sda_pin)) + sc->sda_pin = 1; + device_printf(dev, "scl=%d, sda=%d\n", sc->scl_pin, sc->sda_pin); /* add generic bit-banging code */ bitbang = device_add_child(dev, "iicbb", -1); @@ -105,9 +113,9 @@ { struct gpioiic_softc *sc = device_get_softc(dev); - GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, SDA_PIN, + GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->sda_pin, GPIO_PIN_INPUT); - GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, SCL_PIN, + GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->scl_pin, GPIO_PIN_INPUT); } @@ -142,11 +150,11 @@ GPIOBUS_LOCK_BUS(sc->sc_busdev); if (val == 0) { - GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev, SDA_PIN, 0); - GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, SDA_PIN, + GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev, sc->sda_pin, 0); + GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->sda_pin, GPIO_PIN_OUTPUT); } else { - GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, SDA_PIN, + GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->sda_pin, GPIO_PIN_INPUT); } GPIOBUS_UNLOCK_BUS(sc->sc_busdev); @@ -159,11 +167,11 @@ GPIOBUS_LOCK_BUS(sc->sc_busdev); if (val == 0) { - GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev, SCL_PIN, 0); - GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, SCL_PIN, + GPIOBUS_PIN_SET(sc->sc_busdev, sc->sc_dev, sc->scl_pin, 0); + GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->scl_pin, GPIO_PIN_OUTPUT); } else { - GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, SCL_PIN, + GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->scl_pin, GPIO_PIN_INPUT); } GPIOBUS_UNLOCK_BUS(sc->sc_busdev); @@ -176,9 +184,9 @@ unsigned int val; GPIOBUS_LOCK_BUS(sc->sc_busdev); - GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, SCL_PIN, + GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->scl_pin, GPIO_PIN_INPUT); - GPIOBUS_PIN_GET(sc->sc_busdev, sc->sc_dev, SCL_PIN, &val); + GPIOBUS_PIN_GET(sc->sc_busdev, sc->sc_dev, sc->scl_pin, &val); GPIOBUS_UNLOCK_BUS(sc->sc_busdev); return ((int)val); @@ -191,9 +199,9 @@ unsigned int val; GPIOBUS_LOCK_BUS(sc->sc_busdev); - GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, SDA_PIN, + GPIOBUS_PIN_SETFLAGS(sc->sc_busdev, sc->sc_dev, sc->sda_pin, GPIO_PIN_INPUT); - GPIOBUS_PIN_GET(sc->sc_busdev, sc->sc_dev, SDA_PIN, &val); + GPIOBUS_PIN_GET(sc->sc_busdev, sc->sc_dev, sc->sda_pin, &val); GPIOBUS_UNLOCK_BUS(sc->sc_busdev); return ((int)val); Index: sys/mips/atheros/ar71xx_gpio.c =================================================================== --- sys/mips/atheros/ar71xx_gpio.c (revision 228073) +++ sys/mips/atheros/ar71xx_gpio.c (working copy) @@ -349,6 +349,48 @@ } static int +ar71xx_gpio_configure_from_hint(device_t dev) +{ + struct ar71xx_gpio_softc *sc = device_get_softc(dev); + const char *c, *d; + int i, caps; + + if (resource_string_value(device_get_name(dev), + device_get_unit(dev), "pins", &c)) + return (ENXIO); + i = 0; + /* "1=o:usb,2=o:sys" */ + while (c) { + d = strchr(c, '='); + if (d == NULL) + return (ENXIO); + sc->gpio_pins[i].gp_pin = strtol(c, NULL, 10); + sc->gpio_pins[i].gp_caps = DEFAULT_CAPS; + sc->gpio_pins[i].gp_flags = 0; + d++; + if (d[0] != 'i' && d[0] != 'o' && d[1] != ':') + return (ENXIO); + caps = d[0] == 'o' ? GPIO_PIN_OUTPUT : GPIO_PIN_INPUT; + d += 2; + c = d; + d = strchr(d, ','); + if (d != NULL) { + strncpy(sc->gpio_pins[i].gp_name, c, + d - c < GPIOMAXNAME ? d - c : GPIOMAXNAME); + c = d; + c++; + } else { + strncpy(sc->gpio_pins[i].gp_name, c, GPIOMAXNAME); + c = NULL; + } + ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], caps); + i++; + } + sc->gpio_npins = i; + return (0); +} + +static int ar71xx_gpio_attach(device_t dev) { struct ar71xx_gpio_softc *sc = device_get_softc(dev); @@ -393,20 +435,21 @@ /* Configure all pins as input */ /* disable interrupts for all pins */ GPIO_WRITE(sc, AR71XX_GPIO_INT_MASK, 0); - pinp = ar71xx_gpio_pins; - i = 0; - while (pinp->name) { - strncpy(sc->gpio_pins[i].gp_name, pinp->name, GPIOMAXNAME); - sc->gpio_pins[i].gp_pin = pinp->pin; - sc->gpio_pins[i].gp_caps = DEFAULT_CAPS; - sc->gpio_pins[i].gp_flags = 0; - ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], pinp->flags); - pinp++; - i++; + if (ar71xx_gpio_configure_from_hint(dev)) { + pinp = ar71xx_gpio_pins; + i = 0; + while (pinp->name) { + strncpy(sc->gpio_pins[i].gp_name, pinp->name, GPIOMAXNAME); + sc->gpio_pins[i].gp_pin = pinp->pin; + sc->gpio_pins[i].gp_caps = DEFAULT_CAPS; + sc->gpio_pins[i].gp_flags = 0; + ar71xx_gpio_pin_configure(sc, &sc->gpio_pins[i], pinp->flags); + pinp++; + i++; + } + sc->gpio_npins = i; } - sc->gpio_npins = i; - device_add_child(dev, "gpioc", device_get_unit(dev)); device_add_child(dev, "gpiobus", device_get_unit(dev)); return (bus_generic_attach(dev)); --Apple-Mail=_AB0956E1-BED7-4759-848C-82B934189B43-- From owner-freebsd-embedded@FreeBSD.ORG Sat Dec 3 15:41:04 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BDBFC106566B for ; Sat, 3 Dec 2011 15:41:04 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vx0-f182.google.com (mail-vx0-f182.google.com [209.85.220.182]) by mx1.freebsd.org (Postfix) with ESMTP id 72B3F8FC08 for ; Sat, 3 Dec 2011 15:41:04 +0000 (UTC) Received: by vcbfk1 with SMTP id fk1so4821755vcb.13 for ; Sat, 03 Dec 2011 07:41:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=Lk5ELhwVjshrovzHO7ZDpCoNh9COiDYiincJG4YMKhg=; b=jdWoU3P78ZZO8Ge2y8705icm+CBmqHKgvu6YsX6+vr4vf35APKrwdG0MvT5mbQnfWk JTDvC/NSpl0D8NMTKfB8s/UxZrpfi+8mEmyqDpPW5ebI47dvR9otcykC6vIraAMjr1Pg 0KPH7H629sgHDdsCx+TlTUDpI/MJl35NCD+gE= MIME-Version: 1.0 Received: by 10.52.94.227 with SMTP id df3mr1531757vdb.51.1322926863891; Sat, 03 Dec 2011 07:41:03 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.109.10 with HTTP; Sat, 3 Dec 2011 07:41:03 -0800 (PST) In-Reply-To: <2DB1EAFF-BFEA-4104-8F5A-E4D00BFDF8F9@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> <20111130231311.4a154bc5.ray@ddteam.net> <20111202164539.fff3ea91.ray@dlink.ua> <20111202191122.GK25601@funkthat.com> <2DB1EAFF-BFEA-4104-8F5A-E4D00BFDF8F9@lassitu.de> Date: Sat, 3 Dec 2011 23:41:03 +0800 X-Google-Sender-Auth: gi2L_NYjHaxE89VAakTwGRvnbfk Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: Aleksandr Rybalko , freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 15:41:04 -0000 Cool, thanks for this! I'll review this (and test it too) in a couple days.. Adrian From owner-freebsd-embedded@FreeBSD.ORG Sat Dec 3 15:47:38 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 5A5C3106566B for ; Sat, 3 Dec 2011 15:47:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-vw0-f54.google.com (mail-vw0-f54.google.com [209.85.212.54]) by mx1.freebsd.org (Postfix) with ESMTP id 070128FC12 for ; Sat, 3 Dec 2011 15:47:37 +0000 (UTC) Received: by vbbfr13 with SMTP id fr13so4823364vbb.13 for ; Sat, 03 Dec 2011 07:47:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=egBmmkaLy1KoxDLqEnrUg+HgWYHsd57J7JxMQ4dam7k=; b=uE2RBAWymtRNCf6GUWIZmEe0QgkElTpj70Jm9VJqpuxqbWsN/BI3OOwGh/W50tIJop 9Y3IdB5irjC3pOX92oOE4RQUTe/uiMbwv9CryUbwY5cBEsmax6ShHYLcC7VlCNVF/c8J dfunzXfp/poN4tuPPIne8XzE09yWGAAhFPDxc= MIME-Version: 1.0 Received: by 10.52.66.35 with SMTP id c3mr1584689vdt.17.1322927257167; Sat, 03 Dec 2011 07:47:37 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.52.109.10 with HTTP; Sat, 3 Dec 2011 07:47:37 -0800 (PST) In-Reply-To: <2DB1EAFF-BFEA-4104-8F5A-E4D00BFDF8F9@lassitu.de> References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> <20111130231311.4a154bc5.ray@ddteam.net> <20111202164539.fff3ea91.ray@dlink.ua> <20111202191122.GK25601@funkthat.com> <2DB1EAFF-BFEA-4104-8F5A-E4D00BFDF8F9@lassitu.de> Date: Sat, 3 Dec 2011 23:47:37 +0800 X-Google-Sender-Auth: vWahqv6h8Mlp2wgda82NtKtlwpo Message-ID: From: Adrian Chadd To: Stefan Bethke Content-Type: text/plain; charset=ISO-8859-1 Cc: Aleksandr Rybalko , freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 15:47:38 -0000 Hi, Initial comments (yes, I broke my own rule..) * Don't get rid of SCL_PIN / SDA_PIN: instead rename them to blah_PIN_DEFAULT, and use those defines instead of hardcoding 0 and 1. I have a "thing" for avoiding hard-coded constants, and this makes it more obvious that those 0/1 values are pins rather than true/false. * We should break this out into separate diffs - let's focus right now on fixing/extending the i2c bus code to work with the "strict" flag you've introduced. The rest of the diff is GPIO stuff. That way we can commit it in two parts. Stuff to look at later: * The gpio default stuff is fine (but luis has send me some alternate hint code to look at too!) - however, the capabilities are either in or out. What about pullup, pulldown, etc? * Is there any way to make that "configure GPIO from hint" function generic? Or should we worry about that later on? (eg so the rt305x CPU support from ray@ can also use this?) And my final question: Does this actually now work for mainipulating the switch phy? If so: * how does it work; * do we get per-physical-switch-port statistics somehow? * how do I tinker with it next week when I'm over in Melbourne, talking about this stuff to a group of researchers that want to use the 1043nd? :) Thanks again for this! Adrian From owner-freebsd-embedded@FreeBSD.ORG Sat Dec 3 18:05:36 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id D4A24106566B; Sat, 3 Dec 2011 18:05:36 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id 926CE8FC12; Sat, 3 Dec 2011 18:05:36 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 6D7C91141D7; Sat, 3 Dec 2011 19:05:35 +0100 (CET) References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> <20111130231311.4a154bc5.ray@ddteam.net> <20111202164539.fff3ea91.ray@dlink.ua> <20111202191122.GK25601@funkthat.com> <2DB1EAFF-BFEA-4104-8F5A-E4D00BFDF8F9@lassitu.de> In-Reply-To: Mime-Version: 1.0 (1.0) Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Message-Id: <9EB5B4D2-3927-4790-AB90-C7310FC732DC@lassitu.de> X-Mailer: iPad Mail (9A405) From: Stefan Bethke Date: Sat, 3 Dec 2011 19:05:35 +0100 To: Adrian Chadd Cc: Aleksandr Rybalko , "freebsd-embedded@freebsd.org" Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 18:05:36 -0000 Am 03.12.2011 um 16:47 schrieb Adrian Chadd : > * Don't get rid of SCL_PIN / SDA_PIN: instead rename them to > blah_PIN_DEFAULT, and use those defines instead of hardcoding 0 and 1. > I have a "thing" for avoiding hard-coded constants, and this makes it > more obvious that those 0/1 values are pins rather than true/false. Ok. > * We should break this out into separate diffs - let's focus right now > on fixing/extending the i2c bus code to work with the "strict" flag > you've introduced. The rest of the diff is GPIO stuff. That way we > can commit it in two parts. Will do. > Stuff to look at later: >=20 > * The gpio default stuff is fine (but luis has send me some alternate > hint code to look at too!) - however, the capabilities are either in > or out. What about pullup, pulldown, etc? =46rom my Reading of ar71xx_gpio.c, only in and Out are supported, so I igno= red the rest. If we can find enough letters, the other capabilities could be= supported as well. Note that the capabilities are defaulted, not configure= d. I'm only setting the initial mode. If this is unclear, I can talk about l= ater when I'm back home.=20 > * Is there any way to make that "configure GPIO from hint" function > generic? Or should we worry about that later on? (eg so the rt305x CPU > support from ray@ can also use this?) I'd think iT can be made generic. > And my final question: >=20 > Does this actually now work for mainipulating the switch phy? If so: >=20 > * how does it work; > * do we get per-physical-switch-port statistics somehow? > * how do I tinker with it next week when I'm over in Melbourne, > talking about this stuff to a group of researchers that want to use > the 1043nd? :) yes, see the tbz in the same dir on the web site. Stefan --=20 Stefan Bethke Fon +49 151 14070811 From owner-freebsd-embedded@FreeBSD.ORG Sat Dec 3 21:36:43 2011 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 0CDAB1065676; Sat, 3 Dec 2011 21:36:43 +0000 (UTC) (envelope-from stb@lassitu.de) Received: from gilb.zs64.net (gilb.zs64.net [IPv6:2001:470:1f0b:105e::1ea]) by mx1.freebsd.org (Postfix) with ESMTP id BE73D8FC12; Sat, 3 Dec 2011 21:36:42 +0000 (UTC) Received: by gilb.zs64.net (Postfix, from stb@lassitu.de) id 9893D1146FC; Sat, 3 Dec 2011 22:36:41 +0100 (CET) Mime-Version: 1.0 (Apple Message framework v1251.1) Content-Type: text/plain; charset=iso-8859-1 From: Stefan Bethke In-Reply-To: Date: Sat, 3 Dec 2011 22:36:41 +0100 Content-Transfer-Encoding: quoted-printable Message-Id: References: <68ABED76-CB1F-405A-8036-EC254F7511FA@lassitu.de> <3B3DB17D-BF87-40EE-B1C1-445F178E8844@lassitu.de> <86030CEE-6839-4B96-ACDC-2BA9AC1E4AE4@lassitu.de> <2D625CC9-A0E3-47AA-A504-CE8FB2F90245@lassitu.de> <203BF1C8-D528-40C9-8611-9C7AC7E43BAB@lassitu.de> <3C0E9CA3-E130-4E9A-ABCC-1782E28999D1@lassitu.de> <2B8826C7-00C7-4117-B424-4A86F1346DFF@bsdimp.com> <20111130231311.4a154bc5.ray@ddteam.net> <20111202164539.fff3ea91.ray@dlink.ua> <20111202191122.GK25601@funkthat.com> <2DB1EAFF-BFEA-4104-8F5A-E4D00BFDF8F9@lassitu.de> To: Adrian Chadd X-Mailer: Apple Mail (2.1251.1) Cc: Aleksandr Rybalko , freebsd-embedded@freebsd.org Subject: Re: TL-WR1043: switch X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 03 Dec 2011 21:36:43 -0000 Am 03.12.2011 um 16:47 schrieb Adrian Chadd: > Hi, >=20 > Initial comments (yes, I broke my own rule..) >=20 > * Don't get rid of SCL_PIN / SDA_PIN: instead rename them to > blah_PIN_DEFAULT, and use those defines instead of hardcoding 0 and 1. > I have a "thing" for avoiding hard-coded constants, and this makes it > more obvious that those 0/1 values are pins rather than true/false. > * We should break this out into separate diffs - let's focus right now > on fixing/extending the i2c bus code to work with the "strict" flag > you've introduced. The rest of the diff is GPIO stuff. That way we > can commit it in two parts. = http://www.lassitu.de/freebsd/iicbus-optional-relaxed-bus-semantics.patch > Stuff to look at later: >=20 > * The gpio default stuff is fine (but luis has send me some alternate > hint code to look at too!) - however, the capabilities are either in > or out. What about pullup, pulldown, etc? I'd be happy to review and test luis' code. The code that I added does instantiate each pin with DEFAULT_CAPS (read = and write), sets the name and sets the pin to either read or write. = =46rom ar71xx_gpio.c and ar71xxreg.h it seems that these devices only = support input and output and no other modes. > * Is there any way to make that "configure GPIO from hint" function > generic? Or should we worry about that later on? (eg so the rt305x CPU > support from ray@ can also use this?) sys/dev/gpio/gpiobus.c has no method to set the pin capabilities, only = to report the ones the underlying device offers. So every driver needs = to do it's confuration itself. The code itself certainly could be = factored out. > And my final question: >=20 > Does this actually now work for mainipulating the switch phy? If so: >=20 > * how does it work; I have a userland program that can read and write switch registers (and = PHY registers through that interface). See below. > * do we get per-physical-switch-port statistics somehow? They're there, and the OpenWrt driver has code to read them. I haven't = gotten round to implement that. > * how do I tinker with it next week when I'm over in Melbourne, > talking about this stuff to a group of researchers that want to use > the 1043nd? :) http://www.lassitu.de/freebsd/rtl8366ctl.tbz =46rom the enclosed README: > At this stage, the control program can talk to the switch, and > - print out some configuration information; > - print out some phy information; > - read and write arbitrary switch registers; > - read and write arbitrary phy registers. >=20 > Configuration actions are not implemented yet. I'll try and whip up a command to configure VLANs. Stefan --=20 Stefan Bethke Fon +49 151 14070811