mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-07 21:16:57 +02:00
This CL adds uinput module in INSTALL_MASK so that the module is not installed to non-test image. A mod_image_for_test script is implemented to install the module in the test image if the uinput module exists. BUG=chromium-os:26707 TEST=Build a base image and a test image. Check the directory /lib/modules/<version>/kernel/drivers/input/misc where current <version> is 3.2.7. In the base image, there should be no uinput.ko, while in the test image, there should be uinput.ko. CQ-DEPEND=Ie96242c4d56403866a2298db2ba3bd6459248c1b Change-Id: I0ca6599f80b9bb72cdc044fc97cdf990ce550edc Reviewed-on: https://gerrit.chromium.org/gerrit/19032 Reviewed-by: Kees Cook <keescook@chromium.org> Reviewed-by: Mandeep Singh Baines <msb@chromium.org> Tested-by: Joseph Shyh-In Hwang <josephsih@chromium.org> Commit-Ready: Joseph Shyh-In Hwang <josephsih@chromium.org>
22 lines
768 B
Bash
Executable File
22 lines
768 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
#
|
|
# Add the uinput kernel module into the image for test builds.
|
|
# This is for running trackpad autotest in VM.
|
|
|
|
echo "Adding the uinput module for test builds."
|
|
MODULES_PATH="/lib/modules"
|
|
KERNEL_RELEASE=$(ls -tr "${ROOT_FS_DIR}${MODULES_PATH}" | tail -n1)
|
|
UINPUT_PATH="${MODULES_PATH}/${KERNEL_RELEASE}"/kernel/drivers/input/misc
|
|
SRC_FILE="${BOARD_ROOT}${UINPUT_PATH}"/uinput.ko
|
|
DST_DIR="${ROOT_FS_DIR}${UINPUT_PATH}"
|
|
if [ -f "${SRC_FILE}" ]; then
|
|
install -m 644 "${SRC_FILE}" "${DST_DIR}"
|
|
echo "The uinput module is installed."
|
|
else
|
|
echo "Cannot install the uinput module."
|
|
fi
|