萧海芷 发表于 2025-6-11 15:52:13

ubuntu上交叉编译kindle程序笔记

参考资料:
Hacking the Kindle Touch:
http://www.tuicool.com/articles/Yruui2
kindle下开发:
http://superbrain.cn/kindle%E4%B8%8B%E5%BC%80%E5%8F%91/
 
 
安装交叉编译工具:
 
 sudo apt-get install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi
 
安装KindleTool(用来制作kindle的自动更新包)
 sudo apt-get install build-essential libssl-dev \
zlib1g-dev libarchive-dev libgmp3-dev libhogweed2 nettle-dev
然后下载kindletool(https://github.com/NiLuJe/KindleTool)然后解压,进入解压后的目录执行"make"命令,
生成的文件会在KindleTool/Release目录下。
 
交叉编译xdotool:
下载xdotool(http://www.semicomplete.com/projects/xdotool/)
使用make测试一下编译,发现提示:
xdo.c:29:34: fatal error: X11/extensions/XTest.h: 没有那个文件或目录
使用如下命令安装依赖库:
sudo apt-get install libxtst-dev x11proto-record-dev
 
注:交叉编译没有成功,时间原因没有仔细去研究了,后来是在国外网站下载到一个kindle版本的xdotool
 
xdotool使用方法:
xdotool mousemove 190 1000 click 1
 
点击右边:
xdotool mousemove 700 500 click 1
点击左边:
xdotool mousemove 200 500 click 1
 
 
主要原理是:通过在手机安装SSHmote客户端利用ssh命令,给kindle发送模拟翻页命令实现翻页功能。
实现的主要步骤如下:
1. 对kindle进行越狱
2. 安装usbnet组件
3. 通过putty利用usbnet提供的ssh功能,设置kindle的root账号的密码
4. 在kindle下安装虚拟翻页插件xdotool
5. 在手机客户端安装SSHmote客户端,利用步骤3中的账号和密码登陆kindle并设置SSHmote客户端的命令
6. 现在你可以通过SSHmote控制kindle翻页了
假如kindle竖着放在懒人支架上,翻页命令可以照下面的方式设置:
往回翻页的命令设置为:xdotool mousemove 200 500 click 1 
往前翻页的命令设置为:xdotool mousemove 700 500 click 1
 
已知问题:
翻页只能在原生系统中使用,使用koreader打开的书籍无法翻页
 
xdotool安装方法简要说明:
将此压缩包解压,将所有文件传到kindle的同一个目录,然后在ssh中执行bash install.sh脚本。
此时xdotool就已经安装好了。
可以使用原生系统打开一本书籍,使用ssh连接到kindle,使用xdotool mousemove 700 500; xdotool click 1进行翻页测试。
 
touch event:
http://ozzmaker.com/2013/09/07/programming-a-touchscreen-on-the-raspberry-pi/
https://github.com/XJianfei/virtual_touch
 
 
Creating custom packages

To create custom update packages, you'll have to use KindleTool (which itself is a fork of yifan's original KindleTool ). For those familiar with K2/K3 hacking, it's the successor of the    kindle_update_tool.py Python tool we know and love ;).
KindleTool is designed to run on Unix based systems, so it doesn't play nice on a vanilla Windows. However, it is easy to set up on Linux and OSX, and even via Cygwin on Windows.
These directions may not always be up to date, when in doubt, refer to the COMPILING file ;).   
 

来源:程序园用户自行投稿发布,如果侵权,请联系站长删除
免责声明:如果侵犯了您的权益,请联系站长,我们会及时删除侵权内容,谢谢合作!
页: [1]
查看完整版本: ubuntu上交叉编译kindle程序笔记