kernelnewbies.kernelnewbies.org archive mirror
 help / color / mirror / Atom feed
From: pcuser.mails@gmail.com (pcuser p)
To: kernelnewbies@lists.kernelnewbies.org
Subject: rootfile system porting for FPGA [/bin/sh: can't access tty; job control turned off]
Date: Tue, 8 May 2012 18:13:10 +0530	[thread overview]
Message-ID: <CAFxuAackYQcZ62Zr_WaSt0d1mThcMmLT2Q7QyJ4-bgAkCOOcTg@mail.gmail.com> (raw)
In-Reply-To: <20120507140114.GA4817@adam-laptop>

Thanks all for ur replies.
I gave a try to create a new rootfile system (ext2) by following the
procedure in free-electrons.com and examples in the busybox folder.
Surprisingly, it got built properly and run upto the same point and doesn't
accept any commands i'm typing.
I haven't added serial related stuff (gettty) in the inittab/rcS file as I
am still not much clear about it.


*My board setup is :*
I am using JTAG debugger to load the kernel and root file system (DRAM
controller initilization is done through JTAG) & then kernel and rootfs are
loaded.
I am getting the "printk" messages in terminal program (tera-term running
in PC)

Since,I am not using bootloader ,I enable console prints in the call to
cosole_init in start_kernel (by adding the flags CONSOLE_PRINTBUFFER |
CON_ENABLED in the struct console)
Once call to console_init happens,I am starting to get print messages.

*My query is:*
At later point after file system mounted, is this same console used for
login? (i'm having only one UART port in my board -> ttySAC0)
Am I getting this err (/bin/sh: can't access tty; job control turned off)
because console is locked already for printk's?
*What changes are needed in the inittab & /etc/init.d/rcS file to get the
working shell prompt* *for this scenario*?

*below are the console messages:*
RAMDISK: ext2 filesystem found at block 0
RAMDISK: Loading 3072KiB [1 disk] into ram disk... \
done.
VFS: Mounted root (ext2 filesystem) readonly on device 1:0.
Freeing init memory: 80K
*/bin/sh: can't access tty; job control turned off*
/ #


* /etc/inittab file contents*
# This is run first script
::sysinit:/etc/init.d/rcS
# Start an "askfirst" shell on the console
::askfirst:?/bin/sh
# Stuff to do when restarting the init process
::restart:/sbin/init
# Stuff to do before rebooting
::ctrlaltdel:/sbin/reboot
::shutdown:/bin/umount ?a ?r

*/etc/init.d/rcS file contents *
#!/bin/sh
mount ?t proc none /proc
mount ?t sysfs none /sys
exec /sbin/sh
/bin/sh


plz suggest me the changes required to get working shell prompt..

Thanks,





On Mon, May 7, 2012 at 7:31 PM, Adam Lee <adam8157@gmail.com> wrote:

> On Mon, May 07, 2012 at 06:21:05PM +0530, pcuser p wrote:
> > I am ending up in the shell prompt with the message as below:
> > "entered linuxrc script"
> > "/bin/sh: can't access tty; job control turned off
> > / $"
> >
> > my kernel commad line is
> > "mem=32M console=ttySAC0,115200 root=/dev/ram0 init=/linuxrc initrd=
> > 0x80800000,8M user_debug=31"
>
> In my kernel command line(with busybox), init=/sbin/init, I drop
> commands into /etc/profile.
>
> > Below are my /linuxrc and /etc/inittab file contents
> > linuxrc:
> >
> > #!/bin/sh
> > /bin/echo "entered linuxrc script"
> > /bin/sh
> > exec /sbin/init
>
> Don't run sh before init, this makes the warning.
>
> > /etc/inittab:
> >
> > # Run gettys in standard runlevels
> > 3:2345:respawn:/sbin/getty 115200 ttySAC0
> >
>
> runlevels makes no sense here, but it should be OK.
>
>
> And, I use busybox to build the rootfs for kernel debugging:
> https://github.com/adam8157/kernel-studio
> the rootfs making script is at here right now:
> https://github.com/adam8157/kernel-studio/blob/master/mkrootfs
> Might helps.
>
> --
> Regards,
> Adam Lee
> --------------------------------
> E-mail: adam8157 at gmail.com
> Website: http://adam8157.info
> --------------------------------
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20120508/7d92a615/attachment.html 

  reply	other threads:[~2012-05-08 12:43 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-07 12:51 rootfile system porting for FPGA [/bin/sh: can't access tty; job control turned off] pcuser p
2012-05-07 13:42 ` Anirban Roy
2012-05-07 13:42 ` Mandeep Sandhu
2012-05-07 14:01 ` Adam Lee
2012-05-08 12:43   ` pcuser p [this message]
2012-05-08 13:03     ` Adam Lee

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CAFxuAackYQcZ62Zr_WaSt0d1mThcMmLT2Q7QyJ4-bgAkCOOcTg@mail.gmail.com \
    --to=pcuser.mails@gmail.com \
    --cc=kernelnewbies@lists.kernelnewbies.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).