[yocto] How to have Poky automatically login at boot?
Aaron Schwartz
aaron.schwartz at logicsupply.com
Fri Jul 28 11:29:38 PDT 2017
Hello,
I'm trying to have the busybox getty in Poky login as root automatically
but I can't seem to get it working.
So far I have a sysvinit-inittab_2.%.bbappend:
> PR := "${PR}.1"
> SYSVINIT_ENABLED_GETTYS="1 2 3 4"
> do_install() {
> install -d ${D}${sysconfdir}
> install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
> install -d ${D}${base_bindir}
> install -m 0755 ${WORKDIR}/start_getty ${D}${base_bindir}/start_getty
> set -x
> tmp="${SERIAL_CONSOLES}"
> for i in $tmp
> do
> j=`echo ${i} | sed s/\;/\ /g`
> l=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'`
> label=`echo $l | sed 's/.*\(....\)/\1/'`
> echo "$label:12345:respawn:${base_bindir}/start_getty ${j} vt102" >>
> ${D}${sysconfdir}/inittab
> done
> if [ "${USE_VT}" = "1" ]; then
> cat <<EOF >>${D}${sysconfdir}/inittab
> # ${base_sbindir}/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>
> #
> EOF
> for n in ${SYSVINIT_ENABLED_GETTYS}
> do
> echo "$n:12345:respawn:${base_sbindir}/mingetty --autologin
> root 38400 tty$n" >> ${D}${sysconfdir}/inittab
> done
> echo "" >> ${D}${sysconfdir}/inittab
> fi
> }
I have tried a number of flags with the default getty, including using a
shell as login. I tried adding mingetty to my image to see if that would
work with it's "--autologin" flag, but I still got the busybox getty
yelling at me about unrecognized flags.
Is the best approach to adjust the ALTERNATIVE_PRIORITY for either the
busybox getty or mingetty to have update-alternatives select mingetty, or
is there an easier modification to my sysvinit-innittab bbappend above that
will enable autologin?
Thanks for the help!
Aaron
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/yocto/attachments/20170728/2f76bf0d/attachment.html>
More information about the yocto
mailing list