Moxa Cross-Compiling Interactive Script; Manually Build The Real Tty Driver With A Cross-Compiler - Moxa Technologies NPort 5000 Series User Manual

Hide thumbs Also See for NPort 5000 Series:
Table of Contents

Advertisement

Moxa cross-compiling interactive script

To simplify the processes above, Moxa has provided an interactive script, "mxcc", to cross-compile these
drivers. You may execute ./mxcc in the Real TTY driver source directory to cross-compile the MOXA driver.
The steps are as follows:
# ./mxcc
Enter target device architecture (ARCH) [arm]:
Enter cross-compiler (CROSS_COMPILE) [arm-linux-gnueabihf-]:
Enter target device kernel source directory [/moxa/kernel/]:
If you wish to use secure communication with the NPort 6000 Series device, choose
[Y] to enable the SSL function.
Note: This function supports Real COM with secure mode in the NPort 6000 Series
only.
Do you want to enable secure mode? [Y/N]: N
The polling mode allows you to open the tty port as nonblocking even if the NPort
is not connected.
Do you want to set the driver to polling mode? [Y/N]: N
*******************************************************************
MOXA NPort Server Real TTY Driver Series driver cross-compiling finished.
When cross compiling is successful, the driver is outputted to output folder.
*******************************************************************
The binaries will now be generated and placed in the output directory under the source code folder.

Manually build the Real TTY driver with a cross-compiler

To cross-compile npreal2 driver, users can find "Makefile" in the driver
source folder, then run it.
# make -C KDIR=<KERNEL_SOURCE> M=<DRIVER_SOURCE> ARCH=<ARCH>
CROSS_COMPILE=<CROSS_COMPILE>
KVER_MINOR=<KERNEL_MINOR> modules
<KERNEL_SOURCE>: The directory of target kernel source.
<DRIVER_SOURCE>: The directory of the Real TTY driver source.
<ARCH>: The target Arm environment device's CPU architecture. For example, arm, arm64.
<CROSS_COMPILE>: The cross-compile toolchain path. If the toolchain is arm-linux-gnueabihf, and the
path of toolchain exists in your PATH environment variable, please enter "arm-linux-gnueabihf-" here.
<KERNEL_MAJOR>: The target Arm system kernel source's kernel major version. You can use the command
"make kernelversion" to get the kernel source's major version.
For example:
# make kernelversion
4.4.0
|
+--- kernel major version
<KERNEL_MINOR>: The target Arm system kernel source's kernel minor version. You can use the command
"make kernelversion" to get the kernel source's minor version.
For example:
$ make kernelversion
4.4.0
|
+--- kernel minor version
NPort 5000 Series User Manual
KVER_MAJOR=<KERNEL_MAJOR>
150

Hide quick links:

Advertisement

Table of Contents
loading

Table of Contents