Hi,<br>I am doing  linux kernel porting for FPGA board.<br>I am facing issue in getting the shell prompt at the end of kernel booting.<br>Shell prompt is not taking any commands I’m typing. <br><br>I can place break point in Tx &amp; Rx ISR with Jtag debugger.ISR functions seems working till shell is entered (echo message in the /etc/inittab script &amp; mounting /proc,/devtmpfs and ls command (added to check)are working, I added ls,cat command in the /etc/init.d/rcS file to check uart Tx / Rx)<br>





<br>Once the shell is entered with the below message, UART ISR is NOT invoked  (using JTAG to put breakpoints) ,if I type any command &amp; I can’t get any message. <br><br><br><b>Err message:<br><br>/bin/sh: can&#39;t access tty; job control turned off<br>




<br>/ #</b>
<br><br> <br><br>Kindly share  any suggestion to fix this issue.<br><b><br>Below are the /etc/initab &amp; /etc/init.d/rcS </b><br><br><span style="background-color:rgb(51,102,255)">/etc/inittab:</span><br style="background-color:rgb(255,255,0)">




<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)"># This is run first script</span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">::sysinit:/etc/init.d/rcS</span><br style="background-color:rgb(255,255,0)">




<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)"> </span><br style="background-color:rgb(255,255,0)">
<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)"># Start an &quot;askfirst&quot; shell on the console</span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)">




<span style="background-color:rgb(255,255,0)">ttySAC0::askfirst:-/bin/sh</span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">ttySAC0::respawn:-/sbin/getty 115200 ttySAC0</span><br style="background-color:rgb(255,255,0)">




<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)"> </span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)"># Stuff to do when restarting the init process</span><br style="background-color:rgb(255,255,0)">




<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">::restart:/sbin/init</span><br style="background-color:rgb(255,255,0)">
<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)"> </span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)"># Stuff to do before rebooting</span><br style="background-color:rgb(255,255,0)">




<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">::ctrlaltdel:/sbin/reboot</span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">::shutdown:/bin/umount ­a ­r</span><br style="background-color:rgb(255,255,0)">




<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)"> </span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)"> </span><br style="background-color:rgb(255,255,0)">




<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)"> </span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)"><b style="background-color:rgb(102,51,255)">/etc/init.d/rcS</b><br style="background-color:rgb(255,255,0)">




<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">#!/bin/sh</span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">echo -e &quot;\n in rcS script\n&quot;</span><br style="background-color:rgb(255,255,0)">





<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">echo -e &quot;\n Mounting proc FS\n&quot;</span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)">




<span style="background-color:rgb(255,255,0)">mount ­t proc none /proc</span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">echo -e &quot;\nMounting sysfs \n&quot;</span><br style="background-color:rgb(255,255,0)">




<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">mount ­t sysfs none /sys</span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">ls -alh /</span><br style="background-color:rgb(255,255,0)">




<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">echo -e &quot;\n\n&quot;</span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">ls -alh /dev/ttyS*</span><br style="background-color:rgb(255,255,0)">





<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">echo -e &quot;\n&quot;</span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">cat /proc/interrupts</span><br style="background-color:rgb(255,255,0)">




<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">echo -e &quot;\n ttySAC0 respawning \n&quot;</span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)">




<span style="background-color:rgb(255,255,0)">ttySAC0::respawn:-/sbin/getty 115200 ttySAC0</span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">echo -e &quot;\n ttySAC0 respawning finished \n&quot;</span><br style="background-color:rgb(255,255,0)">





<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">echo -e &quot;\n exec /bin/sh\n&quot;</span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)">




<span style="background-color:rgb(51,255,51)">exec /bin/sh</span><br style="background-color:rgb(255,255,0)"><br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">ls</span><br style="background-color:rgb(255,255,0)">




<br style="background-color:rgb(255,255,0)"><span style="background-color:rgb(255,255,0)">#ls -alh /dev</span><br><br><b style="background-color:rgb(51,102,255)">Below are the console message of boot up.</b><br><br>Linux version 3.1.6-00011-g82af784-dirty (pcuser@pcuser-linux) (gcc version 4.6.1 (Ubuntu/Linaro 4.6.1-9ubuntu3) ) #66 Fri May 11 16:21:22 IST 2012<br>



CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177<br>CPU: VIVT data cache, VIVT instruction cache<br>Machine: FPGA Board<br>Memory policy: ECC disabled, Data cache writeback<br>Available lowmem size : 32 MB<br>



Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128<br>Kernel command line: mem=32M console=ttySAC0,115200 root=/dev/ram0 init=/sbin/init initrd=0x80800000,8M user_debug=31<br>PID hash table entries: 128 (order: -3, 512 bytes)<br>



Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)<br>Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)<br>Memory: 32MB = 32MB total<br>Memory: 22456k/22456k available, 10312k reserved, 0K highmem<br>



Virtual kernel memory layout:<br>    vector  : 0xffff0000 - 0xffff1000   (   4 kB)<br>    fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)<br>    DMA     : 0xffc00000 - 0xffe00000   (   2 MB)<br>    vmalloc : 0xc2800000 - 0xf6000000   ( 824 MB)<br>



    lowmem  : 0xc0000000 - 0xc2000000   (  32 MB)<br>    modules : 0xbf000000 - 0xc0000000   (  16 MB)<br>      .text : 0xc0008000 - 0xc018c000   (1552 kB)<br>      .init : 0xc018c000 - 0xc01a1000   (  84 kB)<br>      .data : 0xc01a2000 - 0xc01afe00   (  56 kB)<br>



       .bss : 0xc01afe24 - 0xc01c0f24   (  69 kB)<br>SLUB: Genslabs=13, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1<br>NR_IRQS:32<br>Console: colour dummy device 80x30<br>console [ttySAC0] enabled<br>Calibrating delay loop... 1.86 BogoMIPS (lpj=9344)<br>



pid_max: default: 32768 minimum: 301<br>Mount-cache hash table entries: 512<br>CPU: Testing write buffer coherency: ok<br>devtmpfs: initialized<br>exceptions_init<br>Switching to clocksource timer0<br>Trying to unpack rootfs image as initramfs...<br>



rootfs image is not initramfs (junk in compressed archive); looks like an initrd<br>Freeing initrd memory: 8192K<br>msgmni has been set to 59<br>io scheduler noop registered (default)<br>brd: module loaded<br>loop: module loaded<br>



mousedev: PS/2 mouse device common for all mice<br>RAMDISK: ext2 filesystem found at block 0<br>RAMDISK: Loading 3072KiB [1 disk] into ram disk... \<br>done.<br>VFS: Mounted root (ext2 filesystem) readonly on device 1:0.<br>



devtmpfs: mounted<br>Freeing init memory: 84K<br><br><b style="background-color:rgb(255,255,0)">echo messages from /etc/rcS &amp; /etc/inintab</b><br> in rcS script<br><br> Mounting proc FS<br><br>Mounting sysfs<br><br>drwxrwxr-x   12 0        0           1.0K May  9  2012 .<br>


drwxrwxr-x   12 0        0           1.0K May  9  2012 ..<br>
drwxrwxr-x    2 0        0           2.0K May 11  2012 bin<br>drwxr-xr-x    3 0        0          11.9K Jan  1 00:00 dev<br>drwxr-xr-x    3 0        0           1.0K May 11  2012 etc<br>drwxr-xr-x    2 0        0           1.0K May  9  2012 lib<br>



lrwxrwxrwx    1 0        0             11 May  8  2012 linuxrc -&gt; bin/busybox<br>drwx------    2 0        0          12.0K May  8  2012 lost+found<br>drwxr-xr-x    2 0        0           1.0K May  8  2012 proc<br>drwxrwxr-x    2 0        0           1.0K May  8  2012 sbin<br>



drwxr-xr-x    2 0        0           1.0K May  8  2012 sys<br>drwxrwxr-x    4 0        0           1.0K May  8  2012 usr<br>drwxr-xr-x    2 0        0           1.0K May  9  2012 var<br><br><br>crw-------    1 0        0         204,  64 Jan  1 00:00 /dev/ttySAC0<br>



<br><br><br> ttySAC0 respawning<br><br>/etc/init.d/rcS: line 20: ttySAC0::respawn:-/sbin/getty: not found<br><br> ttySAC0 respawning finished<br><br>-rwxr-xr-x    1 0        0           1.0K May 11  2012 /bin/hello<br><br>



calling hello world<br><br>/etc/init.d/rcS: line 24: ./hello: not found<br>/etc/init.d/rcS: line 25: hello: not found<br>/etc/init.d/rcS: line 26: ./hello: not found<br>/etc/init.d/rcS: line 27: /bin/hello: not found<br>


<br>
 exec /bin/sh<br><br><span style="background-color:rgb(255,255,51)">/bin/sh: can&#39;t access tty; job control turned off</span><br style="background-color:rgb(255,255,51)"><span style="background-color:rgb(255,255,51)">/ #</span><br>

<br>I can&#39;t type any commad at the shell prompt,<br>shell  is not accepting it.<br><br><br><br>