Author Topic: ok so I disassembled boot5...  (Read 21749 times)

0 Members and 2 Guests are viewing this topic.

Offline judb

  • Administrator
  • Veteran.
  • *****
  • Posts: 1329
  • ph4t l3wtz
Re: ok so I disassembled boot5...
« Reply #20 on: May 30, 2005, 07:38:12 pm »
There are some jumpers that (may) cause alternate boot code to be run on the phatbox but i havent tried them... have you thought about that at all?

Offline para

  • Senior Member
  • Veteran.
  • *****
  • Posts: 181
Re: ok so I disassembled boot5...
« Reply #21 on: May 30, 2005, 08:36:19 pm »
That'd be too easy I think 8)

By the way, thanks for keeping up that work! I'd love to join but you know that I'm focussing on other things right now...

Para

Offline bushing

  • Senior Member
  • Needs to get outside.
  • *****
  • Posts: 119
  • props to my peeps
Re: ok so I disassembled boot5...
« Reply #22 on: May 30, 2005, 09:20:37 pm »
Quote
# /bin/sh invocations on selected ttys
#
# Note below that we prefix the shell commands with a "-" to indicate to the
# shell that it is supposed to be a login shell.  Normally this is handled by
# login, but since we are bypassing login in this case, BusyBox lets you do
# this yourself...
#
# Start an "askfirst" shell on the console (whatever that may be)
#::askfirst:-/bin/sh
# Start an "askfirst" shell on /dev/tty2-4
#tty2::askfirst:-/bin/sh
#tty3::askfirst:-/bin/sh
#tty4::askfirst:-/bin/sh

since no TTY is listed its going to go to the /dev/console device with is redirected to ttys0 in the ramdisk dev directory.

I swear there was some place in one of the startup files that i looked in (i think it was /etc/profile) that checks for /dos/bash in order to really give you a shell.. I think that will keep us from having true shell access until we get a bash exe in place.


The "respawn" directive tells it to start a shell, and if that shell ever dies (ie you log out), restart it.

"Askfirst" makes it display a message "Press enter to activate a shell on this display", but otherwise acts identically.

So, the line ::respawn:-/bin/sh   SHOULD cause a shell to opened on /dev/console, with the  initial dash directing it to execute /etc/profile, which says:

Code: [Select]

export LD_LIBRARY_PATH=/dos/lib
export PATH=$PATH:/dos/bin:/dos/sbin:/dos
export TERMINFO=/dos/share/terminfo
export TERM=vt100
if [ -e /dos/bin/bash ] && [ -e /dos/conf/profile ]; then
 exec /dos/bin/bash -rcfile /dos/conf/profile
fi


So, placing a bash executable in /dos/bin/bash should cause that to happen.  I'm compiling one right now.

Ben

Offline ralph.deratt

  • A few posts under my belt.
  • *
  • Posts: 22
Re: ok so I disassembled boot5...
« Reply #23 on: May 31, 2005, 12:01:10 am »
Quote
There are some jumpers that (may) cause alternate boot code to be run on the phatbox but i havent tried them... have you thought about that at all?


JP2 when the jumper is installed, causes the ARM to boot from internal rom and go into serial port download mode.  the internal rom code is described in Apendix A of the user manual.

IIRC S2,3,4 go to gpios on the 8052.

I haven't tracked down what JP1 does yet...

RdeR

Offline ralph.deratt

  • A few posts under my belt.
  • *
  • Posts: 22
Re: ok so I disassembled boot5...
« Reply #24 on: May 31, 2005, 12:27:53 am »
Quote
# /bin/sh invocations on selected ttys
#
# Note below that we prefix the shell commands with a "-" to indicate to the
# shell that it is supposed to be a login shell.  Normally this is handled by
# login, but since we are bypassing login in this case, BusyBox lets you do
# this yourself...
#
# Start an "askfirst" shell on the console (whatever that may be)
#::askfirst:-/bin/sh
# Start an "askfirst" shell on /dev/tty2-4
#tty2::askfirst:-/bin/sh
#tty3::askfirst:-/bin/sh
#tty4::askfirst:-/bin/sh

since no TTY is listed its going to go to the /dev/console device with is redirected to ttys0 in the ramdisk dev directory.

I swear there was some place in one of the startup files that i looked in (i think it was /etc/profile) that checks for /dos/bash in order to really give you a shell.. I think that will keep us from having true shell access until we get a bash exe in place.


Yup, its in /etc/profile.  here's what it says:
export LD_LIBRARY_PATH=/dos/lib
export PATH=$PATH:/dos/bin:/dos/sbin:/dos
export TERMINFO=/dos/share/terminfo
export TERM=vt100
if [ -e /dos/bin/bash ] && [ -e /dos/conf/profile ]; then
 exec /dos/bin/bash -rcfile /dos/conf/profile
fi

so I copied busy boxfrom the ramdisk to /dos/bin as "bash" and I created a empty profile in /dos/conf/.

I still get nothing on the serial port.

My guess is that bash needs to be signed like all the other executables.   :-[

The other thought I had was will the kernal write to a log file?  I tried creating /dos/log and /dos/var/log.  

RdeR
« Last Edit: May 31, 2005, 12:28:13 am by ralph.deratt »

Offline judb

  • Administrator
  • Veteran.
  • *****
  • Posts: 1329
  • ph4t l3wtz
Re: ok so I disassembled boot5...
« Reply #25 on: May 31, 2005, 04:00:39 am »
Quote


My guess is that bash needs to be signed like all the other executables.   :-[

The other thought I had was will the kernal write to a log file?  I tried creating /dos/log and /dos/var/log.  

RdeR


Yep, I posted that exact same thought in a previous thread.  I can't be 100% sure until we try a properly compiled bash executable.  The problem with copying busybox as bash from what I can tell is it might not run the shell correctly since its fat and busy box expects to be called from a symlink and its possible that the switches on the profile options might cause it to fail as well.

all in all its good info to know but I am not sure how much luck we will have with it.

Offline bushing

  • Senior Member
  • Needs to get outside.
  • *****
  • Posts: 119
  • props to my peeps
Re: ok so I disassembled boot5...
« Reply #26 on: June 01, 2005, 01:28:52 am »
Quote

Yep, I posted that exact same thought in a previous thread.  I can't be 100% sure until we try a properly compiled bash executable.  The problem with copying busybox as bash from what I can tell is it might not run the shell correctly since its fat and busy box expects to be called from a symlink and its possible that the switches on the profile options might cause it to fail as well.

all in all its good info to know but I am not sure how much luck we will have with it.


For what it's worth, I tried using this file http://debian.mines.inpl-nancy.fr/debian/pool/main/b/bash/bash-static_3.0-15_arm.deb, and, well, it didn't do much.  :-/