From owner-freebsd-embedded@FreeBSD.ORG Sun Oct 20 09:16:35 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 675D3CA4 for ; Sun, 20 Oct 2013 09:16:35 +0000 (UTC) (envelope-from sven@hazejager.nl) Received: from mail-qa0-f47.google.com (mail-qa0-f47.google.com [209.85.216.47]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2B7B32E56 for ; Sun, 20 Oct 2013 09:16:34 +0000 (UTC) Received: by mail-qa0-f47.google.com with SMTP id k15so1812455qaq.13 for ; Sun, 20 Oct 2013 02:16:28 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:date:message-id:subject:from:to :content-type; bh=85rCNdVHmT0WSnjx9rDVDxK+bf3+6m0EjJtQ4nsUGvo=; b=TvH+EY6FBe/aKqcdbCAAdzNEYm5iz6rcCWpRaL16xzxezYdab03aKzLQ3yaCyOYuhQ juS9NuqwsvqcVps0nAhegN7yysrsaE2TOuDAZlXTG6y6OJfE0EXV42rnoIGIUqLtYSV3 CJ4nkFolq6dhd1yh5HcaQrUy7twDkh+zcQPI+rt8xMnEqGc60Tbt/nv0WLj4pGCjFN8p FJETCneF4EvV1/f6gCQtrAk/53MlNQF2KH/YFz+IVn5xLPI9D/j3ycMtmGFtRFDiyiWB 4fkwPc+Dc7/uRBCuHasyadWTLNqtNHMySi0MT+hzKa80tRUhAL7ev5xFUqga6wmH7eR7 JlVg== X-Gm-Message-State: ALoCoQndQm8mksLhdAWnxPtRgVW8FjwgmKddCxRTj68zFrSF9ktzrdi2rAkElkfCrov7gqS19LJC MIME-Version: 1.0 X-Received: by 10.224.40.138 with SMTP id k10mr15934198qae.67.1382260587946; Sun, 20 Oct 2013 02:16:27 -0700 (PDT) Received: by 10.49.119.130 with HTTP; Sun, 20 Oct 2013 02:16:27 -0700 (PDT) X-Originating-IP: [212.123.177.47] Date: Sun, 20 Oct 2013 11:16:27 +0200 Message-ID: Subject: Install C++ runtime libraries without installing toolchain From: Sven Hazejager To: freebsd-embedded@freebsd.org Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Oct 2013 09:16:35 -0000 All, Is there a way to install the C++ runtime libraries into a NanoBSD images without installing the whole toolchain? My port needs the libc++ and libcxxrt shared libraries. In my NanoBSD script, I have: CONF_INSTALL=' WITHOUT_INSTALLLIB=1 WITHOUT_TOOLCHAIN=1 ' It's the WITHOUT_TOOLCHAIN knob that I would like to not switch on, so I am looking for alternative ways to get the libraries into my image. I am running 11-CURRENT as of last week. Thanks Sven From owner-freebsd-embedded@FreeBSD.ORG Mon Oct 21 11:06:45 2013 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id EBB349A0 for ; Mon, 21 Oct 2013 11:06:45 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D8C9D2E0C for ; Mon, 21 Oct 2013 11:06:45 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id r9LB6jtL018599 for ; Mon, 21 Oct 2013 11:06:45 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id r9LB6j4a018597 for freebsd-embedded@FreeBSD.org; Mon, 21 Oct 2013 11:06:45 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 21 Oct 2013 11:06:45 GMT Message-Id: <201310211106.r9LB6j4a018597@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 Subject: Current problem reports assigned to freebsd-embedded@FreeBSD.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Oct 2013 11:06:46 -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 Oct 21 13:28:03 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id DF82C3A9 for ; Mon, 21 Oct 2013 13:28:03 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id B6C712808 for ; Mon, 21 Oct 2013 13:28:03 +0000 (UTC) Received: by mail-pd0-f170.google.com with SMTP id v10so2302606pde.29 for ; Mon, 21 Oct 2013 06:28:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=wb4ZsoExSNs/it64kLgnpGy8rzyqSV6+H1vnMR4Gga4=; b=iTjkGXgkijimMMBgpwptgnMMJS4FWInvfoGt/4+sWTwbSHyzUuVlVKtYSpQscmYVTQ MVn2VoPVFQ0y+CcqYx1vlo1LfOGY+uRLitUZsNMoxGt0n8/eKM8zWeaCasSTbKTuHxVg es79YbaF5d5fPxqz1FsB8T456gcp+oUgtfBioCEuy4qHlfDOWrmJpzbUdLlpMTPHI9nF kOdh5J2m+w4Pvxf1A6OkxhtL+lm/p5N1ndQMd8p8fTBfYM1zm0MJgJs0TFFOkIU8Hes5 G9adyhcu0v2cUZxxZlcS1+VXSMZv57/bQ9xB0eeM1BvA8yj5WI4mIddS+C4SgtcENzPF 6n5Q== X-Gm-Message-State: ALoCoQk6i2PkHhTjS5YGYKL46CzEFvel8eULR1wU0HNJkM+OUcyK4H0MZFujWz0b8rgqLqqZrV87 X-Received: by 10.66.250.138 with SMTP id zc10mr18374925pac.72.1382362082751; Mon, 21 Oct 2013 06:28:02 -0700 (PDT) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id yg3sm25809340pab.16.2013.10.21.06.28.01 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 21 Oct 2013 06:28:01 -0700 (PDT) Sender: Warner Losh Subject: Re: Install C++ runtime libraries without installing toolchain Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Mon, 21 Oct 2013 07:28:00 -0600 Content-Transfer-Encoding: 7bit Message-Id: References: To: Sven Hazejager X-Mailer: Apple Mail (2.1085) Cc: freebsd-embedded@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 21 Oct 2013 13:28:03 -0000 On Oct 20, 2013, at 3:16 AM, Sven Hazejager wrote: > All, > > Is there a way to install the C++ runtime libraries into a NanoBSD images > without installing the whole toolchain? My port needs the libc++ > and libcxxrt shared libraries. In my NanoBSD script, I have: > > CONF_INSTALL=' > WITHOUT_INSTALLLIB=1 > WITHOUT_TOOLCHAIN=1 > ' > > It's the WITHOUT_TOOLCHAIN knob that I would like to not switch on, so I am > looking for alternative ways to get the libraries into my image. > > I am running 11-CURRENT as of last week. We may need a new knob for that... Warner From owner-freebsd-embedded@FreeBSD.ORG Wed Oct 23 14:39:21 2013 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 0E27B55D for ; Wed, 23 Oct 2013 14:39:21 +0000 (UTC) (envelope-from ian@FreeBSD.org) Received: from mho-01-ewr.mailhop.org (mho-03-ewr.mailhop.org [204.13.248.66]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D77152477 for ; Wed, 23 Oct 2013 14:39:20 +0000 (UTC) Received: from c-24-8-230-52.hsd1.co.comcast.net ([24.8.230.52] helo=damnhippie.dyndns.org) by mho-01-ewr.mailhop.org with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.72) (envelope-from ) id 1VYzac-000JdL-6x for freebsd-embedded@FreeBSD.org; Wed, 23 Oct 2013 14:39:14 +0000 Received: from [172.22.42.240] (revolution.hippie.lan [172.22.42.240]) by damnhippie.dyndns.org (8.14.3/8.14.3) with ESMTP id r9NEdBNb043925 for ; Wed, 23 Oct 2013 08:39:11 -0600 (MDT) (envelope-from ian@FreeBSD.org) X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 24.8.230.52 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX18ekcqDKMcOSbAKwBPPa+hC Subject: new ofw_search_compatible() From: Ian Lepore To: freebsd-embedded@FreeBSD.org Content-Type: multipart/mixed; boundary="=-ubnTihB6OA1sATM+QSy/" Date: Wed, 23 Oct 2013 08:39:10 -0600 Message-ID: <1382539150.92499.206.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Oct 2013 14:39:21 -0000 --=-ubnTihB6OA1sATM+QSy/ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit While creating drivers that work for a variety of SoCs, I increasingly find myself coding sequences such as: if (ofw_bus_is_compatible(dev, "fsl,imx51-fec")) sc->fectype = FECTYPE_IMX51; else if (ofw_bus_is_compatible(dev, "fsl,imx53-fec")) sc->fectype = FECTYPE_IMX53; else if (ofw_bus_is_compatible(dev, "fsl,imx6q-fec")) sc->fectype = FECTYPE_IMX6; else sc->fectype = FECTYPE_GENERIC; That's a short list as an example, eventually that driver may support a dozen SoCs. I'd like to add a helper routine that turns this into a table lookup, patch attached. Any objections? It turns sequences such as the above into: static struct ofw_compat_data compat_data[] = { {"fsl,imx51-fec", FECTYPE_IMX51}, {"fsl,imx53-fec", FECTYPE_IMX53}, {"fsl,imx6q-fec", FECTYPE_IMX6}, {NULL, FECTYPE_NONE}, }; /* ... */ sc->fectype = ofw_bus_search_compatible(dev, compat_data)->ocd_data; The search routine by design can't return NULL unless you pass it a NULL table pointer. That lets you provide whatever "not found" value in the table-end sentry that works best for the way your code is structured. -- Ian --=-ubnTihB6OA1sATM+QSy/ Content-Disposition: inline; filename="ofw_search_compat.diff" Content-Type: text/x-patch; name="ofw_search_compat.diff"; charset="us-ascii" Content-Transfer-Encoding: 7bit Index: sys/dev/ofw/ofw_bus_subr.h =================================================================== --- sys/dev/ofw/ofw_bus_subr.h (revision 256962) +++ sys/dev/ofw/ofw_bus_subr.h (working copy) @@ -47,6 +47,11 @@ struct ofw_bus_iinfo { pcell_t opi_addrc; }; +struct ofw_compat_data { + const char *ocd_str; + uintptr_t ocd_data; +}; + /* Generic implementation of ofw_bus_if.m methods and helper routines */ int ofw_bus_gen_setup_devinfo(struct ofw_bus_devinfo *, phandle_t); void ofw_bus_gen_destroy_devinfo(struct ofw_bus_devinfo *); @@ -74,6 +79,10 @@ void ofw_bus_find_iparent(phandle_t); int ofw_bus_is_compatible(device_t, const char *); int ofw_bus_is_compatible_strict(device_t, const char *); +/* Helper routine to search a list of compat props. */ +const struct ofw_compat_data * + ofw_bus_search_compatible(device_t, const struct ofw_compat_data *); + /* Helper routine for checking existence of a prop */ int ofw_bus_has_prop(device_t, const char *); Index: sys/dev/ofw/ofw_bus_subr.c =================================================================== --- sys/dev/ofw/ofw_bus_subr.c (revision 256962) +++ sys/dev/ofw/ofw_bus_subr.c (working copy) @@ -197,6 +197,21 @@ ofw_bus_is_compatible_strict(device_t dev, const c return (0); } +const struct ofw_compat_data * +ofw_bus_search_compatible(device_t dev, const struct ofw_compat_data *compat) +{ + + if (compat == NULL) + return NULL; + + for (; compat->ocd_str != NULL; ++compat) { + if (ofw_bus_is_compatible(dev, compat->ocd_str)) + break; + } + + return (compat); +} + int ofw_bus_has_prop(device_t dev, const char *propname) { --=-ubnTihB6OA1sATM+QSy/-- From owner-freebsd-embedded@FreeBSD.ORG Wed Oct 23 14:45:31 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 1D5C57DB for ; Wed, 23 Oct 2013 14:45:31 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ie0-f170.google.com (mail-ie0-f170.google.com [209.85.223.170]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id DF5A12518 for ; Wed, 23 Oct 2013 14:45:30 +0000 (UTC) Received: by mail-ie0-f170.google.com with SMTP id at1so1499104iec.29 for ; Wed, 23 Oct 2013 07:45:30 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:sender:subject:mime-version:content-type:from :in-reply-to:date:cc:content-transfer-encoding:message-id:references :to; bh=dipjXA3s0mAoswcotZz+zGdQBrtahG/twWeQh9vWhWc=; b=kcnf1rpLigBcFC0lOxBzRLHYYAsPh84x4XOTbsg7Qe+SKmCv7EAd+eNpPyV7RQzEfv ZfoQ9vlzMjXOBXUdWa4SK8oIBq+2WeMajaHadJWaAlLncXVi8S+HGmAPJ/tXzVW4OcPy St+8EJy9EUNk4mR/Ueph2x2IrhLGNIhqfWZeQQvmvnA5bnL3Mo9E5d0tN1+K44cWMVMm tvI/BGM2ZHdFfS6/UcH0mnkpe5aFXzOeXMC2XmqVC8kcQiAC/xYZlEZ47Rw5ReNMCynj dZAkORkpD6MvL7fQZRf6oVW9AN4al7PVeInuYOSWykNZbM/VQz08VGrDG2ni6jByYzDN axLw== X-Gm-Message-State: ALoCoQmI6FJkt4cFo9vBKCTd+Ym6DY6IiULHfuEZurKZfTVlcZJQN3YKNwBHjUOcKQvSMpdHWBlC X-Received: by 10.50.26.36 with SMTP id i4mr1007300igg.33.1382539530263; Wed, 23 Oct 2013 07:45:30 -0700 (PDT) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPSA id cl4sm8037510igc.1.2013.10.23.07.45.29 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Wed, 23 Oct 2013 07:45:29 -0700 (PDT) Sender: Warner Losh Subject: Re: new ofw_search_compatible() Mime-Version: 1.0 (Apple Message framework v1085) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <1382539150.92499.206.camel@revolution.hippie.lan> Date: Wed, 23 Oct 2013 08:45:28 -0600 Content-Transfer-Encoding: quoted-printable Message-Id: <38F33DD0-4D30-438A-8380-D2354444420C@bsdimp.com> References: <1382539150.92499.206.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1085) Cc: freebsd-embedded@FreeBSD.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Oct 2013 14:45:31 -0000 I like this... For PC Card I took a slightly different tact where I passed in the size = of the element and returned a pointer to the element. Each element = started with a struct that described what to match. Worked well there, = but most of the time all that was looked up was a simple int. A more = general solution, but maybe not worth the extra hair, unless you combine = it with a probe routine that is 100% driven from tables (which the pc = card client drivers were). The only other nit in the interface is that it requires a NULL = terminator. I'd prefer a count of elements, but I could go either way. Warner On Oct 23, 2013, at 8:39 AM, Ian Lepore wrote: > While creating drivers that work for a variety of SoCs, I increasingly > find myself coding sequences such as: >=20 > if (ofw_bus_is_compatible(dev, "fsl,imx51-fec")) > sc->fectype =3D FECTYPE_IMX51; > else if (ofw_bus_is_compatible(dev, "fsl,imx53-fec")) > sc->fectype =3D FECTYPE_IMX53; > else if (ofw_bus_is_compatible(dev, "fsl,imx6q-fec")) > sc->fectype =3D FECTYPE_IMX6; > else > sc->fectype =3D FECTYPE_GENERIC; >=20 > That's a short list as an example, eventually that driver may support = a > dozen SoCs. I'd like to add a helper routine that turns this into a > table lookup, patch attached. Any objections? It turns sequences = such > as the above into: >=20 > static struct ofw_compat_data compat_data[] =3D { > {"fsl,imx51-fec", FECTYPE_IMX51}, > {"fsl,imx53-fec", FECTYPE_IMX53}, > {"fsl,imx6q-fec", FECTYPE_IMX6}, > {NULL, FECTYPE_NONE}, > }; > /* ... */ > sc->fectype =3D ofw_bus_search_compatible(dev, compat_data)->ocd_data; >=20 > The search routine by design can't return NULL unless you pass it a = NULL > table pointer. That lets you provide whatever "not found" value in = the > table-end sentry that works best for the way your code is structured. >=20 > -- Ian >=20 > Index: sys/dev/ofw/ofw_bus_subr.h > =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/ofw/ofw_bus_subr.h (revision 256962) > +++ sys/dev/ofw/ofw_bus_subr.h (working copy) > @@ -47,6 +47,11 @@ struct ofw_bus_iinfo { > pcell_t opi_addrc; > }; >=20 > +struct ofw_compat_data { > + const char *ocd_str; > + uintptr_t ocd_data; > +}; > + > /* Generic implementation of ofw_bus_if.m methods and helper routines = */ > int ofw_bus_gen_setup_devinfo(struct ofw_bus_devinfo *, phandle_t); > void ofw_bus_gen_destroy_devinfo(struct ofw_bus_devinfo *); > @@ -74,6 +79,10 @@ void ofw_bus_find_iparent(phandle_t); > int ofw_bus_is_compatible(device_t, const char *); > int ofw_bus_is_compatible_strict(device_t, const char *); >=20 > +/* Helper routine to search a list of compat props. */ > +const struct ofw_compat_data * > + ofw_bus_search_compatible(device_t, const struct ofw_compat_data = *); > + > /* Helper routine for checking existence of a prop */ > int ofw_bus_has_prop(device_t, const char *); > Index: sys/dev/ofw/ofw_bus_subr.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/ofw/ofw_bus_subr.c (revision 256962) > +++ sys/dev/ofw/ofw_bus_subr.c (working copy) > @@ -197,6 +197,21 @@ ofw_bus_is_compatible_strict(device_t dev, const = c > return (0); > } >=20 > +const struct ofw_compat_data * > +ofw_bus_search_compatible(device_t dev, const struct ofw_compat_data = *compat) > +{ > + > + if (compat =3D=3D NULL) > + return NULL; > + > + for (; compat->ocd_str !=3D NULL; ++compat) { > + if (ofw_bus_is_compatible(dev, compat->ocd_str)) > + break; > + } > + > + return (compat); > +} > + > int > ofw_bus_has_prop(device_t dev, const char *propname) > { >=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" From owner-freebsd-embedded@FreeBSD.ORG Wed Oct 23 16:08:45 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 6B599120; Wed, 23 Oct 2013 16:08:45 +0000 (UTC) (envelope-from jmg@h2.funkthat.com) Received: from h2.funkthat.com (gate2.funkthat.com [208.87.223.18]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2AEC629F6; Wed, 23 Oct 2013 16:08:44 +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 r9NG8hIG091732 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Wed, 23 Oct 2013 09:08:44 -0700 (PDT) (envelope-from jmg@h2.funkthat.com) Received: (from jmg@localhost) by h2.funkthat.com (8.14.3/8.14.3/Submit) id r9NG8hjo091731; Wed, 23 Oct 2013 09:08:43 -0700 (PDT) (envelope-from jmg) Date: Wed, 23 Oct 2013 09:08:43 -0700 From: John-Mark Gurney To: Ian Lepore Subject: Re: new ofw_search_compatible() Message-ID: <20131023160843.GG56872@funkthat.com> Mail-Followup-To: Ian Lepore , freebsd-embedded@freebsd.org References: <1382539150.92499.206.camel@revolution.hippie.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1382539150.92499.206.camel@revolution.hippie.lan> User-Agent: Mutt/1.4.2.3i X-Operating-System: FreeBSD 7.2-RELEASE i386 X-PGP-Fingerprint: 54BA 873B 6515 3F10 9E88 9322 9CB1 8F74 6D3F A396 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-to-the-FBI-CIA-and-NSA: HI! HOW YA DOIN? can i haz chizburger? X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.2 (h2.funkthat.com [127.0.0.1]); Wed, 23 Oct 2013 09:08:44 -0700 (PDT) Cc: freebsd-embedded@freebsd.org X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 23 Oct 2013 16:08:45 -0000 Ian Lepore wrote this message on Wed, Oct 23, 2013 at 08:39 -0600: > While creating drivers that work for a variety of SoCs, I increasingly > find myself coding sequences such as: > > if (ofw_bus_is_compatible(dev, "fsl,imx51-fec")) > sc->fectype = FECTYPE_IMX51; > else if (ofw_bus_is_compatible(dev, "fsl,imx53-fec")) > sc->fectype = FECTYPE_IMX53; > else if (ofw_bus_is_compatible(dev, "fsl,imx6q-fec")) > sc->fectype = FECTYPE_IMX6; > else > sc->fectype = FECTYPE_GENERIC; > > That's a short list as an example, eventually that driver may support a > dozen SoCs. I'd like to add a helper routine that turns this into a > table lookup, patch attached. Any objections? It turns sequences such > as the above into: > > static struct ofw_compat_data compat_data[] = { > {"fsl,imx51-fec", FECTYPE_IMX51}, > {"fsl,imx53-fec", FECTYPE_IMX53}, > {"fsl,imx6q-fec", FECTYPE_IMX6}, > {NULL, FECTYPE_NONE}, > }; > /* ... */ > sc->fectype = ofw_bus_search_compatible(dev, compat_data)->ocd_data; > > The search routine by design can't return NULL unless you pass it a NULL > table pointer. That lets you provide whatever "not found" value in the > table-end sentry that works best for the way your code is structured. Some comments would be good... Like a brief usage, such as the requirement that the table end w/ NULL w/ a proper data return... a man page would be even better, but no one has written any for the ofw stuff yet.. :( -- 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 Fri Oct 25 22:07:56 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id BB3F87D for ; Fri, 25 Oct 2013 22:07:56 +0000 (UTC) (envelope-from zeus@ibs.dn.ua) Received: from relay.ibs.dn.ua (relay.ibs.dn.ua [91.216.196.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 39CEE256A for ; Fri, 25 Oct 2013 22:07:55 +0000 (UTC) Received: from ibs.dn.ua (relay.ibs.dn.ua [91.216.196.25]) by relay.ibs.dn.ua with ESMTP id r9PM7kba077638 for ; Sat, 26 Oct 2013 01:07:47 +0300 (EEST) Message-ID: <20131026010746.77637@relay.ibs.dn.ua> Date: Sat, 26 Oct 2013 01:07:46 -2100 From: "Zeus Panchenko" To: cc: Subject: TpLink-Wr1043nd: what to do after successfull flashing? Organization: I.B.S. LLC X-Mailer: MH-E 8.3.1; GNU Mailutils 2.99.98; GNU Emacs 24.0.93 X-Face: &sReWXo3Iwtqql1[My(t1Gkx; y?KF@KF`4X+'9Cs@PtK^y%}^.>Mtbpyz6U=,Op:KPOT.uG )Nvx`=er!l?WASh7KeaGhga"1[&yz$_7ir'cVp7o%CGbJ/V)j/=]vzvvcqcZkf; JDurQG6wTg+?/xA go`}1.Ze//K; Fk&/&OoHd'[b7iGt2UO>o(YskCT[_D)kh4!yY'<&:yt+zM=A`@`~9U+P[qS:f; #9z~ Or/Bo#N-'S'!'[3Wog'ADkyMqmGDvga?WW)qd=?)`Y&k=o}>!ST\ MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Zeus Panchenko List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Oct 2013 22:07:56 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 hi all, just have successully flashed TP-WR1043ND v.1.0 and now, please, I need help to move further ... in console everything was looking fine (it looks like I'm too early removed serial console) but question have arisen: 1. is there sshd, pf, bsnmpd? 2. what are the default passwords for users `root' and `user'? while trying to telnet I was asked the password ... (while on serial console I have changed the passwords and successfully telneted in, but I forgot to save changes (how to do that?)) 3. how to add ports I want (dhcpd, openvpn)? 4. how to remove what I need not to free space for ports, for example wifi support (is sys/mips/conf/TP-WN1043ND and AR91XX_BASE the only place to do)? =2D --=20 Zeus V. Panchenko jid:zeus@im.ibs.dn.ua IT Dpt., I.B.S. LLC GMT+2 (EET) =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlJq67IACgkQr3jpPg/3oyrO1wCgwZTozL2SeGxrhoh5HJKvYNWr n0gAoMF1qaVRuzVfKYa6c0zzLnIw1nfW =3DbRKY =2D----END PGP SIGNATURE----- From owner-freebsd-embedded@FreeBSD.ORG Fri Oct 25 23:48:38 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 9D830D4D for ; Fri, 25 Oct 2013 23:48:38 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-qc0-x22f.google.com (mail-qc0-x22f.google.com [IPv6:2607:f8b0:400d:c01::22f]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 5DD712A96 for ; Fri, 25 Oct 2013 23:48:38 +0000 (UTC) Received: by mail-qc0-f175.google.com with SMTP id e16so2389300qcx.20 for ; Fri, 25 Oct 2013 16:48:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=bBNluwajphKbrlUi/8wrv0C+5WJOpb9qgj7vScfx48o=; b=sU40na1FTwqy/Wrliy0SZCPEZbz1eGvjCCTQ0xCSfuP/4gIGXnMkzrJc4UTB/xhhZO /9bZyX2JTf+XZ5VMNZHM6KE3PA7sFNmgjjegkd9GflZRbvFbI6xqYngvAadmEuCECeMB rPYsAf2xLJynYTpt2a65816XXULtIIj+63hhTEZbuD32WpTSJePRkqNtof5jTIVMzGZi vDmsSAPBUujdFtzRQUvHAmXXh5catyou4DtXsGjAAifT6IubNRevWFH5NixduiMwSTfd P36CKS9mB0KANn7SrQL8wQaFf2ZyZKQgksVxaSPFXrS4xt4Re53du1pdo15wm/yAWinh GdwA== MIME-Version: 1.0 X-Received: by 10.229.106.131 with SMTP id x3mr14247162qco.1.1382744917622; Fri, 25 Oct 2013 16:48:37 -0700 (PDT) Sender: adrian.chadd@gmail.com Received: by 10.224.207.66 with HTTP; Fri, 25 Oct 2013 16:48:37 -0700 (PDT) In-Reply-To: <20131026010746.77637@relay.ibs.dn.ua> References: <20131026010746.77637@relay.ibs.dn.ua> Date: Fri, 25 Oct 2013 16:48:37 -0700 X-Google-Sender-Auth: mG84JWqU3CqpNvOXhBh0AExLfF8 Message-ID: Subject: Re: TpLink-Wr1043nd: what to do after successfull flashing? From: Adrian Chadd To: Zeus Panchenko Content-Type: text/plain; charset=ISO-8859-1 X-Content-Filtered-By: Mailman/MimeDel 2.1.14 Cc: "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 25 Oct 2013 23:48:38 -0000 Hi! * There's currently no sshd, pf, bsnmpd. There's just not enough space to have them. Someone needs to slim things down so they all fit. * The default password is 'no password' * To save changes, use the 'cfg_save' command. * adding ports - I'm not sure, sorry. I was hoping there'd be a way to cross-build ports without installing a whole port build framework like poudriere but unfortunately that doesn't seem to be the case at the moment. The embedded images are mostly just for evaluation and testing. In order to really run on these platforms we do need a few things: * I think we need to either slim down libc, libcrypto, libssl, etc - or build a system against a BSD licenced libc (like what android is using); * .. and then teach the build system about how to link against an alternate libc, rather than the default libc; * I think we need to build some extra things like dnsmasq and dropbear against said library set. That would make the userland much, much smaller and more ameniable to embedded hackery. Thanks, -adrian On 26 October 2013 15:07, Zeus Panchenko wrote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > hi all, > > just have successully flashed TP-WR1043ND v.1.0 and now, please, I need > help to move further ... > > in console everything was looking fine (it looks like I'm too early > removed serial console) but question have arisen: > > 1. is there sshd, pf, bsnmpd? > > 2. what are the default passwords for users `root' and `user'? while > trying to telnet I was asked the password ... (while on serial > console I have changed the passwords and successfully telneted in, > but I forgot to save changes (how to do that?)) > > 3. how to add ports I want (dhcpd, openvpn)? > > 4. how to remove what I need not to free space for ports, for example > wifi support (is sys/mips/conf/TP-WN1043ND and AR91XX_BASE the only > place to do)? > > - -- > Zeus V. Panchenko jid:zeus@im.ibs.dn.ua > IT Dpt., I.B.S. LLC GMT+2 (EET) > -----BEGIN PGP SIGNATURE----- > Version: GnuPG v2.0.19 (FreeBSD) > > iEYEARECAAYFAlJq67IACgkQr3jpPg/3oyrO1wCgwZTozL2SeGxrhoh5HJKvYNWr > n0gAoMF1qaVRuzVfKYa6c0zzLnIw1nfW > =bRKY > -----END PGP SIGNATURE----- > _______________________________________________ > 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 > " > From owner-freebsd-embedded@FreeBSD.ORG Sat Oct 26 00:14:53 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 614F4105; Sat, 26 Oct 2013 00:14:53 +0000 (UTC) (envelope-from zbodek@gmail.com) Received: from mail-we0-x230.google.com (mail-we0-x230.google.com [IPv6:2a00:1450:400c:c03::230]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 9765C2BCB; Sat, 26 Oct 2013 00:14:52 +0000 (UTC) Received: by mail-we0-f176.google.com with SMTP id w62so4476515wes.21 for ; Fri, 25 Oct 2013 17:14:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=Z3xllQRO0jqF5u77/jZ/MAvxmI/flYrNGm0/PcZJPvs=; b=BjWaHyjaO9MqPXEnowfUYZLlAjZyxaLpG4n4T9pJxd+8udwdtWpT27RLOlbNI12E8w dh0tdCLuJXrhwdGFhptehNLwMFFbfPaLWdYC6iG5eeWbJnj9mgCY/A7rsn8lJ9FESVHg fGt/8TVwjsRKY6vFr8nV6JecvhKV7CCpTepLcQmPWtAZSvEjdnfSk6hCNodSzwJYOmmq cSsjS9SijqqZLR4ICDOd1FdcYLBDnTv0bDvrauK+wSOE1x35rLR674pSKyE89F5fbvA1 8mBa5LZMTa7v4dU337JFESO13tjzgO+qAdzPS5Jz3qZF8PNz32T3CHyyH3s4o9W00Rr2 enfA== MIME-Version: 1.0 X-Received: by 10.194.176.163 with SMTP id cj3mr9477292wjc.8.1382746491120; Fri, 25 Oct 2013 17:14:51 -0700 (PDT) Sender: zbodek@gmail.com Received: by 10.216.209.194 with HTTP; Fri, 25 Oct 2013 17:14:50 -0700 (PDT) In-Reply-To: References: Date: Sat, 26 Oct 2013 02:14:50 +0200 X-Google-Sender-Auth: h6RAnr6P2r3Fv02KPefPv1btXeA Message-ID: Subject: Re: Changes to UART ns8250 From: Zbigniew Bodek To: "freebsd-embedded@freebsd.org" Content-Type: multipart/mixed; boundary=089e013cbfea6b0db604e999c193 Cc: "freebsd-arm@freebsd.org" , freebsd-current X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Oct 2013 00:14:53 -0000 --089e013cbfea6b0db604e999c193 Content-Type: text/plain; charset=ISO-8859-1 Hello Everyone, I'm attaching the newest version of the ns8250 UART patch. After some discussions I decided to go with busy-wait + timeout solution. The applied delay should handle exotic corner cases (please notice that we can't use ns8250_delay() to get the actual single transmission time since we know that LCR is locked). If there are no objections then I would like to commit this soon. Best regards Zbigniew Bodek 2013/10/9 Zbigniew Bodek : > Hello Ganbold. > > Thank you for testing the patch and pointing those issue out. > My detection log from Armada XP: > > uart0: <16550 or compatible> mem 0xd0012000-0xd001201f irq 41 on simplebus0 > uart0: console (115200,n,8,1) > uart1: <16550 or compatible> mem 0xd0012100-0xd001211f irq 42 on simplebus0 > uart2: <16550 or compatible> mem 0xd0012200-0xd001221f irq 43 on simplebus0 > uart3: <16550 or compatible> mem 0xd0012300-0xd001231f irq 44 on simplebus0 > > Is there a possibility to download a datasheet for RK30xx so that I could > verify what is required for it's UART? > The patch is causing that we only wait until UART is not busy anymore. I > can't find why would that cause problems > if your UART requires busy detection anyway. > > Best regards > Zbigniew Bodek > > > > 2013/10/9 Ganbold Tsagaankhuu >> >> >> >> >> On Tue, Oct 8, 2013 at 9:58 AM, Ganbold Tsagaankhuu >> wrote: >>> >>> Zbigniew, >>> >>> >>> On Tue, Oct 8, 2013 at 3:54 AM, Zbigniew Bodek wrote: >>>> >>>> Hello. >>>> >>>> I would like to present a patch for ns8250 serial that I would like to >>>> commit in the near future (if there are no objections). >>>> >>>> The patch is fixing newest DesignWare UART with busy detection. >>>> During frequency divisors configuration when UART is busy transferring >>>> or >>>> receiving data, line control register manipulation will not take effect. >>>> Therefore, we will not set divisor latch access bit and we will corrupt >>>> LCR >>>> instead of configuring divisors. >>>> It is necessary to wait until UART finishes all transfers to proceed >>>> with >>>> the configuration. >>>> >>>> This was detected on Armada XP as UART fails on this issue 100/100 >>>> attempts. >>>> The patch was tested by kevlo@ and me and it works on our Armada XP - >>>> based >>>> systems. >>>> >>>> Please send your comment or remarks if there are any. >>> >>> >>> I'm trying your patch on r254983. >>> Tried on 2 boards (Cubieboard2 (Allwinner A20 SoC - dual Cortex A7) and >>> Radxa Rock (Rockchip RK3188 - Quad Cortex A9)). Both seem to have some sort >>> of DesignWare uart. >>> >>> 1. It works fine on Cubieboard2. Uart dmesg is like: >>> >>> uart0: <16750 or compatible> mem 0x1c28000-0x1c283ff irq 33 on simplebus0 >>> uart0: console (115200,n,8,1) >>> >>> 2. No any printing on screen in case of Radxa Rock. Without your patch >>> uart dmesg is like: >>> >>> uart0: <16650 or compatible> mem 0x20064000-0x200643ff irq 68 on >>> simplebus0 >>> uart0: console (115200,n,8,1) >>> >>> In case of RK3188 SoC, it seems booting FreeBSD kernel seems very >>> fragile, not sure yet what is causing the problem. >>> Even with stock ns8250 some version later than r254983 didn't show/print >>> anything on serial console few days ago. >>> Only thing so far I know is this r254983 (with some patch) works in my >>> case on RK3188 SoC based board. >> >> >> >> Zbigniew, >> >> Just tried again your patch on RK30xx board. I was able to see boot >> messages on screen. >> This uart detected as: >> ... >> uart0: <16650 or compatible> mem 0x20064000-0x200643ff irq 68 on >> simplebus0 >> uart0: console (115200,n,8,1) >> uart0: fast interrupt >> ... >> Can you show me your uart detection log? >> It seems this DW uart of RK30xx is different than DW uart of A10/A20. >> Boot simply stops printing "start_init: trying /sbin/init". >> >> thanks, >> >> Ganbold >> >> >>> >>> >>> thanks, >>> >>> Ganbold >>> >>> >>> >>>> >>>> >>>> Best regards >>>> Zbigniew Bodek >>>> >>>> _______________________________________________ >>>> freebsd-current@freebsd.org mailing list >>>> http://lists.freebsd.org/mailman/listinfo/freebsd-current >>>> To unsubscribe, send any mail to >>>> "freebsd-current-unsubscribe@freebsd.org" >>> >>> >> > --089e013cbfea6b0db604e999c193 Content-Type: application/octet-stream; name="0001-Wait-for-DesignWare-UART-transfers-completion-before.patch" Content-Disposition: attachment; filename="0001-Wait-for-DesignWare-UART-transfers-completion-before.patch" Content-Transfer-Encoding: base64 X-Attachment-Id: f_hn83jw4x0 RnJvbSAwYjIxZTI2MDYwZmM5Y2RmMjNlMTBmZDFiMWJlNTY2YjVjNzM4ZjJiIE1vbiBTZXAgMTcg MDA6MDA6MDAgMjAwMQpGcm9tOiBaYmlnb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Ql9CisJfQorCiAJZXJy b3IgPSBuczgyNTBfcGFyYW0oYmFzLCBiYXVkcmF0ZSwgZGF0YWJpdHMsIHN0b3BiaXRzLCBwYXJp dHkpOwogCXVhcnRfdW5sb2NrKHNjLT5zY19od210eCk7CiAJcmV0dXJuIChlcnJvcik7Ci0tIAox LjguNAoK --089e013cbfea6b0db604e999c193-- From owner-freebsd-embedded@FreeBSD.ORG Sat Oct 26 07:19:38 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id B5B2F3C7; Sat, 26 Oct 2013 07:19:38 +0000 (UTC) (envelope-from zeus@ibs.dn.ua) Received: from relay.ibs.dn.ua (relay.ibs.dn.ua [91.216.196.25]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 2BB982CB2; Sat, 26 Oct 2013 07:19:37 +0000 (UTC) Received: from ibs.dn.ua (relay.ibs.dn.ua [91.216.196.25]) by relay.ibs.dn.ua with ESMTP id r9Q7JXOg015220; Sat, 26 Oct 2013 10:19:34 +0300 (EEST) Message-ID: <20131026101933.15218@relay.ibs.dn.ua> Date: Sat, 26 Oct 2013 10:19:33 +0300 From: "Zeus Panchenko" To: "Adrian Chadd" Subject: Re: TpLink-Wr1043nd: what to do after successfull flashing? In-reply-to: Your message of Fri, 25 Oct 2013 16:48:37 -0700 References: <20131026010746.77637@relay.ibs.dn.ua> Organization: I.B.S. LLC X-Mailer: MH-E 8.3.1; GNU Mailutils 2.99.98; GNU Emacs 24.0.93 X-Face: &sReWXo3Iwtqql1[My(t1Gkx; y?KF@KF`4X+'9Cs@PtK^y%}^.>Mtbpyz6U=,Op:KPOT.uG )Nvx`=er!l?WASh7KeaGhga"1[&yz$_7ir'cVp7o%CGbJ/V)j/=]vzvvcqcZkf; JDurQG6wTg+?/xA go`}1.Ze//K; Fk&/&OoHd'[b7iGt2UO>o(YskCT[_D)kh4!yY'<&:yt+zM=A`@`~9U+P[qS:f; #9z~ Or/Bo#N-'S'!'[3Wog'ADkyMqmGDvga?WW)qd=?)`Y&k=o}>!ST\ MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Cc: "freebsd-embedded@freebsd.org" X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Zeus Panchenko List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Oct 2013 07:19:38 -0000 =2D----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Adrian Chadd wrote: > * The default password is 'no password' mmm ... something is wrong, perhaps I do something wrong ... # telnet -l user 192.168.1.20 Trying 192.168.1.20... Connected to 192.168.1.20. Escape character is '^]'. Trying SRA secure login: User (user):=20 Password:=20 [ SRA login failed ] I'm unable to log in at all :( > * To save changes, use the 'cfg_save' command. thanks > The embedded images are mostly just for evaluation and testing. In > order to really run on these platforms we do need a few things: ok, understood btw, is zrouter project faces the same things? =2D --=20 Zeus V. Panchenko jid:zeus@im.ibs.dn.ua IT Dpt., I.B.S. LLC GMT+2 (EET) =2D----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.19 (FreeBSD) iEYEARECAAYFAlJrbQUACgkQr3jpPg/3oyokygCgoq86xstADSttVpPxNo38vjHn 4+kAoMXIqWT2NqcaQu9IwIrDlTzBQ9K/ =3Dr1H2 =2D----END PGP SIGNATURE----- From owner-freebsd-embedded@FreeBSD.ORG Sat Oct 26 17:34:53 2013 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTP id 29098FF3; Sat, 26 Oct 2013 17:34:53 +0000 (UTC) (envelope-from zbodek@gmail.com) Received: from mail-we0-x234.google.com (mail-we0-x234.google.com [IPv6:2a00:1450:400c:c03::234]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id 6DE1B2962; Sat, 26 Oct 2013 17:34:52 +0000 (UTC) Received: by mail-we0-f180.google.com with SMTP id q59so5030868wes.39 for ; Sat, 26 Oct 2013 10:34:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc:content-type; bh=fdupMNvNV7iNKDLsxaHz3zAnxb6jObrT7HjK718SNDE=; b=d+mIP9MBM4WF/zY/O4qDwmeytidrecibVw4EoS6XV5S2VbsuV5TFZiXK7EkHaRJyw/ /F7ldC6a02/uZlA9HoeEkyarPZ7o5r/kVE4GtMMr8j3gNpy8WduvbMOVRse7M/bge96k mvF1Ekyp8ICi2wOPoa++KiJ7gUpBSsS9tKkzknENrSN6FtUcWTu6sTx83rgfJgwJMNie FpbfPSBUc7k2ZaYGdua+YKOrdWN1exXhBspa//+5ovlZFcjgQXBCcnqGZ62qiXYtZ0fj Sl/kCaHL/b2/i9WdMI2OmWN0mKVUTX29Ag9h752GNHA7W0fRGUxQcLdKcL3aoH2amycK FvaA== MIME-Version: 1.0 X-Received: by 10.194.185.73 with SMTP id fa9mr12001667wjc.29.1382808890912; Sat, 26 Oct 2013 10:34:50 -0700 (PDT) Sender: zbodek@gmail.com Received: by 10.216.209.194 with HTTP; Sat, 26 Oct 2013 10:34:50 -0700 (PDT) In-Reply-To: References: Date: Sat, 26 Oct 2013 19:34:50 +0200 X-Google-Sender-Auth: V__ooUaHA_RSj98gAGL-i6AVcTA Message-ID: Subject: Re: Changes to UART ns8250 From: Zbigniew Bodek To: "freebsd-embedded@freebsd.org" Content-Type: text/plain; charset=ISO-8859-1 Cc: "freebsd-arm@freebsd.org" , freebsd-current X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 26 Oct 2013 17:34:53 -0000 Hello again. I've just committed the patch: http://svnweb.freebsd.org/base?view=revision&revision=257170 Thanks and best regards Zbigniew Bodek 2013/10/26 Zbigniew Bodek : > Hello Everyone, > > I'm attaching the newest version of the ns8250 UART patch. > After some discussions I decided to go with busy-wait + timeout solution. > The applied delay should handle exotic corner cases (please notice > that we can't use ns8250_delay() > to get the actual single transmission time since we know that LCR is locked). > > If there are no objections then I would like to commit this soon. > > Best regards > Zbigniew Bodek > > 2013/10/9 Zbigniew Bodek : >> Hello Ganbold. >> >> Thank you for testing the patch and pointing those issue out. >> My detection log from Armada XP: >> >> uart0: <16550 or compatible> mem 0xd0012000-0xd001201f irq 41 on simplebus0 >> uart0: console (115200,n,8,1) >> uart1: <16550 or compatible> mem 0xd0012100-0xd001211f irq 42 on simplebus0 >> uart2: <16550 or compatible> mem 0xd0012200-0xd001221f irq 43 on simplebus0 >> uart3: <16550 or compatible> mem 0xd0012300-0xd001231f irq 44 on simplebus0 >> >> Is there a possibility to download a datasheet for RK30xx so that I could >> verify what is required for it's UART? >> The patch is causing that we only wait until UART is not busy anymore. I >> can't find why would that cause problems >> if your UART requires busy detection anyway. >> >> Best regards >> Zbigniew Bodek >> >> >> >> 2013/10/9 Ganbold Tsagaankhuu >>> >>> >>> >>> >>> On Tue, Oct 8, 2013 at 9:58 AM, Ganbold Tsagaankhuu >>> wrote: >>>> >>>> Zbigniew, >>>> >>>> >>>> On Tue, Oct 8, 2013 at 3:54 AM, Zbigniew Bodek wrote: >>>>> >>>>> Hello. >>>>> >>>>> I would like to present a patch for ns8250 serial that I would like to >>>>> commit in the near future (if there are no objections). >>>>> >>>>> The patch is fixing newest DesignWare UART with busy detection. >>>>> During frequency divisors configuration when UART is busy transferring >>>>> or >>>>> receiving data, line control register manipulation will not take effect. >>>>> Therefore, we will not set divisor latch access bit and we will corrupt >>>>> LCR >>>>> instead of configuring divisors. >>>>> It is necessary to wait until UART finishes all transfers to proceed >>>>> with >>>>> the configuration. >>>>> >>>>> This was detected on Armada XP as UART fails on this issue 100/100 >>>>> attempts. >>>>> The patch was tested by kevlo@ and me and it works on our Armada XP - >>>>> based >>>>> systems. >>>>> >>>>> Please send your comment or remarks if there are any. >>>> >>>> >>>> I'm trying your patch on r254983. >>>> Tried on 2 boards (Cubieboard2 (Allwinner A20 SoC - dual Cortex A7) and >>>> Radxa Rock (Rockchip RK3188 - Quad Cortex A9)). Both seem to have some sort >>>> of DesignWare uart. >>>> >>>> 1. It works fine on Cubieboard2. Uart dmesg is like: >>>> >>>> uart0: <16750 or compatible> mem 0x1c28000-0x1c283ff irq 33 on simplebus0 >>>> uart0: console (115200,n,8,1) >>>> >>>> 2. No any printing on screen in case of Radxa Rock. Without your patch >>>> uart dmesg is like: >>>> >>>> uart0: <16650 or compatible> mem 0x20064000-0x200643ff irq 68 on >>>> simplebus0 >>>> uart0: console (115200,n,8,1) >>>> >>>> In case of RK3188 SoC, it seems booting FreeBSD kernel seems very >>>> fragile, not sure yet what is causing the problem. >>>> Even with stock ns8250 some version later than r254983 didn't show/print >>>> anything on serial console few days ago. >>>> Only thing so far I know is this r254983 (with some patch) works in my >>>> case on RK3188 SoC based board. >>> >>> >>> >>> Zbigniew, >>> >>> Just tried again your patch on RK30xx board. I was able to see boot >>> messages on screen. >>> This uart detected as: >>> ... >>> uart0: <16650 or compatible> mem 0x20064000-0x200643ff irq 68 on >>> simplebus0 >>> uart0: console (115200,n,8,1) >>> uart0: fast interrupt >>> ... >>> Can you show me your uart detection log? >>> It seems this DW uart of RK30xx is different than DW uart of A10/A20. >>> Boot simply stops printing "start_init: trying /sbin/init". >>> >>> thanks, >>> >>> Ganbold >>> >>> >>>> >>>> >>>> thanks, >>>> >>>> Ganbold >>>> >>>> >>>> >>>>> >>>>> >>>>> Best regards >>>>> Zbigniew Bodek >>>>> >>>>> _______________________________________________ >>>>> freebsd-current@freebsd.org mailing list >>>>> http://lists.freebsd.org/mailman/listinfo/freebsd-current >>>>> To unsubscribe, send any mail to >>>>> "freebsd-current-unsubscribe@freebsd.org" >>>> >>>> >>> >>