kumquat-buildroot/board/intel/galileo/rootfs_overlay/etc/init.d/S09modload
Ray Kinsella 8715e18e93 board: add support for Intel Galileo Gen 2
Board support package includes:

 * Toplevel build root configuration
 * Github based 3.8.7 Kernel
  * Upstream 3.8.7
  * Linux 3.8.7 Kernel Driver Patches
 * Linux 3.8.7 configuration
 * Grub configuration
 * Init Script to load modules
 * genimage config to create sdcard image.

[Thomas: simplify post-image script since there is now only one call
to genimage.]

Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2015-11-17 23:24:32 +01:00

34 lines
442 B
Bash
Executable File

#!/bin/sh
#
load_drivers()
{
while IFS= read -r line; do
modprobe $line
done < "/etc/modules-load.galileo/$1.conf"
}
do_board()
{
board=$(cat /sys/devices/virtual/dmi/id/board_name)
case "$board" in
*"GalileoGen2" )
load_drivers "galileo_gen2" ;;
*"Galileo" )
load_drivers "galileo" ;;
esac
}
case "$1" in
start)
do_board
;;
stop)
;;
restart|reload)
;;
*)
echo "Usage: $0 {start|stop|restart}"
exit 1
esac