Code Monkey home page Code Monkey logo

imanager's Introduction

Advantech iManager Linux Driver Set

Description

This is a set of platform drivers which provides support for multiple embedded features such as GPIO, I2C/SMBus, Hardware Monitoring, Watchdog, and Backlight/Brightness control. Those features are available on Advantech Embedded boards such as SOM, MIO, AIMB, and PCM. Datasheets of each product line can be downloaded from http://www.advantech.com

Author: Richard Vidal-Dorsch [email protected]

iManager (MFD) driver

This is a Multi-Function-Device (MFD) driver which provides a communication layer to the Advantech iManager Embedded Controller. The type of communication is message based. The client (sub-driver) requests information from Advantech iManager and waits for a response (polling). If a response has been received within an expected time, the data is been extracted from the message and then hand-off to the caller.

Supported chips

Advantech EC based on ITE IT8518
Prefix: imanager
Addresses: 0x029e/0x029f
Datasheet: Available from ITE upon request

Advantech EC based on ITE IT8528
Prefix: imanager
Addresses: 0x029a/0x0299
Datasheet: Available from ITE upon request

Driver name: imanager

Depends on: mfd-core

GPIO driver

This platform driver provides support for 8-bit iManager GPIO which can be accessed through SYSFS (/sys/class/gpio/). Linux Kernel config option CONFIG_GPIO_SYSFS needs to be enabled.

Driver name: gpio-imanager

Depends on: imanager (mfd)

I2C driver

This platform driver provides support for iManager I2C/SMBus.

Driver name: i2c-imanager

Depends on: imanager (mfd)

Module Parameters

bus_frequency (unsigned short)

Set desired bus frequency.

Valid values (kHz) are:
		 50: Slow
		100: Standard (default)
		400: Fast

Description

The Advantech iManager provides up to four SMBus controllers. One of them is configured for I2C compatibility.

Features:
	Process Call
		Not supported

	I2C Block-Read
		Supported

	SMBus 2.0 Support
		- No PEC
		- No Interrupt

Hardware monitor driver

This platform driver provides support for iManager hardware monitoring and FAN control.

Driver name: imanager_hwmon

Depends on: imanager (mfd)

Description

The Advantech iManager supports up to 3 fan rotation speed sensors, 3 temperature monitoring sources and up to 5 voltage sensors, VID, alarms and a automatic fan regulation strategy (as well as manual fan control mode).

Temperatures are measured in degrees Celsius and measurement resolution is 1 degC. An Alarm is triggered when the temperature gets higher than the high limit; it stays on until the temperature falls below the high limit.

Fan rotation speeds are reported in RPM (rotations per minute). An alarm is triggered if the rotation speed has dropped below a programmable limit. No fan speed divider support available.

Voltage sensors (also known as IN sensors) report their values in millivolts. An alarm is triggered if the voltage has crossed a programmable minimum or maximum limit.

The driver supports automatic fan control mode known as Thermal Cruise. In this mode, the firmware attempts to keep the measured temperature in a predefined temperature range. If the temperature goes out of range, fan is driven slower/faster to reach the predefined range again.

The mode works for fan1-fan3.

sysfs attributes

pwm[1-3]
	This file stores PWM duty cycle or DC value (fan speed) in
	range:
		0: (stop)
		255: (full)

pwm[1-3]_enable
	This file controls mode of fan/temperature control:
		0: Fan control disabled (fans set to maximum speed)
		1: Manual mode, write to pwm[1-3] any value 0-255
		2: "Fan Speed Cruise" mode

pwm[1-3]_mode
	Controls if output is PWM or DC level
		0: DC output
		1: PWM output

Speed Cruise mode (2)
	This mode tries to keep the fan speed constant.

fan[1-3]min
	Minimum fan speed

fan[1-3]max
	Maximum fan speed

Watchdog driver

This driver provides support for iManager watchdog.

Driver name: imanager_wdt

Depends on: imanager (mfd)

Backlight/Brightness driver

This driver provides support for iManager backlight and brightness control which can be accessed through SYSFS (/sys/class/backlight).

Driver name: imanager_bl

Depends on: imanager (mfd)

Build Requirements

Besides the required build tools e.g. gcc, make, and kernel development packages, the kernel also needs to have sub-drivers enabled depending on the desired features (MFD, GPIO, SYSFS, HWMON, and I2C).

Off-the-shelf Linux distributions such as Fedora, Ubuntu, Debian etc. usually provide support for a set of embedded features without having to customize the kernel. Support for a certain feature can be verified by checking the kernel configuration file which is stored under /boot/ directory.

  • Multi-Function-Device (MFD) - required for iManager

      $ grep CONFIG_MFD_CORE /boot/config-$(uname -r)
    
  • SYFS for Hardware Monitoring

      $ grep CONFIG_HWMON /boot/config-$(uname -r)
    
  • SYFS for GPIO (GPIOLIB and GPIO_SYSFS)

      $ grep CONFIG_GPIO /boot/config-$(uname -r)
    
  • I2C bus driver support

      $ grep 'CONFIG_I2C=' /boot/config-$(uname -r)
    

Build/Install Instructions

Build and install those modules in off-the-shelf Linux distributions:

  • Modify Makefile.kbuild according to your requirements.

  • Remove 'm' at the end of a CONFIG_ line if the driver should not be built.

  • Build and install drivers (modules).

      $ make
    

    Below command will build and install all drivers into the kernel driver tree under a single sub-folder named /extra/imanager/

      $ sudo make install
    

    The drivers can be found at

      /lib/modules/current_kernel_release/extra/imanager/
    

    Use the command uname -r to get the current kernel release

      /lib/modules/$(uname -r)/extra/imanager/
    

Loading and unloading modules

Kernel modules are handled by tools such as modprobe, insmod, and rmmod. You can use these tools manually.

  • Using modprobe and modprobe -r

  • Using insmod and rmmod

    To load imanager-core module (and its sub-platform drivers):

      $ sudo modprobe imanager-core
    

    This will load gpio, i2c, hwmon, backlight, and watchdog modules if available.

    To load imanager-core module by filename (if it is not already installed in /lib/modules/$(uname -r)/extra/imanager/):

      $ sudo insmod imanager-core.ko
    

    To unload a module (gpio, i2c, etc.):

      $ sudo modprobe -r <module name>
    

    Or, alternatively:

      $ sudo rmmod <module name>
    

Using GPIO from user-space

The Linux GPIO Sysfs Interface provides a good source of information regarding GPIO usage through user-space.

Some Linux OSes return a Permission denied even when using sudo command. In this case you would have to switch temporarily to root user.

  • On Debian based systems

      $ sudo su
    
  • Or on Red Hat based systems

      $ su
    

    Export desired GPIO(s)

      #> echo "248" > /sys/class/gpio/export
    

    And then switch back to user

      #> exit
    

CentOS 6/7 Users Requiring Support for GPIO

Please see README_CentOS.md file for customizing a RHEL kernel.

imanager's People

Contributors

rvido avatar sethhillbrand avatar sw-macb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

imanager's Issues

module install fails with error "Can't read private key - DEPMOD 3.13.0-35-generic"

root@leed3:/home/leed/iManager-master/iManager-master# make -C /lib/modules/uname -r/build M=$PWD modules_install
make: Entering directory /usr/src/linux-headers-3.13.0-35-generic' INSTALL /home/leed/iManager-master/iManager-master/gpio-imanager.ko Can't read private key INSTALL /home/leed/iManager-master/iManager-master/i2c-imanager.ko Can't read private key INSTALL /home/leed/iManager-master/iManager-master/imanager.ko Can't read private key INSTALL /home/leed/iManager-master/iManager-master/imanager_bl.ko Can't read private key INSTALL /home/leed/iManager-master/iManager-master/imanager_hwmon.ko Can't read private key INSTALL /home/leed/iManager-master/iManager-master/imanager_wdt.ko Can't read private key DEPMOD 3.13.0-35-generic make: Leaving directory/usr/src/linux-headers-3.13.0-35-generic'

Question: Does GPIO driver support interrupts?

I have successfully built and used the GPIO driver. I noticed that the inputs do not have an edge file in /sys/class/gpio/gpioXXX/. Based on that, I'm assuming that the GPIOs do not support interrupts. Is that a function of the hardware or the kernel driver in gpio-imanager?

some hardware monitoring feather does not suported...

i have AIMB-274
and i can access 3 fan's rpm with windows driver

but with this driver i can olny access cpu fan's rpm and one 3pin fan's rpm

and i can access pch temperature and cpu temp with windows driver..
but only CPU temp with this driver.

windows drivers access extra register??

unexpected hwmon delay on boot

I've recently tried to update the iManager driver for my Linux variant and I noticed that the statistics that imanager-hwmon module populates do not show any updates until after five (5) minutes of uptime. Before the update, an invoke of the sensors command would display updated information for the "imanager_hwmon-isa-0000" block right away:

imanager_hwmon-isa-0000
Adapter: ISA adapter
+12V:        +11.79 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
+5V:          +0.23 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
VBat:         +2.92 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
FAN CPU:        0 RPM  (min = 2000 RPM, max = 6000 RPM)
FAN SYS1:    1665 RPM  (min = 2000 RPM, max = 6000 RPM)
Temp CPU:     +40.0 C  (low  = +40.0 C, high = +85.0 C)
Temp SYS1:    +40.0 C  (low  = +40.0 C, high = +85.0 C)

After updating to a newer version, the sensors information shows the following:

imanager_hwmon-isa-0000
Adapter: ISA adapter
+12VS0:       +0.00 V  (min =  +0.00 V, max =  +0.00 V)
+5VS0:        +0.00 V  (min =  +0.00 V, max =  +0.00 V)
+3.3VS0:      +0.00 V  (min =  +0.00 V, max =  +0.00 V)
FAN CPU:        0 RPM  (min = 2000 RPM, max = 6000 RPM)
FAN SYS1:    2000 RPM  (min = 2000 RPM, max = 6000 RPM)
Temp CPU:     +63.0 C  (low  = +40.0 C, high = +85.0 C)
Temp SYS1:    +63.0 C  (low  = +40.0 C, high = +85.0 C)

No voltages, RPMs or temperature values are updated until (almost exactly) five (5) minutes of uptime:

imanager_hwmon-isa-0000
Adapter: ISA adapter
+12VS0:      +11.79 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
+5VS0:        +0.23 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
+3.3VS0:      +2.92 V  (min =  +0.00 V, max =  +0.00 V)  ALARM
FAN CPU:        0 RPM  (min = 2000 RPM, max = 6000 RPM)
FAN SYS1:    1665 RPM  (min = 2000 RPM, max = 6000 RPM)
Temp CPU:     +39.0 C  (low  = +40.0 C, high = +85.0 C)
Temp SYS1:    +39.0 C  (low  = +40.0 C, high = +85.0 C)

Explicit version/commit information:

  • All kernel variants are based off of Linux v4.4.30.
  • Works with no issues with iManager driver v1.4.0 (commit fe07cd3).
  • Observed issue in iManager driver v1.4.0 (commit 0524834) and iManager driver v1.4.0 (commit b35f807).
  • Modules used: imanager-core, imanager-bl and imanager-hwmon
  • Observed issue on hardware: custom hardware using a SOM-5892 as well as an Advantech SOM-DB5800 development carrier board unit.

Is AIMB-275 board supported?

Dear Sirs,
We are running a linux 4.9.13 kernel on top of a AIMB-275 Mini-ITX motherboard.

The README of this module says AIMB board family have this kind of chip.
However the ec_read_chip function in imanager_init is returning ffff when loading the module.
(Below the log of modprobe printing the "No such device" error message)
It looks like there is no such chip at that address for our board.

Is there another iManager driver implementation?
How can we verify we have the Advantech EC based chip ITE IT8518 or IT8528?

Thank you for your support.

$ sudo modprobe -vvvv imanager-core
modprobe: INFO: ../libkmod/libkmod.c:354 kmod_set_log_fn() custom logging function 0x5563c0513090 registered
modprobe: DEBUG: ../libkmod/libkmod-index.c:790 index_mm_open() file=/lib/modules/4.9.13/modules.dep.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:790 index_mm_open() file=/lib/modules/4.9.13/modules.alias.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:790 index_mm_open() file=/lib/modules/4.9.13/modules.symbols.bin
modprobe: DEBUG: ../libkmod/libkmod-index.c:790 index_mm_open() file=/lib/modules/4.9.13/modules.builtin.bin
modprobe: DEBUG: ../libkmod/libkmod-module.c:529 kmod_module_new_from_lookup() input alias=imanager-core, normalized=imanager_core
modprobe: DEBUG: ../libkmod/libkmod-module.c:535 kmod_module_new_from_lookup() lookup modules.dep imanager_core
modprobe: DEBUG: ../libkmod/libkmod.c:544 kmod_search_moddep() use mmaped index 'modules.dep' modname=imanager_core
modprobe: DEBUG: ../libkmod/libkmod.c:392 kmod_pool_get_module() get module name='imanager_core' found=(nil)
modprobe: DEBUG: ../libkmod/libkmod.c:400 kmod_pool_add_module() add 0x5563c17c75c0 key='imanager_core'
modprobe: DEBUG: ../libkmod/libkmod-module.c:190 kmod_module_parse_depline() 0 dependencies for imanager_core
modprobe: DEBUG: ../libkmod/libkmod-module.c:556 kmod_module_new_from_lookup() lookup imanager_core=0, list=0x5563c17c76d0
modprobe: DEBUG: ../libkmod/libkmod-module.c:1707 kmod_module_get_initstate() could not open '/sys/module/imanager_core/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1717 kmod_module_get_initstate() could not open '/sys/module/imanager_core': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1355 kmod_module_get_options() modname=bt87x mod->name=imanager_core mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1355 kmod_module_get_options() modname=cx88_alsa mod->name=imanager_core mod-> alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1355 kmod_module_get_options() modname=saa7134_alsa mod->name=imanager_core mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1355 kmod_module_get_options() modname=snd_atiixp_modem mod->name=imanager_core mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1355 kmod_module_get_options() modname=snd_intel8x0m mod->name=imanager_core mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1355 kmod_module_get_options() modname=snd_via82xx_modem mod->name=imanager_core mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1355 kmod_module_get_options() modname=snd_usb_audio mod->name=imanager_core mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1355 kmod_module_get_options() modname=snd_usb_caiaq mod->name=imanager_core mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1355 kmod_module_get_options() modname=snd_usb_ua101 mod->name=imanager_core mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1355 kmod_module_get_options() modname=snd_usb_us122l mod->name=imanager_core mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1355 kmod_module_get_options() modname=snd_usb_usx2y mod->name=imanager_core mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1355 kmod_module_get_options() modname=snd_cmipci mod->name=imanager_core mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1355 kmod_module_get_options() modname=snd_pcsp mod->name=imanager_core mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1355 kmod_module_get_options() modname=snd_usb_audio mod->name=imanager_core mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1355 kmod_module_get_options() modname=vmwgfx mod->name=imanager_core mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1355 kmod_module_get_options() modname=BOOT_IMAGE=/boot/vmlinuz_4 mod->name=imanager_core mod->alias=(null)
modprobe: DEBUG: ../libkmod/libkmod-module.c:1707 kmod_module_get_initstate() could not open '/sys/module/imanager_core/initstate': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:1717 kmod_module_get_initstate() could not open '/sys/module/imanager_core': No such file or directory
modprobe: DEBUG: ../libkmod/libkmod-module.c:717 kmod_module_get_path() name='imanager_core' path='/lib/modules/4.9.13/extra/imanager/imanager-core.ko'
modprobe: DEBUG: ../libkmod/libkmod-module.c:717 kmod_module_get_path() name='imanager_core' path='/lib/modules/4.9.13/extra/imanager/imanager-core.ko'
insmod /lib/modules/4.9.13/extra/imanager/imanager-core.ko 
modprobe: DEBUG: ../libkmod/libkmod-module.c:717 kmod_module_get_path() name='imanager_core' path='/lib/modules/4.9.13/extra/imanager/imanager-core.ko'
modprobe: INFO: ../libkmod/libkmod-module.c:861 kmod_module_insert_module() Failed to insert module '/lib/modules/4.9.13/extra/imanager/imanager-core.ko': No such device
modprobe: ERROR: could not insert 'imanager_core': No such device
modprobe: DEBUG: ../libkmod/libkmod-module.c:441 kmod_module_unref() kmod_module 0x5563c17c75c0 released
modprobe: DEBUG: ../libkmod/libkmod.c:408 kmod_pool_del_module() del 0x5563c17c75c0 key='imanager_core'
modprobe: INFO: ../libkmod/libkmod.c:321 kmod_unref() context 0x5563c17c72b0 released

"write error: Invalid argument" when exporting GPIO

I am working on an Advantech MIO-5271 with Ubuntu 16.04 and kernel 4.4.0-31. After building and installing the kernel modules as described in the README, I am unable to export the GPIOs. My steps are below. Any help would be greatly appreciated. Thanks!

root@tm-test:~/iManager# make
make -C /lib/modules/4.4.0-31-generic/build M=/root/iManager clean
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-31-generic'
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-31-generic'
rm -f -rf *.bak
make -C /lib/modules/4.4.0-31-generic/build M=/root/iManager modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-31-generic'
  CC [M]  /root/iManager/imanager-core.o
  CC [M]  /root/iManager/gpio-imanager.o
  CC [M]  /root/iManager/i2c-imanager.o
  CC [M]  /root/iManager/imanager-hwmon.o
  CC [M]  /root/iManager/imanager_bl.o
  CC [M]  /root/iManager/imanager_wdt.o
  Building modules, stage 2.
  MODPOST 6 modules
  CC      /root/iManager/gpio-imanager.mod.o
  LD [M]  /root/iManager/gpio-imanager.ko
  CC      /root/iManager/i2c-imanager.mod.o
  LD [M]  /root/iManager/i2c-imanager.ko
  CC      /root/iManager/imanager-core.mod.o
  LD [M]  /root/iManager/imanager-core.ko
  CC      /root/iManager/imanager-hwmon.mod.o
  LD [M]  /root/iManager/imanager-hwmon.ko
  CC      /root/iManager/imanager_bl.mod.o
  LD [M]  /root/iManager/imanager_bl.ko
  CC      /root/iManager/imanager_wdt.mod.o
  LD [M]  /root/iManager/imanager_wdt.ko
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-31-generic'
root@tm-test:~/iManager# make install
make -C /lib/modules/4.4.0-31-generic/build M=/root/iManager modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-31-generic'
  Building modules, stage 2.
  MODPOST 6 modules
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-31-generic'
make -C /lib/modules/4.4.0-31-generic/build M=/root/iManager INSTALL_MOD_DIR=extra/imanager modules_install
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-31-generic'
  INSTALL /root/iManager/gpio-imanager.ko
At main.c:222:
- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178
sign-file: certs/signing_key.pem: No such file or directory
  INSTALL /root/iManager/i2c-imanager.ko
At main.c:222:
- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178
sign-file: certs/signing_key.pem: No such file or directory
  INSTALL /root/iManager/imanager-core.ko
At main.c:222:
- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178
sign-file: certs/signing_key.pem: No such file or directory
  INSTALL /root/iManager/imanager-hwmon.ko
At main.c:222:
- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178
sign-file: certs/signing_key.pem: No such file or directory
  INSTALL /root/iManager/imanager_bl.ko
At main.c:222:
- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178
sign-file: certs/signing_key.pem: No such file or directory
  INSTALL /root/iManager/imanager_wdt.ko
At main.c:222:
- SSL error:02001002:system library:fopen:No such file or directory: bss_file.c:175
- SSL error:2006D080:BIO routines:BIO_new_file:no such file: bss_file.c:178
sign-file: certs/signing_key.pem: No such file or directory
  DEPMOD  4.4.0-31-generic
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-31-generic'
/sbin/depmod -a
root@tm-test:~/iManager# modprobe imanager-core
root@tm-test:~/iManager# lsmod | grep imanager
imanager_wdt           16384  0
i2c_imanager           16384  0
imanager_hwmon         28672  0
gpio_imanager          16384  0
imanager_bl            16384  0
imanager_core          20480  5 i2c_imanager,gpio_imanager,imanager_hwmon,imanager_bl,imanager_wdt
root@tm-test:~/iManager# echo "0" > /sys/class/gpio/export
-su: echo: write error: Invalid argument

Dmesg Output:

[  134.037509] imanager_core: module verification failed: signature and/or required key missing - tainting kernel
[  134.127820] imanager imanager: Found Advantech iManager it8528 - MIO-5271 13.14/1.0 (release)
[  134.132421] imanager-gpio imanager-gpio: GPIO initialized with 8 pins
[  134.193427] imanager-smbus imanager-smbus: SMBus frequency: 100 kHz
[  134.338528] imanager-wdt imanager-wdt: Driver loaded (timeout=30 seconds)
[  150.071675] export_store: invalid GPIO 1
[ 1021.013955] export_store: invalid GPIO 0

suggestion | mark release file with interim postfix

The following is a suggestion towards marking the RELEASE file version entry for specific release cycle events. If the following doesn't fit in your own release cycle process or is just not really desired, feel free to ignore this request.


The following suggests that the interim release value found in RELEASE should be appended with a -git postfix (ex. v1.4.0-git). This would allow a developer to easily confirm the non-stable variant release from just using the source. Doing this, however, requires an official release to involve two (2) commits: a release commit (removing -git postfix and tagging) and a kickoff cycle commit (updating new version target and re-adding postfix). Consider the following examples: release commit and kickoff cycle commit.

Fails to build install on ubunto 18.04.5 LTS.

I am trying to build on ubuntu 18.04.5 and when running "sudo make install" I am getting the message:

make -C /lib/modules/5.4.0-74-generic/build M=/home/yoni/GIT/iManager modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-74-generic'
Building modules, stage 2.
MODPOST 2 modules
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-74-generic'
make -C /lib/modules/5.4.0-74-generic/build M=/home/yoni/GIT/iManager INSTALL_MOD_DIR=extra/imanager modules_install
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-74-generic'
INSTALL /home/yoni/GIT/iManager/i2c-imanager.ko
At main.c:178:

  • SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:72
  • SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:79
    sign-file: certs/signing_key.x509: No such file or directory
    INSTALL /home/yoni/GIT/iManager/imanager-core.ko
    At main.c:178:
  • SSL error:02001002:system library:fopen:No such file or directory: ../crypto/bio/bss_file.c:72
  • SSL error:2006D080:BIO routines:BIO_new_file:no such file: ../crypto/bio/bss_file.c:79
    sign-file: certs/signing_key.x509: No such file or directory
    DEPMOD 5.4.0-74-generic
    Warning: modules_install: missing 'System.map' file. Skipping depmod.
    make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-74-generic'
    /sbin/depmod -a

Question

I've got an IT8528 chip or at least so does it seem, it's a Razer Blade 14' 2014 system and the IT87 module reports an unknown chip 0x8520 revision a.
However upon building, installing and loading the module I get:
insmod: ERROR: could not insert module imanager-core.ko: No such device

This is on Gentoo, under 4.7.2-gentooSources.

Am I doing something wrong?

Fails to build on Debian 11.3

Trying to build on Debian 11.3. Fails with the following errors:

make[1]: Entering directory '/usr/src/linux-headers-5.10.0-13-amd64'
make[1]: Leaving directory '/usr/src/linux-headers-5.10.0-13-amd64'
rm -f -rf *.bak
make -C /lib/modules/5.10.0-13-amd64/build M=/home/john/iManager modules
make[1]: Entering directory '/usr/src/linux-headers-5.10.0-13-amd64'
  CC [M]  /home/john/iManager/imanager-core.o
/home/john/iManager/imanager-core.c: In function ‘imanager_register_cells’:
/home/john/iManager/imanager-core.c:806:13: error: assignment of read-only location ‘devs[i++]’
  806 |   devs[i++] = imanager_devs[IMANAGER_BACKLIGHT];
      |             ^
/home/john/iManager/imanager-core.c:809:13: error: assignment of read-only location ‘devs[i++]’
  809 |   devs[i++] = imanager_devs[IMANAGER_GPIO];
      |             ^
/home/john/iManager/imanager-core.c:812:13: error: assignment of read-only location ‘devs[i++]’
  812 |   devs[i++] = imanager_devs[IMANAGER_HWMON];
      |             ^
/home/john/iManager/imanager-core.c:815:13: error: assignment of read-only location ‘devs[i++]’
  815 |   devs[i++] = imanager_devs[IMANAGER_SMB];
      |             ^
/home/john/iManager/imanager-core.c:818:13: error: assignment of read-only location ‘devs[i++]’
  818 |   devs[i++] = imanager_devs[IMANAGER_WDT];
      |             ^
/home/john/iManager/imanager-core.c: In function ‘imanager_add_attribute’:
/home/john/iManager/imanager-core.c:222:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
  222 |   switch (attr->did) {
      |   ^~~~~~
/home/john/iManager/imanager-core.c:238:2: note: here
  238 |  case ADC:
      |  ^~~~
/home/john/iManager/imanager-core.c:239:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
  239 |   switch (attr->did) {
      |   ^~~~~~
/home/john/iManager/imanager-core.c:281:2: note: here
  281 |  case PWM:
      |  ^~~~
/home/john/iManager/imanager-core.c:282:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
  282 |   switch (attr->did) {
      |   ^~~~~~
/home/john/iManager/imanager-core.c:315:2: note: here
  315 |  case SMB:
      |  ^~~~
/home/john/iManager/imanager-core.c:316:3: warning: this statement may fall through [-Wimplicit-fallthrough=]
  316 |   switch (attr->did) {
      |   ^~~~~~
/home/john/iManager/imanager-core.c:334:2: note: here
  334 |  case IRQ:
      |  ^~~~
make[3]: *** [/usr/src/linux-headers-5.10.0-13-common/scripts/Makefile.build:285: /home/john/iManager/imanager-core.o] Error 1
make[2]: *** [/usr/src/linux-headers-5.10.0-13-common/Makefile:1846: /home/john/iManager] Error 2
make[1]: *** [/usr/src/linux-headers-5.10.0-13-common/Makefile:185: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.10.0-13-amd64'
make: *** [Makefile:29: modules] Error 2```

Question about implementing the watchdog using C#

I'm fairly new to the linux/embedded space but need to implement the watchdog for our SOM. So far I have successfully compiled and installed the module and am able to use the watchdog, but want to know if I am using the correct commands as the driver was intended. I will need to implement this using C#, and plan to run these commands using a C# Process object. Is there a better way to use the watchdog functionality?

To enable and feed the watchdog from the terminal, I am using:
echo 1 > /dev/watchdog1
To stop the watchdog, I use:
echo 0 > /dev/watchdog1
To change the timeout from the default, I use:
rmmod imanager_wdt
insmod /lib/modules/$(uname -r)/extra/imanager/imanager_wdt.ko timeout=60

This seems to work just fine, but I wanted to know if these commands are the correct usage or if there is a better way.
Thanks in advance

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.