hush on NONMMU for active shell
Martinb_ARM_NOMMU_KISSDVD
martinb at zeelandnet.nl
Sat Jun 2 12:36:30 PDT 2007
Because lash is the only shell what works for me (telnet shell) and hush is now almost as small as lash im trying to get hush working for telnet shell
but like all other versions its not working (for me)
Its a bit hard to debug because if i use hush i cant telnet anymore
so i did make a firmware on my environment with the old lash as shell and from that shell i did run strace on the 1.6.0 hush
i did made all possible compilations (with/without the options) but i always get a blinking cursur and that is
strace gives me:
execve("./hush", ["./hush"], [/* 4 vars */]) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, 0, 0) = 0x1ce3000
old_mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, 0, 0) = 0x1cd7000
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, 0, 0) = 0x1ce6000
getcwd("/hdd/shell", 4097) = 11
read(0, <unfinished ...>
i can do a {controll C} to get back to prompt
(that will give me the last line of strace)
if i enable the "ineractive mode" it looks almost ok but please read on
strace gives me
/hdd/shell # /hdd/stage2/adv/strace -F ./hush
execve("./hush", ["./hush"], [/* 4 vars */]) = 0
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, 0, 0) = 0x1cac000
old_mmap(NULL, 8192, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, 0, 0) = 0x1cad000
old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_SHARED|MAP_ANONYMOUS, 0, 0) = 0x1caf000
getcwd("/hdd/shell", 4097) = 11
ioctl(0, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(1, TCGETS, {B38400 opost isig icanon echo ...}) = 0
ioctl(0, TIOCGPGRP, [143]) = 0
fcntl64(0, F_DUPFD, 255) = 255
getpgrp() = 143
fcntl64(255, F_SETFD, FD_CLOEXEC) = 0
ioctl(255, TIOCGPGRP, [143]) = 0
rt_sigaction(SIGTSTP, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTTIN, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTTOU, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGINT, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGQUIT, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTERM, {SIG_IGN}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGILL, {0x176f8f0, [ILL], SA_RESTART|0x4000000}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGTRAP, {0x176f8f0, [TRAP], SA_RESTART|0x4000000}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGABRT, {0x176f8f0, [ABRT], SA_RESTART|0x4000000}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGFPE, {0x176f8f0, [FPE], SA_RESTART|0x4000000}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGBUS, {0x176f8f0, [BUS], SA_RESTART|0x4000000}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGSEGV, {0x176f8f0, [SEGV], SA_RESTART|0x4000000}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGHUP, {0x176f8f0, [HUP], SA_RESTART|0x4000000}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGPIPE, {0x176f8f0, [PIPE], SA_RESTART|0x4000000}, {SIG_DFL}, 8) = 0
rt_sigaction(SIGALRM, {0x176f8f0, [ALRM], SA_RESTART|0x4000000}, {SIG_DFL}, 8) = 0
setpgid(0, 0) = 0
getpid() = 144
ioctl(255, TIOCSPGRP, [144]) = 0
write(1, "\n\n", 2
) = 2
write(1, "BusyBox v1.6.0 (2007-06-02 21:04"..., 72BusyBox v1.6.0 (2007-06-02 21:04:45 CEST) hush - the humble shell v0.02
) = 72
write(1, "Enter \'help\' for a list of built"..., 46Enter 'help' for a list of built-in commands.
) = 46
write(1, "\n", 1
) = 1
geteuid() = 0
write(1, "/hdd/shell # ", 13/hdd/shell # ) = 13
read(0, 0x1775d30, 4096) = ? ERESTARTSYS (To be restarted)
--- SIGINT (Interrupt) @ 0 (0) ---
read(0,
but i cant execute any command
(it will just give me a next line)
i just paste some telnet output to make it clear
/paste
BusyBox v1.6.0 (2007-06-02 21:04:45 CEST) hush - the humble shell v0.02
Enter 'help' for a list of built-in commands.
/ # ls
/ # ps
/ # dontexist
/ # pwd
/
/ # cd ^H^H^H^H^H^H
: No such file or directory
/ # cd hdd
/hdd # ls
/hdd # help
/hdd #
/endpaste
if i do a tab (when i did enable tab_completion) then the shell will exit or my device will crash and i need to reboot
if i do a backspace i get " ¥Ø̯¦ð¾ƒÕJL☺๦¯Qƒan¸x ¥Ø̯¦ð¾ƒÕJL☺๦¯Qƒan¸x"
(so if i do a 2e backspace i get the same stuff, its NOT random)
if i use hush only for a script then hush is working ok
am i making some error on this or can this be some kind of bug in relation to the fact i have a non mmu system
if someone is interested in solving this isue then im willing to provide all feedback/test possible from my side to help
p.s. lash is not working at all on my system and since lash is going to be replaced i think its better to concentrate on hush
More information about the busybox
mailing list