rootfile system porting for FPGA [/bin/sh: can't access tty; job control turned off]

pcuser p pcuser.mails at gmail.com
Tue May 8 08:43:10 EDT 2012


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 at 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 


More information about the Kernelnewbies mailing list