From owner-freebsd-embedded@FreeBSD.ORG Sun Nov 4 14:59:32 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2644F569; Sun, 4 Nov 2012 14:59:32 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id D10418FC08; Sun, 4 Nov 2012 14:59:31 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id qA4ExODi072549; Sun, 4 Nov 2012 07:59:25 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) 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 qA4Ex1ec011219; Sun, 4 Nov 2012 07:59:01 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Subject: Re: watchdogd, jemalloc, and mlockall From: Ian Lepore To: Dylan Cochran In-Reply-To: References: <1351967919.1120.102.camel@revolution.hippie.lan> <50957793.8060709@delphij.net> <1351973531.1120.118.camel@revolution.hippie.lan> Content-Type: text/plain; charset="us-ascii" Date: Sun, 04 Nov 2012 07:59:01 -0700 Message-ID: <1352041141.1120.146.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: freebsd-hackers@freebsd.org, 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: Sun, 04 Nov 2012 14:59:32 -0000 On Sun, 2012-11-04 at 09:16 -0500, Dylan Cochran wrote: > Have you already tried something like opt.lg_chunk? This, combined > with other options for the library (man 3 jemalloc), should reduce the > space from 8MB down to 16K, or so. (approximation, I'm being liberal > for jemalloc's internal bookkeeping size). For a special case like > watchdogd, this would make more sense in general (given it should be > designed to do no allocations/deletions during normal operation > anyway). For other programs, this would be as unwise as statically > linking them. > I had completely missed the fact that jemalloc had its own manpage, thank you. Given that new information I think the pieces are in place to put watchdogd on a memory diet. I'll work up a patch in the next couple days -- Ian > The 'perfect' solution would obviously be improving the library > manager (rtld) to only mmap() function pages it needs, though I will > admit I'm not sure if the ELF format is even capable of supporting > something like that, what other problems it would cause down the road, > or if it even attempts to do this already (I haven't looked at the > runtime linker code since 7.0). > > By the way, remember that when you compare static v dynamic, that the > runtime linker does allocate private memory to handle the resolving of > symbols to virtual memory addresses. That may skew your memory usage > figures a bit. > > On Sat, Nov 3, 2012 at 4:12 PM, Ian Lepore > wrote: > > > > On Sat, 2012-11-03 at 12:59 -0700, Xin Li wrote: > > > -----BEGIN PGP SIGNED MESSAGE----- > > > Hash: SHA256 > > > > > > On 11/3/12 11:38 AM, Ian Lepore wrote: > > > > In an attempt to un-hijack the thread about memory usage increase > > > > between 6.4 and 9.x, I'm starting a new thread here related to my > > > > recent discovery that watchdogd uses a lot more memory since it > > > > began using mlockall(2). > > > > > > > > I tried statically linking watchdogd and it made a small difference > > > > in RSS, presumably because it doesn't wire down all of libc and > > > > libm. > > > > > > Speaking for this, the last time I brought this up, someone (can't > > > remember, I think it was phk@) argued that the shared library would > > > use only one copy of memory, while statically linked ones would be > > > duplicated and thus use more memory. I haven't yet tried to prove or > > > challenge that, though. > > > > That sounds right to me... if 3 or 4 daemons were to eventually be > > statically linked because of mlockall(), then each of them would have > > its own private copy of strlen(), and malloc(), and so on; we'd be back > > to the bad old days before shared libs came along. Each program would > > contain its own copy of only the routines from the library that it uses, > > not the entire library in each program. > > > > On the other hand, if even one daemon linked with shared libc uses > > mlockall(), then all of libc gets wired. As I understand it, only one > > physical copy of libc would exist in memory, still shared by almost all > > running apps. The entire contents of the library would continuously > > occupy physical memory, even the parts that no apps are using. > > > > It's hard to know how to weigh the various tradeoffs. I suspect there's > > no one correct answer. > > > > -- Ian > > > > > > _______________________________________________ > > freebsd-hackers@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" > _______________________________________________ > freebsd-hackers@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-hackers > To unsubscribe, send any mail to "freebsd-hackers-unsubscribe@freebsd.org" From owner-freebsd-embedded@FreeBSD.ORG Sun Nov 4 16:36:17 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 0BA53D62 for ; Sun, 4 Nov 2012 16:36:17 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-ia0-f182.google.com (mail-ia0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id B1E788FC15 for ; Sun, 4 Nov 2012 16:36:16 +0000 (UTC) Received: by mail-ia0-f182.google.com with SMTP id k10so4918918iag.13 for ; Sun, 04 Nov 2012 08:36:16 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=63yDsjz8PAzKhlYSRmP1Yuke8U3kKrQTEyn7nqTVvKY=; b=JZL2cGLapt5LJInLUVnUsKRpQDVLr8RKNPmAXcOcBsmVnIN/21oLH4ANZL790/SijH sAYpm0vFxYfCox5iAV5BFSr/sPQj5bd2Kuh30POgZWWXVRIH5eaX5QNBefFOTfEO9JhD sYHBHabgCyZGLYoTp8N6+9AJqbZbxf87dLw26S0aVVn94liY7n6thnwkCqmSEXEY8E49 /d1sdJP6uj4sivT0ySSRsC872+0Z4lwJouX6NFtqTjr1p/3SAEhSlWTo3D0/sJH1vTXs sdWGfwRWFFAvdaXMAem86g61ZMGyPBby8omQYSwKq32F0RkaAk1vUS8xzdADxreD3lGF 9MAA== Received: by 10.50.88.168 with SMTP id bh8mr7197806igb.71.1352046976152; Sun, 04 Nov 2012 08:36:16 -0800 (PST) Received: from 53.imp.bsdimp.com (50-78-194-198-static.hfc.comcastbusiness.net. [50.78.194.198]) by mx.google.com with ESMTPS id l8sm4085807igo.13.2012.11.04.08.36.14 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 04 Nov 2012 08:36:15 -0800 (PST) Sender: Warner Losh Subject: Re: watchdogd, jemalloc, and mlockall Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: <1351968635.1120.110.camel@revolution.hippie.lan> Date: Sun, 4 Nov 2012 09:36:13 -0700 Content-Transfer-Encoding: 7bit Message-Id: <2D77347F-9913-4727-AA57-204AC266E15C@bsdimp.com> References: <1351967919.1120.102.camel@revolution.hippie.lan> <20121103184143.GC73505@kib.kiev.ua> <1351968635.1120.110.camel@revolution.hippie.lan> To: Ian Lepore X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQl78iJ8KcEF8meoUlwB7KWg+fuXmAy6q3KLH0LUoj+thwVan2rwxYJLGleL2k083iUvRRz8 Cc: Konstantin Belousov , freebsd-hackers@freebsd.org, 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: Sun, 04 Nov 2012 16:36:17 -0000 On Nov 3, 2012, at 12:50 PM, Ian Lepore wrote: > On Sat, 2012-11-03 at 20:41 +0200, Konstantin Belousov wrote: >> On Sat, Nov 03, 2012 at 12:38:39PM -0600, Ian Lepore wrote: >>> In an attempt to un-hijack the thread about memory usage increase >>> between 6.4 and 9.x, I'm starting a new thread here related to my recent >>> discovery that watchdogd uses a lot more memory since it began using >>> mlockall(2). >>> >>> I tried statically linking watchdogd and it made a small difference in >>> RSS, presumably because it doesn't wire down all of libc and libm. >>> >>> VSZ RSS >>> 10236 10164 Dynamic >>> 8624 8636 Static >>> >>> Those numbers are from ps -u on an arm platform. I just updated the PR >>> (bin/173332) with some procstat -v output comparing with/without >>> mlockall(). >>> >>> It appears that the bulk of the new RSS bloat comes from jemalloc >>> allocating vmspace in 8MB chunks. With mlockall(MCL_FUTURE) in effect >>> that leads to wiring 8MB to satisfy what probably amounts to a few >>> hundred bytes of malloc'd memory. >>> >>> It would probably also be a good idea to remove the floating point from >>> watchdogd to avoid wiring all of libm. The floating point is used just >>> to turn the timeout-in-seconds into a power-of-two-nanoseconds value. >>> There's probably a reasonably efficient way to do that without calling >>> log(), considering that it only happens once at program startup. >> >> No, I propose to add a switch to turn on/off the mlockall() call. >> I have no opinion on the default value of the suggested switch. > > In a patch I submitted along with the PR, I added code to query the > vm.swap_enabled sysctl and only call mlockall() when swapping is > enabled. > > Nobody yet has said anything about what seems to me to be the real > problem here: jemalloc grabs 8MB at a time even if you only need to > malloc a few bytes, and there appears to be no way to control that > behavior. Or maybe there's a knob in there that didn't jump out at me > on a quick glance through the header files. Isn't that only for non-production builds? Warner From owner-freebsd-embedded@FreeBSD.ORG Sun Nov 4 16:47:05 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 5E96BF8A; Sun, 4 Nov 2012 16:47:05 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id C39668FC08; Sun, 4 Nov 2012 16:47:04 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id qA4Gl3Cc075619; Sun, 4 Nov 2012 09:47:03 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) 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 qA4GkeLN011274; Sun, 4 Nov 2012 09:46:40 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Subject: Re: watchdogd, jemalloc, and mlockall From: Ian Lepore To: Warner Losh In-Reply-To: <2D77347F-9913-4727-AA57-204AC266E15C@bsdimp.com> References: <1351967919.1120.102.camel@revolution.hippie.lan> <20121103184143.GC73505@kib.kiev.ua> <1351968635.1120.110.camel@revolution.hippie.lan> <2D77347F-9913-4727-AA57-204AC266E15C@bsdimp.com> Content-Type: text/plain; charset="us-ascii" Date: Sun, 04 Nov 2012 09:46:40 -0700 Message-ID: <1352047600.1120.148.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , freebsd-hackers@freebsd.org, 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: Sun, 04 Nov 2012 16:47:05 -0000 On Sun, 2012-11-04 at 09:36 -0700, Warner Losh wrote: > On Nov 3, 2012, at 12:50 PM, Ian Lepore wrote: > > > On Sat, 2012-11-03 at 20:41 +0200, Konstantin Belousov wrote: > >> On Sat, Nov 03, 2012 at 12:38:39PM -0600, Ian Lepore wrote: > >>> In an attempt to un-hijack the thread about memory usage increase > >>> between 6.4 and 9.x, I'm starting a new thread here related to my recent > >>> discovery that watchdogd uses a lot more memory since it began using > >>> mlockall(2). > >>> > >>> I tried statically linking watchdogd and it made a small difference in > >>> RSS, presumably because it doesn't wire down all of libc and libm. > >>> > >>> VSZ RSS > >>> 10236 10164 Dynamic > >>> 8624 8636 Static > >>> > >>> Those numbers are from ps -u on an arm platform. I just updated the PR > >>> (bin/173332) with some procstat -v output comparing with/without > >>> mlockall(). > >>> > >>> It appears that the bulk of the new RSS bloat comes from jemalloc > >>> allocating vmspace in 8MB chunks. With mlockall(MCL_FUTURE) in effect > >>> that leads to wiring 8MB to satisfy what probably amounts to a few > >>> hundred bytes of malloc'd memory. > >>> > >>> It would probably also be a good idea to remove the floating point from > >>> watchdogd to avoid wiring all of libm. The floating point is used just > >>> to turn the timeout-in-seconds into a power-of-two-nanoseconds value. > >>> There's probably a reasonably efficient way to do that without calling > >>> log(), considering that it only happens once at program startup. > >> > >> No, I propose to add a switch to turn on/off the mlockall() call. > >> I have no opinion on the default value of the suggested switch. > > > > In a patch I submitted along with the PR, I added code to query the > > vm.swap_enabled sysctl and only call mlockall() when swapping is > > enabled. > > > > Nobody yet has said anything about what seems to me to be the real > > problem here: jemalloc grabs 8MB at a time even if you only need to > > malloc a few bytes, and there appears to be no way to control that > > behavior. Or maybe there's a knob in there that didn't jump out at me > > on a quick glance through the header files. > > Isn't that only for non-production builds? > > Warner I don't think so, I discovered this on my tflex unit running -current, and it's built with MALLOC_PRODUCTION defined because it doesn't have enough ram to boot without it defined. -- Ian From owner-freebsd-embedded@FreeBSD.ORG Sun Nov 4 17:02:10 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1187F57F; Sun, 4 Nov 2012 17:02:10 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id C17FB8FC15; Sun, 4 Nov 2012 17:02:09 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id qA4H23mV076114; Sun, 4 Nov 2012 10:02:03 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) 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 qA4H1e9W011293; Sun, 4 Nov 2012 10:01:40 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Subject: Re: watchdogd, jemalloc, and mlockall From: Ian Lepore To: Warner Losh In-Reply-To: <2D77347F-9913-4727-AA57-204AC266E15C@bsdimp.com> References: <1351967919.1120.102.camel@revolution.hippie.lan> <20121103184143.GC73505@kib.kiev.ua> <1351968635.1120.110.camel@revolution.hippie.lan> <2D77347F-9913-4727-AA57-204AC266E15C@bsdimp.com> Content-Type: text/plain; charset="us-ascii" Date: Sun, 04 Nov 2012 10:01:40 -0700 Message-ID: <1352048500.1120.151.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Konstantin Belousov , freebsd-hackers@freebsd.org, 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: Sun, 04 Nov 2012 17:02:10 -0000 On Sun, 2012-11-04 at 09:36 -0700, Warner Losh wrote: > On Nov 3, 2012, at 12:50 PM, Ian Lepore wrote: > > > On Sat, 2012-11-03 at 20:41 +0200, Konstantin Belousov wrote: > >> On Sat, Nov 03, 2012 at 12:38:39PM -0600, Ian Lepore wrote: > >>> In an attempt to un-hijack the thread about memory usage increase > >>> between 6.4 and 9.x, I'm starting a new thread here related to my recent > >>> discovery that watchdogd uses a lot more memory since it began using > >>> mlockall(2). > >>> > >>> I tried statically linking watchdogd and it made a small difference in > >>> RSS, presumably because it doesn't wire down all of libc and libm. > >>> > >>> VSZ RSS > >>> 10236 10164 Dynamic > >>> 8624 8636 Static > >>> > >>> Those numbers are from ps -u on an arm platform. I just updated the PR > >>> (bin/173332) with some procstat -v output comparing with/without > >>> mlockall(). > >>> > >>> It appears that the bulk of the new RSS bloat comes from jemalloc > >>> allocating vmspace in 8MB chunks. With mlockall(MCL_FUTURE) in effect > >>> that leads to wiring 8MB to satisfy what probably amounts to a few > >>> hundred bytes of malloc'd memory. > >>> > >>> It would probably also be a good idea to remove the floating point from > >>> watchdogd to avoid wiring all of libm. The floating point is used just > >>> to turn the timeout-in-seconds into a power-of-two-nanoseconds value. > >>> There's probably a reasonably efficient way to do that without calling > >>> log(), considering that it only happens once at program startup. > >> > >> No, I propose to add a switch to turn on/off the mlockall() call. > >> I have no opinion on the default value of the suggested switch. > > > > In a patch I submitted along with the PR, I added code to query the > > vm.swap_enabled sysctl and only call mlockall() when swapping is > > enabled. > > > > Nobody yet has said anything about what seems to me to be the real > > problem here: jemalloc grabs 8MB at a time even if you only need to > > malloc a few bytes, and there appears to be no way to control that > > behavior. Or maybe there's a knob in there that didn't jump out at me > > on a quick glance through the header files. > > Isn't that only for non-production builds? > > Warner I just realized the implication of what you asked. I think it must be that jemalloc always allocates big chunks of vmspace at a time (unless tuned to do otherwise; I haven't looked into the tuning stuff yet), but when MALLOC_PRODUCTION isn't defined it also touches all the pages within that allocated space, presumably to lay in known byte patterns or other debugging info. -- Ian From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 5 11:06:32 2012 Return-Path: Delivered-To: freebsd-embedded@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 67C9ECDF for ; Mon, 5 Nov 2012 11:06:32 +0000 (UTC) (envelope-from owner-bugmaster@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) by mx1.freebsd.org (Postfix) with ESMTP id 4BF2C8FC12 for ; Mon, 5 Nov 2012 11:06:32 +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 qA5B6WHF001113 for ; Mon, 5 Nov 2012 11:06:32 GMT (envelope-from owner-bugmaster@FreeBSD.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id qA5B6Vup001111 for freebsd-embedded@FreeBSD.org; Mon, 5 Nov 2012 11:06:31 GMT (envelope-from owner-bugmaster@FreeBSD.org) Date: Mon, 5 Nov 2012 11:06:31 GMT Message-Id: <201211051106.qA5B6Vup001111@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, 05 Nov 2012 11:06:32 -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 kern/172968 embedded [arge] probe/attach occasionally fails to find a PHY 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 3 problems total. From owner-freebsd-embedded@FreeBSD.ORG Mon Nov 5 13:21:05 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 043E275C; Mon, 5 Nov 2012 13:21:05 +0000 (UTC) (envelope-from cochard@gmail.com) Received: from mail-la0-f54.google.com (mail-la0-f54.google.com [209.85.215.54]) by mx1.freebsd.org (Postfix) with ESMTP id 3D7948FC17; Mon, 5 Nov 2012 13:21:03 +0000 (UTC) Received: by mail-la0-f54.google.com with SMTP id e12so5149355lag.13 for ; Mon, 05 Nov 2012 05:21:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type; bh=7z64Lzy0nwBjugxq5sDAa66WX6Qh2l0M3xE/To2ZaxQ=; b=AbayiVxixsfoqJeXzZ1TT2eWkFGuPOxRbXkQzy+5TGtJt5L8bgMf7x7BjlLjne70z7 fy/ll0Hn65g18XcrSn3kySctdbullLRtV/N+w1bnbpqxt9ztxUWFgbw0vN5JVSwXLYLI 065byXOABsdui/EPCY7CQMgmAsrGotdbe6qoEBBTfWSz8MY0mRDdcBCupN9XWG2v6uRM zS6DHxxmmgQgpcdDN3xKXKeVkeNpcPS8POTsYs8daFnjKA4heL1IkL6mqFoRp0+ojKSq 7ecIE2zCqjykvv985VbtjfThatH9Wpj1YAZz0EQdBAQElWJObFD/ZUEoTOrvkfPNS1P1 a1Gg== Received: by 10.152.105.33 with SMTP id gj1mr9168233lab.49.1352121662564; Mon, 05 Nov 2012 05:21:02 -0800 (PST) MIME-Version: 1.0 Sender: cochard@gmail.com Received: by 10.112.54.10 with HTTP; Mon, 5 Nov 2012 05:20:42 -0800 (PST) In-Reply-To: <1556142970.20121103154300@serebryakov.spb.ru> References: <1556142970.20121103154300@serebryakov.spb.ru> From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Date: Mon, 5 Nov 2012 14:20:42 +0100 X-Google-Sender-Auth: -UGoeOnZES9LZUKk9c2ZMZHfVlk Message-ID: Subject: Re: pkg-ng and nanobsd? To: lev@freebsd.org 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: Mon, 05 Nov 2012 13:21:05 -0000 Hi Lev, I'm using pkg-ng on my nanobsd project, but I didn't use "cust_pkg()" because I prefer to generate ports from my nanobsd script: My nanobsd configuration file (BSDRP.nano) include a function add_port () that generate a pkg from the ports. source here: https://sourceforge.net/p/bsdrp/code/ And the flowshart of my framework (the make.sh script that call nanobsd) is here: http://bsdrp.net/documentation/technical_docs#makesh_flowshart Regards, Olivier On Sat, Nov 3, 2012 at 12:43 PM, Lev Serebryakov wrote: > Hello, Freebsd-embedded. > > Does somebody have solution for pkg-ng and nanobsd co-existence? > > I was able to hack "cust_pkg ()" function to install pkg-ng into > chrooted environment (bootstrap pkg command), but after that "pkg > add" fails, as it doesn't have `-F' flag and it reports > double-installation as error :( > > > -- > // Black Lion AKA Lev Serebryakov > > _______________________________________________ > 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 Tue Nov 6 21:01:57 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id ADE7087C; Tue, 6 Nov 2012 21:01:57 +0000 (UTC) (envelope-from adrian.chadd@gmail.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 67B878FC0A; Tue, 6 Nov 2012 21:01:57 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so733853pbb.13 for ; Tue, 06 Nov 2012 13:01:56 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; bh=2gaaPUtjNUz0jR2FQYQ1055AVFzxgyAwY74Rz4P93oo=; b=sRVVrJhGY+KZIJhkp1BhJdp7WYHXIRYI234zN+rrhi4dZWUY0pp6+ZVGYQkiL6LFFV 0HTGpryqjm7kn8R3KNf3ezgQ2FQYpmorrvNS0MvUIaVJBm5L3RBDk8pow92Re2Von/fJ 1BfPhr++Iw3jIH2r9bdtwyCAHO8levFOLWk1d8B48VFTiLDoGQ/cWRmy9XphEMD2llmr eo7MHjPuiRKFQeXUWWxUaZnNWpKylZvGDuuh0BvAhSVaegpzYzlXoiHEC0/kKzIdwBgP 0LWkuNlckX9jbFuiUQY574gdc9o7vRqU6coUqJDkeDSn20fWIEHYHNW3K/2I5DRz9YEV f/qA== MIME-Version: 1.0 Received: by 10.68.251.197 with SMTP id zm5mr449213pbc.30.1352235716070; Tue, 06 Nov 2012 13:01:56 -0800 (PST) Sender: adrian.chadd@gmail.com Received: by 10.68.124.130 with HTTP; Tue, 6 Nov 2012 13:01:55 -0800 (PST) In-Reply-To: <4770DC05-A7C2-4E59-8188-ABFA404DAF23@gmail.com> References: <0FCCB08E-8517-4B5C-8621-06DAF3B86B09@gmail.com> <5BB9E514-7C57-480E-994C-BF59023BC400@gmail.com> <20121012020904.c03ef76a.ray@ddteam.net> <23E6E442-A8CE-4024-86BF-B0D19CC696F8@gmail.com> <7E5C5ACD-B9D0-4591-B071-797F9F1E1743@gmail.com> <4770DC05-A7C2-4E59-8188-ABFA404DAF23@gmail.com> Date: Tue, 6 Nov 2012 13:01:55 -0800 X-Google-Sender-Auth: pkz2AJ0kNULYsJBqIGwRLa7cqdk Message-ID: Subject: Re: if_arge eventually fails to attach PHY at boot (with arswitch) From: Adrian Chadd To: Luiz Otavio O Souza Content-Type: text/plain; charset=ISO-8859-1 Cc: Aleksandr Rybalko , 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: Tue, 06 Nov 2012 21:01:57 -0000 Hi, I'm happy to make arswitch need to be specified in hints, rather than probed. Does anyone have any cleaner ideas on how to probe this stuff? It's very recursive (ie, arswitch exposes an mdiobus, which the arswitch code then tries to probe. The probing messes the mdiobus up and makes it difficult to find a PHY there.) This feels like ISA all over again.. :) Adrian On 6 November 2012 10:39, Luiz Otavio O Souza wrote: > On Nov 3, 2012, at 12:48 PM, Adrian Chadd wrote: >> On 3 November 2012 06:10, Luiz Otavio O Souza wrote: >>> Hi Adrian and sorry for the delay, >>> >>> Yes, there is one fix missing, but it is not ready yet... i'm work on the fix and hope to get it ready for a review later today or tomorrow. >> >> Cool! What is it? > > The arswitch driver always tries to attach to every mdio bus on the system. When the switch exposes his own mdio another arswitch instance was trying to attach to it and while trying to read from the switch registers it sometimes upset the switch. > > I've tried to fix this by others means, but agreed with Ray that arswitch can't be really 'detected', so i just removed the auto attachment from it and now it only attaches when hinted. This fixes the problem without any additional hack. > > Please let me know what you think about it. > > The rtl8366 may have the same problem, but for now i don't have any hardware to test it... > > Ahh, the AP96 kernel file has the arswitch device declared but there is no hints for it on AP96.hints, so i didn't touch it. > > Thanks, > Luiz > From owner-freebsd-embedded@FreeBSD.ORG Tue Nov 6 21:32:34 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1BDBA14D for ; Tue, 6 Nov 2012 21:32:34 +0000 (UTC) (envelope-from imp@bsdimp.com) Received: from mail-oa0-f54.google.com (mail-oa0-f54.google.com [209.85.219.54]) by mx1.freebsd.org (Postfix) with ESMTP id B419C8FC08 for ; Tue, 6 Nov 2012 21:32:33 +0000 (UTC) Received: by mail-oa0-f54.google.com with SMTP id n9so1198594oag.13 for ; Tue, 06 Nov 2012 13:32:32 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=sender:subject:mime-version:content-type:from:in-reply-to:date:cc :content-transfer-encoding:message-id:references:to:x-mailer :x-gm-message-state; bh=YcStZPpj6V4flaCMiJJUoRCE+CWJIeFozt+0Ha6GrYM=; b=RwrAKF8eBnsD1MNY2W3jzF5jIIswTclUpC2DHWKoEN1ilS2Ll4EbjpNeayNa1l79OU gJ8qygeQ92CkUAnXMN0hvcaY2roHNWLr8TYiEjUP7cpYwNAoNFrVtwZ/3X9TnRIpGmxy Tvvpk8R5La4omUHroagBLMmvN2X6KZrIkn668sbQRdA1/UyTyu8ERkvVrxMCgdee+Adp lPhkHqJXusZRz1vCmVKSFEEbMv3FMfFh1axiLnXzMogVNlsSZ42i9u+Bk6/dSGS0yCbc 1FWnsnlT2nAxsMygvGOMp/4m6pnjSLTalYbTADOUaxLUQMRVKMjciS9mYGt+g1bK2Q1q gkEw== Received: by 10.60.7.73 with SMTP id h9mr2126250oea.13.1352237552867; Tue, 06 Nov 2012 13:32:32 -0800 (PST) Received: from [10.30.101.53] ([209.117.142.2]) by mx.google.com with ESMTPS id on10sm21791761obc.9.2012.11.06.13.32.30 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 06 Nov 2012 13:32:31 -0800 (PST) Sender: Warner Losh Subject: Re: if_arge eventually fails to attach PHY at boot (with arswitch) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=us-ascii From: Warner Losh In-Reply-To: Date: Tue, 6 Nov 2012 14:32:28 -0700 Content-Transfer-Encoding: quoted-printable Message-Id: <1984A35B-D0BE-4896-96D4-32EAE746F9EC@bsdimp.com> References: <0FCCB08E-8517-4B5C-8621-06DAF3B86B09@gmail.com> <5BB9E514-7C57-480E-994C-BF59023BC400@gmail.com> <20121012020904.c03ef76a.ray@ddteam.net> <23E6E442-A8CE-4024-86BF-B0D19CC696F8@gmail.com> <7E5C5ACD-B9D0-4591-B071-797F9F1E1743@gmail.com> < CAJ-Vmom9iPB+-JfkNRtd10rzGSDbttvbWnOSu+3Tj4+sGWRpew@mail.gmail.com> <4770DC05-A7C2-4E59-8188-ABFA404DAF23@gmail.com> To: Adrian Chadd X-Mailer: Apple Mail (2.1084) X-Gm-Message-State: ALoCoQmYERBZO4hP3QLn54mnvZfUj+EsPjYsltwiKGYrxNEQKe8Uam1UPqHeNuB2ZYhdIWlsNv0B Cc: Aleksandr Rybalko , freebsd-embedded@freebsd.org, Luiz Otavio O Souza 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: Tue, 06 Nov 2012 21:32:34 -0000 On Nov 6, 2012, at 2:01 PM, Adrian Chadd wrote: > Hi, >=20 > I'm happy to make arswitch need to be specified in hints, rather than = probed. >=20 > Does anyone have any cleaner ideas on how to probe this stuff? It's > very recursive (ie, arswitch exposes an mdiobus, which the arswitch > code then tries to probe. The probing messes the mdiobus up and makes > it difficult to find a PHY there.) >=20 > This feels like ISA all over again.. FDT is the one true way of doing this :) Hints are a poor, bastard step-child that beats doing without... Warner > :) >=20 > Adrian >=20 > On 6 November 2012 10:39, Luiz Otavio O Souza = wrote: >> On Nov 3, 2012, at 12:48 PM, Adrian Chadd wrote: >>> On 3 November 2012 06:10, Luiz Otavio O Souza = wrote: >>>> Hi Adrian and sorry for the delay, >>>>=20 >>>> Yes, there is one fix missing, but it is not ready yet... i'm work = on the fix and hope to get it ready for a review later today or = tomorrow. >>>=20 >>> Cool! What is it? >>=20 >> The arswitch driver always tries to attach to every mdio bus on the = system. When the switch exposes his own mdio another arswitch instance = was trying to attach to it and while trying to read from the switch = registers it sometimes upset the switch. >>=20 >> I've tried to fix this by others means, but agreed with Ray that = arswitch can't be really 'detected', so i just removed the auto = attachment from it and now it only attaches when hinted. This fixes the = problem without any additional hack. >>=20 >> Please let me know what you think about it. >>=20 >> The rtl8366 may have the same problem, but for now i don't have any = hardware to test it... >>=20 >> Ahh, the AP96 kernel file has the arswitch device declared but there = is no hints for it on AP96.hints, so i didn't touch it. >>=20 >> Thanks, >> Luiz >>=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 Nov 7 10:34:25 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1485737C for ; Wed, 7 Nov 2012 10:34:25 +0000 (UTC) (envelope-from jack.mclauren@yahoo.com) Received: from nm25.bullet.mail.ne1.yahoo.com (nm25.bullet.mail.ne1.yahoo.com [98.138.90.88]) by mx1.freebsd.org (Postfix) with ESMTP id BFC0D8FC0A for ; Wed, 7 Nov 2012 10:34:23 +0000 (UTC) Received: from [98.138.90.48] by nm25.bullet.mail.ne1.yahoo.com with NNFMP; 07 Nov 2012 10:32:40 -0000 Received: from [98.138.89.170] by tm1.bullet.mail.ne1.yahoo.com with NNFMP; 07 Nov 2012 10:32:40 -0000 Received: from [127.0.0.1] by omp1026.mail.ne1.yahoo.com with NNFMP; 07 Nov 2012 10:32:40 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 223644.77423.bm@omp1026.mail.ne1.yahoo.com Received: (qmail 77268 invoked by uid 60001); 7 Nov 2012 10:32:40 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1352284360; bh=D325389dz3FQh6Wearh94xLTyBFx5IIh5X/0XsQuz20=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=eNFekhHCuDRYmY5xO4jMXEAu8CHdhxJwbrJy3H/Ka3jipWPRoIuHfdPEF+5BzYiXisTODQKpUzu17oDrCvpaDxQlu3SiSWqO6i1W/d628Tuar+K9RovnaxBLeW6NK7FvNl6DTrRhbibU/kM27xsTyceoHTBxJT1vdrfeqQCVfo8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=pwpu5trPaVrHilG/hUkEM7igFdhw2VO0/PnAUmTcthmPg38Hnd8Zl2nnj/dSLDSE19akv1p494srHH5pk8Jnqoj7iNELXZQHPv8dEcifGMeepVf++lAvuUTd/jXB3o7lfPYwkSPgzn71AarnrkhmBfw68HF1cT6p+Cdb5dFnPl4=; X-YMail-OSG: fVUIcK0VM1nJcaymYA5PiPGJKdiBkkIWkc1VHRjnBrbSwAP f5gxnSlZtb2lktRSK.Xfno42gnlqV6Rue2xoP6nBUEnrC3vYGjrrmnQZrbsL ubi6BBPMtyvf9ifo3A3mbvWQBbc4Gk3HdV8C0hbIp9ZwIIBmkp7ytKbfbeWq N1eAa2qYvnqKpGED7gwg8utRs.p8832DXwwU7WRZaumCM_ClA60vMBCEQdIS coTDIGVU5ZYCfzVXB8lJ2wAOc_LlQa0_RGnENkxMQGzlYG_TLtI0RswEN64h HoyoLKcX6e4.lkAZ_j2TeEdkP0IuBDw48nZsq_.jhBuVGOc4lQmZa8XVfojJ vnpUUPKwokXF8jdaeKcOSiO9fqtFwa1EYn1MSFmMRhbi3t1dfoIHP3wFFv4z MV2c9LFzPh5l8a6zDSD8NbOUpjWWs9XGhP8IJ0qUI5AY_uLVk67r1_hfABUo 48G3z0IVYSZa8KEMl2S9D55z3fY_7fHDAvCn04V7g.NgG.tzx.opyi858bnW FO6pVotg- Received: from [89.165.120.140] by web126003.mail.ne1.yahoo.com via HTTP; Wed, 07 Nov 2012 02:32:40 PST X-Rocket-MIMEInfo: 001.001, SGVsbG8gZnJpZW5kcwpUaGFua3MgZm9yIGhlbHBpbmcgbWUgYnVpbGRpbmcgYSBuYW5vYnNkIGltYWdlLiBJIGRpZCBidWlsZAphbiBpbWFnZSB3aXRoIG5vIHByb2JsZW1zICggc3BlY2lhbCB0aGFua3MgdG_CoFBhdWwgU2NoZW5rZXZlbGTCoMKgKS4KQnV0IEkgaGF2ZSBzb21lIHByb2JsZW1zIGluIHRoZSBzZWNvbmQgcGhhc2Ugb2YgcnVubmluZyBhCmRldmljZSBmcm9tIGEgbmFub2JzZCBpbWFnZS4gCkFmdGVyIGNvcHlpbmcgdGhlIGltYWdlIG9uIGEgZmxhc2ggbWVtb3J5LCBhbmQgYWZ0ZXIgSSBzZXQBMAEBAQE- X-Mailer: YahooMailWebService/0.8.123.460 References: <1351605941.79450.YahooMailNeo@web126002.mail.ne1.yahoo.com> <20121030145024.GA16785@psconsult.nl> Message-ID: <1352284360.76432.YahooMailNeo@web126003.mail.ne1.yahoo.com> Date: Wed, 7 Nov 2012 02:32:40 -0800 (PST) From: Jack Mc Lauren Subject: nanobsd boot problem To: Paul Schenkeveld , "freebsd-embedded@freebsd.org" In-Reply-To: <20121030145024.GA16785@psconsult.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Jack Mc Lauren List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2012 10:34:25 -0000 Hello friends=0AThanks for helping me building a nanobsd image. I did build= =0Aan image with no problems ( special thanks to=A0Paul Schenkeveld=A0=A0).= =0ABut I have some problems in the second phase of running a=0Adevice from = a nanobsd image. =0AAfter copying the image on a flash memory, and after I = set=0Athe system to boot up from flash memory, I just see a black screen an= d a=0Ablinking cursor ! looks like the boot device ( flash memory ) is not = recognized=0Aby the system.=0AHere are my debugging information , if they a= re not enough,=0Atell me please to send you necessary informations :=0Admes= g output :=0Ada0 at umass-sim0 bus 0 scbus0=0Atarget 0 lun 0=0Ada0: Removable Direct Access SCSI-4 device=0Ada0: 40.0= 00MB/s transfers=0Ada0: 7388MB (15130624 512 byte=0Asectors: 255H 63S/T 941= C) =A0=A0=0Aaccording to the last line, I change the NANO_SECTS to 63=0Aand= NANO_HEADS to 255. (in nanobsd.sh).=0Als /dev output :=0A=A0=A0=A0=A0=A0= =A0=A0=A0=A0=A0 da0s1=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 da0s1a=A0=A0=A0=A0 ad6s= 1b=A0=A0=A0=A0=A0=A0=A0=A0=A0 da0s3=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ad6s1d=A0= =A0=A0=A0=A0=A0=A0=A0=A0 da0s4=0Aaccording to the first column , I set NANO= _DRIVE to da0. (in=0Ananobsd.sh)=0Aand here are the contents of the flash m= emory :=0A=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 ls /mnt=0A.cshrc=A0= =A0=A0=A0=A0=A0=A0=A0=A0 boot=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 lib=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 rescue=A0=A0=A0=A0=A0=A0=A0=A0=A0 usr=0A.profil= e=A0=A0=A0=A0=A0=A0=A0 cfg=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 libexec=A0= =A0=A0=A0=A0=A0=A0=A0 root=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 var=0A.snap=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 conf=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 media=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 sbin=0ACOPYRIGHT=A0=A0 =A0=A0=A0=A0dev=A0=A0=A0= =A0=A0=A0=A0=A0=A0=A0=A0=A0 mnt=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 sys=0Ab= in=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 etc=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0= =A0 proc=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 tmp=0AAm I missing something ?? c= ould you please me please ? From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 7 12:02:12 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id E09C8967 for ; Wed, 7 Nov 2012 12:02:12 +0000 (UTC) (envelope-from freebsd@psconsult.nl) Received: from mx1.psconsult.nl (unknown [IPv6:2001:7b8:30f:e0::5059:ee8a]) by mx1.freebsd.org (Postfix) with ESMTP id 8B0928FC0A for ; Wed, 7 Nov 2012 12:02:12 +0000 (UTC) Received: from mx1.psconsult.nl (mx1.hvnu.psconsult.nl [46.44.189.154]) by mx1.psconsult.nl (8.14.5/8.14.4) with ESMTP id qA7C24hX057066 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 7 Nov 2012 13:02:10 +0100 (CET) (envelope-from freebsd@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.5/8.14.4/Submit) id qA7C24T5057065 for freebsd-embedded@freebsd.org; Wed, 7 Nov 2012 13:02:04 +0100 (CET) (envelope-from freebsd@psconsult.nl) X-Authentication-Warning: mx1.psconsult.nl: paul set sender to freebsd@psconsult.nl using -f Date: Wed, 7 Nov 2012 13:02:04 +0100 From: Paul Schenkeveld To: freebsd-embedded@freebsd.org Subject: Re: nanobsd boot problem Message-ID: <20121107120204.GA51120@psconsult.nl> References: <1351605941.79450.YahooMailNeo@web126002.mail.ne1.yahoo.com> <20121030145024.GA16785@psconsult.nl> <1352284360.76432.YahooMailNeo@web126003.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1352284360.76432.YahooMailNeo@web126003.mail.ne1.yahoo.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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, 07 Nov 2012 12:02:12 -0000 Hi, On Wed, Nov 07, 2012 at 02:32:40AM -0800, Jack Mc Lauren wrote: > Hello friends > Thanks for helping me building a nanobsd image. I did build > an image with no problems ( special thanks to Paul Schenkeveld  ). > But I have some problems in the second phase of running a > device from a nanobsd image. > After copying the image on a flash memory, and after I set > the system to boot up from flash memory, I just see a black screen and a > blinking cursor ! looks like the boot device ( flash memory ) is not recognized > by the system. Sounds like you've built a nanobsd image for serial console and try to run it on a system with [vga] console. Pls. confirm whether you have a vga console and PS/2 (or USB) keyboard or serial console. Pls. post the .conf file you used to build NanoBSD. > Here are my debugging information , if they are not enough, > tell me please to send you necessary informations : > dmesg output : > da0 at umass-sim0 bus 0 scbus0 > target 0 lun 0 > da0: PMAP> Removable Direct Access SCSI-4 device > da0: 40.000MB/s transfers > da0: 7388MB (15130624 512 byte > sectors: 255H 63S/T 941C)    > according to the last line, I change the NANO_SECTS to 63 > and NANO_HEADS to 255. (in nanobsd.sh). Never change variables inside nanobsd.sh, create a config file instead and the run "sh nanobsd.sh -c configfile.conf" > ls /dev output : >            da0s1           da0s1a     ad6s1b          da0s3           ad6s1d          da0s4 > according to the first column , I set NANO_DRIVE to da0. (in > nanobsd.sh) > and here are the contents of the flash memory : >                 ls /mnt > .cshrc          boot            lib             rescue          usr > .profile        cfg             libexec         root            var > .snap           conf            media           sbin > COPYRIGHT       dev             mnt             sys > bin             etc             proc            tmp > Am I missing something ?? could you please me please ? Kind regards, Paul Schenkeveld From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 7 14:42:36 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 9C12AD9E for ; Wed, 7 Nov 2012 14:42:36 +0000 (UTC) (envelope-from jack.mclauren@yahoo.com) Received: from nm29-vm4.bullet.mail.ne1.yahoo.com (nm29-vm4.bullet.mail.ne1.yahoo.com [98.138.91.189]) by mx1.freebsd.org (Postfix) with ESMTP id EC8848FC14 for ; Wed, 7 Nov 2012 14:42:35 +0000 (UTC) Received: from [98.138.226.179] by nm29.bullet.mail.ne1.yahoo.com with NNFMP; 07 Nov 2012 14:42:35 -0000 Received: from [98.138.89.192] by tm14.bullet.mail.ne1.yahoo.com with NNFMP; 07 Nov 2012 14:42:34 -0000 Received: from [127.0.0.1] by omp1050.mail.ne1.yahoo.com with NNFMP; 07 Nov 2012 14:42:34 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 792362.64263.bm@omp1050.mail.ne1.yahoo.com Received: (qmail 47658 invoked by uid 60001); 7 Nov 2012 14:42:34 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1352299354; bh=9CfPY361HM9OCObxKlObyRB85UpCAOWB/jNURzq5F1Q=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=K3HFHGqL24nzsS6RyCLaiTt9mPUUDiM6/KpaHd0xtqcJGKA0SMp0AHM0XkXn+1nitV/QwgSgtG28WPQY/rJbc+NcCMp2If7/feAfQJnBuuYA9VXIv/uSQ76UE2UDFjXK6kHD0teSUPjVsJvlB8j/nyuy3K0BcMK4kE04Kw2kaho= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=lz5yml3ioOchA3Zjz8uvWTC33YvFVanoWHJxeuEm27wCjTyhzrwWwMVLFnKYuMxAygGsvpEHC+PBPq06e6xrEBo7bSiUFOVqowjuF/gYx+j6cMSQwalDpEhbJj7nn2lL6xbJvoO86OtkAQRVgC3MF2yFdc5dccZYFydljZiM4A4=; X-YMail-OSG: pG2LYvQVM1mOOY.9PQQoLESg_4lg5rwAHj0gItK0Fzx6RiU YetI5i1Hk23peDNNsDPdZBrHfH_RoaMIwiVtWaiH_FT6pFQ_6ScKPQs85LVv 05qeX_Z.dPar8Y6CrHme_.EEpYzp0d.DpBmb3UpUU4JGdwOXlAn5APaQAeKT qJ0STIIxoaskF25DWt69JCtOq9Oh6x7ld7V6AZ13jD.brxSnpNqVVEGIVREE MFkZKglyz9GJw10bnInmpFRYnoypDFO2AkkPpEzGtaq2cO..BsXEH4Sf1wJ_ vf_EIqZKGvftwrO.xNzS_D7XJ8b.Rns5Y_9KJFaX__mzPYBHdElS0dw4lycP 59EjtpkpFnwElGUnYY3idxXi_hvlx4drUjQhUsw9o09N_lgOc3k6vzc1qaBg nIn6qz9e94C3SV2xmXCTltYr9z2IiewKnM9zk94mnZ6bhQP1mNqSu03lmqfT UiTTIttfVp6xQf9482qG_up49s6Q37q6xAdSPIpN1I_hvPjZsApK9bcog28T HVyS_d4xeck2gUrvDx3O_J4XCQuYPRw-- Received: from [89.165.120.140] by web126004.mail.ne1.yahoo.com via HTTP; Wed, 07 Nov 2012 06:42:34 PST X-Rocket-MIMEInfo: 001.001, VGhhbmtzIGZvciB5b3VyIHJlcGx5IC4uLgoKPj5QbHMuIHBvc3QgdGhlIC5jb25mIGZpbGUgeW91IHVzZWQgdG8gYnVpbGQgTmFub0JTRC4KCgoKdGhpcyBpcyB0aGUgd2hvbGUgbmFub2JzZC5zaCBmaWxlLiBzb3JyeSBpdCdzIGEgYml0IGxvbmcgLi4uCiMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjIyMjCgoKc2V0IC1lCgoKIyABMAEBAQE- X-Mailer: YahooMailWebService/0.8.123.460 References: <1351605941.79450.YahooMailNeo@web126002.mail.ne1.yahoo.com> <20121030145024.GA16785@psconsult.nl> <1352284360.76432.YahooMailNeo@web126003.mail.ne1.yahoo.com> <20121107120204.GA51120@psconsult.nl> Message-ID: <1352299354.47535.YahooMailNeo@web126004.mail.ne1.yahoo.com> Date: Wed, 7 Nov 2012 06:42:34 -0800 (PST) From: Jack Mc Lauren Subject: Re: nanobsd boot problem To: Paul Schenkeveld , "freebsd-embedded@freebsd.org" In-Reply-To: <20121107120204.GA51120@psconsult.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Jack Mc Lauren List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2012 14:42:36 -0000 Thanks for your reply ...=0A=0A>>Pls. post the .conf file you used to build= NanoBSD.=0A=0A=0A=0Athis is the whole nanobsd.sh file. sorry it's a bit lo= ng ...=0A##################################################################= #################################################################=0A=0A=0As= et -e=0A=0A=0A# Name of this NanoBSD build. =A0(Used to construct workdir n= ames)=0ANANO_NAME=3Dfull=0A=0A# Source tree directory=0ANANO_SRC=3D/usr/src= =0A=0A# Where nanobsd additional files live under the source tree=0ANANO_TO= OLS=3Dtools/tools/nanobsd=0A=0A# Where cust_pkg() finds packages to install= =0ANANO_PACKAGE_DIR=3D${NANO_SRC}/${NANO_TOOLS}/Pkg=0ANANO_PACKAGE_LIST=3D"= *"=0A=0A# Object tree directory=0A# default is subdir of /usr/obj=0ANANO_OB= J=3D"/var/images"=0A=0A# The directory to put the final images=0A# default = is ${NANO_OBJ}=0A#NANO_DISKIMGDIR=3D""=0A=0A# Parallel Make=0ANANO_PMAKE=3D= "make -j 3"=0A=0A# The default name for any image we create.=0ANANO_IMGNAME= =3D"_.disk.full"=0A=0A# Options to put in make.conf during buildworld only= =0ACONF_BUILD=3D'=0AWITHOUT_ACCT=3D"YES"=0AWITHOUT_AMD=3D"YES"=0AWITHOUT_AP= M=3D"YES"=0AWITHOUT_ASSERT_DEBUG=3D"YES"=0AWITHOUT_ATM=3D"YES"=0AWITHOUT_AU= DIT=3D"YES"=0AWITHOUT_AUTHPF=3D"YES"=0AWITHOUT_BIND=3D"YES"=0AWITHOUT_BIND_= DNSSEC=3D"YES"=0AWITHOUT_BIND_ETC=3D"YES"=0AWITHOUT_BIND_LIBS_LWRES=3D"YES"= =0AWITHOUT_BIND_MTREE=3D"YES"=0AWITHOUT_BIND_NAMED=3D"YES"=0AWITHOUT_BIND_U= TILS=3D"YES"=0AWITHOUT_BLUETOOTH=3D"YES"=0AWITHOUT_BSNMP=3D"YES"=0AWITHOUT_= CALENDAR=3D"YES"=0AWITHOUT_CAPSICUM=3D"YES"=0AWITHOUT_CTM=3D"YES"=0AWITHOUT= _CVS=3D"YES"=0AWITHOUT_DICT=3D"YES"=0AWITHOUT_EXAMPLES=3D"YES"=0AWITHOUT_FL= OPPY=3D"YES"=0AWITHOUT_FREEBSD_UPDATE=3D"YES"=0AWITHOUT_GAMES=3D"YES"=0AWIT= HOUT_GCOV=3D"YES"=0AWITHOUT_GDB=3D"YES"=0AWITHOUT_GPIB=3D"YES"=0AWITHOUT_GP= IO=3D"YES"=0AWITHOUT_HTML=3D"YES"=0AWITHOUT_IPFILTER=3D"YES"=0AWITHOUT_IPX= =3D"YES"=0AWITHOUT_IPX_SUPPORT=3D"YES"=0AWITHOUT_JAIL=3D"YES"=0AWITHOUT_KER= BEROS=3D"YES"=0AWITHOUT_KERBEROS_SUPPORT=3D"YES"=0AWITHOUT_LIB32=3D"YES"=0A= WITHOUT_LOCALES=3D"YES"=0AWITHOUT_LOCATE=3D"YES"=0AWITHOUT_LPR=3D"YES"=0AWI= THOUT_MAN=3D"YES"=0AWITHOUT_MAN_UTILS=3D"YES"=0AWITHOUT_NCP=3D"YES"=0AWITHO= UT_NDIS=3D"YES"=0AWITHOUT_NETCAT=3D"YES"=0AWITHOUT_NIS=3D"YES"=0AWITHOUT_NL= S=3D"YES"=0AWITHOUT_NLS_CATALOGS=3D"YES"=0AWITHOUT_NS_CACHING=3D"YES"=0AWIT= HOUT_PORTSNAP=3D"YES"=0AWITHOUT_PROFILE=3D"YES"=0AWITHOUT_QUOTAS=3D"YES"=0A= WITHOUT_RCMDS=3D"YES"=0AWITHOUT_RESCUE=3D"YES"=0AWITHOUT_ROUTED=3D"YES"=0AW= ITHOUT_SENDMAIL=3D"YES"=0AWITHOUT_SHAREDOCS=3D"YES"=0AWITHOUT_SYSINSTALL=3D= "YES"=0AWITHOUT_WIRELESS=3D"YES"=0AWITHOUT_WIRELESS_SUPPORT=3D"YES"=0AWITHO= UT_WPA_SUPPLICANT_EAPOL=3D"YES"=0AWITHOUT_ZFS=3D"YES"=0AWITH_IDEA=3D"YES"= =0A'=0A=0A# Options to put in make.conf during installworld only=0ACONF_INS= TALL=3D'=0AWITHOUT_ACCT=3D"YES"=0AWITHOUT_AMD=3D"YES"=0AWITHOUT_APM=3D"YES"= =0AWITHOUT_ASSERT_DEBUG=3D"YES"=0AWITHOUT_ATM=3D"YES"=0AWITHOUT_AUDIT=3D"YE= S"=0AWITHOUT_AUTHPF=3D"YES"=0AWITHOUT_BIND=3D"YES"=0AWITHOUT_BIND_DNSSEC=3D= "YES"=0AWITHOUT_BIND_ETC=3D"YES"=0AWITHOUT_BIND_LIBS_LWRES=3D"YES"=0AWITHOU= T_BIND_MTREE=3D"YES"=0AWITHOUT_BIND_NAMED=3D"YES"=0AWITHOUT_BIND_UTILS=3D"Y= ES"=0AWITHOUT_BLUETOOTH=3D"YES"=0AWITHOUT_BSNMP=3D"YES"=0AWITHOUT_CALENDAR= =3D"YES"=0AWITHOUT_CAPSICUM=3D"YES"=0AWITHOUT_CTM=3D"YES"=0AWITHOUT_CVS=3D"= YES"=0AWITHOUT_DICT=3D"YES"=0AWITHOUT_EXAMPLES=3D"YES"=0AWITHOUT_FLOPPY=3D"= YES"=0AWITHOUT_FREEBSD_UPDATE=3D"YES"=0AWITHOUT_GAMES=3D"YES"=0AWITHOUT_GCO= V=3D"YES"=0AWITHOUT_GDB=3D"YES"=0AWITHOUT_GPIB=3D"YES"=0AWITHOUT_GPIO=3D"YE= S"=0AWITHOUT_HTML=3D"YES"=0AWITHOUT_IPFILTER=3D"YES"=0AWITHOUT_IPX=3D"YES"= =0AWITHOUT_IPX_SUPPORT=3D"YES"=0AWITHOUT_JAIL=3D"YES"=0AWITHOUT_KERBEROS=3D= "YES"=0AWITHOUT_KERBEROS_SUPPORT=3D"YES"=0AWITHOUT_LIB32=3D"YES"=0AWITHOUT_= LOCALES=3D"YES"=0AWITHOUT_LOCATE=3D"YES"=0AWITHOUT_LPR=3D"YES"=0AWITHOUT_MA= N=3D"YES"=0AWITHOUT_MAN_UTILS=3D"YES"=0AWITHOUT_NCP=3D"YES"=0AWITHOUT_NDIS= =3D"YES"=0AWITHOUT_NETCAT=3D"YES"=0AWITHOUT_NIS=3D"YES"=0AWITHOUT_NLS=3D"YE= S"=0AWITHOUT_NLS_CATALOGS=3D"YES"=0AWITHOUT_NS_CACHING=3D"YES"=0AWITHOUT_PO= RTSNAP=3D"YES"=0AWITHOUT_PROFILE=3D"YES"=0AWITHOUT_QUOTAS=3D"YES"=0AWITHOUT= _RCMDS=3D"YES"=0AWITHOUT_RESCUE=3D"YES"=0AWITHOUT_ROUTED=3D"YES"=0AWITHOUT_= SENDMAIL=3D"YES"=0AWITHOUT_SHAREDOCS=3D"YES"=0AWITHOUT_SYSINSTALL=3D"YES"= =0AWITHOUT_WIRELESS=3D"YES"=0AWITHOUT_WIRELESS_SUPPORT=3D"YES"=0AWITHOUT_WP= A_SUPPLICANT_EAPOL=3D"YES"=0AWITHOUT_ZFS=3D"YES"=0AWITH_IDEA=3D"YES"=0A'=0A= =0A# Options to put in make.conf during both build- & installworld.=0ACONF_= WORLD=3D'=0AWITHOUT_ACCT=3D"YES"=0AWITHOUT_AMD=3D"YES"=0AWITHOUT_APM=3D"YES= "=0AWITHOUT_ASSERT_DEBUG=3D"YES"=0AWITHOUT_ATM=3D"YES"=0AWITHOUT_AUDIT=3D"Y= ES"=0AWITHOUT_AUTHPF=3D"YES"=0AWITHOUT_BIND=3D"YES"=0AWITHOUT_BIND_DNSSEC= =3D"YES"=0AWITHOUT_BIND_ETC=3D"YES"=0AWITHOUT_BIND_LIBS_LWRES=3D"YES"=0AWIT= HOUT_BIND_MTREE=3D"YES"=0AWITHOUT_BIND_NAMED=3D"YES"=0AWITHOUT_BIND_UTILS= =3D"YES"=0AWITHOUT_BLUETOOTH=3D"YES"=0AWITHOUT_BSNMP=3D"YES"=0AWITHOUT_CALE= NDAR=3D"YES"=0AWITHOUT_CAPSICUM=3D"YES"=0AWITHOUT_CTM=3D"YES"=0AWITHOUT_CVS= =3D"YES"=0AWITHOUT_DICT=3D"YES"=0AWITHOUT_EXAMPLES=3D"YES"=0AWITHOUT_FLOPPY= =3D"YES"=0AWITHOUT_FREEBSD_UPDATE=3D"YES"=0AWITHOUT_GAMES=3D"YES"=0AWITHOUT= _GCOV=3D"YES"=0AWITHOUT_GDB=3D"YES"=0AWITHOUT_GPIB=3D"YES"=0AWITHOUT_GPIO= =3D"YES"=0AWITHOUT_HTML=3D"YES"=0AWITHOUT_IPFILTER=3D"YES"=0AWITHOUT_IPX=3D= "YES"=0AWITHOUT_IPX_SUPPORT=3D"YES"=0AWITHOUT_JAIL=3D"YES"=0AWITHOUT_KERBER= OS=3D"YES"=0AWITHOUT_KERBEROS_SUPPORT=3D"YES"=0AWITHOUT_LIB32=3D"YES"=0AWIT= HOUT_LOCALES=3D"YES"=0AWITHOUT_LOCATE=3D"YES"=0AWITHOUT_LPR=3D"YES"=0AWITHO= UT_MAN=3D"YES"=0AWITHOUT_MAN_UTILS=3D"YES"=0AWITHOUT_NCP=3D"YES"=0AWITHOUT_= NDIS=3D"YES"=0AWITHOUT_NETCAT=3D"YES"=0AWITHOUT_NIS=3D"YES"=0AWITHOUT_NLS= =3D"YES"=0AWITHOUT_NLS_CATALOGS=3D"YES"=0AWITHOUT_NS_CACHING=3D"YES"=0AWITH= OUT_PORTSNAP=3D"YES"=0AWITHOUT_PROFILE=3D"YES"=0AWITHOUT_QUOTAS=3D"YES"=0AW= ITHOUT_RCMDS=3D"YES"=0AWITHOUT_RESCUE=3D"YES"=0AWITHOUT_ROUTED=3D"YES"=0AWI= THOUT_SENDMAIL=3D"YES"=0AWITHOUT_SHAREDOCS=3D"YES"=0AWITHOUT_SYSINSTALL=3D"= YES"=0AWITHOUT_WIRELESS=3D"YES"=0AWITHOUT_WIRELESS_SUPPORT=3D"YES"=0AWITHOU= T_WPA_SUPPLICANT_EAPOL=3D"YES"=0AWITHOUT_ZFS=3D"YES"=0AWITH_IDEA=3D"YES"=0A= '=0A=0A# Kernel config file to use=0ANANO_KERNEL=3DGENERIC=0A=0A# Customize= commands.=0ANANO_CUSTOMIZE=3D""=0A#cust_clean=0A=0A# Late customize comman= ds.=0ANANO_LATE_CUSTOMIZE=3D""=0A=0A# Newfs paramters to use=0ANANO_NEWFS= =3D"-b 4096 -f 512 -i 8192 -O1 -U"=0A=0A# The drive name of the media at ru= ntime=0ANANO_DRIVE=3Dda0=0A=0A# Target media size in 512 bytes sectors=0ANA= NO_MEDIASIZE=3D600000=0A#UsbDevice generic-hdd 256=0A=0A# Number of code im= ages on media (1 or 2)=0ANANO_IMAGES=3D1=0A=0A# 0 -> Leave second image all= zeroes so it compresses better.=0A# 1 -> Initialize second image with a co= py of the first=0ANANO_INIT_IMG2=3D0=0A=0A# Size of code file system in 512= bytes sectors=0A# If zero, size will be as large as possible.=0ANANO_CODES= IZE=3D0=0A=0A# Size of configuration file system in 512 bytes sectors=0A# C= annot be zero.=0ANANO_CONFSIZE=3D20480=0A=0A# Size of data file system in 5= 12 bytes sectors=0A# If zero: no partition configured.=0A# If negative: max= size possible=0ANANO_DATASIZE=3D20480=0A=0A# Size of the /etc ramdisk in 5= 12 bytes sectors=0ANANO_RAM_ETCSIZE=3D10240=0A=0A# Size of the /tmp+/var ra= mdisk in 512 bytes sectors=0ANANO_RAM_TMPVARSIZE=3D20480=0A=0A# Media geome= try, only relevant if bios doesn't understand LBA.=0ANANO_SECTS=3D63=0ANANO= _HEADS=3D255=0A=0A# boot0 flags/options and configuration=0ANANO_BOOT0CFG= =3D"-o packet -s 1 -m 3"=0ANANO_BOOTLOADER=3D"boot/boot0sio"=0A=0A# boot2 f= lags/options=0A# default force serial console=0ANANO_BOOT2CFG=3D"-h"=0A=0A#= Backing type of md(4) device=0A# Can be "file" or "swap"=0ANANO_MD_BACKING= =3D"file"=0A=0A# Progress Print level=0APPLEVEL=3D3=0A=0A##################= #####################################################=0A# Architecture to b= uild. =A0Corresponds to TARGET_ARCH in a buildworld.=0A# Unfortunately, the= re's no way to set TARGET at this time, and it=A0=0A# conflates the two, so= architectures where TARGET !=3D TARGET_ARCH do=0A# not work. =A0This defau= lts to the arch of the current machine.=0A=0ANANO_ARCH=3D`uname -p`=0A=0A##= #####################################################################=0A#= =0A# The functions which do the real work.=0A# Can be overridden from the c= onfig file(s)=0A#=0A#######################################################= ################=0A=0Aclean_build ( ) (=0Apprint 2 "Clean and create object= directory (${MAKEOBJDIRPREFIX})"=0A=0Aif ! rm -rf ${MAKEOBJDIRPREFIX} > /d= ev/null 2>&1 ; then=0Achflags -R noschg ${MAKEOBJDIRPREFIX}=0Arm -r ${MAKEO= BJDIRPREFIX}=0Afi=0Amkdir -p ${MAKEOBJDIRPREFIX}=0Aprintenv > ${MAKEOBJDIRP= REFIX}/_.env=0A)=0A=0Amake_conf_build ( ) (=0Apprint 2 "Construct build mak= e.conf ($NANO_MAKE_CONF_BUILD)"=0A=0Aecho "${CONF_WORLD}" > ${NANO_MAKE_CON= F_BUILD}=0Aecho "${CONF_BUILD}" >> ${NANO_MAKE_CONF_BUILD}=0A)=0A=0Abuild_w= orld ( ) (=0Apprint 2 "run buildworld"=0Apprint 3 "log: ${MAKEOBJDIRPREFIX}= /_.bw"=0A=0Acd ${NANO_SRC}=0Aenv TARGET_ARCH=3D${NANO_ARCH} ${NANO_PMAKE} \= =0A__MAKE_CONF=3D${NANO_MAKE_CONF_BUILD} buildworld \=0A> ${MAKEOBJDIRPREFI= X}/_.bw 2>&1=0A)=0A=0Abuild_kernel ( ) (=0Apprint 2 "build kernel ($NANO_KE= RNEL)"=0Apprint 3 "log: ${MAKEOBJDIRPREFIX}/_.bk"=0A=0Aif [ -f ${NANO_KERNE= L} ] ; then=0Acp ${NANO_KERNEL} ${NANO_SRC}/sys/${NANO_ARCH}/conf=0Afi=0A= =0A(cd ${NANO_SRC};=0A# unset these just in case to avoid compiler complain= ts=0A# when cross-building=0Aunset TARGET_CPUTYPE=0Aunset TARGET_BIG_ENDIAN= =0Aenv TARGET_ARCH=3D${NANO_ARCH} ${NANO_PMAKE} buildkernel \=0A__MAKE_CONF= =3D${NANO_MAKE_CONF_BUILD} KERNCONF=3D`basename ${NANO_KERNEL}` \=0A> ${MAK= EOBJDIRPREFIX}/_.bk 2>&1=0A)=0A)=0A=0Aclean_world ( ) (=0Aif [ "${NANO_OBJ}= " !=3D "${MAKEOBJDIRPREFIX}" ]; then=0Apprint 2 "Clean and create object di= rectory (${NANO_OBJ})"=0Aif ! rm -rf ${NANO_OBJ} > /dev/null 2>&1 ; then=0A= chflags -R noschg ${NANO_OBJ}=0Arm -r ${NANO_OBJ}=0Afi=0Amkdir -p ${NANO_OB= J} ${NANO_WORLDDIR}=0Aprintenv > ${NANO_OBJ}/_.env=0Aelse=0Apprint 2 "Clean= and create world directory (${NANO_WORLDDIR})"=0Aif ! rm -rf ${NANO_WORLDD= IR}/ > /dev/null 2>&1 ; then=0Achflags -R noschg ${NANO_WORLDDIR}=0Arm -rf = ${NANO_WORLDDIR}=0Afi=0Amkdir -p ${NANO_WORLDDIR}=0Afi=0A)=0A=0Amake_conf_i= nstall ( ) (=0Apprint 2 "Construct install make.conf ($NANO_MAKE_CONF_INSTA= LL)"=0A=0Aecho "${CONF_WORLD}" > ${NANO_MAKE_CONF_INSTALL}=0Aecho "${CONF_I= NSTALL}" >> ${NANO_MAKE_CONF_INSTALL}=0A)=0A=0Ainstall_world ( ) (=0Apprint= 2 "installworld"=0Apprint 3 "log: ${NANO_OBJ}/_.iw"=0A=0Acd ${NANO_SRC}=0A= env TARGET_ARCH=3D${NANO_ARCH} \=0A${NANO_PMAKE} __MAKE_CONF=3D${NANO_MAKE_= CONF_INSTALL} installworld \=0ADESTDIR=3D${NANO_WORLDDIR} \=0A> ${NANO_OBJ}= /_.iw 2>&1=0Achflags -R noschg ${NANO_WORLDDIR}=0A#for i in ${FreeBSDProgra= mDirs}; do=0A# =A0 =A0 =A0 =A0 =A0 =A0echo "=3D=3D> $i"=0A# =A0 =A0 =A0 =A0= =A0 =A0(cd $i && eval env ${mkenv} ${mkcmd} INSTALL=3Dinstall NOINSTALLLIB= =3Dyes NO_INSTALLLIB=3Dyes install)=0A# =A0 =A0 =A0 =A0done=0A)=0A=0Ainstal= l_etc ( ) (=0A=0Apprint 2 "install /etc"=0Apprint 3 "log: ${NANO_OBJ}/_.etc= "=0A=0Acd ${NANO_SRC}=0Aenv TARGET_ARCH=3D${NANO_ARCH} \=0A${NANO_PMAKE} __= MAKE_CONF=3D${NANO_MAKE_CONF_INSTALL} distribution \=0ADESTDIR=3D${NANO_WOR= LDDIR} \=0A> ${NANO_OBJ}/_.etc 2>&1=0A# make.conf doesn't get created by de= fault, but some ports need it=0A# so they can spam it.=0Acp /dev/null ${NAN= O_WORLDDIR}/etc/make.conf=0A)=0A=0Ainstall_kernel ( ) (=0Apprint 2 "install= kernel"=0Apprint 3 "log: ${NANO_OBJ}/_.ik"=0A=0Acd ${NANO_SRC}=0Aenv TARGE= T_ARCH=3D${NANO_ARCH} ${NANO_PMAKE} installkernel \=0ADESTDIR=3D${NANO_WORL= DDIR} \=0A__MAKE_CONF=3D${NANO_MAKE_CONF_INSTALL} KERNCONF=3D`basename ${NA= NO_KERNEL}` \=0A> ${NANO_OBJ}/_.ik 2>&1=0A)=0A=0Arun_customize() (=0A=0Appr= int 2 "run customize scripts"=0Afor c in $NANO_CUSTOMIZE=0Ado=0Apprint 2 "c= ustomize \"$c\""=0Apprint 3 "log: ${NANO_OBJ}/_.cust.$c"=0Apprint 4 "`type = $c`"=0A( $c ) > ${NANO_OBJ}/_.cust.$c 2>&1=0Adone=0A)=0A=0Arun_late_customi= ze() (=0A=0Apprint 2 "run late customize scripts"=0Afor c in $NANO_LATE_CUS= TOMIZE=0Ado=0Apprint 2 "late customize \"$c\""=0Apprint 3 "log: ${NANO_OBJ}= /_.late_cust.$c"=0Apprint 4 "`type $c`"=0A( $c ) > ${NANO_OBJ}/_.late_cust.= $c 2>&1=0Adone=0A)=0A=0Asetup_nanobsd ( ) (=0Apprint 2 "configure nanobsd s= etup"=0Apprint 3 "log: ${NANO_OBJ}/_.dl"=0A=0A(=0Acd ${NANO_WORLDDIR}=0A=0A= # Move /usr/local/etc to /etc/local so that the /cfg stuff=0A# can stomp on= it. =A0Otherwise packages like ipsec-tools which=0A# have hardcoded paths = under ${prefix}/etc are not tweakable.=0Aif [ -d usr/local/etc ] ; then=0A(= =0Amkdir -p etc/local=0Acd usr/local/etc=0Afind . -print | cpio -dumpl ../.= ./../etc/local=0Acd ..=0Arm -rf etc=0Aln -s ../../etc/local etc=0A)=0Afi=0A= =0Afor d in var etc=0Ado=0A# link /$d under /conf=0A# we use hard links so = we have them both places.=0A# the files in /$d will be hidden by the mount.= =0A# XXX: configure /$d ramdisk size=0Amkdir -p conf/base/$d conf/default/$= d=0Afind $d -print | cpio -dumpl conf/base/=0Adone=0A=0Aecho "$NANO_RAM_ETC= SIZE" > conf/base/etc/md_size=0Aecho "$NANO_RAM_TMPVARSIZE" > conf/base/var= /md_size=0A=0A# pick up config files from the special partition=0Aecho "mou= nt -o ro /dev/${NANO_DRIVE}s3" > conf/default/etc/remount=0A=0A# Put /tmp o= n the /var ramdisk (could be symlink already)=0Armdir tmp || true=0Arm tmp = || true=0Aln -s var/tmp tmp=0A=0A) > ${NANO_OBJ}/_.dl 2>&1=0A)=0A=0Asetup_n= anobsd_etc ( ) (=0Apprint 2 "configure nanobsd /etc"=0A=0A(=0Acd ${NANO_WOR= LDDIR}=0A=0A# create diskless marker file=0Atouch etc/diskless=0A=0A# Make = root filesystem R/O by default=0Aecho "root_rw_mount=3DNO" >> etc/defaults/= rc.conf=0A=0A# save config file for scripts=0Aecho "NANO_DRIVE=3D${NANO_DRI= VE}" > etc/nanobsd.conf=0A=0Aecho "/dev/${NANO_DRIVE}s1a / ufs ro 1 1" > et= c/fstab=0Aecho "/dev/${NANO_DRIVE}s3 /cfg ufs rw,noauto 2 2" >> etc/fstab= =0Amkdir -p cfg=0A)=0A)=0A=0Aprune_usr() (=0A=0A# Remove all empty director= ies in /usr=A0=0Afind ${NANO_WORLDDIR}/usr -type d -depth -print |=0Awhile = read d=0Ado=0Armdir $d > /dev/null 2>&1 || true=A0=0Adone=0A)=0A=0Apopulate= _slice ( ) (=0Alocal dev dir mnt=0Adev=3D$1=0Adir=3D$2=0Amnt=3D$3=0Atest -z= $2 && dir=3D/var/empty=0Atest -d $d || dir=3D/var/empty=0Aecho "Creating $= {dev} with ${dir} (mounting on ${mnt})"=0Anewfs ${NANO_NEWFS} ${dev}=0Amoun= t ${dev} ${mnt}=0Acd ${dir}=0Afind . -print | grep -Ev '/(CVS|\.svn)' | cpi= o -dumpv ${mnt}=0Adf -i ${mnt}=0Aumount ${mnt}=0A)=0A=0Apopulate_cfg_slice = ( ) (=0Apopulate_slice "$1" "$2" "$3"=0A)=0A=0Apopulate_data_slice ( ) (=0A= populate_slice "$1" "$2" "$3"=0A)=0A=0Acreate_i386_diskimage ( ) (=0Apprint= 2 "build diskimage"=0Apprint 3 "log: ${NANO_OBJ}/_.di"=0A=0A(=0Aecho $NANO= _MEDIASIZE $NANO_IMAGES \=0A$NANO_SECTS $NANO_HEADS \=0A$NANO_CODESIZE $NAN= O_CONFSIZE $NANO_DATASIZE |=0Aawk '=0A{=0Aprintf "# %s\n", $0=0A=0A# size o= f cylinder in sectors=0Acs =3D $3 * $4=0A=0A# number of full cylinders on m= edia=0Acyl =3D int ($1 / cs)=0A=0A# output fdisk geometry spec, truncate cy= ls to 1023=0Aif (cyl <=3D 1023)=0Aprint "g c" cyl " h" $4 " s" $3=0Aelse=0A= print "g c" 1023 " h" $4 " s" $3=0A=0Aif ($7 > 0) {=A0=0A# size of data par= tition in full cylinders=0Adsl =3D int (($7 + cs - 1) / cs)=0A} else {=0Ads= l =3D 0;=0A}=0A=0A# size of config partition in full cylinders=0Acsl =3D in= t (($6 + cs - 1) / cs)=0A=0Aif ($5 =3D=3D 0) {=0A# size of image partition(= s) in full cylinders=0Aisl =3D int ((cyl - dsl - csl) / $2)=0A} else {=0Ais= l =3D int (($5 + cs - 1) / cs)=0A}=0A=0A# First image partition start at se= cond track=0Aprint "p 1 165 " $3, isl * cs - $3=0Ac =3D isl * cs;=0A=0A# Se= cond image partition (if any) also starts offset one=A0=0A# track to keep t= hem identical.=0Aif ($2 > 1) {=0Aprint "p 2 165 " $3 + c, isl * cs - $3=0Ac= +=3D isl * cs;=0A}=0A=0A# Config partition starts at cylinder boundary.=0A= print "p 3 165 " c, csl * cs=0Ac +=3D csl * cs=0A=0A# Data partition (if an= y) starts at cylinder boundary.=0Aif ($7 > 0) {=0Aprint "p 4 165 " c, dsl *= cs=0A} else if ($7 < 0 && $1 > c) {=0Aprint "p 4 165 " c, $1 - c=0A} else = if ($1 < c) {=0Aprint "Disk space overcommitted by", \=0A =A0 =A0c - $1, "s= ectors" > "/dev/stderr"=0Aexit 2=0A}=0A=0A# Force slice 1 to be marked acti= ve. This is necessary=0A# for booting the image from a USB device to work.= =0Aprint "a 1"=0A}=0A' > ${NANO_OBJ}/_.fdisk=0A=0AIMG=3D${NANO_DISKIMGDIR}/= ${NANO_IMGNAME}=0AMNT=3D${NANO_OBJ}/_.mnt=0Amkdir -p ${MNT}=0A=0Aif [ "${NA= NO_MD_BACKING}" =3D "swap" ] ; then=0AMD=3D`mdconfig -a -t swap -s ${NANO_M= EDIASIZE} -x ${NANO_SECTS} \=0A-y ${NANO_HEADS}`=0Aelse=0Aecho "Creating md= backing file..."=0Add if=3D/dev/zero of=3D${IMG} bs=3D${NANO_SECTS}b \=0Ac= ount=3D`expr ${NANO_MEDIASIZE} / ${NANO_SECTS}`=0AMD=3D`mdconfig -a -t vnod= e -f ${IMG} -x ${NANO_SECTS} \=0A-y ${NANO_HEADS}`=0Afi=0A=0Atrap "echo 'Ru= nning exit trap code' ; df -i ${MNT} ; umount ${MNT} || true ; mdconfig -d = -u $MD" 1 2 15 EXIT=0A=0Afdisk -i -f ${NANO_OBJ}/_.fdisk ${MD}=0Afdisk ${MD= }=0A# XXX: params=0A# XXX: pick up cached boot* files, they may not be in i= mage anymore.=0Aboot0cfg -B -b ${NANO_WORLDDIR}/${NANO_BOOTLOADER} ${NANO_B= OOT0CFG} ${MD}=0Absdlabel -w -B -b ${NANO_WORLDDIR}/boot/boot ${MD}s1=0Absd= label ${MD}s1=0A=0A# Create first image=0A# XXX: should use populate_slice = for easier override=0Anewfs ${NANO_NEWFS} /dev/${MD}s1a=0Amount /dev/${MD}s= 1a ${MNT}=0Adf -i ${MNT}=0Aecho "Copying worlddir..."=0A( cd ${NANO_WORLDDI= R} && find . -print | cpio -dump ${MNT} )=0Adf -i ${MNT}=0Aecho "Generating= mtree..."=0A( cd ${MNT} && mtree -c ) > ${NANO_OBJ}/_.mtree=0A( cd ${MNT} = && du -k ) > ${NANO_OBJ}/_.du=0Aumount ${MNT}=0A=0Aif [ $NANO_IMAGES -gt 1 = -a $NANO_INIT_IMG2 -gt 0 ] ; then=0A# Duplicate to second image (if present= )=0Aecho "Duplicating to second image..."=0Add if=3D/dev/${MD}s1 of=3D/dev/= ${MD}s2 bs=3D64k=0Amount /dev/${MD}s2a ${MNT}=0Afor f in ${MNT}/etc/fstab $= {MNT}/conf/base/etc/fstab=0Ado=0Ased -i "" "s=3D${NANO_DRIVE}s1=3D${NANO_DR= IVE}s2=3Dg" $f=0Adone=0Aumount ${MNT}=0Afi=0A# Create Config slice=0Apopula= te_cfg_slice /dev/${MD}s3 "${NANO_CFGDIR}" ${MNT}=0A=0A# Create Data slice,= if any.=0Aif [ $NANO_DATASIZE -ne 0 ] ; then=0Apopulate_data_slice /dev/${= MD}s4 "${NANO_DATADIR}" ${MNT}=0Afi=0A=0Aif [ "${NANO_MD_BACKING}" =3D "swa= p" ] ; then=0Aecho "Writing out ${NANO_IMGNAME}..."=0Add if=3D/dev/${MD} of= =3D${IMG} bs=3D64k=0Afi=0A=0Aecho "Writing out _.disk.image..."=0Add if=3D/= dev/${MD}s1 of=3D${NANO_DISKIMGDIR}/_.disk.image bs=3D64k=0Amdconfig -d -u = $MD=0A=0Atrap - 1 2 15 EXIT=0A=0A) > ${NANO_OBJ}/_.di 2>&1=0A)=0A=0A# i386 = and amd64 are identical for disk images=0Acreate_amd64_diskimage ( ) (=0Acr= eate_i386_diskimage=0A)=0A=0Alast_orders () (=0A# Redefine this function wi= th any last orders you may have=0A# after the build completed, for instance= to copy the finished=0A# image to a more convenient place:=0A# cp ${NANO_D= ISKIMGDIR}/_.disk.image /home/ftp/pub/nanobsd.disk=0A)=0A=0A###############= ########################################################=0A#=0A# Optional c= onvenience functions.=0A#=0A###############################################= ########################=0A=0A#############################################= ##########################=0A# Common Flash device geometries=0A#=0A=0AFlas= hDevice () {=0Aif [ -d ${NANO_TOOLS} ] ; then=0A. ${NANO_TOOLS}/FlashDevice= .sub=0Aelse=0A. ${NANO_SRC}/${NANO_TOOLS}/FlashDevice.sub=0Afi=0Asub_FlashD= evice $1 $2=0A}=0A=0A######################################################= #################=0A# USB device geometries=0A#=0A# Usage:=0A#UsbDevice Gen= eric 1000# a generic flash key sold as having 1GB=0A#=0A# This function wil= l set NANO_MEDIASIZE, NANO_HEADS and NANO_SECTS for you.=0A#=0A# Note that = the capacity of a flash key is usually advertised in MB or=0A# GB, *not* Mi= B/GiB. As such, the precise number of cylinders available=0A# for C/H/S geo= metry may vary depending on the actual flash geometry.=0A#=0A# The followin= g generic device layouts are understood:=0A# =A0generic =A0 =A0 =A0 =A0 =A0= An alias for generic-hdd.=0A# =A0generic-hdd =A0 =A0 =A0 255H 63S/T xxxxC = with no MBR restrictions.=0A# =A0generic-fdd =A0 =A0 =A0 64H 32S/T xxxxC wi= th no MBR restrictions.=0A#=0A# The generic-hdd device is preferred for fla= sh devices larger than 1GB.=0A#=0A=0AUsbDevice () {=0Aa1=3D`echo $1 | tr '[= :upper:]' '[:lower:]'`=0Acase $a1 in=0Ageneric-fdd)=0ANANO_HEADS=3D64=0ANAN= O_SECTS=3D32=0ANANO_MEDIASIZE=3D$(( $2 * 1000 * 1000 / 512 ))=0A;;=0Ageneri= c|generic-hdd)=0ANANO_HEADS=3D255=0ANANO_SECTS=3D63=0ANANO_MEDIASIZE=3D$(( = $2 * 1000 * 1000 / 512 ))=0A;;=0A*)=0Aecho "Unknown USB flash device"=0Aexi= t 2=0A;;=0Aesac=0A}=0A=0A##################################################= #####################=0A# Setup serial console=0A=0Acust_comconsole () (=0A= # Enable getty on console=0Ased -i "" -e /tty[du]0/s/off/on/ ${NANO_WORLDDI= R}/etc/ttys=0A=0A# Disable getty on syscons devices=0Ased -i "" -e '/^ttyv[= 0-8]/s/on/off/' ${NANO_WORLDDIR}/etc/ttys=0A=0A# Tell loader to use serial = console early.=0Aecho "${NANO_BOOT2CFG}" > ${NANO_WORLDDIR}/boot.config=0A)= =0A=0A#####################################################################= ##=0A# Allow root login via ssh=0A=0Acust_allow_ssh_root () (=0Ased -i "" -= e '/PermitRootLogin/s/.*/PermitRootLogin yes/' \=0A =A0 =A0${NANO_WORLDDIR}= /etc/ssh/sshd_config=0A)=0A=0A#############################################= ##########################=0A# Install the stuff under ./Files=0A=0Acust_in= stall_files () (=0Acd ${NANO_TOOLS}/Files=0Afind . -print | grep -Ev '/(CVS= |\.svn)' | cpio -dumpv ${NANO_WORLDDIR}=0A)=0A=0Acust_clean () (=0A#for i i= n ${DIRs}; do=0A#echo "removing "$i" from source tree"=0A#rm -rf ${NANO_WOR= LDDIR}$i=0A#cd ${NANO_WORLDDIR}$i=0A#echo "\done"=0A#done=0A=0A# Compress t= he kernel (save 3Mb)=0Aif [ -f ${NANO_WORLDDIR}/boot/kernel/kernel ]; then= =0Aif ! gzip -v9 ${NANO_WORLDDIR}/boot/kernel/kernel; then=0Aecho "Error du= ring zipping the kernel"=0Afi=0Afi=0A# Remove some of the folders (without = share/snmp)=0A# usr/include : 15MB=0AFOLDERS_TO_REMOVE=3D'=0Ausr/local/incl= ude=0Ausr/local/man=0Ausr/local/info=0Ausr/local/share/doc/gettext=0Ausr/lo= cal/share/doc/libasprintf=0Ausr/local/share/doc/libiconv=0Ausr/local/share/= doc/snmp=0Ausr/local/share/examples/quagga=0Ausr/include=0Ausr/share/groff_= font=0Ausr/share/tmac=0Ausr/share/me=0Ausr/share/info=0Ausr/share/man=0Ausr= /share/openssl=0Ausr/libdata/lint=0Ausr/libdata/ldscripts=0A'=0Afor c in $F= OLDERS_TO_REMOVE=0Ado=0Aif [ -d ${NANO_WORLDDIR}/$c ]=0Athen=0Aecho "Removi= ng ${NANO_WORLDDIR}/$c"=0Aif ! rm -rf ${NANO_WORLDDIR}/$c ; then=0Aecho "Er= ror: Can't remove it!"=0Afi=0Afi=0Adone=0A=0A# Remove some files=0A=A0 =A0 = FILES_TO_REMOVE=3D'=0Ausr/local/etc/rc.d/freevrrpd.sh.sample=0Ausr/share/mi= sc/magic.mgc=0Ausr/share/misc/termcap.db=0A'=0A=A0 =A0 for c in ${FILES_TO_= REMOVE}=0A=A0 =A0 do=0A=A0 =A0 =A0 =A0 if [ -f ${NANO_WORLDDIR}/$c ]=0A=A0 = =A0 =A0 =A0 then=0Aecho "Removing ${NANO_WORLDDIR}/$c"=0A=A0 =A0 =A0 =A0 = =A0 =A0 if ! rm -rf ${NANO_WORLDDIR}/$c ; then=0Aecho "Error: Can't remove = it!"=0Afi=0A=A0 =A0 =A0 =A0 fi=0A=A0 =A0 done=0A=0A# All ports are compiled= , then we can remove all TOOLCHAIN files=0A# This save about 25MB.=0A# The = list of these files was generated by a the output of:=0A# usr/src/tools/too= ls/build_option_survey=0A# Because it's a very time consuming script, outpu= t are online:=0A# http://phk.freebsd.dk/misc/build_options_stable_8_210741/= =0A=0ATOOLCHAIN_TO_REMOVE=3D'=0Ausr/bin/addr2line=0Ausr/bin/gnu-ar=0Ausr/bi= n/as=0Ausr/bin/ld=0Ausr/bin/nm=0Ausr/bin/objcopy=0Ausr/bin/objdump=0Ausr/bi= n/gnu-ranlib=0Ausr/bin/readelf=0Ausr/bin/size=0Ausr/bin/strings=0Ausr/bin/s= trip=0Ausr/bin/cc=0Ausr/bin/gcc=0Ausr/bin/cpp=0Ausr/bin/c++=0Ausr/bin/g++= =0Ausr/bin/CC=0Ausr/bin/c++filt=0Ausr/bin/gcov=0Ausr/bin/gdb=0Ausr/bin/gdbt= ui=0Ausr/bin/kgdb=0Ausr/bin/ar=0Ausr/bin/ranlib=0Ausr/bin/c89=0Ausr/bin/c99= =0Ausr/bin/sum=0Ausr/bin/compile_et=0Ausr/bin/ctags=0Ausr/bin/file2c=0Ausr/= bin/gprof=0Ausr/bin/od=0Ausr/bin/indent=0Ausr/bin/m4=0Ausr/bin/lex=0Ausr/bi= n/lex++=0Ausr/bin/flex=0Ausr/bin/flex++=0Ausr/bin/mt=0Ausr/bin/mkstr=0Ausr/= bin/rpcgen=0Ausr/bin/unifdef=0Ausr/bin/unifdefall=0Ausr/bin/nvi=0Ausr/bin/v= grind=0Ausr/bin/lint=0Ausr/bin/xstr=0Ausr/bin/lzdec=0Ausr/bin/yacc=0Ausr/bi= n/yyfix=0Ausr/bin/byacc=0Ausr/bin/lzdec=0Ausr/bin/clang=0Ausr/bin/clang++= =0Ausr/bin/clang-cpp=0Ausr/bin/clang-tblgen=0Ausr/bin/tblgen=0Ausr/bin/crun= chgen=0Ausr/bin/crunchide=0Ausr/libexec/cc1=0Ausr/libexec/cc1plus=0Ausr/lib= exec/cc1obj=0Ausr/libexec/vfontedpr=0Ausr/libexec/lint1=0Ausr/libexec/lint2= =0Ausr/sbin/btxld=0Ausr/sbin/config=0Ausr/sbin/i2c=0Ausr/sbin/pkg_add=0Ausr= /sbin/pkg_create=0Ausr/sbin/pkg_delete=0Ausr/sbin/pkg_info=0Ausr/sbin/pkg_u= pdating=0Ausr/sbin/pkg_version=0Ausr/sbin/rmt=0Ausr/share/misc/gprof.flat= =0Ausr/share/misc/gprof.callg=0Ausr/share/misc/vgrindefs=0Ausr/share/misc/v= grindefs.db=0A'=0A#usr/share/tmac/tmac.vgrind=0A=A0 =A0 for c in $TOOLCHAIN= _TO_REMOVE=0A=A0 =A0 do=0A=A0 =A0 =A0 =A0 if [ -f ${NANO_WORLDDIR}/$c ]=0A= =A0 =A0 =A0 =A0 then=0A=A0 =A0 =A0 =A0 =A0 =A0 echo "Removing ${NANO_WORLDD= IR}/$c"=0A=A0 =A0 =A0 =A0 =A0 =A0 if ! rm -rf ${NANO_WORLDDIR}/$c ; then=0A= =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 echo "Error: Can't remove it!"=0A=A0 =A0 = =A0 =A0 =A0 =A0 fi=0A=A0 =A0 =A0 =A0 fi=0A=A0 =A0 done=0A# Move termcap.sma= ll file=0Aif [ -f ${NANO_WORLDDIR}/etc/termcap.small ]; then=0Amv ${NANO_WO= RLDDIR}/etc/termcap.small ${NANO_WORLDDIR}/usr/share/misc/termcap.db=0Afi= =0A=0A# Kill all .a's that are installed with TOOLCHAIN (remove 33MB)=0A=A0= =A0 find ${NANO_WORLDDIR} -name \*.a | xargs rm=0A=0A# strip binaries for = ports (tips from FreeNAS 8)=0Apprint 4 "Stripping binaries and libraries"= =0Afor dir in $(find ${NANO_WORLDDIR}/ -name '*bin' -or -name 'lib' -maxdep= th 3); do=0Afor f in $(find $dir -type f); do=0Astrip 2>/dev/null $f || := =0Adone=0Adone=0A# Generate package inventory=0A#chroot ${NANO_WORLDDIR} /b= in/sh -exc \=0A#'pkg info' > ${NANO_OBJ}/packages.info=0A)=0A=0A###########= ############################################################=0A# Install pa= ckages from ${NANO_PACKAGE_DIR}=0A=0Acust_pkg () (=0A=0A# Copy packages int= o chroot=0Amkdir -p ${NANO_WORLDDIR}/Pkg=0A(=0Acd ${NANO_PACKAGE_DIR}=0Afin= d ${NANO_PACKAGE_LIST} -print |=0A =A0 =A0cpio -dumpv ${NANO_WORLDDIR}/Pkg= =0A)=0A=0A# Count & report how many we have to install=0Atodo=3D`ls ${NANO_= WORLDDIR}/Pkg | wc -l`=0Aecho "=3D=3D=3D TODO: $todo"=0Als ${NANO_WORLDDIR}= /Pkg=0Aecho "=3D=3D=3D"=0Awhile true=0Ado=0A# Record how many we have now= =0Ahave=3D`ls ${NANO_WORLDDIR}/var/db/pkg | wc -l`=0A=0A# Attempt to instal= l more packages=0A# ...but no more than 200 at a time due to pkg_add's inte= rnal=0A# limitations.=0Achroot ${NANO_WORLDDIR} sh -c \=0A'ls Pkg/*tbz | xa= rgs -n 200 pkg_add -F' || true=0A=0A# See what that got us=0Anow=3D`ls ${NA= NO_WORLDDIR}/var/db/pkg | wc -l`=0Aecho "=3D=3D=3D NOW $now"=0Als ${NANO_WO= RLDDIR}/var/db/pkg=0Aecho "=3D=3D=3D"=0A=0A=0Aif [ $now -eq $todo ] ; then= =0Aecho "DONE $now packages"=0Abreak=0Aelif [ $now -eq $have ] ; then=0Aech= o "FAILED: Nothing happened on this pass"=0Aexit 2=0Afi=0Adone=0Arm -rf ${N= ANO_WORLDDIR}/Pkg=0A)=0A=0A################################################= #######################=0A# Convenience function:=0A# Register all args as = customize function.=0A=0Acustomize_cmd () {=0ANANO_CUSTOMIZE=3D"$NANO_CUSTO= MIZE $*"=0Acust_clean=0A}=0A=0A############################################= ###########################=0A# Convenience function:=0A# Register all args= as late customize function to run just before=0A#image creation.=0A=0Alate= _customize_cmd () {=0ANANO_LATE_CUSTOMIZE=3D"$NANO_LATE_CUSTOMIZE $*"=0A}= =0A=0A#####################################################################= ##=0A#=0A# All set up to go...=0A#=0A######################################= #################################=0A=0A# Progress Print=0A#Print $2 at leve= l $1.=0Apprint() {=0A=A0 =A0 if [ "$1" -le $PPLEVEL ]; then=0Aruntime=3D$((= `date +%s` - $NANO_STARTTIME ))=0Aprintf "%s %.${1}s %s\n" "`date -u -r $r= untime +%H:%M:%S`" "#####" "$2" 1>&3=0A=A0 =A0 fi=0A}=0A=0Ausage () {=0A(= =0Aecho "Usage: $0 [-biknqvw] [-c config_file]"=0Aecho "-bsuppress builds (= both kernel and world)"=0Aecho "-isuppress disk image build"=0Aecho "-ksupp= ress buildkernel"=0Aecho "-nadd -DNO_CLEAN to buildworld, buildkernel, etc"= =0Aecho "-qmake output more quiet"=0Aecho "-vmake output more verbose"=0Aec= ho "-wsuppress buildworld"=0Aecho "-cspecify config file"=0A) 1>&2=0Aexit 2= =0A}=0A=0A#################################################################= ######=0A# Parse arguments=0A=0Ado_clean=3Dtrue=0Ado_kernel=3Dtrue=0Ado_wor= ld=3Dtrue=0Ado_image=3Dtrue=0A=0Aset +e=0Aargs=3D`getopt bc:hiknqvw $*`=0Ai= f [ $? -ne 0 ] ; then=0Ausage=0Aexit 2=0Afi=0Aset -e=0A=0Aset -- $args=0Afo= r i=0Ado=0Acase "$i"=A0=0Ain=0A-b)=0Ado_world=3Dfalse=0Ado_kernel=3Dfalse= =0Ashift=0A;;=0A-k)=0Ado_kernel=3Dfalse=0Ashift=0A;;=0A-c)=0A. "$2"=0Ashift= =0Ashift=0A;;=0A-h)=0Ausage=0A;;=0A-i)=0Ado_image=3Dfalse=0Ashift=0A;;=0A-n= )=0Ado_clean=3Dfalse=0Ashift=0A;;=0A-q)=0APPLEVEL=3D$(($PPLEVEL - 1))=0Ashi= ft=0A;;=0A-v)=0APPLEVEL=3D$(($PPLEVEL + 1))=0Ashift=0A;;=0A-w)=0Ado_world= =3Dfalse=0Ashift=0A;;=0A--)=0Ashift=0Abreak=0Aesac=0Adone=0A=0Aif [ $# -gt = 0 ] ; then=0Aecho "$0: Extraneous arguments supplied"=0Ausage=0Afi=0A=0A###= ####################################################################=0A# Se= tup and Export Internal variables=0A#=0Atest -n "${NANO_OBJ}" || NANO_OBJ= =3D/usr/obj/nanobsd.${NANO_NAME}/=0Atest -n "${MAKEOBJDIRPREFIX}" || MAKEOB= JDIRPREFIX=3D${NANO_OBJ}=0Atest -n "${NANO_DISKIMGDIR}" || NANO_DISKIMGDIR= =3D${NANO_OBJ}=0A=0ANANO_WORLDDIR=3D${NANO_OBJ}/_.w=0ANANO_MAKE_CONF_BUILD= =3D${MAKEOBJDIRPREFIX}/make.conf.build=0ANANO_MAKE_CONF_INSTALL=3D${NANO_OB= J}/make.conf.install=0A=0Aif [ -d ${NANO_TOOLS} ] ; then=0Atrue=0Aelif [ -d= ${NANO_SRC}/${NANO_TOOLS} ] ; then=0ANANO_TOOLS=3D${NANO_SRC}/${NANO_TOOLS= }=0Aelse=0Aecho "NANO_TOOLS directory does not exist" 1>&2=0Aexit 1=0Afi=0A= =0Aif $do_clean ; then=0Atrue=0Aelse=0ANANO_PMAKE=3D"${NANO_PMAKE} -DNO_CLE= AN"=0Afi=0A=0Aexport MAKEOBJDIRPREFIX=0A=0Aexport NANO_ARCH=0Aexport NANO_C= ODESIZE=0Aexport NANO_CONFSIZE=0Aexport NANO_CUSTOMIZE=0Aexport NANO_DATASI= ZE=0Aexport NANO_DRIVE=0Aexport NANO_HEADS=0Aexport NANO_IMAGES=0Aexport NA= NO_IMGNAME=0Aexport NANO_MAKE_CONF_BUILD=0Aexport NANO_MAKE_CONF_INSTALL=0A= export NANO_MEDIASIZE=0Aexport NANO_NAME=0Aexport NANO_NEWFS=0Aexport NANO_= OBJ=0Aexport NANO_PMAKE=0Aexport NANO_SECTS=0Aexport NANO_SRC=0Aexport NANO= _TOOLS=0Aexport NANO_WORLDDIR=0Aexport NANO_BOOT0CFG=0Aexport NANO_BOOTLOAD= ER=0A=0A###################################################################= ####=0A# And then it is as simple as that...=0A=0A# File descriptor 3 is us= ed for logging output, see pprint=0Aexec 3>&1=0A=0ANANO_STARTTIME=3D`date += %s`=0Apprint 1 "NanoBSD image ${NANO_NAME} build starting"=0A=0Aif $do_worl= d ; then=0Aif $do_clean ; then=0Aclean_build=0Aelse=0Apprint 2 "Using exist= ing build tree (as instructed)"=0Afi=0Amake_conf_build=0Abuild_world=0Aelse= =0Apprint 2 "Skipping buildworld (as instructed)"=0Afi=0A=0Aif $do_kernel ;= then=0Abuild_kernel=0Aelse=0Apprint 2 "Skipping buildkernel (as instructed= )"=0Afi=0A=0Aclean_world=0Amake_conf_install=0Ainstall_world=0Ainstall_etc= =0Asetup_nanobsd_etc=0Ainstall_kernel=0A=0Arun_customize=0Asetup_nanobsd=0A= prune_usr=0Arun_late_customize=0Aif $do_image ; then=0Acreate_${NANO_ARCH}_= diskimage=0Aelse=0Apprint 2 "Skipping image build (as instructed)"=0Afi=0Al= ast_orders=0A=0Apprint 1 "NanoBSD image ${NANO_NAME} completed"=0A=0A######= ###########################################################################= #################################################=0A>>Never change variable= s inside nanobsd.sh, create a config file instead=0A>>and the run "sh nanob= sd.sh -c configfile.conf"=0A=0AThanks for your suggestion, i will do so :)= =0AI want to use both vga console and serial console, Is it possible ? From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 7 15:06:46 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C5A5E3FD for ; Wed, 7 Nov 2012 15:06:46 +0000 (UTC) (envelope-from espartano.mail@gmail.com) Received: from mail-ia0-f182.google.com (mail-ia0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 858B48FC12 for ; Wed, 7 Nov 2012 15:06:46 +0000 (UTC) Received: by mail-ia0-f182.google.com with SMTP id k10so1530915iag.13 for ; Wed, 07 Nov 2012 07:06:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=BtclrE5ZSURif7TW4mysWYOgixW0ZNZwPSjZxYDjySk=; b=VkTmeN71pGo96S9WIoWIwSiIIvAk5WogZqfihlxBCQDNAVQo1uavhaF0CClQJrh6zy qCmL8xVnW10hhy/vKKCEKt5KiAw6fV3KoaXBJ71BWLamA5RG23m/Sqyca92qts05QAO0 YWH0/UaLhjp0hOzARUwgkD2j61Dw2Y3BYNsJ9L7K9IuRfimhq0dLzx7Uq837V+yUXHIQ j9dyM3CKKWVgqgDzpa/YdMxfT6H3gyEg31OMTozJqaA0Y/ImOwkHupJ+0+fmXnkLfrLo 3lVmsvmatkkZDu98ag+oUVxwBZxAgV7k4i56Vrd9aGt9w4vyljVz0UJGptDdGYUyvDUh Z1yg== MIME-Version: 1.0 Received: by 10.50.37.168 with SMTP id z8mr17034691igj.1.1352300805810; Wed, 07 Nov 2012 07:06:45 -0800 (PST) Received: by 10.64.37.41 with HTTP; Wed, 7 Nov 2012 07:06:45 -0800 (PST) In-Reply-To: <1352299354.47535.YahooMailNeo@web126004.mail.ne1.yahoo.com> References: <1351605941.79450.YahooMailNeo@web126002.mail.ne1.yahoo.com> <20121030145024.GA16785@psconsult.nl> <1352284360.76432.YahooMailNeo@web126003.mail.ne1.yahoo.com> <20121107120204.GA51120@psconsult.nl> <1352299354.47535.YahooMailNeo@web126004.mail.ne1.yahoo.com> Date: Wed, 7 Nov 2012 09:06:45 -0600 Message-ID: Subject: Re: nanobsd boot problem From: Espartano To: Jack Mc Lauren Content-Type: text/plain; charset=ISO-8859-1 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, 07 Nov 2012 15:06:46 -0000 > Thanks for your suggestion, i will do so :) > I want to use both vga console and serial console, Is it possible ? Yes, you have to put this line: console="vidconsole comconsole" into /boot/loader.conf file man loader.conf say: console (``vidconsole'') ``comconsole'' selects serial console, ``vidconsole'' selects the video console, ``nullconsole'' selects a mute console (useful for systems with neither a video console nor a serial port), and ``spinconsole'' selects the video console which prevents any input and hides all output replacing it with ``spinning'' character (useful for embedded products and such). Best regards From owner-freebsd-embedded@FreeBSD.ORG Wed Nov 7 15:10:35 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 30A2D464 for ; Wed, 7 Nov 2012 15:10:35 +0000 (UTC) (envelope-from freebsd@psconsult.nl) Received: from mx1.psconsult.nl (unknown [IPv6:2001:7b8:30f:e0::5059:ee8a]) by mx1.freebsd.org (Postfix) with ESMTP id D08878FC0A for ; Wed, 7 Nov 2012 15:10:34 +0000 (UTC) Received: from mx1.psconsult.nl (mx1.hvnu.psconsult.nl [46.44.189.154]) by mx1.psconsult.nl (8.14.5/8.14.4) with ESMTP id qA7FASmt069982 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Wed, 7 Nov 2012 16:10:33 +0100 (CET) (envelope-from freebsd@psconsult.nl) Received: (from paul@localhost) by mx1.psconsult.nl (8.14.5/8.14.4/Submit) id qA7FASPD069981 for freebsd-embedded@freebsd.org; Wed, 7 Nov 2012 16:10:28 +0100 (CET) (envelope-from freebsd@psconsult.nl) X-Authentication-Warning: mx1.psconsult.nl: paul set sender to freebsd@psconsult.nl using -f Date: Wed, 7 Nov 2012 16:10:28 +0100 From: Paul Schenkeveld To: freebsd-embedded@freebsd.org Subject: Re: nanobsd boot problem Message-ID: <20121107151028.GA40957@psconsult.nl> References: <1351605941.79450.YahooMailNeo@web126002.mail.ne1.yahoo.com> <20121030145024.GA16785@psconsult.nl> <1352284360.76432.YahooMailNeo@web126003.mail.ne1.yahoo.com> <20121107120204.GA51120@psconsult.nl> <1352299354.47535.YahooMailNeo@web126004.mail.ne1.yahoo.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1352299354.47535.YahooMailNeo@web126004.mail.ne1.yahoo.com> User-Agent: Mutt/1.5.21 (2010-09-15) 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, 07 Nov 2012 15:10:35 -0000 On Wed, Nov 07, 2012 at 06:42:34AM -0800, Jack Mc Lauren wrote: > Thanks for your reply ... > > >>Pls. post the .conf file you used to build NanoBSD. > > > > this is the whole nanobsd.sh file. sorry it's a bit long ... Indeed too long to read from where I am now. Also, always leave the line starting with '# $FreeBSD:' in your replies as that will tell us which version of the script you used, but.. - All your config vars should go in a separate config file, say mynanobsd.conf, then run 'sh nanobsd.sh -c mynanobsd.conf' to build an image. - The line 'NANO_BOOTLOADER="boot/boot0sio"' selects a boot0 loader (the part that goes into the first sector of your flash device) to be one that supports only a serial console. If you want VGA use 'boot/boot0' there. There's no boot0 loader that supports both because it must be very small (max. 446 bytes). - If you go for serial console you should have a line 'customize_cmd cust_comconsole' in mynanobsd.conf, for VGA leave it out. - Later boot stages in FreeBSD support dual consoles (VGA and serial) but the nanobsd.sh script was not meant to support that. See nanobsd(8), boot(8) and: http://www.freebsd.org/doc/en_US.ISO8859-1/articles/nanobsd/ for further information With kind regards, Paul Schenkeveld From owner-freebsd-embedded@FreeBSD.ORG Thu Nov 8 13:00:55 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id EA701C4 for ; Thu, 8 Nov 2012 13:00:55 +0000 (UTC) (envelope-from jack.mclauren@yahoo.com) Received: from nm2-vm0.bullet.mail.ne1.yahoo.com (nm2-vm0.bullet.mail.ne1.yahoo.com [98.138.91.39]) by mx1.freebsd.org (Postfix) with ESMTP id 8354F8FC08 for ; Thu, 8 Nov 2012 13:00:55 +0000 (UTC) Received: from [98.138.226.178] by nm2.bullet.mail.ne1.yahoo.com with NNFMP; 08 Nov 2012 13:00:49 -0000 Received: from [98.138.87.10] by tm13.bullet.mail.ne1.yahoo.com with NNFMP; 08 Nov 2012 13:00:49 -0000 Received: from [127.0.0.1] by omp1010.mail.ne1.yahoo.com with NNFMP; 08 Nov 2012 13:00:49 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 33536.36703.bm@omp1010.mail.ne1.yahoo.com Received: (qmail 44893 invoked by uid 60001); 8 Nov 2012 13:00:48 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1352379648; bh=8TDklBPU00RiUY/ljA0kfje+xwmlteBRgy9YcuQJ9ZM=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=Kf6ArCT4hsNrl0OSpIFxzxleL/b+lS74byt+ruNEYzIc87pd+z505i6nNz9oZFp4I9P3ggSqePNxXrEXt5ijc3mhK4nM1RvmWr0JthbNRZFX3Y45QvSBYjCjsSB1UP/9h9pqxf5YJTyiM1BXJm/KsCV3mSpGz9QGtvx2f6nmpjs= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:In-Reply-To:MIME-Version:Content-Type; b=40BSgsWbUoB5f0nV12o7mwYeC9+7rZPL2NOj2Kh1HtfImqUnu/Cvp1yLBW0TJJBDpvzt65E6Q2sOoIzn4zdoX0eftQLzpBv3Ix7+X5Fm5jiwV6klkQuBjROLnEAATRzjK909L1EfojGhSV1sdxTEoYLwudZSPiYsJEQ4ETArGJk=; X-YMail-OSG: 4lYhN6wVM1mHRTc8hWYU6DxMY0jz8HBj9KJPzQOKDN4t1Ue Q1FDZwlPNXmRA0gF70ltibWrJdgAkHNuLeZ.1BbIYzRPhlF3CZFaka9gMlBS xH5YiTAWEUEVoUhWQYIf1O_FeUHK4vkYAgcE0UrHjIOkoYikRGezSLAAyuSl iEWcY66VhmrU17uH3kwlsZc.3pKAssKOUktGHOd_JiCWOP4dBQEcwziU5GVT f83MMKLUxqsc3sMcpdNb9L2TvLUS.VaJBA3FBkzMfVtjShEDHLJhRKEq0P2v F7E.h1qa.1aCPe6jNuUrp_hhkIkVr_JxuNCxgAhIP53GYmvL82Z5zdKi.0Vs Oq1N0mOa_3eISU5vuRhTBv3wnZE2h7tTEaekkzUVbY_39lJOntdZobxC2bNj OwkrSpiZ8edavbocX2YFer4JWkD6CpPbqDHTv.pe1BDO2ciR2UX6mWih0LFX aQlFyYPZ52NANv7E- Received: from [89.165.120.140] by web126002.mail.ne1.yahoo.com via HTTP; Thu, 08 Nov 2012 05:00:48 PST X-Rocket-MIMEInfo: 001.001, Cgo.IC0gVGhlIGxpbmUgJ05BTk9fQk9PVExPQURFUj0iYm9vdC9ib290MHNpbyInIHNlbGVjdHMgYSBib290MCBsb2FkZXIKPiDCoCh0aGUgcGFydCB0aGF0IGdvZXMgaW50byB0aGUgZmlyc3Qgc2VjdG9yIG9mIHlvdXIgZmxhc2ggZGV2aWNlKQo.IHRvIGJlIG9uZSB0aGF0IHN1cHBvcnRzIG9ubHkgYSBzZXJpYWwgY29uc29sZS7CoCBJZiB5b3Ugd2FudCBWR0EKPiB1c2UgJ2Jvb3QvYm9vdDAnIHRoZXJlLsKgIFRoZXJlJ3Mgbm8gYm9vdDAgbG9hZGVyIHRoYXQgc3VwcG9ydHMgYm90aAo.IGJlY2F1c2UgaXQBMAEBAQE- X-Mailer: YahooMailWebService/0.8.123.460 References: <1351605941.79450.YahooMailNeo@web126002.mail.ne1.yahoo.com> <20121030145024.GA16785@psconsult.nl> <1352284360.76432.YahooMailNeo@web126003.mail.ne1.yahoo.com> <20121107120204.GA51120@psconsult.nl> <1352299354.47535.YahooMailNeo@web126004.mail.ne1.yahoo.com> <20121107151028.GA40957@psconsult.nl> Message-ID: <1352379648.93982.YahooMailNeo@web126002.mail.ne1.yahoo.com> Date: Thu, 8 Nov 2012 05:00:48 -0800 (PST) From: Jack Mc Lauren Subject: Re: nanobsd boot problem To: Paul Schenkeveld , "freebsd-embedded@freebsd.org" In-Reply-To: <20121107151028.GA40957@psconsult.nl> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Jack Mc Lauren List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Nov 2012 13:00:56 -0000 =0A=0A> - The line 'NANO_BOOTLOADER=3D"boot/boot0sio"' selects a boot0 load= er=0A> =A0(the part that goes into the first sector of your flash device)= =0A> to be one that supports only a serial console.=A0 If you want VGA=0A> = use 'boot/boot0' there.=A0 There's no boot0 loader that supports both=0A> b= ecause it must be very small (max. 446 bytes).=0A=0AThank you, it worked co= rrectly. =A0:)=0A=0AThere is an another problem, when i boot up from flash = memory , i have an error. It seems that=A0the fstab file has not the correc= t contents.=0AI changed the fstab file like this :=0A/dev/ad0s1a / ufs ro 1= 1=A0=0A/dev/ad0s3 /cfg rw,noauto 2 2=0Abut after reboot i have this error = :=A0=0Aa black screen with some messages like :=0AIf you have invalid mount= options, reboot, and first try the following from the loader prompt :=0Ase= t vfs.root.mountfrom.options=3Drw=0Aand so on ... From owner-freebsd-embedded@FreeBSD.ORG Thu Nov 8 15:20:07 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 627E82CA for ; Thu, 8 Nov 2012 15:20:07 +0000 (UTC) (envelope-from jack.mclauren@yahoo.com) Received: from nm34-vm7.bullet.mail.ne1.yahoo.com (nm34-vm7.bullet.mail.ne1.yahoo.com [98.138.229.87]) by mx1.freebsd.org (Postfix) with ESMTP id 0DC0F8FC0A for ; Thu, 8 Nov 2012 15:20:05 +0000 (UTC) Received: from [98.138.90.54] by nm34.bullet.mail.ne1.yahoo.com with NNFMP; 08 Nov 2012 15:19:59 -0000 Received: from [98.138.89.240] by tm7.bullet.mail.ne1.yahoo.com with NNFMP; 08 Nov 2012 15:19:58 -0000 Received: from [127.0.0.1] by omp1013.mail.ne1.yahoo.com with NNFMP; 08 Nov 2012 15:19:58 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 406465.11744.bm@omp1013.mail.ne1.yahoo.com Received: (qmail 10841 invoked by uid 60001); 8 Nov 2012 15:19:58 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1352387998; bh=7Kld+CW32jjcObpHgY+JqMH4tiqMCZuJ+TRaN4R0I1Y=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=HRvsRjMy7uW22QcRGB3KnkGupmXmADyBD4kF6apTkdBCoIbFQ1BjhYg5RH4tBYBUs3jtiIip/oI8QuyVl+sjpEuCw/60qn0iJcCU5U1bdvdS7sGGNXo/4ozzzu0+HyFckGTZrogep3SSvbpj73Ndl8rLU0bZNtlDIMcA7q1XXtE= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:Message-ID:Date:From:Reply-To:Subject:To:MIME-Version:Content-Type; b=EVlxIclnO9Jm4O/smaQh99S172nu2NzUBL9T4PLt5U7Jty0GSm/c1BKlKX3S1RencO3ivYggXWa75wt+IH/IA4T8YRK0S61XthA8dvZXQ6VmaT2K3zKa6dw8CVP3c+ats0dNKnbWeZuOpf+tIzPv/X2IMZ7IVLtbXDfpGbY6Dfo=; X-YMail-OSG: N5bpxQYVM1ksFl8pmqe04MPZzoNURorgS.taSgIi7ZYDUMx ePAjYbOxAykkFqPqQMOZ7nAr7e4ZL.AnU4WzbPcvBQytRRE5z_o82fcy7uKq r941YX..O4aBAu7JQ69lqPLwOHojeFTA539ZeOvJ6PN2mWnH1Dh4Ge.K5Yvi hJ4VlHu_yT.67nje5boJdyIUKvAy5fIz._jYcDj2vybRkiYCb_QoiKXoW9LC euu4z1yroVlCUzt2QEMW8P4Iu388af.5B3_9xd5sDmVTCpaefzfytLZfSY8n DWY3_aHNkcetJqR55Askwqf9hQOZGmz6uW_IelMbifc.AQhSKYlIsuoVKR4l wrCmv870FWQN9QejEJSDwNBaDXW3MT2316K7GjfAN2HNxdrFCegHgx56GB7G _ltt06BCZXMF7SnbcioDYy9KBZOjOjjhU66xs12DSz3jYRVOCeSHA Received: from [89.165.120.140] by web126003.mail.ne1.yahoo.com via HTTP; Thu, 08 Nov 2012 07:19:58 PST X-Rocket-MIMEInfo: 001.001, aGkgYWxsCnRoZSBsYXN0IHByb2JsZW0gc29sdmVkISBCdXQgaSBjYW4gcnVuwqBvbmUgb2Ygb3VyIHN5c3RlbXPCoMKgd2l0aCBuYW5vYnNkIGltYWdlIGJ1dCBvbiBzb21lIG9mIHRoZW0gaSBjYW4ndCBhbmQgaSBoYXZlIHRoZSBmb2xsb3dpbmcgZXJyb3IgOgoKYSBibGFjayBzY3JlZW4gd2l0aCBzb21lIG1lc3NhZ2VzIGxpa2UgOgpJZiB5b3UgaGF2ZSBpbnZhbGlkIG1vdW50IG9wdGlvbnMsIHJlYm9vdCwgYW5kIGZpcnN0IHRyeSB0aGUgZm9sbG93aW5nIGZyb20gdGhlIGxvYWRlciBwcm9tcHQgOgpzZXQBMAEBAQE- X-Mailer: YahooMailWebService/0.8.123.460 Message-ID: <1352387998.10370.YahooMailNeo@web126003.mail.ne1.yahoo.com> Date: Thu, 8 Nov 2012 07:19:58 -0800 (PST) From: Jack Mc Lauren Subject: nanobsd image To: "freebsd-embedded@freebsd.org" MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.14 X-BeenThere: freebsd-embedded@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: Jack Mc Lauren List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Nov 2012 15:20:07 -0000 hi all=0Athe last problem solved! But i can run=A0one of our systems=A0=A0w= ith nanobsd image but on some of them i can't and i have the following erro= r :=0A=0Aa black screen with some messages like :=0AIf you have invalid mou= nt options, reboot, and first try the following from the loader prompt :=0A= set vfs.root.mountfrom.options=3Drw=0Aand so on ...=A0=0A=0A=0AAre there an= y options which may cause this problem and make this difference ??? From owner-freebsd-embedded@FreeBSD.ORG Thu Nov 8 15:33:04 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1067C739 for ; Thu, 8 Nov 2012 15:33:04 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id BE7448FC12 for ; Thu, 8 Nov 2012 15:33:03 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id qA8FWuUt042850 for ; Thu, 8 Nov 2012 08:32:57 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) 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 qA8FWr9u015993; Thu, 8 Nov 2012 08:32:53 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Subject: Re: nanobsd image From: Ian Lepore To: Jack Mc Lauren In-Reply-To: <1352387998.10370.YahooMailNeo@web126003.mail.ne1.yahoo.com> References: <1352387998.10370.YahooMailNeo@web126003.mail.ne1.yahoo.com> Content-Type: text/plain; charset="us-ascii" Date: Thu, 08 Nov 2012 08:32:53 -0700 Message-ID: <1352388773.17290.66.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit 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: Thu, 08 Nov 2012 15:33:04 -0000 On Thu, 2012-11-08 at 07:19 -0800, Jack Mc Lauren wrote: > hi all > the last problem solved! But i can run one of our systems with nanobsd image but on some of them i can't and i have the following error : > > a black screen with some messages like : > If you have invalid mount options, reboot, and first try the following from the loader prompt : > set vfs.root.mountfrom.options=rw > and so on ... > > > Are there any options which may cause this problem and make this difference ??? It's hard to guess what's going on with a description of "messages like..." rather than the actual messages verbatim. But if I had to guess at this point, I'd lean towards a difference between SATA devices being "ad0" and "ada0" which might be different between target systems based on the BIOS settings on each system for whether to present the drives as legacy/compatible IDE versus AHCI. The options used to build the kernel also have some effect on ad0 vs ada0, but I'll admit to being in a complete state of confusion over that because of working on systems using 8.x, 9.x and 10.0 every day, and I've completely lost track of what behaviors are seen in which versions. -- Ian From owner-freebsd-embedded@FreeBSD.ORG Sat Nov 10 08:26:12 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 2349992 for ; Sat, 10 Nov 2012 08:26:12 +0000 (UTC) (envelope-from jack.mclauren@yahoo.com) Received: from nm21-vm1.bullet.mail.ne1.yahoo.com (nm21-vm1.bullet.mail.ne1.yahoo.com [98.138.91.46]) by mx1.freebsd.org (Postfix) with ESMTP id B651F8FC0C for ; Sat, 10 Nov 2012 08:26:11 +0000 (UTC) Received: from [98.138.226.177] by nm21.bullet.mail.ne1.yahoo.com with NNFMP; 10 Nov 2012 08:26:05 -0000 Received: from [98.138.87.11] by tm12.bullet.mail.ne1.yahoo.com with NNFMP; 10 Nov 2012 08:26:05 -0000 Received: from [127.0.0.1] by omp1011.mail.ne1.yahoo.com with NNFMP; 10 Nov 2012 08:26:05 -0000 X-Yahoo-Newman-Property: ymail-3 X-Yahoo-Newman-Id: 603104.20675.bm@omp1011.mail.ne1.yahoo.com Received: (qmail 48965 invoked by uid 60001); 10 Nov 2012 08:26:05 -0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.com; s=s1024; t=1352535965; bh=xQKprLT/zncODYbb8GfVBTYyJPcnsbXxoUQSTpqad04=; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=w6v7C6ireSCYkoIdrmAj8UE/cDr1Whk/NumxRZutbrMC4TpOCVVx5GRwzHeA4fmNkmZyuTeFK7kKHWs5hF4i7eMVRlmh3+OrGdFMgE83X9G5/NjVL9BaLrhHjtmwp0wvITAk+4JX8Q4LhDCQKDwMbc5yTw6dAaN8mF2gcIwzV/8= DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:X-Rocket-MIMEInfo:X-Mailer:References:Message-ID:Date:From:Reply-To:Subject:To:Cc:In-Reply-To:MIME-Version:Content-Type; b=O2rldnKJkvuP055i1KCwCBnFkBtbfge1GeRYqLOKxCCXAwFWRkywRW2kpeuj5ypuKY5jMqhPQooaAFxASQsnTs80gXtJDhjn4IfWO2GDbHvnvhcYiMtKBChSFJoK7u8V8JtjULkkw+EUHHFH2K/1kMAtFi6HRMa1eUkanhJ6SxM=; X-YMail-OSG: gPVUqjEVM1kognXc0_q8UWfGGpMW23jV.jGhbub5GocRnRQ Vd1aBO114GHDGoTOp.sFWzcW7tO2.bXbjhV1kqaNvGG_OV3nUt_0e8X2vxM3 J0Wes4rd5O5XiLxsXes7MgnoFhLBuBOMJNkGF2eZtbxStS8GYDtg8k2vZTEr 2NLXlbgZUozyVh78w.QtfYkKYMl0K1wjsn7dSGx6g99gHM6MMs_o8r147Ruv drOrXaHldCMrLBE_dsCkSrR5Q1SAXlraAqxsubB.Op1cT48Wg3LsuVVBdN9g D4JP_QQKRVXRTwM6Hni4TSULv7NPnUbqPWPqVyOCZZzmrir0AyYT2l82GzIg r9ZCfJT3aUucft2YuDacTeW2RCavl0XUJXVLRLy6JXgRFslgV54Wz86gQjd. WpcidSdL9CcyAw9Fl4Lu3p5vbHmf4R3VfnyZPcDaYuzOW26dpVEi6eVo55tD 5AKEyQJ6N3FJ2slM- Received: from [89.165.120.140] by web126006.mail.ne1.yahoo.com via HTTP; Sat, 10 Nov 2012 00:26:05 PST X-Rocket-MIMEInfo: 001.001, Pkl0J3MgaGFyZCB0byBndWVzcyB3aGF0J3MgZ29pbmcgb24gd2l0aCBhIGRlc2NyaXB0aW9uIG9mICJtZXNzYWdlcwoKPmxpa2UuLi4iIHJhdGhlciB0aGFuIHRoZSBhY3R1YWwgbWVzc2FnZXMgdmVyYmF0aW0uwqAgQnV0IGlmIEkgaGFkIHRvCj5ndWVzcyBhdCB0aGlzIHBvaW50LCBJJ2QgbGVhbiB0b3dhcmRzIGEgZGlmZmVyZW5jZSBiZXR3ZWVuIFNBVEEgZGV2aWNlcwo.YmVpbmcgImFkMCIgYW5kICJhZGEwIiB3aGljaCBtaWdodCBiZSBkaWZmZXJlbnQgYmV0d2VlbiB0YXJnZXQgc3lzdGVtcwo.YmFzZWQBMAEBAQE- X-Mailer: YahooMailWebService/0.8.123.460 References: <1352387998.10370.YahooMailNeo@web126003.mail.ne1.yahoo.com> <1352388773.17290.66.camel@revolution.hippie.lan> Message-ID: <1352535965.38849.YahooMailNeo@web126006.mail.ne1.yahoo.com> Date: Sat, 10 Nov 2012 00:26:05 -0800 (PST) From: Jack Mc Lauren Subject: Re: nanobsd image To: Ian Lepore In-Reply-To: <1352388773.17290.66.camel@revolution.hippie.lan> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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 Reply-To: Jack Mc Lauren List-Id: Dedicated and Embedded Systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 10 Nov 2012 08:26:12 -0000 >It's hard to guess what's going on with a description of "messages=0A=0A>l= ike..." rather than the actual messages verbatim.=C2=A0 But if I had to=0A>= guess at this point, I'd lean towards a difference between SATA devices=0A>= being "ad0" and "ada0" which might be different between target systems=0A>b= ased on the BIOS settings on each system for whether to present the=0A>driv= es as legacy/compatible IDE versus AHCI.=C2=A0 The options used to build=0A= >the kernel also have some effect on ad0 vs ada0, but I'll admit to being= =0A>in a complete state of confusion over that because of working on system= s=0A>using 8.x, 9.x and 10.0 every day, and I've completely lost track of= =0A>what behaviors are seen in which versions.=0A=0A>-- Ian=0A=0AThank you = Lan. this is the whole message, and what i do :=0A=0A######################= ############################=0AIf you have invalid mount options, reboot, a= nd first try the=0Afollowing from the loader prompt :=0A=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 se= t vfs.root.mountfrom.options=3Drw=0AAnd then remove the invalid mount optio= ns from /etc/fstab.=0A=C2=A0=0ALoader variables:=0Avfs.root.mountfrom=3Dufs= :/dev/da0s1a=0Avfs.root.mountfrom.options=3Dro=0A=C2=A0=0AManual root files= ystem specifications:=0Ada0 at umass-sim0 bus 0 scbus0 target 0 lun 0=0A=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 :=0AMount using filesystem = =0Ada0 :=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 eg. Ufs:/dev/da0s1a=0A Removable Direct Access=0ASCSI-4 device=0A=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= Eg. Cd9660:/dev/acd0=0Ada0: 40.000MB/s transfers=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 This=0Ais equivalent to:=0Amount =E2= =80=93t cd9660 /dev/acd0/=0Ada0: 7388MB (15130624 512 byte sector: 255H 63S= /T 941C)=0A=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0 ?=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 List valid disk boot devices=0A=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 Abort manual input=0Amountroo= t >=0Amountroot>?=0AList of GEOM managed disk devices:=0A=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 da= 10s1a=C2=A0=C2=A0 da0s4=C2=A0 =C2=A0da0s3=C2=A0 da0s1=C2=A0 =C2=A0da0=0A###= ################################################=0A=0AI have to set the mou= nt root manually :=0AMountroot>ufs:/dev/da0s1a=0AThe system does not do thi= s automatically. Fstab file is=0Acorrect as you can see the =E2=80=9Cloader= variables=E2=80=9D.=0AWhat=E2=80=99s the problem ? I am so confused !!!=0A= The point is that we don=E2=80=99t dace this problem on one our=0Asystem !!= !=0Aby the way, I have copied the image on a flash memory. From owner-freebsd-embedded@FreeBSD.ORG Sat Nov 10 16:40:45 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id B4DD0152 for ; Sat, 10 Nov 2012 16:40:45 +0000 (UTC) (envelope-from bob@drinksbeer.org) Received: from mail.drinksbeer.org (107-0-69-251-ip-static.hfc.comcastbusiness.net [107.0.69.251]) by mx1.freebsd.org (Postfix) with ESMTP id 8C47F8FC0A for ; Sat, 10 Nov 2012 16:40:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by mail.drinksbeer.org (Postfix) with ESMTP id 17B865D44EF; Sat, 10 Nov 2012 08:32:27 -0800 (PST) X-Virus-Scanned: amavisd-new at drinksbeer.org Received: from mail.drinksbeer.org ([127.0.0.1]) by localhost (mail.drinksbeer.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4BqIaL0YfXze; Sat, 10 Nov 2012 08:32:17 -0800 (PST) Received: from mail.drinksbeer.org (mail [107.0.69.251]) by mail.drinksbeer.org (Postfix) with ESMTP id 2367B5D44EE; Sat, 10 Nov 2012 08:32:17 -0800 (PST) Date: Sat, 10 Nov 2012 08:32:16 -0800 (PST) From: Bob Ryan To: Jack Mc Lauren Message-ID: <3071705.80.1352565121545.JavaMail.Bob@Toad-PC> In-Reply-To: <1352535965.38849.YahooMailNeo@web126006.mail.ne1.yahoo.com> Subject: Re: nanobsd image MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Originating-IP: [71.197.83.152] X-Mailer: Zimbra 7.1.4_GA_2565 (Zimbra Desktop/7.2.1_11637_Windows) 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: Sat, 10 Nov 2012 16:40:45 -0000 I don't see da0s1a in this list- List of GEOM managed disk devices: da10s1a da0s4 da0s3 da0s1 da0 ################################################### ----- Original Message ----- From: "Jack Mc Lauren" To: "Ian Lepore" Cc: freebsd-embedded@freebsd.org Sent: Saturday, November 10, 2012 12:26:05 AM Subject: Re: nanobsd image >It's hard to guess what's going on with a description of "messages >like..." rather than the actual messages verbatim.=C2=A0 But if I had to >guess at this point, I'd lean towards a difference between SATA devices >being "ad0" and "ada0" which might be different between target systems >based on the BIOS settings on each system for whether to present the >drives as legacy/compatible IDE versus AHCI.=C2=A0 The options used to bui= ld >the kernel also have some effect on ad0 vs ada0, but I'll admit to being >in a complete state of confusion over that because of working on systems >using 8.x, 9.x and 10.0 every day, and I've completely lost track of >what behaviors are seen in which versions. >-- Ian Thank you Lan. this is the whole message, and what i do : ################################################## If you have invalid mount options, reboot, and first try the following from the loader prompt : =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 set vfs.root.mountfrom.options=3Drw And then remove the invalid mount options from /etc/fstab. =C2=A0 Loader variables: vfs.root.mountfrom=3Dufs:/dev/da0s1a vfs.root.mountfrom.options=3Dro =C2=A0 Manual root filesystem specifications: da0 at umass-sim0 bus 0 scbus0 target 0 lun 0 =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 : Mount using filesystem da0 :=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 eg. Ufs:/dev/da0s1a Removable Direct Access SCSI-4 device =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 Eg. Cd9660:/dev/acd0 da0: 40.000MB/s transfers=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0 This is equivalent to: mount =E2=80=93t cd9660 /dev/acd0/ da0: 7388MB (15130624 512 byte sector: 255H 63S/T 941C) =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 ?=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0=C2=A0 List valid disk boot devices =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 =C2=A0=C2=A0=C2=A0=C2=A0 Abort manual input mountroot > mountroot>? List of GEOM managed disk devices: =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2= =A0=C2=A0=C2=A0 da10s1a=C2=A0=C2=A0 da0s4=C2=A0 =C2=A0da0s3=C2=A0 da0s1=C2= =A0 =C2=A0da0 ################################################### I have to set the mount root manually : Mountroot>ufs:/dev/da0s1a The system does not do this automatically. Fstab file is correct as you can see the =E2=80=9Cloader variables=E2=80=9D. What=E2=80=99s the problem ? I am so confused !!! The point is that we don=E2=80=99t dace this problem on one our system !!! by the way, I have copied the image on a flash memory. _______________________________________________ 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 Nov 10 20:07:25 2012 Return-Path: Delivered-To: freebsd-embedded@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6D83C6BC; Sat, 10 Nov 2012 20:07:25 +0000 (UTC) (envelope-from freebsd@damnhippie.dyndns.org) Received: from duck.symmetricom.us (duck.symmetricom.us [206.168.13.214]) by mx1.freebsd.org (Postfix) with ESMTP id 3F0B28FC08; Sat, 10 Nov 2012 20:07:24 +0000 (UTC) Received: from damnhippie.dyndns.org (daffy.symmetricom.us [206.168.13.218]) by duck.symmetricom.us (8.14.5/8.14.5) with ESMTP id qAAK7Hh4037959; Sat, 10 Nov 2012 13:07:24 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) 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 qAAK75gq019245; Sat, 10 Nov 2012 13:07:05 -0700 (MST) (envelope-from freebsd@damnhippie.dyndns.org) Subject: Re: watchdogd, jemalloc, and mlockall From: Ian Lepore To: freebsd-embedded@freebsd.org, freebsd-hackers@freebsd.org In-Reply-To: <1351968635.1120.110.camel@revolution.hippie.lan> References: <1351967919.1120.102.camel@revolution.hippie.lan> <20121103184143.GC73505@kib.kiev.ua> <1351968635.1120.110.camel@revolution.hippie.lan> Content-Type: text/plain; charset="us-ascii" Date: Sat, 10 Nov 2012 13:07:05 -0700 Message-ID: <1352578025.17290.123.camel@revolution.hippie.lan> Mime-Version: 1.0 X-Mailer: Evolution 2.32.1 FreeBSD GNOME Team Port Content-Transfer-Encoding: 7bit Cc: Jason Evans 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, 10 Nov 2012 20:07:25 -0000 On Sat, 2012-11-03 at 12:50 -0600, Ian Lepore wrote: > On Sat, 2012-11-03 at 20:41 +0200, Konstantin Belousov wrote: > > On Sat, Nov 03, 2012 at 12:38:39PM -0600, Ian Lepore wrote: > > > In an attempt to un-hijack the thread about memory usage increase > > > between 6.4 and 9.x, I'm starting a new thread here related to my recent > > > discovery that watchdogd uses a lot more memory since it began using > > > mlockall(2). > > > > > > I tried statically linking watchdogd and it made a small difference in > > > RSS, presumably because it doesn't wire down all of libc and libm. > > > > > > VSZ RSS > > > 10236 10164 Dynamic > > > 8624 8636 Static > > > > > > Those numbers are from ps -u on an arm platform. I just updated the PR > > > (bin/173332) with some procstat -v output comparing with/without > > > mlockall(). > > > > > > It appears that the bulk of the new RSS bloat comes from jemalloc > > > allocating vmspace in 8MB chunks. With mlockall(MCL_FUTURE) in effect > > > that leads to wiring 8MB to satisfy what probably amounts to a few > > > hundred bytes of malloc'd memory. > > > > > > It would probably also be a good idea to remove the floating point from > > > watchdogd to avoid wiring all of libm. The floating point is used just > > > to turn the timeout-in-seconds into a power-of-two-nanoseconds value. > > > There's probably a reasonably efficient way to do that without calling > > > log(), considering that it only happens once at program startup. > > > > No, I propose to add a switch to turn on/off the mlockall() call. > > I have no opinion on the default value of the suggested switch. > > In a patch I submitted along with the PR, I added code to query the > vm.swap_enabled sysctl and only call mlockall() when swapping is > enabled. > > Nobody yet has said anything about what seems to me to be the real > problem here: jemalloc grabs 8MB at a time even if you only need to > malloc a few bytes, and there appears to be no way to control that > behavior. Or maybe there's a knob in there that didn't jump out at me > on a quick glance through the header files. I finally found some time to pursue this further. A small correction to what I said earlier: it appears that jemalloc allocates chunks of 4MB at a time, not 8, but it also appears that it allocates at least 2 chunks so the net effect is an 8MB default minimum allocation. I played with the jemalloc tuning option lg_chunk and with static versus dynamic linking, and came up with the numbers below, which were generated by ps -u on an ARM-based system with 64MB running -current from a couple weeks ago, but with the recent patch to watchdogd to eliminate the need for libm. I used "lg_chunk:14" (16K chunks), the smallest value it would allow on this platform. For comparison I also include the numbers from a FreeBSD 8.2 ARM system (which would be dynamic linked and untuned, and also without any mlockall() calls). Link malloc %MEM VSZ RSS ------------------------------------- dynamic untuned 15.3 10040 9996 static untuned 13.2 8624 8636 dynamic tuned 2.8 1880 1836 static tuned 0.8 480 492 [ freebsd 8.2 ] 1.1 1752 748 So it appears that using jemalloc's tuning in a daemon that uses mlockall(2) is a big win, especially if the daemon doesn't do much memory allocation (watchdogd allocates 2 things, 4k and 1280 bytes; if you use -e it also strdup()s the command string). It also seems that providing a build-time knob to control static linking would be valuable on platforms that are very memory limited and can't benefit from having all of libc wired. I haven't attached a patch because there appears to be no good way to actually achieve this in a platform-agnostic way. The jemalloc code enforces the lower range of the lg_chunk tuning value to be tied to the page size of the platform, and it rejects out of range values without changing the tuning. The code that works on an ARM with 4K page size, const char *malloc_conf = "lg_chunk:14"; would fail on a system that had bigger pages. The tuning must be specified with a compile-time constant like that, because it has to be tuned before the first allocation, which apparently happens before main() is entered. It would be nice if jemalloc would clip the tuning to the lowest legal value instead of rejecting it, especially since the lowest legal value is calculated based not only on page size but on the value of other configurable values. There's another potential solution, but it strikes me as rather inelegant... jemalloc can also be tuned with the MALLOC_CONF env var. With the right rc-fu we could provide something like a watchdogd_memtune variable that you could set and watchdogd would be invoked with MALLOC_CONF set to that in the environment. It still couldn't be set to a default value that was good for all platforms. It would also get passed through environment inheritence to any "-e whatever" command run by watchdogd, which isn't necessarily appropriate. I'm cc'ing Jason in case he can offer some advice about a better way to achieve this tuning, because I'm sure my quick read-through of the manpage this morning missed important details and implications. -- Ian