Copyright 2020. All rights reserved. Advantech Co. Ltd. Page 3
Table of Contents
1. INTRODUCTION .................................................................................... 5
1.1 OVERVIEW .......................................................................................................................... 5
1.2 TARGET AUDIENCE ............................................................................................................ 5
1.3 BIOS AND BMC VERSIONS .............................................................................................. 5
1.4 OS DISTRIBUTION AND KERNEL VERSION ........................................................................ 5
1.4.1 How to upgrade Linux Kernel............................................................................................................. 5
1.5 FILES AND SOFTWARE TOOLS ........................................................................................... 6
2. WATCHDOG FUNCTION ...................................................................... 7
2.1 WATCHDOG ON PCH ......................................................................................................... 7
2.2 WATCHDOG ON HWM ...................................................................................................... 8
3. GPIO FUNCTION ................................................................................. 11
3.1 HW GPIO PIN ................................................................................................................. 11
3.2 CONTROL HW GPIO ....................................................................................................... 11
3.2.1 Locate i2c bus of IO expander .......................................................................................................... 11
3.2.2 I2c raw command to control ............................................................................................................. 12
3.2.3 Kernel GPIO sysfs to control.............................................................................................................. 13
4. SOFTWARE DEFINED LED ............................................................... 16
4.1 LOCATE I2C BUS OF IO EXPANDER ................................................................................. 17
4.2 CONTROL SOFTWARE DEFINED LED ............................................................................ 18
4.2.1 I2c raw command to control ............................................................................................................. 18
4.2.2 Kernel GPIO sysfs to control.............................................................................................................. 19
4.2.3 Kernel LED sysfs to control ............................................................................................................... 21
5. SOFTWARE DEFINED BUTTON ..................................................... 24
5.1 LOAD SOFTWARE BUTTON WITH LINUX SERVICE ........................................................ 24
5.1.1 Set SW button access mode ............................................................................................................... 24
5.1.2 Install and configure acpid ................................................................................................................. 24
5.1.3 Configure systemd-logind .................................................................................................................. 26
5.2 LOAD SOFTWARE BUTTON WITH SW BUTTON DRIVER ................................................ 27
5.2.1 Set SW button access mode ............................................................................................................... 27
5.2.2 Load Software Button Interface Driver ........................................................................................ 27
5.2.3 Software Button Daemon ................................................................................................................... 27
5.2.4 Sample Config file and scripts .......................................................................................................... 29
6. AFRU (ADVANTECH FRU UTILITY) .............................................. 31
6.1 INTRODUCTION ................................................................................................................ 31
6.2 COMMAND EXAMPLE ....................................................................................................... 31
6.3 OTHER COMMAND OPTIONS ........................................................................................... 32
7. SENSORS ............................................................................................... 33
7.1 APM (ADVANTECH PLATFORM MONITOR) ................................................................. 33
7.2 LM-SENSORS ................................................................................................................... 34