xref: /OK3568_Linux_fs/buildroot/package/iucode-tool/S00iucode-tool (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#!/bin/sh
2#
3# Upload microcode into the processor.
4#
5
6MICROCODE_DIR="/lib/firmware/intel-ucode"
7
8start() {
9	printf 'Starting iucode-tool: '
10	/usr/sbin/iucode_tool -q -k "$MICROCODE_DIR"
11	status="$?"
12	if [ "$status" = 0 ]; then
13		echo "OK"
14	else
15		echo "FAIL"
16	fi
17	return "$status"
18}
19
20case "$1" in
21	start)
22		start;;
23	stop|restart|reload)
24		;;
25	*)
26		echo "Usage: $0 {start|stop|restart|reload}"
27		exit 1
28esac
29