Friends, when I started working with ARM boards I faced much more problems on interfacing board with my development pc, and this is also one of such. Eventhough I managed to start terminal(after u-boot process) of target system I am unable to control my terminal by means of [ctrl] + [c] when terminal hangs at some thing. In my application, there was a test in that terminal of target will hang and I need to take back my terminal by pressing ctrl + c. After googling I found that my target is running terminal at /dev/console so to make a controllable terminal I need to run terminal at some other device such as /dev/tty0 – /dev/tty4. But since we are dealing with embedded system, serial device becomes handy, so I decided to run terminal at /dev/ttyS0 which is first serial device of my system.
Fault,
When my embedded system boots up, I saw this line,
/bin/sh: can’t access tty; job control turned off
Steps I followed,
1) I added following line to /etc/inittab (configuration file for /sbin/init)
ttyS0::askfirst:/bin/sh
My /etc/inittab looks like,
# /etc/inittab: init configuration for /sbin/init
# running /etc/init.d/rcS for mounting /proc and /sys file system
::sysinit:/etc/init.d/rcS
ttyS0::askfirst:/bin/sh
::ctrlaltdel:/sbin/reboot
::shutdown:/sbin/swapoff -a
::shutdown:/bin/umount -a -r
::restart:/sbin/init
2) creating character device at /dev directory of target with major number 4 and minor number 64 (you can refer this values from your development pc)
$ mknod -m 666 /dev/ttyS0 c 4 64
3) Time to reboot,
After rebooting, my system works fine and I can use [ctrl] + [c] as normal, and this line “/bin/sh: can’t access tty; job control turned off ” does not exists.
FYI,
My startup script /etc/init.d/rcS is
#!/bin/sh
# just dummy to mount /proc and /sys
mount -vt proc proc proc
mount -vt sysfs sysfs sys
Enjoy..!
I am using linux kernel on ARM board samsung exynos 5250. I am using linaro provided rootfs. There is no inittab anymore. Which file should I edit for the same effect. I am looking to /etc/init/*.conf files but I couldn’t find which file to edit.
LikeLike