android系统移植报错:sh: can't access tty; job control turned off

解决方案: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 REALLY want your shell to run on, then you can hack your kernel (if you are into that sortof thing) by changing  to change the lines where it sets "1;" to instead set it to "0". I recommend you instead run your shell on a real console...

由于我这里还是想在 /dev/console上运行shell,所以只需对应的

1、system/core/init/init.c里定义static char *console_name = "/dev/console";

2、内核源码中drivers/char/tty_io.c里 noctty = 0 

你可能感兴趣的:(android,shell,Access,Terminal)