第 10 章 console / terminal

10.1. serial console

gurb

$ sudo vim /boot/grub/menu.lst

title           Ubuntu 8.04.1, kernel 2.6.24-21-generic
root            (hd0,5)
kernel          /boot/vmlinuz-2.6.24-21-generic root=UUID=3d5dd6c0-bbd2-4ddf-9b71-1c7b78e8de3b ro quiet splash 

console=tty0 console=ttyS0,38400
initrd          /boot/initrd.img-2.6.24-21-generic
quiet	
		

tty6

$ sudo vim /etc/event.d/tty6

respawn
#exec /sbin/getty 38400 tty6
exec /sbin/getty -L /dev/ttyS0 38400 vt100	
		

other terminal: VT100, VT220, VT320, VT420

securetty

$ cat /etc/securetty
# for people with serial port consoles
ttyS0
		





原文出处:Netkiller 系列 手札
本文作者:陈景峯
转载请与作者联系,同时请务必标明文章原始出处和作者信息及本声明。

# Instructions to compile on Windows ## Create a new Visual Studio project with the library included Download the latest version of libmodbus source code from Github `https://github.com/stephane/libmodbus` -> Code -> Download ZIP. Once the archive is decompressed, launch a Windows terminal (`cmd`) in `src/win32` directory and run `cscript configure.js`. 1. copy the file `config.h` from `src/win32` to `src`. 2. create a new 'Console App' project under Visual Studio. 3. create a new directory called `libmodbus` inside your VS project (same level as the `.vcxproj` file). 4. copy all `*.c` and `*.h` from libmodbus `src` in the new `libmodbus` folder of your VS project. 5. copy `modbus.rc` in your VS project (same level as the `.vcxproj` file). 6. drag and drop `libmodbus/*.c` files (4) in *Solution Explorer -> Source Files*. 7. drag and drop `libmodbus/*.h` files (8) in *Solution Explorer -> Header Files*. 8. drag and drop `modbus.rc` file in *Solution Explorer -> Resource Files*. 9. check path is `#include "modbus-version.h"` in `modbus.rc`. 10. in the **Property Pages** of the project *Configuration Properties -> C/C++ -> General -> Additional Include Directories*, add `libmodbus` folder. 11. in the **Property Pages** of the project *Configuration Properties -> Resources -> Additional Include Directories*, add `libmodbus` folder. 12. in the **Property Pages** of the project *Configuration Properties -> Linker -> Input*, define `ws2_32.lib`. 13. if required, add `_CRT_SECURE_NO_WARNINGS` to *C/C++ -> Preprocessor -> Preprocessor Definitions*. ## Create a libmodbus DLL This directory contains the project file for Visual Studio to build `modbus.dll` and import library `modbus.lib`. In the Windows terminal, run `cscript configure.js` to generate: - `config.h` - `modbus-version.h` are generated using configure.js. To write... 翻译中文并总结
09-02
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值