maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   OS2008 / Maemo 4 / Chinook - Diablo (https://talk.maemo.org/forumdisplay.php?f=29)
-   -   GNU commands incompatibility? (https://talk.maemo.org/showthread.php?t=28531)

luis 2009-04-24 15:26

GNU commands incompatibility?
 
Hi,

I am having many problems with compatibility among maemo shell commands and modern GNU commands. Any help will be appreciated:

1) As an example, xargs does not accept the option -0 (the only reason why I use xargs), or egrep does not accept the option -U. I suppose that this is to make the programs smaller/lighter, but it makes bash scripts hard to port. How do you solve this?

2) I installed bash 3.2 from extras, and I use history expansion a lot. I am used to expand using some leters of the command name, like: 'mo<UP>' to show previous commands that begin with 'mo'. But maemo bash ignores the 'mo', and shows the very last command. What I am missing?

3) When using history expansion with the <UP> arrow, sometimes there are some 'trash' of previous commands that makes hard to edit them. Like:

Nokia:~> firefox httmediaplayer-ui

instead of

Nokia:~> mediaplayer-ui

Maybe this has to do with the PS1 variable I use? Or terminfo?

4) I installed mc, but it shows lots of trash in my xterm. Perhaps the TERM=xterm variable is incorrect?

And, BTW, where can I find maemo xargs man page?

Thanks,

L.

jethro.itt 2009-04-24 17:10

Re: GNU commands incompatibility?
 
Quote:

Originally Posted by luis (Post 281818)
And, BTW, where can I find maemo xargs man page?
.

Maemo uses Busybox for many of the shell commands. That's why there are missing features compared to the full GNU tools. It is to save space (a lot of it, actually) just as you thought. You can view documentation about Busybox commands on its website, but bear in mind that Maemo Diablo uses Busybox v1.6.1 (released May 2008).

I don't know about mc compatibility with Maemo xterm. I've never tried it.

luis 2009-04-24 17:48

Re: GNU commands incompatibility?
 
Quote:

Originally Posted by jethro.itt (Post 281832)
Maemo uses Busybox for many of the shell commands. That's why there are missing features compared to the full GNU tools. It is to save space (a lot of it, actually) just as you thought. You can view documentation about Busybox commands on its website, but bear in mind that Maemo Diablo uses Busybox v1.6.1 (released May 2008).

I see. Acutally, that BusyBox 'spam' message that appears many times in the console is quite annoying...

Thanks,
L.

free 2009-04-24 18:22

Re: GNU commands incompatibility?
 
Quote:

Originally Posted by luis (Post 281818)
Hi,

2) I installed bash 3.2 from extras, and I use history expansion a lot. I am used to expand using some leters of the command name, like: 'mo<UP>' to show previous commands that begin with 'mo'. But maemo bash ignores the 'mo', and shows the very last command. What I am missing?

An .inputrc is what you need. But when you have played some time with ctrl-r, you'll never need this anymore.

PHP Code:

# search in the history (up & down)
"\e[A"history-search-backward
"\e[B"history-search-forward 

You often see busybox on linux embedded system with limited resources

luis 2009-04-24 21:43

Re: GNU commands incompatibility?
 
Quote:

Originally Posted by free (Post 281844)
An .inputrc is what you need.

Of course! I forgot about it. Mine is quite complete, in fact, but I made it several years ago.

Quote:

But when you have played some time with ctrl-r, you'll never need this anymore.
ctrl-r is indeed more flexible since you can search by the middle, but I always search by the first letters... and <Up> is 1 key press less... :o)

Quote:

PHP Code:

# search in the history (up & down)
"\e[A"history-search-backward
"\e[B"history-search-forward 


In my case, it is \eOA and \eBA (not sure why).

Thanks!
L.

GeneralAntilles 2009-04-24 22:46

Re: GNU commands incompatibility?
 
Quote:

Originally Posted by jethro.itt (Post 281832)
Maemo uses Busybox for many of the shell commands. That's why there are missing features compared to the full GNU tools. It is to save space (a lot of it, actually) just as you thought. You can view documentation about Busybox commands on its website, but bear in mind that Maemo Diablo uses Busybox v1.6.1 (released May 2008).

Not only is it a space issue (storage and RAM), it's a performance issue. Substituting bash/GNUtils for BusyBox will more than double the boot time.

Man pages are on the website.

Andre Klapper 2009-04-27 10:28

Re: GNU commands incompatibility?
 
There will be some compatibility improvements for Fremantle.
Just query for Busybox bugs (also in RESOLVED/VERIFIED/CLOSED state) in https://bugs.maemo.org .

luis 2009-04-27 15:21

Re: GNU commands incompatibility?
 
Quote:

Originally Posted by GeneralAntilles (Post 281885)
Not only is it a space issue (storage and RAM), it's a performance issue. Substituting bash/GNUtils for BusyBox will more than double the boot time.

I would be glad to pay that price for fully compatible GNU utils, but that is just me.

Quote:

Man pages are on the website.
I know that page, but it has only a few commands. xargs and mediaplayer in particular are not there.

Thanks,
L.

free 2009-04-28 17:26

Re: GNU commands incompatibility?
 
Glad to see about the improvements!
I've had once the problem when packaging rkhunter where cat was missing the -v option
Quote:

-v, --show-nonprinting
use ^ and M- notation, except for LFD and TAB
I had never seen this before actually.

free 2009-04-28 17:32

Re: GNU commands incompatibility?
 
I'm sure a lot of people also will want manpages directly accessible on the device...

I don't think it's only the boot time that is impacted (who cares anyway). Some embedded systems I've worked on were never rebooted but still busybox was the only way with limited resources.


All times are GMT. The time now is 02:39.

vBulletin® Version 3.8.8