交叉编译 kindle paperwhite dropbear

安装gcc

apt install gcc-arm-linux-gnueabi g++-arm-linux-gnueabi ccache  click
如果是ko
apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf

下载dropbear和zlib

dropbear
zlib

编译zlib

下载解压zlib-1.2.11.tar.gz
tar xzvf zlib-1.2.11.tar.gz -C ~/download/dropbear-2018.76
cd ~/download/dropbear-2018.76/zlib-1.2.11
mdir build
./configure --prefix=~/download/dropbear-2018.76/zlib-1.2.11/build
vi Makefile
:%s/gcc/arm-linux-gnueabi-gcc/g

同理替换如下

CC=arm-linux-gnueabi-gcc
LDSHARED=arm-linux-gnueabi-gcc -shared -Wl,-soname,libz.so.1,--version-script,zlib.map
CPP=arm-linux-gnueabi-gcc -E
AR=arm-linux-gnueabi-ar
RANLIB=arm-linux-gnueabi-ranlib

然后make 就好了
~/download/dropbear-2018.76/zlib-1.2.11/build有3个文件夹。。
include  lib  share

编译dropbear

cd ~/download/dropbear-2018.76
./configure CC=arm-linux-gnueabi-gcc --build=i686-linux    --host=arm-linux --target=arm-linux --with-zlib=/root/download/dropbear-2018.76/zlib-1.2.11
make

传到kindle试试。。

    kpw=root@x.x.x.x 
    rsync dropbear  $kpw:/mnt/us/
    ssh kpw
    /mnt/us/dropbear -help
    Dropbear server v2018.76 https://matt.ucc.asn.au/dropbear/dropbear.html
    Usage: ./dropbear [options]
    -b bannerfile	Display the contents of bannerfile before user login
    		(default: none)
    -r keyfile  Specify hostkeys (repeatable)
    		defaults: 
    		dss /etc/dropbear/dropbear_dss_host_key
    		rsa /etc/dropbear/dropbear_rsa_host_key
    		ecdsa /etc/dropbear/dropbear_ecdsa_host_key
    -R		Create hostkeys as required
    -F		Don't fork into background
    -E		Log to stderr rather than syslog
    -w		Disallow root logins
    -G		Restrict logins to members of specified group
    -s		Disable password logins
    -g		Disable password logins for root
    -B		Allow blank password logins
    -T		Maximum authentication tries (default 10)
    -j		Disable local port forwarding
    -k		Disable remote port forwarding
    -a		Allow connections to forwarded ports from any host
    -c command	Force executed command
    -p [address:]port
    		Listen on specified tcp port (and optionally address),
    		up to 10 can be specified
    		(default port is 22 if none specified)
    -P PidFile	Create pid file PidFile
    		(default /var/run/dropbear.pid)
    -i		Start for inetd
    -W <receive_window_buffer> (default 24576, larger may be faster, max 1MB)
    -K <keepalive>  (0 is never, default 0, in seconds)
    -I <idle_timeout>  (0 is never, default 0, in seconds)
    -V    Version
    
mntroot rw
mv dropbear /usr/bin/
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值