/vm/custom/obj/mnt/是system root
tar -xjf dropbear-2016.74.tar.bz2
cd dropbear-2016.74/
he root path of our chroot environmen
./configure --prefix=/vm/custom/obj/mnt --disable-zlib
make
sudo make install DESTDIR=
创建DSA
cd /vm/custom/obj/mnt/
sudo mkdir etc/dropbear
/vm/custom/obj/mnt/sbin$ ldd dropbear
显示
linux-vdso.so.1 => (0x00007fff485ed000)
libutil.so.1 => /lib/x86_64-linux-gnu/libutil.so.1 (0x00007f14aaeaf000)
libcrypt.so.1 => /lib/x86_64-linux-gnu/libcrypt.so.1 (0x00007f14aac76000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f14aa8b1000)
/lib64/ld-linux-x86-64.so.2 (0x00007f14ab0b2000)
cd ..
因为我使用宿主机ubuntu的编译系统,
需要处理一下的库
sudo mkdir lib
sudo cp /lib/x86_64-linux-gnu/libutil.so.1 lib/
sudo cp /lib/x86_64-linux-gnu/libcrypt.so.1 lib/
li@li-shuangbin:/vm/custom/obj/mnt/lib/x86_64-linux-gnu$ sudo cp -r /lib/x86_64-linux-gnu/libc-2.19.so .
li@li-shuangbin:/vm/custom/obj/mnt/lib/x86_64-linux-gnu$ sudo cp -r /lib/x86_64-linux-gnu/libc.so.6 .
sudo mkdir lib64
sudo cp /lib64/ld-linux-x86-64.so.2 lib64/
添加dropbear的key
/vm/custom/obj/mnt/etc/dropbear$ sudo ../../bin/dropbearkey -t rsa -f dropbear_rsa_host_key
qemu-system-x86_64 \
-kernel linux-4.10.4/arch/x86_64/boot/bzImage \
-initrd obj/initramfs-busybox-x86.cpio.gz \
-nographic -append "console=ttyS0" -enable-kvm -hda obj/hda.img
make -C /vm/custom/linux-4.10.4/ SUBDIRS=$PWD modules
warning: assignment makes pointer from integer without a cast [enabled by default]
port_pkt_db = vzalloc(size);
阅读(1656) | 评论(0) | 转发(0) |