Hi,
i want to add a script into freescale file system, and also run automatically when iMX6 linux booted. So can you help me,
=> How to remove freescale rootfs login.
=> How to add script and run automatically when iMX6 linux booted, Where i add that script and script run command also.
Solved! Go to Solution.
You need to add "--autologin root" parameter
into the line with "respawn:/sbin/getty" option in /etc/inittab.
Have a great day,
Victor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
You need to add "--autologin root" parameter
into the line with "respawn:/sbin/getty" option in /etc/inittab.
Have a great day,
Victor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
there are so many etc/inittab, in which file i need to write
/home/fsl-release-bsp/core-image-base/tmp/work/imx6ulevk-poky-linux-gnueabi/core-image-base/1.0-r0/rootfs/etc/inittab
/home/fsl-release-bsp/core-image-base/tmp/work/imx6ulevk-poky-linux-gnueabi/sysvinit-inittab/2.88dsf-r10/inittab
/home/fsl-release-bsp/core-image-base/tmp/work/imx6ulevk-poky-linux-gnueabi/sysvinit-inittab/2.88dsf-r10/package/etc/inittab
/home/fsl-release-bsp/core-image-base/tmp/work/imx6ulevk-poky-linux-gnueabi/sysvinit-inittab/2.88dsf-r10/packages-split/sysvinit-inittab/etc/inittab
/home/fsl-release-bsp/core-image-base/tmp/work/imx6ulevk-poky-linux-gnueabi/sysvinit-inittab/2.88dsf-r10/image/etc/inittab
Hi chandrasekhar,
Add in below mention file.
/home/fsl-release-bsp/core-image-base/tmp/work/imx6ulevk-poky-linux-gnueabi/sysvinit-inittab/2.88dsf-r10/inittab
Regards,
Aravinth
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
hi did the same thing, after bootup I am getting error getty doesnt recognize command -a
I tried with --autologion option also. I got the same error getty doesn,t recognize --autologin
and kernel hangs up for 5 minutes and then again throes the error for every 5 minutes
# /etc/inittab: init(8) configuration.
# $Id: inittab,v 1.91 2002/01/25 13:35:21 miquels Exp $
# The default runlevel.
id:5:initdefault:
# Boot-time system configuration/initialization script.
# This is run first except when booting in emergency (-b) mode.
si::sysinit:/etc/init.d/rcS
# What to do in single-user mode.
~~:S:wait:/sbin/sulogin
# /etc/init.d executes the S and K scripts upon change
# of runlevel.
#
# Runlevel 0 is halt.
# Runlevel 1 is single-user.
# Runlevels 2-5 are multi-user.
# Runlevel 6 is reboot.
l0:0:wait:/etc/init.d/rc 0
l1:1:wait:/etc/init.d/rc 1
l2:2:wait:/etc/init.d/rc 2
l3:3:wait:/etc/init.d/rc 3
l4:4:wait:/etc/init.d/rc 4
l5:5:wait:/etc/init.d/rc 5
l6:6:wait:/etc/init.d/rc 6
# Normally not reached, but fallthrough in case of emergency.
z6:6:respawn:/sbin/sulogin
mxc0:12345:respawn:/sbin/getty --autologin root -L 115200 ttymxc0
# /sbin/getty invocations for the runlevels.
#
# The "id" field MUST be the same as the last
# characters of the device (after "tty").
#
# Format:
# <id>:<runlevels>:<action>:<process>
#
1:12345:respawn:/sbin/getty 38400 tty1
this is my inittab
Hi chandrasekhar,
Can you add like this,
mxc0:12345:respawn:/sbin/getty -L 115200 ttymxc0 --autologin root
Regards,
Aravinth
tried the way you told again same issue
Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]
/sbin/getty: unrecognized option '--autologin'
BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.
Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]
/sbin/getty: unrecognized option '--autologin'
BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.
Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]
/sbin/getty: unrecognized option '--autologin'
BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.
Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]
/sbin/getty: unrecognized option '--autologin'
BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.
Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]
/sbin/getty: unrecognized option '--autologin'
BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.
Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]
/sbin/getty: unrecognized option '--autologin'
BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.
Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]
/sbin/getty: unrecognized option '--autologin'
BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.
Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]
/sbin/getty: unrecognized option '--autologin'
BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.
Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]
/sbin/getty: unrecognized option '--autologin'
BusyBox v1.23.1 (2016-07-19 18:13:00 IST) multi-call binary.
Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]
INIT: Id "mxc0" respawning too fast: disabled for 5 minutes
replace the login like following.
null::respawn:/bin/bash
Hi,
I could not understand what you mean but I did something like this;
null::respawn:/sbin/getty -L 115200 ttymxc0 --autologin root
But this did not work.
I found another solution which works;
1:2345:respawn:/bin/login -f root ttymxc0 </dev/ttymxc0 >/dev/ttymxc0 2>&1
Thanks..
this worked for me......remember it will set the baudrate to 38400 so we naeed to to write -L 115200 additionally
replace
null::respawn:/sbin/getty -L 115200 ttymxc0 --autologin root
with
null::respawn:/bin/bash
Hi,
Create autologin script located in /usr/bin. This script should contain following data.
#!/bin/sh
exec /bin/login -f usename
You have to change the /etc/inittab getty login line as follows:
mxc0:12345:respawn:/sbin/getty -l /usr/bin/autologin -n -L 115200 ttymxc0
Regards,
Aravinth
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
do I need to add in any of the .bb file. I want it to be part of my build.Sorry for my basic questions.
Thanks
Chandrasekhar
Hi chandra sekhar,
First you try manually. If it's works then i will tell you how to add in yocto bsp
Regards,
Aravinth
Can you please go on this?
Thanks..
sure!
Hi,
I tried both solutions you have provided but they do not work.
For script solution, it says; getty: ttymxc0: can't execute '/usr/bin/autologin'
For --autologin option it says;
/sbin/getty: unrecognized option '--autologin'
BusyBox v1.23.1 (2016-08-12 11:49:01 EEST) multi-call binary.
Usage: getty [OPTIONS] BAUD_RATE[,BAUD_RATE]... TTY [TERMTYPE]
...
Can you please help on this? Thanks..