[Original] based on ZYNQ Linux environment Construction (IV.)

Source: Internet
Author: User
Tags locale dropbear

This compilation with my sister system

Download BusyBox and Dropbear,

[#73 #13:04:52 [email protected] ~/zybo_demo/xilinxfs] $wget--no-check-certificate https://git.busybox.net/busybox/ snapshot/busybox-1_23_1.tar.gz--2017-08-14 13:04:56--  https://git.busybox.net/busybox/snapshot/busybox-1_23 _1.tar.gzresolving git.busybox.net (git.busybox.net) ... 140.211.167.122Connecting to Git.busybox.net (git.busybox.net) |140.211.167.122|:443 ... Connected. Warning:no Certificate Subject Alternative name matches        requested host name ' Git.busybox.net '. HTTP request sent, awaiting response ... oklength:unspecified [application/x-gzip]saving to: ' busybox-1_23_1.tar.gz '    [                                                 <=>                ] 2,800,283    230k/s in   13s     2017-08-14 13:05:14 (211 kb/s)-' busybox-1_23_1.tar.gz ' saved [2800283]

  

[#74 #13:05:14 [email protected] ~/ZYBO_DEMO/XILINXFS] $wget http://matt.ucc.asn.au/dropbear/releases/ dropbear-0.53.1.tar.gz--2017-08-14 13:06:25--  http://matt.ucc.asn.au/dropbear/releases/ Dropbear-0.53.1.tar.gzresolving matt.ucc.asn.au (matt.ucc.asn.au) ... 130.95.13.18, 2405:3c00:5200:100::18connecting to matt.ucc.asn.au (matt.ucc.asn.au) |130.95.13.18|:80 ... Connected. HTTP request sent, awaiting response ... oklength:1772583 (1.7M) [application/x-gzip]saving to: ' Dropbear-0.53.1.tar.gz ' 100%[=========================== ========================================>] 1,772,583    156k/s in   12s     2017-08-14 13:06:39 (143 KB/s)-' Dropbear-0.53.1.tar.gz ' saved [1772583/1772583]

  

Under the BusyBox directory, the default configuration and initialization

Make Arch=arm Cross_compile=arm-xilinx-linux-gnueabi-defconfig

Visual configuration

Make Arch=arm Cross_compile=arm-xilinx-linux-gnueabi-menuconfig

Install the root file system to the specified directory

Make Arch=arm Cross_compile=arm-xilinx-linux-gnueabi-install

Configure Dropbear in the Dropbear directory

/home/fpgadeveloper/zybo_demo/xilinxfs/dropbear-0.53.1

  

Compiling dropbear

Make programs= "Dropbear dbclient dropbearkey dropbearconvert SCP" Multi=1 strip

Install Dropbear and create symbolic links

sudo make install

Establish a soft connection and enter the/home/fpgadeveloper/zybo_demo/xilinxfs/rootfs/usr/bin

[#23 #23:28:47 [email protected] ~/zybo_demo/xilinxfs/rootfs/usr/bin] $LN-S. /.. /sbin/dropbear./SCP

  

Copy the cross-compilation library to the following directory

sudo cp ~/sdk2015/lin/arm-xilinx-linux-gnueabi/libc/lib/* Lib-r

sudo cp ~/sdk2015/lin/arm-xilinx-linux-gnueabi/libc/sbin/* Sbin-r

sudo cp ~/sdk2015/lin/arm-xilinx-linux-gnueabi/libc/usr/bin/* usr/bin/-R

[#123 #23:37:50 [email protected] ~/zybo_demo/xilinxfs/rootfs] $mkdir Lib [#124 #23:38:30 [email protected] ~/zybo_demo/ XILINXFS/ROOTFS] $sudo cp ~/sdk2015/lin/arm-xilinx-linux-gnueabi/libc/lib/* lib-r [#125 #23:38:33 [email protected] ~/ ZYBO_DEMO/XILINXFS/ROOTFS] $sudo cp ~/sdk2015/lin/arm-xilinx-linux-gnueabi/libc/sbin/* sbin-r[#126 #23:38:35 [email Protected] ~/zybo_demo/xilinxfs/rootfs] $sudo CP ~/sdk2015/lin/arm-xilinx-linux-gnueabi/libc/usr/bin/* usr/bin/-R

  

Create a Lib directory under the USR directory

[#125 #23:38:33 [email protected] ~/zybo_demo/xilinxfs/rootfs] $CD usr/[#126 #23:42:37 [email protected] ~/zybo_demo/ XILINXFS/ROOTFS/USR] $ls bin  sbin[#127 #23:42:39 [email protected] ~/zybo_demo/xilinxfs/rootfs/usr] $mkdir Lib [# 128#23:42:43 [email protected] ~/zybo_demo/xilinxfs/rootfs/usr] $ls bin  Lib  sbin

  

sudo cp ~/sdk2015/lin/arm-xilinx-linux-gnueabi/libc/usr/lib/* usr/lib/-R

Go to the usr/lib path and delete

sudo rm-rf locale

sudo rm-rf audit

sudo rm-rf bin

sudo rm-rf gconv

sudo rm *.a

sudo rm *.o

[#132 #23:43:42 [email protected] ~/ZYBO_DEMO/XILINXFS/ROOTFS] $sudo CP ~/sdk2015/lin/arm-xilinx-linux-gnueabi/libc/ usr/lib/* usr/lib/-r[#133 #23:45:12 [email protected] ~/zybo_demo/xilinxfs/rootfs] $CD usr/lib/[#134 #23:46:52 [email Protected] ~/zybo_demo/xilinxfs/rootfs/usr/lib] $sudo rm-rf locale[#135 #23:47:00 [email protected] ~/zybo_demo/ Xilinxfs/rootfs/usr/lib] $sudo rm-rf audit[#136 #23:47:00 [email protected] ~/zybo_demo/xilinxfs/rootfs/usr/lib] $sudo RM-RF bin[#137 #23:47:00 [email protected] ~/zybo_demo/xilinxfs/rootfs/usr/lib] $sudo rm-rf gconv[#138 #23:47:00 [email Protected] ~/zybo_demo/xilinxfs/rootfs/usr/lib] $sudo rm *.a[#139 #23:47:00 [email protected] ~/zybo_demo/xilinxfs/ Rootfs/usr/lib] $sudo rm *.o[#140 #23:47:00 [email protected] ~/zybo_demo/xilinxfs/rootfs/usr/lib]$

  

Run in the root directory of the file

mkdir Dev etc etc/dropbear etc/init.d mnt opt proc root sys tmp var var/log var/www

The files are used in the files in the RAMDisk provided by Xilinx and copied to the relevant folder

Create a "etc/fstab" file with the following content

Touch Etc/fstab

Touch Etc/fstab                                             echo "label=//TMPFS defaults 0 0            " >> etc/fstabecho "none/dev/pts devpts gid=5,mode=620 0  0 ">> etc/fstabecho" none/proc proc defaults 0 0            ">> etc/fstabecho" None/sys sysfs defaults 0 0            " >> Etc/fstabecho "none/tmp tmpfs defaults 0 0            " >> etc/fstab

  

Create a "etc/inittab" file with the following content

Touch Etc/inittab                                                  echo ":: Sysinit:/etc/init.d/rcs                    " >> etc/inittabecho "#/bin/ash                                   " >> etc/ Inittabecho "#                                            " >> Etc/inittabecho "# Start an Askfirst shell on the serial ports" >> Etc/inittabecho "tt Yps0::respawn:-/bin/ash                    ">> Etc/inittabecho" # What does when restarting the init process ">> Etc/initta Becho ":: Restart:/sbin/init                         " >> Etc/inittabecho "# What to do before rebooting                " >> Etc/inittabecho " :: Shutdown:/bin/umount-a-R                 ">> Etc/inittab

  

Create a "etc/passwd" file with the following content

Touch etc/passwd                                                                     echo "root:$1$qc.cebjc$svjyqm.ig.gkelhaem.fd0:0:0:root:/root:/bin/sh" >> etc/passwd  

  

Create the file "Etc/init.d/rcs" with the following content

#!/bin/shecho "Starting RcS ..." echo "+ + mounting filesystem" MOUNT-T proc none/procmount-t sysfs none/sysmount-t Tmpfs None/tmpecho "+ Setting up Mdev" Echo/sbin/mdev >/proc/sys/kernel/hotplugmdev-smkdir-p/dev/ptsmkdir-p/dev/i2cm Ount-t devpts Devpts/dev/ptsecho "+ starting telnet daemon" Telnetd-l/bin/shecho "+ Starting HTTP Daemon" Httpd-h/va  R/wwwecho "+ + starting FTP Daemon" TCPSVD 0:21 ftpd ftpd-w/&echo "+ + starting dropbear (SSH) daemon" Dropbearecho "RcS Complete "

  

Modify Permissions

sudo chmod 755 Etc/init.d/rcs

sudo chown root:root Etc/init.d/rcs

Making a file system

Ddif=/dev/zero Of=ramdisknew.image bs=1024x768Count=32768MKE2FS-F Ramdisknew.image-l"RAMDisk"-B1024x768-M0tune2fs ramdisknew.image-I.0chmod a+rwx Ramdisknew.imagesudo Mount-O loop ramdisknew.image tmp_mnt_new/sudo cp-r/home/fpgadeveloper/zybo_demo/xilinxfs/rootfs/*tmp_mnt_new/cd tmp_mnt_newcd Bin/sudo cp-rf/home/fpgadeveloper/zybo_demo/uart_tools/lrzsz-0.12.20/src/lrz. sudo cp-rf/home/fpgadeveloper/zybo_demo/uart_tools/lrzsz-0.12.20/src/lsz. cd. Cd.. sudo umount tmp_mnt_newgzip ramdisknew.imagemkimage-a arm-t ramdisk-c gzip-d ramdisknew.image.gz uramdisk.image.gz

Copy uboot DtB *uramdisk.image.gz uimage and other files, merge in SDK Environment

System load can be initiated via QSPI Flash or SD card

[Original] based on ZYNQ Linux environment Construction (IV.)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.