M7350/oe-core/meta-msm/recipes/sysvinit/sysvinit-inittab_2.88dsf.bb

72 lines
1.6 KiB
BlitzBasic
Raw Normal View History

2024-09-09 08:52:07 +00:00
DESCRIPTION = "Inittab for sysvinit"
LICENSE = "GPLv2"
LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe"
PR = "r9"
SRC_URI = "file://COPYING \
file://inittab"
S = "${WORKDIR}/sysvinit-${PV}"
INHIBIT_DEFAULT_DEPS = "1"
SERIAL_CONSOLE = "115200 console"
do_configure() {
cp ${WORKDIR}/COPYING ${S}/
}
do_compile() {
:
}
do_install() {
install -d ${D}${sysconfdir}
install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
if [ ! -z "${SERIAL_CONSOLE}" ]; then
echo "S:2345:respawn:${base_sbindir}/getty -L ttyHSL0 ${SERIAL_CONSOLE}" >> ${D}${sysconfdir}/inittab
fi
idx=0
tmp="${SERIAL_CONSOLES}"
for i in $tmp
do
j=`echo ${i} | sed s/\;/\ /g`
echo "${idx}:2345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
idx=`expr $idx + 1`
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:2345:respawn:${base_sbindir}/getty 38400 tty$n" >> ${D}${sysconfdir}/inittab
done
echo "" >> ${D}${sysconfdir}/inittab
fi
}
# USE_VT and SERIAL_CONSOLE are generally defined by the MACHINE .conf.
# Set PACKAGE_ARCH appropriately.
PACKAGE_ARCH = "${MACHINE_ARCH}"
FILES_${PN} = "${sysconfdir}/inittab"
CONFFILES_${PN} = "${sysconfdir}/inittab"
USE_VT ?= "0"
SYSVINIT_ENABLED_GETTYS ?= "0"