sonic-buildimage/platform/broadcom/saibcm-modules/debian/opennsl-modules-4.9.0-8-amd64.init
zhenggen-xu f093ef2a9f [security kernel] Upgrade kernel from 4.9.110-3+deb9u2 to 4.9.110-3+deb9u6 (#2367)
* [security kernel] Upgrade kernel from 4.9.110-3+deb9u2 to 4.9.110-3+deb9u6
short version: 4.9.0-7 to 4.9.0-8

See changelogs for security fixes:
https://tracker.debian.org/media/packages/l/linux/changelog-4.9.110-3deb9u6

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>

* Update sonic-linux-kernel submodule after it was merged

Signed-off-by: Zhenggen Xu <zxu@linkedin.com>
2018-12-11 04:17:17 -08:00

74 lines
1.3 KiB
Bash
Executable File

#!/bin/bash
# This script load/unload opennsl kernel modules
### BEGIN INIT INFO
# Provides: load-opennsl-modules
# Required-Start:
# Required-Stop:
# Should-Start:
# Should-Stop:
# Default-Start: S
# Default-Stop: 0 6
# Short-Description: Load OpenNSL kernel modules
### END INIT INFO
function create_devices()
{
rm -f /dev/linux-knet-cb
rm -f /dev/linux-bcm-knet
rm -f /dev/linux-bcm-bde
rm -f /dev/linux-kernel-bde
mknod /dev/linux-knet-cb c 121 0
mknod /dev/linux-bcm-knet c 122 0
mknod /dev/linux-bcm-bde c 126 0
mknod /dev/linux-kernel-bde c 127 0
}
function load_kernel_modules()
{
modprobe linux-kernel-bde dmasize=32M maxpayload=128
modprobe linux-user-bde
modprobe linux-bcm-knet use_rx_skb=1 rx_buffer_size=9238
modprobe linux-knet-cb
}
function remove_kernel_modules()
{
rmmod linux-knet-cb
rmmod linux-bcm-knet
rmmod linux-user-bde
rmmod linux-kernel-bde
}
case "$1" in
start)
echo -n "Load OpenNSL kernel modules... "
create_devices
load_kernel_modules
echo "done."
;;
stop)
echo -n "Unload OpenNSL kernel modules... "
remove_kernel_modules
echo "done."
;;
force-reload|restart)
echo "Not supported"
;;
*)
echo "Usage: /etc/init.d/opennsl-modules-4.9.0-8-amd64.init {start|stop}"
exit 1
;;
esac
exit 0