From mobi at mobiphil.com Tue Apr 2 16:04:00 2013 From: mobi at mobiphil.com (mobi phil) Date: Tue, 2 Apr 2013 18:04:00 +0200 Subject: [Aboriginal] armv4tl floating exception message in guest Message-ID: Hi Rob, Thanks for creating aboriginal and all the related work. Heard about it as I was looking for a way to bootstrap funtoo installation for arm based machines. however inside system-image-armv4tl, I get on "ls" command "Floating point exception". Have an AMD 8 core machine with ubuntu 12.04 with QEMU emulator version 1.0.50 (Debian 1.0.50-2012.03-0ubuntu2.1), Copyright (c) 2003-2008 Fabrice Bellard this error seems to be a showstopper for me... any hints? (BTW.. do not give up with your project TCC! ;) ) rgrds, mobi phil being mobile, but including technology http://mobiphil.com 1364918640.0 From jazzoowatchman at gmail.com Tue Apr 2 22:58:46 2013 From: jazzoowatchman at gmail.com (Jazzoo Watchman) Date: Tue, 2 Apr 2013 18:58:46 -0400 Subject: [Aboriginal] armv4tl floating exception message in guest In-Reply-To: References: Message-ID: I have not tracked the origin of this "error", either, but; a possible workaround is : ls -l Looks like "wide" result printing is somewhat FUBAR. If I had to guess, I'd say some where in the printf "chain" a division is being made and there is no "floating point" support. Hope the above get's you past the "show-stopper." James On Tue, Apr 2, 2013 at 12:04 PM, mobi phil wrote: > Hi Rob, > > > Thanks for creating aboriginal and all the related work. > Heard about it as I was looking for a way to bootstrap funtoo > installation for arm based machines. > however inside system-image-armv4tl, I get on "ls" command "Floating > point exception". > Have an AMD 8 core machine with ubuntu 12.04 with QEMU emulator > version 1.0.50 (Debian 1.0.50-2012.03-0ubuntu2.1), Copyright (c) > 2003-2008 Fabrice Bellard > > this error seems to be a showstopper for me... any hints? > > (BTW.. do not give up with your project TCC! ;) ) > > > > rgrds, > mobi phil > > being mobile, but including technology > http://mobiphil.com > _______________________________________________ > Aboriginal mailing list > Aboriginal at lists.landley.net > http://lists.landley.net/listinfo.cgi/aboriginal-landley.net > -------------- next part -------------- An HTML attachment was scrubbed... URL: From mobi at mobiphil.com Wed Apr 3 12:07:38 2013 From: mobi at mobiphil.com (mobi phil) Date: Wed, 3 Apr 2013 14:07:38 +0200 Subject: [Aboriginal] armv4tl floating exception message in guest In-Reply-To: References: Message-ID: Hi, > I have not tracked the origin of this "error", either, but; a possible > workaround is : > > ls -l > > Looks like "wide" result printing is somewhat FUBAR. > > If I had to guess, I'd say some where in the printf "chain" a division is > being made and there is no "floating point" support. Indeed, "ls -l" works. It gave me a bit the "showstopper" impression. I think what lot of people do, once inside the qemu machine, is ls. At this stage, without a debugger, and without symbols is difficult to help to give more feedback. (would not make sense to have some tools like strace, gdb in the snandard system started by dev-environment-sh?). It seems for me that it would fit into the philosophy of aboriginal/toybox to have basic investigation tool to be able to report bugs, etc. Also a non-stripped version of toybox would be probably helpfull to help to fix bugs. (or there is no one? ;) ). Or? How would you proceed to have the fastest way to find out the answer to "why" (floating point exceptino) in this case To check basic floating point health I compiled and run: #include int main(void) { float x = 23.2343, y = 44234.243; if(x < y) { printf("%f\n", x/y); } return 0; } Does anybody have a debugger compatible with the latest armv4tl system? regards Mobi 1364990858.0 From rob at landley.net Wed Apr 3 12:13:16 2013 From: rob at landley.net (Rob Landley) Date: Wed, 03 Apr 2013 07:13:16 -0500 Subject: [Aboriginal] armv4tl floating exception message in guest In-Reply-To: (from mobi@mobiphil.com on Tue Apr 2 11:04:00 2013) References: Message-ID: <1364991196.18069.17@driftwood> On 04/02/2013 11:04:00 AM, mobi phil wrote: > Hi Rob, > > > Thanks for creating aboriginal and all the related work. > Heard about it as I was looking for a way to bootstrap funtoo > installation for arm based machines. > however inside system-image-armv4tl, I get on "ls" command "Floating > point exception". I am, as I type this, uploading a new release. :) The bug was that the toybox upgrade made -C (column view) the default, but if your tty has no defined size (which /dev/console pointing to a serial console won't), then it sees a size of 0 and column view had a division by zero error trying to figure out where to place the columns. Should be fixed in the new release. > Have an AMD 8 core machine with ubuntu 12.04 with QEMU emulator > version 1.0.50 (Debian 1.0.50-2012.03-0ubuntu2.1), Copyright (c) > 2003-2008 Fabrice Bellard > > this error seems to be a showstopper for me... any hints? Try the new version. Or do "ls -l" or similar in the old one (anything but column view). > (BTW.. do not give up with your project TCC! ;) ) I intend to restart qcc after toybox 1.0 is ready. Thanks, Rob 1364991196.0 From mobi at mobiphil.com Wed Apr 3 12:31:24 2013 From: mobi at mobiphil.com (mobi phil) Date: Wed, 3 Apr 2013 14:31:24 +0200 Subject: [Aboriginal] armv4tl floating exception message in guest In-Reply-To: <1364991196.18069.17@driftwood> References: <1364991196.18069.17@driftwood> Message-ID: Hi Rob, > I am, as I type this, uploading a new release. :) thanks, indeed it works now. I assume you did not read my second email (strace, gdb., symbols etc ) those tools and some other minimal infrastructure could make these kind of bug-fix-round-trips shorter, thus more productive both for you and others. Mobi 1364992284.0 From rob at landley.net Wed Apr 3 18:41:47 2013 From: rob at landley.net (Rob Landley) Date: Wed, 03 Apr 2013 13:41:47 -0500 Subject: [Aboriginal] armv4tl floating exception message in guest In-Reply-To: (from mobi@mobiphil.com on Wed Apr 3 07:31:24 2013) Message-ID: <1365014507.18069.21@driftwood> On 04/03/2013 07:31:24 AM, mobi phil wrote: > Hi Rob, > > > I am, as I type this, uploading a new release. :) > thanks, indeed it works now. > > I assume you did not read my second email (strace, gdb., symbols etc ) > those tools and some other minimal infrastructure could make these > kind of bug-fix-round-trips shorter, thus more productive both for you > and others. Static strace binaries are in the "extras" directory, you should be able to fetch them with wget through the virtual network. They may not have uploaded for this release (200k/second times a large number of megabytes, and I can't upload from this netbook at woork but only out and lunch and such). But the old versions are generally under http://landley.net/aboriginal/downloads/old/binaries/ (although in this case 1.2.2 probably isn't populated yet because instead of logging into the server and doing a "mv" of the old files I just did the mv locally on my netbook and let rsync handle it, and it has to re-upload the old files. At 200k/second. It'll take a while. Given the order rsync's doing things in, the new extras dir should go up before 1.2.2 does.) Adding gdb is a perpetual todo item, I think my most recent stab at it was somewhere around http://landley.net/notes-2010.html#15-02-2010 but mostly I don't use gdb, so I wait for people who do to note its absence. I can try to take another stab at it for next release, if you like. Rob 1365014507.0 From rob at landley.net Mon Apr 8 17:11:22 2013 From: rob at landley.net (Rob Landley) Date: Mon, 08 Apr 2013 12:11:22 -0500 Subject: [Aboriginal] armv4tl floating exception message in guest In-Reply-To: (from mobi@mobiphil.com on Sat Apr 6 09:37:36 2013) Message-ID: <1365441082.18069.49@driftwood> On 04/06/2013 09:37:36 AM, mobi phil wrote: > > Static strace binaries are in the "extras" directory, you should be > able to > > fetch them with wget through the virtual network. They may not have > uploaded > > for this release (200k/second times a large number of megabytes, > and I can't > > upload from this netbook at woork but only out and lunch and such). > > thanks, was not aware about the extras directory I need to improve the documentation, but haven't figured out how to do so without making it so big you can't find anything because of the sheer size. All of my attempts to sit down and systematically document this project turn into giant things like http://speakerdeck.com/u/mirell/p/developing-for-non-x86-targets-using-qemu which isn't what I'm going for. I'm actually pretty happy with how _short_ I managed to get the recent rewrite of the about.html page. > > Adding gdb is a perpetual todo item, I think my most recent stab at > it was > > somewhere around http://landley.net/notes-2010.html#15-02-2010 but > mostly I > > don't use gdb, so I wait for people who do to note its absence. > > you made me curious. can you tell me please what would you have used > in this particular situation (and restricted environment) to figure > out where the floating exception is coming from? We debugged it on this list in December: http://lists.landley.net/pipermail/aboriginal-landley.net/2012-December/000478.html What I usually do is recompile the source of the offending command and stick printf() calls into it until I tracked down the line that was faulting. (If it didn't print, that was after the segfault, if it did print it was before.) Then I'd print out the values of the calculation it was doing and found the division by zero error and trace that data back to where it came from. In this case, somebody else ran gdb on it before I got around to looking at it: http://lists.landley.net/pipermail/aboriginal-landley.net/2012-December/000483.html http://lists.landley.net/pipermail/aboriginal-landley.net/2012-December/000484.html But if you have a build environment set up and can recompile the program with extra logging of your choice stuck in anywhere, gdb doesn't buy you all that much. Where gdb shines is when you _can't_ easily do that. Since I'm building this whole system from source... I sometimes use the -s option of the various qemu variants to hook up gdb via "target remote": http://landley.net/notes-2008.html#18-03-2008 http://landley.net/notes-2008.html#19-03-2008 But that's for stuff I can't stick a printf in. (And I've managed to stick a printf into the uClibc dynamic linker.) The case above was debugging the glue tinycc put between _start and main(). I've also had to debug uclibc and qemu disagreeing about what that init code should do on powerpc, but gdb wasn't helpful there. (objdump -d was, and I stuck printf()s in qemu.) http://lists.gnu.org/archive/html/qemu-devel/2010-02/msg00800.html http://landley.net/notes-2007.html#28-03-2007 Here's a longish debugging session I did without gdb: http://landley.net/notes-2011.html#01-09-2011 http://landley.net/notes-2011.html#02-09-2011 http://landley.net/notes-2011.html#03-09-2011 http://landley.net/notes-2011.html#04-09-2011 http://landley.net/notes-2011.html#05-09-2011 And so on, and so forth. I pull out gdb when I have no other choice, but that's almost never the case. Rob 1365441082.0 From mobi at mobiphil.com Wed Apr 10 18:37:29 2013 From: mobi at mobiphil.com (mobi phil) Date: Wed, 10 Apr 2013 20:37:29 +0200 Subject: [Aboriginal] Aboriginal & Funtoo, latest status? Message-ID: Hi, Please note that I put both aboriginal and funtoo-dev in To field. Good to read on one of the links http://landley.net/notes-2011.html#01-09-2011 that Rob Landley "would like to get Funtoo bootstrapped". I also found a page on funtoo wiki, but it ends with "The approach above didn't seem to correctly provide needed dependencies. Options at this point:" Did anybody manage to bootstrap funtoo with aboriginal, or any other way for arm? regards, Misi 1365619049.0 From mobi at mobiphil.com Wed Apr 10 18:48:27 2013 From: mobi at mobiphil.com (mobi phil) Date: Wed, 10 Apr 2013 20:48:27 +0200 Subject: [Aboriginal] armv4tl floating exception message in guest In-Reply-To: <1365441082.18069.49@driftwood> References: <1365441082.18069.49@driftwood> Message-ID: > All of my attempts to sit down and systematically document this project turn > into giant things like > http://speakerdeck.com/u/mirell/p/developing-for-non-x86-targets-using-qemu > which isn't what I'm going for. I'm actually pretty happy with how _short_ I > managed to get the recent rewrite of the about.html page. IMHO just 3 lines in the about.html what to do when something seem to be broken, would probably be equal value of hundreds of pages of documentation. GDB: do not know how complicated it is, but also having debugging symbols in a separate file would pb. also make investigation easier. But everybody has different experience etc. I did myself printf in two situations (broken GDB in past on old HP machines). But I will bake my own gdb for this purpose, do not worry. If funtoo debootstrapping would work, that would already create a gdb that could be reused at later stages. 1365619707.0 From rob at landley.net Thu Apr 11 02:15:31 2013 From: rob at landley.net (Rob Landley) Date: Wed, 10 Apr 2013 21:15:31 -0500 Subject: [Aboriginal] Aboriginal & Funtoo, latest status? In-Reply-To: (from mobi@mobiphil.com on Wed Apr 10 13:37:29 2013) Message-ID: <1365646531.18069.74@driftwood> On 04/10/2013 01:37:29 PM, mobi phil wrote: > Hi, > > Please note that I put both aboriginal and funtoo-dev in To field. > > Good to read on one of the links > http://landley.net/notes-2011.html#01-09-2011 that Rob Landley "would > like to get Funtoo bootstrapped". I also found a page on funtoo wiki, > but it ends with "The approach above didn't seem to correctly provide > needed dependencies. Options at this point:" > > Did anybody manage to bootstrap funtoo with aboriginal, or any other > way for arm? I stopped working on this due to http://landley.net/notes-2012.html#10-01-2012 Rob P.S. although I've stopped using that expression since, it wasn't remotely the first time. A quick grep turned up http://landley.net/notes-2010.html#05-06-2010 for example. P.P.S. Half the reason I took a 6 month contract in Minnesota is it's an hour away from my sister and her four kids; I spend most weekends there. Yeah, cuts down on programming time, I know... P.P.P.S. The ex-homeless friend survived, has a job (fast food but it pays the bills) and earlier today texted me pictures of the one bedroom apartment she just moved into with her new husband (who she met on the streets) and their dog. Not gonna detail the rest of the people I mentioned but they're all still alive and doing reasonably well. Well, the one in Arkansas has multiple sclerosis and Reese got mugged last month, but other than that... 1365646531.0 From rob at landley.net Thu Apr 11 02:19:44 2013 From: rob at landley.net (Rob Landley) Date: Wed, 10 Apr 2013 21:19:44 -0500 Subject: [Aboriginal] armv4tl floating exception message in guest In-Reply-To: (from mobi@mobiphil.com on Wed Apr 10 13:48:27 2013) References: <1365441082.18069.49@driftwood> Message-ID: <1365646784.18069.75@driftwood> On 04/10/2013 01:48:27 PM, mobi phil wrote: > > All of my attempts to sit down and systematically document this > project turn > > into giant things like > > > http://speakerdeck.com/u/mirell/p/developing-for-non-x86-targets-using-qemu > > which isn't what I'm going for. I'm actually pretty happy with how > _short_ I > > managed to get the recent rewrite of the about.html page. > > IMHO just 3 lines in the about.html what to do when something seem to > be broken, would probably be equal value of hundreds of pages of > documentation. I'm open to suggestions, what should I add? (There's also a longish FAQ which has a bunch of debugging suggestions in it.) > GDB: do not know how complicated it is, but also having debugging > symbols in a separate file would pb. also make investigation easier. > But everybody has different experience etc. I did myself printf in two > situations (broken GDB in past on old HP machines). But I will bake my > own gdb for this purpose, do not worry. Ok. > If funtoo debootstrapping would work, that would already create a gdb > that could be reused at later stages. I have LFS bootstrapping. http://landley.net/aboriginal/control-images http://landley.net/aboriginal/bin (see lfs-* tarballs). It doesn't do gdb yet, but I could add it to something like that. (I've been meaning to do a beyond linux from scratch image...) Rob 1365646784.0 From rob at landley.net Sun Apr 14 08:04:51 2013 From: rob at landley.net (Rob Landley) Date: Sun, 14 Apr 2013 03:04:51 -0500 Subject: [Aboriginal] Aboriginal & Funtoo, latest status? In-Reply-To: <1365646531.18069.74@driftwood> (from rob@landley.net on Wed Apr 10 21:15:31 2013) Message-ID: <1365926691.18069.98@driftwood> On 04/10/2013 09:15:31 PM, Rob Landley wrote: > On 04/10/2013 01:37:29 PM, mobi phil wrote: >> Hi, >> >> Please note that I put both aboriginal and funtoo-dev in To field. >> >> Good to read on one of the links >> http://landley.net/notes-2011.html#01-09-2011 that Rob Landley >> "would >> like to get Funtoo bootstrapped". I also found a page on funtoo wiki, >> but it ends with "The approach above didn't seem to correctly >> provide >> needed dependencies. Options at this point:" >> >> Did anybody manage to bootstrap funtoo with aboriginal, or any other >> way for arm? > > I stopped working on this due to > http://landley.net/notes-2012.html#10-01-2012 I should probably provide more info than that. I started trying to bootstrap Gentoo but the project was badly damaged by Debian refugees landing on it around 2006. I started typing that here and instead wrote up a thing about it in my blog: http://landley.net/notes-2013.html#10-04-2013 I'm still interested in bootstrapping distros under Aboriginal Linux. I've got a stale Linux From Scratch 6.8 with a pending contribution I need to triage and integrate to update that to 7.3. I did a "Beyond linux from scratch" subset for Qualcomm in 2011 but that code belonged to qualcomm and like all proprietary code I've ever worked on was abandoned and buried in a sea trench when I left, never to be seen again. Red Hat is "pointy hair linux" (and SuSE is diet pointy hair linux), I had an existing blog entry about that: http://landley.net/notes-2012.html#14-03-2012 (I have a todo item to see if "zypper" helps out there. There's a bunch of layers built on top of this stuff. I couldn't make any sense of the Opensuse Build System...) I also need to poke at debian/ubuntu, and maybe arch or slackware. And of course try to bootstrap buildroot and openembedded and such natively. (Using their package repositories but not their board description files. Neither one is really set up to decouple this...) But really, toybox is eating my spare time for now... Rob 1365926691.0 From prazzb at gmail.com Mon Apr 15 19:51:43 2013 From: prazzb at gmail.com (Prasanna Balan) Date: Tue, 16 Apr 2013 01:21:43 +0530 Subject: [Aboriginal] LFS 7.3 toybox issue Message-ID: <20130415195143.GA11873@desktop> Hello I am struck in package shadow as it needs chmod -f. However chmod -f isn't yet implemented in toybox. So I just pushed it above in baseconfig-busybox. However, it still had the same issue. On further search, I found that busybox is building chmod but toybox is overwriting it. Then it dawned that toybox doesn't parse baseconfig-busybox but rather does defconfig. Is there a reason why it is done this way or such issue never came up?? Should I just patch toybox to do chmod as default n ??? There are points on both sides so I would like to get an opinion. prazzb 1366055503.0 From idunham at lavabit.com Tue Apr 16 04:50:36 2013 From: idunham at lavabit.com (Isaac Dunham) Date: Mon, 15 Apr 2013 21:50:36 -0700 Subject: [Aboriginal] Aboriginal Digest, Vol 27, Issue 7 In-Reply-To: References: Message-ID: <20130415215036.8f4df9c5.idunham@lavabit.com> On Mon, 15 Apr 2013 13:30:35 -0700 aboriginal-request at lists.landley.net wrote: > Hello > I am struck in package shadow as it needs chmod -f. However chmod -f > isn't yet implemented in toybox. So I just pushed it above in Hmm...looks like it should be trivial to implement. In fact, it half-works to just make it a no-op: -USE_CHMOD(NEWTOY(chmod, "<2?vR", TOYFLAG_BIN)) +USE_CHMOD(NEWTOY(chmod, "<2?vRf", TOYFLAG_BIN)) But for a full implementation, it would also take a few lines added to verror_msg or whatever is calling it... one way that crosses my mind is to: -add a variable (int toyquiet; in lib.h ?) -set it conditionally: toyquiet = (toys.optflags & FLAG_f); -wrap everything in verror_msg() before the last line with an if (!toyquiet) { .. } > baseconfig-busybox. However, it still had the same issue. On further > search, I found that busybox is building chmod but toybox is > overwriting it. > Then it dawned that toybox doesn't parse baseconfig-busybox but rather > does defconfig. What about switching install order (if someone enables something in busybox, it becomes the default)? > Is there a reason why it is done this way or such issue never came > up?? > Should I just patch toybox to do chmod as default n ??? > There are points on both sides so I would like to get an opinion. > > prazzb -- Isaac Dunham 1366087836.0 From rob at landley.net Wed Apr 17 18:46:55 2013 From: rob at landley.net (Rob Landley) Date: Wed, 17 Apr 2013 13:46:55 -0500 Subject: [Aboriginal] Aboriginal Digest, Vol 27, Issue 7 In-Reply-To: <20130415215036.8f4df9c5.idunham@lavabit.com> (from idunham@lavabit.com on Mon Apr 15 23:50:36 2013) Message-ID: <1366224415.18069.114@driftwood> On 04/15/2013 11:50:36 PM, Isaac Dunham wrote: > On Mon, 15 Apr 2013 13:30:35 -0700 > aboriginal-request at lists.landley.net wrote: > > > Hello > > I am struck in package shadow as it needs chmod -f. However chmod -f > > isn't yet implemented in toybox. So I just pushed it above in > > Hmm...looks like it should be trivial to implement. In fact, it > half-works to just make it a no-op: > -USE_CHMOD(NEWTOY(chmod, "<2?vR", TOYFLAG_BIN)) > +USE_CHMOD(NEWTOY(chmod, "<2?vRf", TOYFLAG_BIN)) > > But for a full implementation, it would also take a few lines added > to verror_msg or whatever is calling it... > one way that crosses my mind is to: > -add a variable (int toyquiet; in lib.h ?) > -set it conditionally: > toyquiet = (toys.optflags & FLAG_f); > -wrap everything in verror_msg() before the last line with an > if (!toyquiet) { > .. > } if (toys.optflags & FLAG_f) { close(2); open("/dev/null", O_RDWR); } (This assumes that stdin and stdout exist, but if we're called out of spec we at least won't make things too much worse...) > > baseconfig-busybox. However, it still had the same issue. On further > > search, I found that busybox is building chmod but toybox is > > overwriting it. > > Then it dawned that toybox doesn't parse baseconfig-busybox but > rather > > does defconfig. > > What about switching install order (if someone enables something in > busybox, > it becomes the default)? I've thought of installing busybox in one directory and toybox in another and having the $PATH fall back between them, but busybox is going away. Toybox is replacing busybox. So the extra plumbing would just be transitional. build/host/busybox currently says: Currently defined functions: [, [[, ash, awk, bunzip2, bzcat, bzip2, cpio, dd, diff, egrep, expr, fgrep, find, ftpd, ftpget, ftpput, grep, gunzip, gzip, ifconfig, init, install, less, lspci, man, mount, mv, pgrep, ping, pkill, ps, route, sed, sh, split, stat, tar, test, tr, umount, unxz, vi, wget, xzcat, zcat vi and less need the same line editing code as the shell command history, otherwise reasonably straightforward. grep/egrep/fgrep are mostly just regex code wrappers, I should do that. find is simple now that dirtree is there (and there's a version checked in awaiting cleanup). init shouldn't be there, aboriginal uses oneit instead. There's a stat in pending, needs cleanup. Same for ifconfig. ps, pgrep, and pkill are actually easy, I just haven't done it yet. :) lspci is easy. install is easy. split and tr are easy. tar is a bit fiddly, but not too bad. ftpd, ftpget, ftpput, and wget are all straightforward but networking code. (Haven't done most of the networking code yet, other than netcat.) ping and route are different kind of networking code (similar to ifconfig). sed I wrote the busybox version of and have started a toybox version of. mv is on my short-term todo list, now that I've got cp and rm it's pretty much "more of the same". mount/umount I started and got interrupted, need to get back to it. bunzip2 and bzcat I have the plumbing for already implemented (just needs polishing), but the problem is busybox won't support -j unless it's built in. So they (and zcat, and xzcat) stay until I implement tar in toybox. gzip/gunzip there's nice public domain versions of (I have the links around here somewhere), and if nothing else I ported it to java 1.0 back in the 90's. xzcat/unxz has a version checked in, awaiting cleanup. (The compression side is a todo but the code's public domain and I can clean it up.) cpio and tar are fairly straightforward, on my todo list. bzip2 is kind of horrible but I have code here. (The string sorting gorp even I haven't figured out how to simplify...) I keep thinking I've already implemented dd. It's fairly straightforward, just has a lot of funky command line option parsing. For diff I want to use Bram cohen's algorithm http://en.wikipedia.org/wiki/Patience_sorting man is a design issue: not sure what it _should_ do. A trivial zcat of preformatted text is trivial, it should integrate with the "help" command somehow. (help documents shell builtins, man documents stuff installed in $PATH, for toybox both are builtin but man should also check $PATH for external commands. But _not_ the horrible troff crap.) ash and sh are a biggish deal, I've got a lot of research for that but need a couple months to do it right. expr is basically the $((blah)) shell builtin. [, [[, and test are all the same command, which I've started a local implementation of. awk is a biggish deal. So I have plans for everything on the list, I just need a lot more time. I'm actually cheating slightly answering this email in a tech talk about some new vendor technology I don't think I'll have to care about but can't conveniently leave without stepping in front of the camera recording the presentation. Rob 1366224415.0 From idunham at lavabit.com Fri Apr 19 06:36:23 2013 From: idunham at lavabit.com (idunham at lavabit.com) Date: Thu, 18 Apr 2013 23:36:23 -0700 (PDT) Subject: [Aboriginal] Busybox applets not yet implemented In-Reply-To: References: Message-ID: <14647.50.0.225.8.1366353383.squirrel@lavabit.com> Landley wrote: > I've thought of installing busybox in one directory and toybox in > another and having the $PATH fall back between them, but busybox is > going away. Toybox is replacing busybox. So the extra plumbing would > just be transitional. > > build/host/busybox currently says: > > Currently defined functions: > [, [[, ash, awk, bunzip2, bzcat, bzip2, cpio, dd, diff, egrep, > expr, > fgrep, find, ftpd, ftpget, ftpput, grep, gunzip, gzip, > ifconfig, init, > install, less, lspci, man, mount, mv, pgrep, ping, pkill, ps, > route, > sed, sh, split, stat, tar, test, tr, umount, unxz, vi, wget, > xzcat, > zcat > > vi and less need the same line editing code as the shell command > history, otherwise reasonably straightforward. > > grep/egrep/fgrep are mostly just regex code wrappers, I should do that. > mount/umount I started and got interrupted, need to get back to it. My own experiments with booting a Debian system with a custom shell init indicate that only a few things are needed to boot up a system properly: -a sh: pd/mksh is enough for now. -mount: the next most important part. -mdev: fixing /dev does demand some subdirs, and hotplug will require handling env variables (which busybox has support for); not highest priority, though. -grep, modprobe, cut: I autoload modules by grep -h MODALIAS /sys/bus/*/devices/*/uevent 2>/dev/null |cut -d = -f 2 |xargs modprobe -abq modprobe needs the following for this use case: Support aliases. May require depmod. -a: insert all modules in a list at once -b: blacklist needs to work! -q: Hot/coldplug shouldn't spit out a mile of errors. > cpio and tar are fairly straightforward, on my todo list. Of the two, tar may be more important for building, but cpio is what matters for replacing klibc-utils. > man is a design issue: not sure what it _should_ do. A trivial zcat of > preformatted text is trivial, it should integrate with the "help" > command somehow. (help documents shell builtins, man documents stuff > installed in $PATH, for toybox both are builtin but man should also > check $PATH for external commands. But _not_ the horrible troff crap.) Standard man often caches formatted troff as text, which would be a good place to start. > ash and sh are a biggish deal, I've got a lot of research for that but > need a couple months to do it right. expr is basically the $((blah)) > shell builtin. [, [[, and test are all the same command, which I've > started a local implementation of. There's plenty of shells around, so I'm not too concerned about it. Of course, this is all my own opinion, looking at it from the boot perspective. 1366353383.0 From prazzb at gmail.com Sat Apr 20 16:48:42 2013 From: prazzb at gmail.com (Prasanna Balan) Date: Sat, 20 Apr 2013 22:18:42 +0530 Subject: [Aboriginal] LFS 7.3 toybox issue In-Reply-To: <20130415195143.GA11873@desktop> References: <20130415195143.GA11873@desktop> Message-ID: <20130420164842.GA15232@desktop> On 16/04/13, Prasanna Balan wrote: > Hello > I am struck in package shadow as it needs chmod -f. However chmod -f > isn't yet implemented in toybox. So I just pushed it above in > baseconfig-busybox. However, it still had the same issue. On further > search, I found that busybox is building chmod but toybox is > overwriting it. > Then it dawned that toybox doesn't parse baseconfig-busybox but rather > does defconfig. > > Is there a reason why it is done this way or such issue never came > up?? > Should I just patch toybox to do chmod as default n ??? > There are points on both sides so I would like to get an opinion. > > prazzb update: am way ahead.about 75 % done. kbd breaks with some weird flex issue.So does bash.Since we have bash already,I pushed it to the end. Rob, could you give some extensive documentation on record-commands ?? prazzb 1366476522.0 From rob at landley.net Sun Apr 21 05:48:23 2013 From: rob at landley.net (Rob Landley) Date: Sun, 21 Apr 2013 00:48:23 -0500 Subject: [Aboriginal] LFS 7.3 toybox issue In-Reply-To: <20130420164842.GA15232@desktop> (from prazzb@gmail.com on Sat Apr 20 11:48:42 2013) Message-ID: <1366523303.18069.131@driftwood> On 04/20/2013 11:48:42 AM, Prasanna Balan wrote: > On 16/04/13, Prasanna Balan wrote: > > Hello > > I am struck in package shadow as it needs chmod -f. However chmod -f > > isn't yet implemented in toybox. So I just pushed it above in > > baseconfig-busybox. However, it still had the same issue. On further > > search, I found that busybox is building chmod but toybox is > > overwriting it. > > Then it dawned that toybox doesn't parse baseconfig-busybox but > rather > > does defconfig. > > > > Is there a reason why it is done this way or such issue never came > > up?? > > Should I just patch toybox to do chmod as default n ??? > > There are points on both sides so I would like to get an opinion. > > > > prazzb > > update: am way ahead.about 75 % done. kbd breaks with some weird flex > issue.So does bash.Since we have bash already,I pushed it to the end. > > Rob, could you give some extensive documentation on record-commands ?? I wrote some up at http://landley.net/aboriginal/FAQ.html#debug_logging (scroll down a bit to "Use the command logging wrapper"). Natively on target, there's an /sbin/record-commands script you can look at. Just go: record-commands your-command-line And when it's done look at /tmp/record-commands-log.txt to see everything that got called, in order, with all their arguments. The central trick in more/report-recorded-commands.sh is just: awk '{print $1}' logfile | sort -u That gives you a list of the commands used in this log. Rob 1366523303.0