* init.asm - 0.03 (19-Jun-2002) - asmutils 0.18
@ 2008-04-29 15:36 Bodo Giannone
2008-05-01 9:32 ` Frank Kotler
0 siblings, 1 reply; 7+ messages in thread
From: Bodo Giannone @ 2008-04-29 15:36 UTC (permalink / raw)
To: linux-assembly
Hello,
I am the maintainer of BG-Tiny Linux Bootdisk.
The tiny init version included in asmutils-0.18 (init.asm 0.03,
19-Jun-2002) is exactly what I was looking for to integrate into BG-Tiny
Linux Bootdisk. Unfortunately I am havging some problems I cannot
resolve myself due to lacking assembler skills.
I want to start /bin/sh on tty1-4 without using getty or login.
Unfortunately directly after booting I get the following error message:
"can't access tty, job control turned off". This could mean that init
does not activate the ttys completely. Is there a possibility to change
that?
The sh I am using is ash from BusyBox 1.3.2. If I try to use sh.asm from
asmutils-0.18 I only get a segfault.
I am using linux kernel 2.4.36.2 and uClibc 0.9.27 (linked statically).
It would be great if someone had a suggestion.
Many thanks in andvance.
Greetings,
Bodo Giannone
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: init.asm - 0.03 (19-Jun-2002) - asmutils 0.18
2008-04-29 15:36 init.asm - 0.03 (19-Jun-2002) - asmutils 0.18 Bodo Giannone
@ 2008-05-01 9:32 ` Frank Kotler
2008-05-02 12:12 ` Faré
2008-05-02 15:46 ` Bodo Giannone
0 siblings, 2 replies; 7+ messages in thread
From: Frank Kotler @ 2008-05-01 9:32 UTC (permalink / raw)
To: Bodo Giannone; +Cc: linux-assembly
Bodo Giannone wrote:
> Hello,
>
> I am the maintainer of BG-Tiny Linux Bootdisk.
Thank you. I downloaded it and tried it. Sure is tiny! Seemed to work
fine. (unlike "a-linux" which hung on me the last time I tried it, IIRC)
> The tiny init version included in asmutils-0.18 (init.asm 0.03,
> 19-Jun-2002) is exactly what I was looking for to integrate into BG-Tiny
> Linux Bootdisk. Unfortunately I am havging some problems I cannot
> resolve myself due to lacking assembler skills.
>
> I want to start /bin/sh on tty1-4 without using getty or login.
> Unfortunately directly after booting I get the following error message:
> "can't access tty, job control turned off". This could mean that init
> does not activate the ttys completely. Is there a possibility to change
> that?
Always a "possibility"! I'm gradually acquiring a few assembly skills...
but I'm not sure what "init" is supposed to do. Quite a difference
between the asmutils "init" and /sbin/init on my system!!! The "init"
you're using comes from Busybox, right?
> The sh I am using is ash from BusyBox 1.3.2. If I try to use sh.asm from
> asmutils-0.18 I only get a segfault.
Hmmm. It seems to work okay for me - that's launching it from my "usual"
shell or from the shell from Busybox (I guess) that I get after booting
your disk... and mounting the partition with asmutils on it - not "from
scratch". How would I see this segfault?
> I am using linux kernel 2.4.36.2 and uClibc 0.9.27 (linked statically).
>
> It would be great if someone had a suggestion.
I'd be willing to attempt to modify the asmutils "init", if I knew what
it needed to do differently. Anyone know where I can find a "newbie's
quickstart guide to init"? Maybe I should look at the Busybox code...
That's not much of a "suggestion". I just wanted to give ya some
encouragement. It "should" be a "possibility" to fix any problems you're
having with asmutils.
Best,
Frank
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: init.asm - 0.03 (19-Jun-2002) - asmutils 0.18
2008-05-01 9:32 ` Frank Kotler
@ 2008-05-02 12:12 ` Faré
2008-05-02 15:46 ` Bodo Giannone
1 sibling, 0 replies; 7+ messages in thread
From: Faré @ 2008-05-02 12:12 UTC (permalink / raw)
To: Frank Kotler; +Cc: Bodo Giannone, linux-assembly
When running your shell on a tty, you may be missing such fun syscalls
as setsid, setpgid, tcsetpgrp, etc., that may be necessary for the
process to feel like it's in control of its destiny and its terminal.
Double check what the C version of init does before you do the same.
[ François-René ÐVB Rideau | Reflection&Cybernethics | http://fare.tunes.org ]
A programming language is low level
when its programs require attention to the irrelevant.
-- Alan Perlis
2008/5/1 Frank Kotler <fbkotler@verizon.net>:
> Bodo Giannone wrote:
>
> > Hello,
> >
> > I am the maintainer of BG-Tiny Linux Bootdisk.
> >
>
> Thank you. I downloaded it and tried it. Sure is tiny! Seemed to work fine.
> (unlike "a-linux" which hung on me the last time I tried it, IIRC)
>
>
>
> > The tiny init version included in asmutils-0.18 (init.asm 0.03,
> > 19-Jun-2002) is exactly what I was looking for to integrate into BG-Tiny
> > Linux Bootdisk. Unfortunately I am havging some problems I cannot
> > resolve myself due to lacking assembler skills.
> >
> > I want to start /bin/sh on tty1-4 without using getty or login.
> > Unfortunately directly after booting I get the following error message:
> > "can't access tty, job control turned off". This could mean that init
> > does not activate the ttys completely. Is there a possibility to change
> > that?
> >
>
> Always a "possibility"! I'm gradually acquiring a few assembly skills...
> but I'm not sure what "init" is supposed to do. Quite a difference between
> the asmutils "init" and /sbin/init on my system!!! The "init" you're using
> comes from Busybox, right?
>
>
>
> > The sh I am using is ash from BusyBox 1.3.2. If I try to use sh.asm from
> > asmutils-0.18 I only get a segfault.
> >
>
> Hmmm. It seems to work okay for me - that's launching it from my "usual"
> shell or from the shell from Busybox (I guess) that I get after booting your
> disk... and mounting the partition with asmutils on it - not "from scratch".
> How would I see this segfault?
>
>
>
> > I am using linux kernel 2.4.36.2 and uClibc 0.9.27 (linked statically).
> >
> > It would be great if someone had a suggestion.
> >
>
> I'd be willing to attempt to modify the asmutils "init", if I knew what it
> needed to do differently. Anyone know where I can find a "newbie's
> quickstart guide to init"? Maybe I should look at the Busybox code...
>
> That's not much of a "suggestion". I just wanted to give ya some
> encouragement. It "should" be a "possibility" to fix any problems you're
> having with asmutils.
>
> Best,
> Frank
>
>
>
> --
> To unsubscribe from this list: send the line "unsubscribe linux-assembly"
> in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-assembly" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: init.asm - 0.03 (19-Jun-2002) - asmutils 0.18
2008-05-01 9:32 ` Frank Kotler
2008-05-02 12:12 ` Faré
@ 2008-05-02 15:46 ` Bodo Giannone
2008-05-02 20:19 ` Frank Kotler
1 sibling, 1 reply; 7+ messages in thread
From: Bodo Giannone @ 2008-05-02 15:46 UTC (permalink / raw)
To: Frank Kotler; +Cc: linux-assembly
Hello Frank and all others,
>> I am the maintainer of BG-Tiny Linux Bootdisk.
>
> Thank you. I downloaded it and tried it. Sure is tiny! Seemed to work
> fine. (unlike "a-linux" which hung on me the last time I tried it, IIRC)
>
>> The tiny init version included in asmutils-0.18 (init.asm 0.03,
>> 19-Jun-2002) is exactly what I was looking for to integrate into BG-Tiny
>> Linux Bootdisk. Unfortunately I am havging some problems I cannot
>> resolve myself due to lacking assembler skills.
>>
>> I want to start /bin/sh on tty1-4 without using getty or login.
>> Unfortunately directly after booting I get the following error message:
>> "can't access tty, job control turned off". This could mean that init
>> does not activate the ttys completely. Is there a possibility to change
>> that?
>
> Always a "possibility"! I'm gradually acquiring a few assembly skills...
> but I'm not sure what "init" is supposed to do. Quite a difference
> between the asmutils "init" and /sbin/init on my system!!!
You are right. Normally init is supposed to execute some initscripts at
bootup time and then to start getty on several virtual terminals. At
shutdown time it should start/stop again some initscripts and then shut
down the system. However most of this is not really required for a small
rescue system like BG-Tiny Linux Bootdisk.
The init from asmutils at bootup first starts an init script and then
executes /sbin/sh (or whatever is hardcoded) on /dev/tty1-4. It is
something like a simple but effective combination of init/getty/login.
> The "init" you're using comes from Busybox, right?
Yes, the init used until now comes from Busybox. But due to ram- and
diskspace reasons I would like to change it to the one from asmutils.
>> The sh I am using is ash from BusyBox 1.3.2. If I try to use sh.asm from
>> asmutils-0.18 I only get a segfault.
>
> Hmmm. It seems to work okay for me - that's launching it from my "usual"
> shell or from the shell from Busybox (I guess) that I get after booting
> your disk... and mounting the partition with asmutils on it - not "from
> scratch". How would I see this segfault?
sh from asmutils taken by itself works fine. It segfaults only in
combination with init from asmutils. At least it does so on my system.
If I use another type of sh, for example ash from busybox I get the
following error and no segfault: "can't access tty, job control turned off".
I think the cause could be the same. It could probably mean that init
does not activate the ttys completely.
>> I am using linux kernel 2.4.36.2 and uClibc 0.9.27 (linked statically).
>>
>> It would be great if someone had a suggestion.
>
> I'd be willing to attempt to modify the asmutils "init", if I knew what
> it needed to do differently. Anyone know where I can find a "newbie's
> quickstart guide to init"? Maybe I should look at the Busybox code...
>
> That's not much of a "suggestion". I just wanted to give ya some
> encouragement. It "should" be a "possibility" to fix any problems you're
> having with asmutils.
Thank You very much. I am looking forward to Your answer. Have a nice
weekend.
Greetings,
Bodo Giannone
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: init.asm - 0.03 (19-Jun-2002) - asmutils 0.18
2008-05-02 15:46 ` Bodo Giannone
@ 2008-05-02 20:19 ` Frank Kotler
2008-05-30 20:34 ` Karsten Scheibler
0 siblings, 1 reply; 7+ messages in thread
From: Frank Kotler @ 2008-05-02 20:19 UTC (permalink / raw)
To: Bodo Giannone; +Cc: linux-assembly
Bodo Giannone wrote:
...
> If I use another type of sh, for example ash from busybox I get the
> following error and no segfault: "can't access tty, job control turned off".
From the Busybox FAQ:
--------------------
Why do I keep getting "sh: can't access tty; job control turned off"
errors? Why doesn't Control-C work within my shell?
Job control will be turned off since your shell can not obtain a
controlling
terminal. This typically happens when you run your shell on
/dev/console.
The kernel will not provide a controlling terminal on the /dev/console
device. Your should run your shell on a normal tty such as tty1 or
ttyS0
and everything will work perfectly. If you <em>REALLY</em> want
your shell
to run on /dev/console, then you can hack your kernel (if you are
into that
sortof thing) by changing drivers/char/tty_io.c to change the lines
where
it sets "noctty = 1;" to instead set it to "0". I recommend you
instead
run your shell on a real console...
-------------------
That's what it says...
> I think the cause could be the same. It could probably mean that init
> does not activate the ttys completely.
Agreed. I took a quick look at tty_io.c to see what noctty=1/0 does for
us - that may be what init needs to do(?). No enlightenment yet (I'm not
a good C programmer and not "oriented" in the kernel... don't expect too
much).
The asmutils init does this:
sys_ioctl [tty_fd], TCGETS, tty_termios
sys_ioctl [tty_fd], TCSETSW, tty_termios
As a wild-asmed guess, I'm guessing we may want to tweak some flags in
between. I need to study it some more, but that's the current theory...
I don't know if I know enough to help you with this, Bodo, but it's an
"interesting puzzle".
Best,
Frank
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: init.asm - 0.03 (19-Jun-2002) - asmutils 0.18
2008-05-02 20:19 ` Frank Kotler
@ 2008-05-30 20:34 ` Karsten Scheibler
0 siblings, 0 replies; 7+ messages in thread
From: Karsten Scheibler @ 2008-05-30 20:34 UTC (permalink / raw)
To: linux-assembly
Hello,
>> If I use another type of sh, for example ash from busybox I get the
>> following error and no segfault: "can't access tty, job control turned
>> off".
>
> From the Busybox FAQ:
>
> --------------------
> Why do I keep getting "sh: can't access tty; job control turned off"
> errors? Why doesn't Control-C work within my shell?
>
> Job control will be turned off since your shell can not obtain a
> controlling
> terminal. This typically happens when you run your shell on
> /dev/console.
> The kernel will not provide a controlling terminal on the /dev/console
> device. Your should run your shell on a normal tty such as tty1 or
> ttyS0
> and everything will work perfectly. If you <em>REALLY</em> want your
> shell
> to run on /dev/console, then you can hack your kernel (if you are into
> that
> sortof thing) by changing drivers/char/tty_io.c to change the lines
> where
> it sets "noctty = 1;" to instead set it to "0". I recommend you
> instead
> run your shell on a real console...
> -------------------
Bodo haven't you got my mail from april ?
i've sent you a test program in C to determine if the controlling tty
stuff would fix the problem ... haven't got an answer so far from you
karsten
^ permalink raw reply [flat|nested] 7+ messages in thread
* init.asm - 0.03 (19-Jun-2002) - asmutils 0.18
@ 2008-04-29 16:08 Bodo Giannone
0 siblings, 0 replies; 7+ messages in thread
From: Bodo Giannone @ 2008-04-29 16:08 UTC (permalink / raw)
To: linux-assembly
Hello,
I am the maintainer of BG-Tiny Linux Bootdisk.
The tiny init version included in asmutils-0.18 (init.asm 0.03,
19-Jun-2002) is exactly what I was looking for to integrate into BG-Tiny
Linux Bootdisk. Unfortunately I am havging some problems I cannot
resolve myself due to lacking assembler skills.
I want to start /bin/sh on tty1-4 without using getty or login.
Unfortunately directly after booting I get the following error message:
"can't access tty, job control turned off". This could mean that init
does not activate the ttys completely. Is there a possibility to change
that?
The sh I am using is ash from BusyBox 1.3.2. If I try to use sh.asm from
asmutils-0.18 I only get a segfault.
I am using linux kernel 2.4.36.2 and uClibc 0.9.27 (linked statically).
It would be great if someone had a suggestion.
Many thanks in andvance.
Greetings,
Bodo Giannone
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2008-05-30 20:34 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-04-29 15:36 init.asm - 0.03 (19-Jun-2002) - asmutils 0.18 Bodo Giannone
2008-05-01 9:32 ` Frank Kotler
2008-05-02 12:12 ` Faré
2008-05-02 15:46 ` Bodo Giannone
2008-05-02 20:19 ` Frank Kotler
2008-05-30 20:34 ` Karsten Scheibler
-- strict thread matches above, loose matches on Subject: below --
2008-04-29 16:08 Bodo Giannone
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).