summaryrefslogtreecommitdiff
path: root/extra/usb_serial/install
diff options
context:
space:
mode:
authorJack Rosenthal <jrosenth@chromium.org>2021-11-04 12:11:58 -0600
committerCommit Bot <commit-bot@chromium.org>2021-11-05 04:22:34 +0000
commit252457d4b21f46889eebad61d4c0a65331919cec (patch)
tree01856c4d31d710b20e85a74c8d7b5836e35c3b98 /extra/usb_serial/install
parent08f5a1e6fc2c9467230444ac9b582dcf4d9f0068 (diff)
downloadchrome-ec-stabilize-14526.84.B-ish.tar.gz
In the interest of making long-term branch maintenance incur as little technical debt on us as possible, we should not maintain any files on the branch we are not actually using. This has the added effect of making it extremely clear when merging CLs from the main branch when changes have the possibility to affect us. The follow-on CL adds a convenience script to actually pull updates from the main branch and generate a CL for the update. BUG=b:204206272 BRANCH=ish TEST=make BOARD=arcada_ish && make BOARD=drallion_ish Signed-off-by: Jack Rosenthal <jrosenth@chromium.org> Change-Id: I17e4694c38219b5a0823e0a3e55a28d1348f4b18 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/ec/+/3262038 Reviewed-by: Jett Rink <jettrink@chromium.org> Reviewed-by: Tom Hughes <tomhughes@chromium.org>
Diffstat (limited to 'extra/usb_serial/install')
-rwxr-xr-xextra/usb_serial/install88
1 files changed, 0 insertions, 88 deletions
diff --git a/extra/usb_serial/install b/extra/usb_serial/install
deleted file mode 100755
index eba1d2ac83..0000000000
--- a/extra/usb_serial/install
+++ /dev/null
@@ -1,88 +0,0 @@
-#!/bin/sh -e
-#
-# Copyright 2016 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.
-#
-# Build and install raiden module and udev rules
-
-bold=$(tput bold)
-normal=$(tput sgr0)
-
-error() {
- echo "${bold}Install failed${normal}"
-}
-
-trap "error $LINENO" ERR
-
-fallback=false
-
-if [ "$1" = "--fallback" ]; then
- fallback=true
- shift
-fi
-
-if [ $# -ne 0 ]; then
- echo ""
- echo "Usage: ${bold}$0${normal} [--fallback]"
- echo ""
- echo "Install Raiden kernel module and udev rules for working with Case"
- echo "Closed Debug enabled devices."
- echo ""
- echo "${bold}--fallback${normal}"
- echo " Install udev rules to use usbserial directly without installing"
- echo " the raiden module. This can be used when the raiden module fails"
- echo " to build, or can not be used for other reasons."
- echo ""
- echo " The fallback solution will generate extra /dev/ttyUSB? entries"
- echo " for the SPI and possibly other CCD bridges. These should be"
- echo " ignored by you. Flashrom is smart enough to detach the kernel"
- echo " driver from the SPI bridge, so they will not interfere with"
- echo " flashing new firmware images over CCD."
- echo ""
- exit 1
-fi
-
-if [ "$fallback" = "false" ]; then
- #
- # The normal path builds and installs the raiden module
- #
- {
- #
- # Don't build the module as root so it's easier to clean up after
- #
- make modules &&
-
- #
- # Install the new module and update dependency and alias information
- #
- sudo make modules_install &&
- sudo depmod -a
- } || {
- echo $bold
- echo "Building and/or installing the raiden module failed, you may"
- echo "want to use the --fallback option."
- echo $normal
- exit 1;
- }
-else
- #
- # The fallback path installs the fallback udev rule and its helper script.
- #
- sudo install -m644 51-google-serial-fallback.rules /etc/udev/rules.d
- sudo install add_usb_serial_id /lib/udev
-fi
-
-#
-# Install the udev rule for creating /dev/google symlinks.
-#
-sudo install -m644 51-google-serial.rules /etc/udev/rules.d
-
-#
-# Trigger udev to create the symlinks for any attached devices that have the
-# Google Vendor ID. Limiting triggering like this prevents unwanted resetting
-# of some device state, even with the change action specified.
-#
-for syspath in $(dirname $(grep -rxl --include=idVendor 18d1 /sys/devices)); do
- sudo udevadm trigger --action=change --parent-match=${syspath}
-done