#!/bin/sh PREREQ="" prereqs() { echo "$PREREQ" } case $1 in # get pre-requisites prereqs) prereqs exit 0 ;; esac # main LOAD_MODULES="" MASTER_ID="" MODPROBE_FILES="" BLACKLIST="" for x in $(cat /proc/cmdline); do case $x in load_modules=*) LOAD_MODULES="$(echo ${x#load_modules=}|tr "," " ")" ;; deny_modules=*) BLACKLIST="$(echo ${x#deny_modules=}|tr "," " ")" ;; lliurex_master=*) MASTER_ID="${x#lliurex_master=}" ;; tecra_s3) MASTER_ID="PR72" ;; tx1320) MASTER_ID="PR83" ;; ttyfix|fixtty) LOAD_MODULES="fbcon vesafb" rm -f /etc/modprobe.d/blacklist-framebuffer esac done # especific masters tasks if [ -n "$MASTER_ID" ] ; then if [ -z "$LOAD_MODULES" ] ; then case $MASTER_ID in PR72|pr72) LOAD_MODULES="ahci" ;; esac fi if [ -z "$BLACKLIST" ] ; then case $MASTER_ID in PR83|pr83) BLACKLIST="usbtouchscreen tkusb" ;; esac fi fi # end especific tasks if [ "$LOAD_MODULES" ] ; then for M in $LOAD_MODULES ; do m="$(echo "$M" |tr "." " ")" modprobe -Q $m || true done fi if [ "$BLACKLIST" ] ; then for M in $BLACKLIST ; do echo "blacklist $M" >> /etc/modprobe.d/blacklist-llxcfg done fi