================================================================================
=                                CORAS(LNX)                                    =
=                        CONTEC RAS driver for Linux                           =
=                                                              Ver. 1.17.0     =
=                                                          CONTEC Co.,Ltd.     =
================================================================================

◆ Contents
===========
  Introduction
  About the Product
  Support products
  Restrictions
  Note
  install/uninstall
  File Structure
  Version up history

◆ Introduction
================
  The explanation of CORAS(LNX) is described as follows. You must read it
  because some contents are not described in help.

◆ About the Product
=====================
  - CORAS(LNX) supplies the set of functions for controlling our board by the
    driver and the shared library in module.

  - Start up the driver and use it, by using the script files for starting the
    driver.

  - Sample source code is attached.

◆ Support products
====================
  - BX-220 Series *1
  - BX-320 Series
  - BX-830 Series *1
  - BX-956S Series
  - PT-956S Series
  - BX-825 Series
  - CPS-BXC200 Series *2
  - BX-U200 Series
  - BX-T1000 Series *1
  - BX-T210 Series
  - PT-V10/15WB-2x0 Series *3
  - BX-M1500 Series
  - BX-M2500 Series
  - BX-T3000 Series
  - PT-M1xSA-210 Series
  - BX-T310-J Series
  - BX-M310-J Series
  - PT-M07WA-310/PT-F10SA-320/PT-F12SA-320 Series
  - BX-U310 Series
  - BX-T5000-J Series
  - BX-M4600/BX-M4600P2/BX-M4600P4 Series
  - BX-M540-J Series

  *1) For the BX-220 Series, BX-830 Series, BX-T1000 Series, it is necessary to
  rebuild Linux kernel in order to use all functions. For details, please check
  the contents of the Linux Operation Confirmation. Also, set the necessary
  module loading such as i2c-dev beforehand before installation, and change
  the bus number in the program code of the utility as appropriate.

  *2) For the CPS-BXC200 Series, if you want to use the DIO operation of the
  main unit with our DIO driver and the WDT operation of this RAS driver
  together, be sure to perform exclusive control appropriately for each.
  If you do not exclusively control each operation, unintended problems may
  occur.

  *3) Regarding backlight control in PT-V10/15WB-2x0 Series
  It is possible to control the built-in LCD brightness through ACPI(acpi_video
  driver), but when using this utility software, it cannot be used together with
  brightness control through ACPI. Unintended behavior may occur if used
  together with backlight control from "/sys/class/backlight/acpi_video0".
  When using this utility software, please use the LCD backlight control
  provided by the driver module (coras). When using it, you need to add
  "acpi_backlight=vendor" to the kernel option in advance. Make sure that the
  "/sys/class/backlight/contec_backlight" directory exists with the coras driver
  module loaded. Please confirm that you can change the brightness by entering a
  value in the "brightness" file under that directory or by operating it from
  the desktop environment. The input range for "brightness" can be from 0 to
  "max_brightness".
  A brightness value of 0 is the lower limit of the setting range in which the
  backlight will not turn off completely. If you want to turn the LCD backlight
  ON/OFF without relying on OS control, enter 4 (FB_BLANK_POWERDOWN) in
  "bl_power" to turn it off, and enter 0 (other than 4) to turn it on.
  Saving the brightness value settings at OS shutdown and restoring them at
  startup is executed from the coras_load service.

◆ Restrictions
================
  The operation check environment is as follows.
  The following description may be described together with the confirmation
  information in the conventional version. Please note that the execution has
  not been confirmed again for all combinations of this version and all models
  and the listed distributions (and versions). In addition, we do not guarantee
  the operation with all the listed models and each distribution (and version).
  * The contents below are as of the release. It may not match the support
    status of each distribution.
  * For operation confirmation information for individual models, see the
    contents of the operation confirmation document for each model.

  Distribution                  Kernel version
  ----------------------      ------------------
  Ubuntu
    Ubuntu 20.04 LTS          5.4.0-26-generic(x86_64)
                              5.8.0-43-generic(x86_64)(hwe)
                              5.11.0-27-generic(x86_64)(hwe)
                              5.13.0-30-generic(x86_64)(hwe)
                              5.15.0-67-generic(x86_64)(hwe)
    Ubuntu 22.04 LTS          5.15.0-25-generic(x86_64)
                              6.2.0-26-generic(x86_64)(hwe)
                              6.8.0-40-generic(x86_64)(hwe)
    Ubuntu 24.04 LTS          6.8.0-41-generic(x86_64)
                              6.14.0-27-generic(x86_64)(hwe)
                              6.17.0-14-generic(x86_64)(hwe)
    Ubuntu 26.04 LTS          7.0.0-27-generic(x86_64)
  Red Hat Enterprise Linux(RHEL)
    RHEL 7.9                  3.10.0-1160.el7.x86_64
    RHEL 8.3                  4.18.0-240.el8.x86_64
    RHEL 8.4                  4.18.0-305.el8.x86_64
    RHEL 8.6                  4.18.0-372.9.1.el8.x86_64
    RHEL 8.9                  4.18.0-513.5.1.el8_9.x86_64
    RHEL 8.10                 4.18.0-553.el8_10.x86_64
    RHEL 9.0                  5.14.0-70.13.1.el9_0.x86_64
    RHEL 9.3                  5.14.0-362.8.1.el9_3.x86_64
    RHEL 9.4                  5.14.0-427.13.1.el9_4.x86_64
    RHEL 9.5                  5.14.0-503.11.1.el9_5.x86_64
    RHEL 9.6                  5.14.0-570.12.1.el9_6.x86_64
    RHEL 9.7                  5.14.0-611.5.1.el9_7.x86_64
    RHEL 9.8                  5.14.0-687.5.1.el9_8.x86_64
    RHEL 10.0                 6.12.0-55.9.1.el10_0.x86_64
    RHEL 10.1                 6.12.0-124.8.1.el10_1.x86_64
    RHEL 10.2                 6.12.0-211.7.1.el10_2.x86_64
  MIRACLE LINUX(ML)
    ML 8.4                    4.18.0-305.el8.x86_64
    ML 8.6                    4.18.0-372.9.1.el8.x86_64
    ML 8.8                    4.18.0-477.10.1.el8_8.x86_64
    ML 8.10                   4.18.0-553.el8_10.x86_64
    ML 9.0                    5.14.0-70.13.1.el9_0.x86_64
    ML 9.2                    5.14.0-284.11.1.el9_2.x86_64
    ML 9.4                    5.14.0-427.13.1.el9_4.x86_64
    ML 9.6                    5.14.0-570.12.1.el9_6.x86_64
  AlmaLinux(AL)
    AL 9.6                    5.14.0-570.12.1.el9_6.x86_64
    AL 9.7                    5.14.0-611.5.1.el9_7.x86_64
    AL 9.8                    5.14.0-687.5.1.el9_8.x86_64
    AL 10.0                   6.12.0-55.9.1.el10_0.x86_64(x86_64-v3)
    AL 10.1                   6.12.0-124.8.1.el10_1.x86_64(x86_64-v3)
    AL 10.2                   6.12.0-211.7.1.el10_2.x86_64(x86_64-v3)

  dependencies
  ------------
    - glibc ≧ 2.17
    - gcc
    - GNU make
    - systemd
    etc.

◆ Note
==============
  - Before using the driver source and library included in this software
    package, please check the contents of the attached EULA and agree to the
    terms of use.

  - You need to have root privileges to install and configure the driver, start
    it, and run make. In addition, there may be restrictions on operations,
    etc. depending on your environment such as permission settings and security
    settings.

  - When updating the kernel, rebuild this kernel module as appropriate.

  - For details, please refer to the help documents and the contents of each
    script and program source.

◆ install/uninstall
==================
[src package]
  - install
    Compile and install modules, libraries, etc.

    # cd ./(CORASLNX_Top_Directory)
    # make install

  - uninstall
    Uninstalls modules, libraries, etc.

    # cd ./(CORASLNX_Top_Directory)
    # make uninstall

    * If you have changed the installation destination, the uninstall process
      may not be performed properly, so please check the contents in advance.
      Also, when uninstalling, do not use a version different from the one used
      at the time of installation. It may not be processed normally.

* makefile Execution option
The following options are available, so please use them as needed.
  install         ... The module and library related items will be installed.
  uninstall       ... The module and library related items will be uninstalled.
  install_all     ... The module, library and sample utilities(temperature
                      monitoring daemon) will be installed.
  uninstall_all   ... The module, library and sample utilities(temperature
                      monitoring daemon) will be uninstalled.
  install_util    ... The sample utilities (temperature monitoring daemon) will
                      be installed. (Requires installation related to module and
                      library)
  uninstall_util  ... The sample utilities will be uninstalled.
                      (temperature monitoring daemon)
  sample          ... Build the console sample corresponding to the device.
                      (Note: Since it is judged only by dmi information,
                      it may be built including unsupported ones.)
  clean           ... Delete the intermediate files, executable files, etc.
                      created when "install" and "sample" options are used.

* If you want to compile and install them individually, please refer to the help
  document and the contents of each makefile, and check the installation order
  before proceeding.

* For RHEL-based distributions, the coras driver module may not load properly
  due to SELinux security policy. If the loading of the coras module is
  restricted by SELinux, you need to make changes such as setting the policy
  appropriately. The following is an example of how to set the policy.
  (Run after installation)
  #Create and move to work directory
    # mkdir (work_dir) && cd ./(work_dir)
  #Generate policy package
    # ausearch -c 'insmod' -f '/opt/contec/CoRasMod/coras.ko' --raw | \
      audit2allow -M coras-insmod
  #Enable policy package
    # semodule -i coras-insmod.pp
  #Confirm that policy package is enabled
    # semanage module -l | grep coras-insmod

  #Reload coras module
    # systemctl restart coras_load.service


[rpm package]
The included RPM package may be used in RHEL and RHEL compatible environments
such as AlmaLinux. Below is an example using the dnf command.

  - install
    # cd ./(CORASLNX_Top_Directory)/rpm/elX/<arch>

    package install
    # dnf install \
      ./kmod-coras.X.X-X.elX.<arch>.rpm \
      ./coras-X.X-X.elX.<arch>.rpm \
      ./coras-tools-X.X-X.elX.<arch>.rpm \
      ./coras-devel-X.X-X.elX.<arch>.rpm

    coras module load (start service or reboot)
    # systemctl start coras_load

    CLI tool execution test (temperature information)
    # corasctl temp

    * The kmod package is in kABI-tracking kmod format. Please install the
      package according to the execution environment (for example, for an el9.1
      kernel environment, install the 162.6.1.el9_1 package, etc.). If you
      update the kernel package to a newer el minor release after installing
      the kmod package, the kernel modules in the kmod package may stop working
      due to kernel ABI incompatibilities. When upgrading, you must ensure that
      the appropriate kmod-coras package is provided and update or reinstall the
      kmod-coras package.

  - uninstall
    package uninstall
    # dnf remove kmod-coras coras coras-tools coras-devel

[deb package]
May be available in compatible environments such as Ubuntu.
The following is an execution example using the apt command.

  - install
    # cd ./(CORASLNX_Top_Directory)/debs/<ubuntu_codename>/<arch>

    package install
    # apt install \
      ./coras-dkms_X.XX-XubuntuX_<arch>.deb \
      ./coras_X.XX-XubuntuX_<arch>.deb \
      ./coras-tools_X.XX-XubuntuX_<arch>.deb \
      ./coras-dev_X.XX-XubuntuX_<arch>.deb

    CLI tool execution test (temperature information)
    # corasctl temp

    * The "coras-dkms" package uses dkms. You will need to install dkms and
      dependent packages. When updating a kernel package, dkms will attempt to
      rebuild this module for the target kernel.

  - uninstall
    package uninstall
    # apt purge coras-dkms coras coras-tools coras-dev

[note]
* For PT-V10/15WB-2x0 Series, be sure to add "acpi_backlight=vendor" to the
  kernel option.
* The default settings for the temperature monitoring daemon sample are set to
  the same values regardless of the model, so please change the settings as
  appropriate when using it.
* Sample programs (sample cli tools, hardware monitoring daemon sample)
  The cli tool sample(corasctl) and hardware monitoring daemon sample(cohwmond)
  uses libudev.h or sd-device.h. Additionally, the following dependent packages
  are required.
    - ubuntu 20.04, ubuntu 22.04, ubuntu 24.04、ubuntu 26.04
      libsystemd-dev
    - RHEL7、RHEL8、RHEL9、RHEL10、ML8、ML9、AL8、AL9、AL10
      systemd-devel

◆ File Structure
============================
  The file structure is as follows.

  ./(CORASLNX_Top_Directory)/
    readme_j.txt .......... README file (Japanese)
    readme_e.txt .......... README file (English)
    EULA_JP.txt ........... License Agreement (Japanese)
    EULA_EN.txt ........... License Agreement (English)

    help/ ................. help file storage directory
      jp/ ................. Japanese version
        corashelp.htm ..... html help files
        data/ ............. Help data
      en/ ................. English version
        corashelp.htm ..... html help files
        data/ ............. Help data

    module/ ............... coras driver module

    library/
      include/
        coras_lib.h ....... Shared library header file
        coras_ctl.h ....... Shared library / device driver common header file
        mtdll.h ........... Shared library / device driver common header file
      x86_64/ ............. 64bit Shared library
        libcoraslib.so.x.x(.x)
        libmtdll.so.x.x(.x)
      Makefile ............ Makefile for installing

    samples/
      corasctl/ ........... sample cli tool
      cohwmond/ ........... hardware(temperature) monitoring daemon sample
      console_samples/ .... Sample source code storage directory
        bin/ .............. for console sample binary
        dio/ .............. General purpose input/output control sample program
        hwmon/ ............ Hardware monitor sample program
        PMonitor/ ......... Temperature monitoring sample program
        RS485/ ............ RS485 communication mode control sample program
        Serial/ ........... RS-422/485 communication sample program
        sled/ ............. Status LED control sample program
        uSW/ .............. The user switch status acquisition sample program
        wdt/ .............. Watchdog timer control sample program

      old_samples/ ........ Obsolete sample program
        cothermald/ ....... [obsolete] Temperature monitoring daemon sample
                            (before v1.10)
        CoRasGuiUtil/ ..... [obsolete] GUI utility sample (before v1.10)

    rpms/ ................. rpm packages
      el8/x86_64/ ......... for el8 - x86_64
      el9/x86_64/ ......... for el9 - x86_64
      el10/x86_64/ ........ for el10 - x86_64(x86_64-v3)

      [rpm packages]
        kmod-coras ........ kmod kernel module packages (kABI-tracking kmod)
        coras ............. coras package(module init service and libs)
        coras-devel ....... for development sub-package(header, etc.)
        coras-tools ....... sample tools sub-package (daemon and cli tools)

        * about rpm file name
          <pkg_name>-<pkg_ver>-<pkg_rel>[.<extra_ver>].<dist>.<arch>.rpm
            pkg_name  : package name (coras, coras-devel, etc.)
            pkg_ver   : package version
            pkg_rel   : package release (rpm package)
            extra_ver : extra version info
                       (kmod-coras : additional kernel information at build)
                        [el8]
                          80       : el 8.0
                          147      : el 8.1 - 8.2
                          240      : el 8.3 - 8.4
                          348      : el 8.5
                          372.9.1  : el 8.6 - 8.7
                          477.10.1 : el 8.8 - 8.10
                        [el9]
                          70.13.1  : el 9.0
                          162.6.1  : el 9.1
                          284.11.1 : el 9.2
                          362.8.1  : el 9.3
                          427.13.1 : el 9.4
                          503.11.1 : el 9.5
                          570.12.1 : el 9.6
                          611.5.1  : el 9.7
                          687.5.1  : el 9.8
                        [el10]
                          55.9.1   : el 10.0
                          124.8.1  : el 10.1
                          211.7.1  : el 10.2
            dist      : elX(_X)
            arch      : x86_64

    debs/ ................. deb packages
      jammy/x86_64/ ....... for 22.04(.X) LTS (Jammy Jellyfish) x86_64
      noble/x86_64/ ....... for 24.04(.X) LTS (Noble Numbat) x86_64
      resolute/x86_64/ .... for 26.04(.X) LTS (Resolute Raccoon) x86_64

      [deb packages]
        coras-dkms ........ kernel module packages (dkms)
        coras ............. coras package(module init service and libs)
        coras-dev ......... for development sub-package(header, etc.)
        coras-tools ....... sample tools sub-package (daemon and cli tools)

        * about deb file name
          <pkg_name>_<pkg_ver>[-revision]_<arch>.rpm
            pkg_name  : package name (coras, coras-devel, etc.)
            pkg_ver   : package version
            revision  : debian revision
            arch      : amd64

◆ Version up history
=====================================
  Ver. 1.17.0 (Jul. 2026)
  -----------------------------
    - added support products (BX-M540-J Series)

  Ver. 1.16.0 (May. 2026)
  -----------------------------
    - added support products (BX-M4600/BX-M4600P2/BX-M4600P4 Series)

  Ver. 1.15.0 (Aug. 2025)
  -----------------------------
    - added support products (BX-T5000-J Series)
    - added rpm packages for
      - el 10

  Ver. 1.14.1 (Jul. 2025)
  -----------------------------
    - bugfix : Fixed an unexpected return value (INVALID_CALL (0x20001003))
      when executing the following functions on models other than the BX-U310.
        - MT_StartWDT
        - MT_StopWDT
        - MT_SetWDT
        - MT_TickWDT

  Ver. 1.14 (Dec. 2024)
  -----------------------------
    - added support products (BX-U310 Series)
    - Update to attached deb packages
      - Removed deb packages for ubuntu 18.04(.x) LTS (Focal Fossa)
      - Added deb packages for ubuntu 24.04(.x) LTS (Noble Numbat)
    - Updated list of supported distributions
      - CentOS 7 removed due to EOL
      etc.

  Ver. 1.13 (May  2024)
  -----------------------------
    - added
      - Support products (PT-M07WA-310/PT-F10SA-320/PT-F12SA-320 Series)

  Ver. 1.12 (Mar. 2024)
  -----------------------------
    - added
      - Support products (BX-T310-J, BX-M310-J)

  Ver. 1.11 (Jan. 2024)
  -----------------------------
    - add binary packages (rpm, deb)
      - add rpm packages for
        - el8
        - el9
      - add deb packages for
        - Ubuntu 20.04 LTS (Focal Fossa)
        - Ubuntu 22.04 LTS (Jammy Jellyfish)
    - add sample cli-tool(corasctl)
    - Migrated temperature monitoring daemon sample from cothermald to cohwmond.
      The status of the old temperature monitoring daemon sample (cothermald)
      has been moved to obsolete.
    - update sample GUI tool : GTK+2 -> GTK+3
      The status of the sample GUI tool has been moved to obsolete.
    - Update some documents and confirm information

  Ver. 1.10 (Sep. 2022)
  -----------------------------
    - added
      - Support products (PT-M1xSA-210)

  Ver. 1.09 (May. 2022)
  -----------------------------
    - added
      - Support products (BX-T3000)
    - Update confirm information

  Ver. 1.08 (Dec. 2021)
  -----------------------------
    - added
      - Support products (BX-M2500)

  Ver. 1.07 (Oct. 2021)
  -----------------------------
    - added
      - Support products (BX-M1500)
    - Partial revision of EULA

  Ver. 1.06 (Aug. 2021)
  -----------------------------
    - added
      - Support products (PT-V10WB)
    - Extension of driver related to backlight operation of PT-V10WB Series
    - Update confirm information

  Ver. 1.05 (Apr. 2021)
  -----------------------------
    - added
      - Support products (BX-T210)
    - MT_GetVoltage func fix (BX-T1000)
    - Update confirm information
    - Some specification changes
      - code modification, Minor fix

  Ver. 1.04 (Oct. 2020)
  -----------------------------
    - added
      - Support products (BX-T1000)

  Ver. 1.03 (Jul. 2020)
  -----------------------------
    - added
      - Support products (BX-U200)
    - remove coras_shmtx
    - Update confirm information
    - Some specification changes
      - code modification, Minor fix

  Ver. 1.02 (May. 2020)
  -----------------------------
    - added
      - Support products (CPS-BXC200)
    - Update confirm information
    - Some specification changes
      - File Structure

  Ver. 1.01 (Oct. 2019)
  -----------------------------
    - Added
      - GUI Utility Sample
      - Temperature monitoring daemon
      - Support product(BX-825)
    - [functions]Add MT_StartMonitoringEx
    - [library]Some specification changes

  Ver. 1.00 (Feb. 2018)
  -----------------------------
    - First Release

<<------------------------------------------------------------------------------
  Linux® is the registered trademark of Linus Torvalds in the U.S. and other
  countries. Ubuntu is a trademark or registered trademark of Canonical Ltd.
  CentOS, Red Hat, and Red Hat Enterprise Linux are registered trademarks of
  Red Hat, Inc. in the United States and other countries. MIRACLE LINUX is
  registered trademarks of Cybertrust Japan Co., Ltd. AlmaLinux is trademarks
  of AlmaLinux OS Foundation. Other brand, product names and service names are
  trademarks of their respective holder.
------------------------------------------------------------------------------>>
