安装vim
sudo apt-get update
sudo apt-get install vim
64位下安装32位库
sudo apt-get install lib32z1
交叉编译工具链的下载(我准备移植比较新的内核、uboot、根文件系统所以用比较新的交叉编译工具链)
https://launchpad.net/gcc-arm-embedded/+download
http://www.veryarm.com/arm-none-linux-gnueabi-gcc
使用make manuconfig 要用的ncurses库安装
apt-get install libncurses5-dev
ssh安装和开启
sudo apt-get install openssh-server
sudo service sshd start
tftp服务器的部署
安装
sudo apt-get install tftpd-hpa tftp-hpa
修改
sudo vi /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/tftpboot"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="--secure -c"
重启
sudo service tftpd-hpa restart
nfs服务器的搭建
安装客户端和服务器
sudo apt install nfs-common
sudo apt-get install nfs-kernel-server
设置共享目录
sudo mkdir /xxxx/xxxx
修改配置文件
sudo vim /etc/exports
在文件后面添加
/xxxx/xxxx *(rw,sync,no_root_squash,no_subtree_check)
前面那个绝对路径目录是与nfs服务客户端共享的目录,*代表允许所有的网段访问(也可以使用具体的IP)
rw:挂接此目录的客户端对该共享目录具有读写权限
sync:资料同步写入内存和硬盘
no_root_squash:客户机用root访问该共享文件夹时,不映射root用户。(root_squash:客户机用root用户访问该共享文件夹时,将root用户映射成匿名用户)
no_subtree_check:不检查父目录的权限。
重启服务器
sudo /etc/init.d/nfs-kernel-server restart
编译新的kernel出错
run@ubuntu:~/work/kernel/linux-4.18.4$ make s5pv210_defconfig
YACC scripts/kconfig/zconf.tab.c
/bin/sh: 1: bison: not found
make[1]: *** [scripts/kconfig/zconf.tab.c] Error 127
make: *** [s5pv210_defconfig] Error 2
sudo apt-get install flex
sudo apt-get install bison
编译新内核出现找不到bio.h头文件
scripts/extract-cert.c:21:25: fatal error: openssl/bio.h: No such file or directory
#include <openssl/bio.h>
^
compilation terminated.
make[1]: *** [scripts/extract-cert] Error 1
make: *** [scripts] Error 2
搜索说出现要安装libssl-dev
sudo apt-get install libssl-dev
[sudo] password for run:
Sorry, try again.
[sudo] password for run:
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libssl-dev : Depends: libssl1.0.0 (= 1.0.1f-1ubuntu2) but 1.0.1f-1ubuntu2.4 is to be installed
Recommends: libssl-doc but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
发现libssl版本太高
使用sudo apt-get install aptitude来降低版本
sudo apt-get install aptitude
Reading package lists... Done
Building dependency tree
Reading state information... Done
The following extra packages will be installed:
aptitude-common libboost-iostreams1.54.0 libcwidget3 libept1.4.12
Suggested packages:
aptitude-doc-en aptitude-doc tasksel debtags libcwidget-dev
The following NEW packages will be installed:
aptitude aptitude-common libboost-iostreams1.54.0 libcwidget3 libept1.4.12
0 upgraded, 5 newly installed, 0 to remove and 1 not upgraded.
Need to get 2,526 kB of archives.
After this operation, 10.5 MB of additional disk space will be used.
Do you want to continue? [Y/n] y
Get:1 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libboost-iostreams1.54.0 i386 1.54.0-4ubuntu3 [29.3 kB]
Get:2 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libept1.4.12 i386 1.0.12 [140 kB]
Get:3 http://cn.archive.ubuntu.com/ubuntu/ trusty/main aptitude-common all 0.6.8.2-1ubuntu4 [700 kB]
Get:4 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libcwidget3 i386 0.5.16-3.5ubuntu1 [300 kB]
Get:5 http://cn.archive.ubuntu.com/ubuntu/ trusty/main aptitude i386 0.6.8.2-1ubuntu4 [1,356 kB]
73% [5 aptitude 681 kB/1,356 kB 50%] 6,781 B/s 1min 39s
73% [5 aptitude 681 kB/1,356 kB 50%] 6,781 B/s 1min 39s
100% [5 aptitude 1,345 kB/1,356 kB 99%] 4,384 B/s 2s
100% [5 aptitude 1,352 kB/1,356 kB 100%] 4,384 B/s 1s
100% [5 aptitude 1,352 kB/1,356 kB 100%] 4,384 B/s 1s
Fetched 2,526 kB in 3min 6s (13.5 kB/s)
Selecting previously unselected package libboost-iostreams1.54.0:i386.
(Reading database ... 172565 files and directories currently installed.)
Preparing to unpack .../libboost-iostreams1.54.0_1.54.0-4ubuntu3_i386.deb ...
Unpacking libboost-iostreams1.54.0:i386 (1.54.0-4ubuntu3) ...
Selecting previously unselected package libept1.4.12:i386.
Preparing to unpack .../libept1.4.12_1.0.12_i386.deb ...
Unpacking libept1.4.12:i386 (1.0.12) ...
Selecting previously unselected package aptitude-common.
Preparing to unpack .../aptitude-common_0.6.8.2-1ubuntu4_all.deb ...
Unpacking aptitude-common (0.6.8.2-1ubuntu4) ...
Selecting previously unselected package libcwidget3.
Preparing to unpack .../libcwidget3_0.5.16-3.5ubuntu1_i386.deb ...
Unpacking libcwidget3 (0.5.16-3.5ubuntu1) ...
Selecting previously unselected package aptitude.
Preparing to unpack .../aptitude_0.6.8.2-1ubuntu4_i386.deb ...
Unpacking aptitude (0.6.8.2-1ubuntu4) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up libboost-iostreams1.54.0:i386 (1.54.0-4ubuntu3) ...
Setting up libept1.4.12:i386 (1.0.12) ...
Setting up aptitude-common (0.6.8.2-1ubuntu4) ...
Setting up libcwidget3 (0.5.16-3.5ubuntu1) ...
Setting up aptitude (0.6.8.2-1ubuntu4) ...
update-alternatives: using /usr/bin/aptitude-curses to provide /usr/bin/aptitude (aptitude) in auto mode
Processing triggers for libc-bin (2.19-0ubuntu6) ...
降低版本
sudo aptitude install libssl-dev
The following NEW packages will be installed:
libssl-dev{b} libssl-doc{a} zlib1g-dev{a}
0 packages upgraded, 3 newly installed, 0 to remove and 1 not upgraded.
Need to get 2,135 kB of archives. After unpacking 6,877 kB will be used.
The following packages have unmet dependencies:
libssl-dev : Depends: libssl1.0.0 (= 1.0.1f-1ubuntu2) but 1.0.1f-1ubuntu2.4 is installed.
The following actions will resolve these dependencies:
Keep the following packages at their current version:
1) libssl-dev [Not Installed]
Accept this solution? [Y/n/q/?] n
The following actions will resolve these dependencies:
Downgrade the following packages:
1) libssl1.0.0 [1.0.1f-1ubuntu2.4 (now) -> 1.0.1f-1ubuntu2 (trusty)]
Accept this solution? [Y/n/q/?] y
The following packages will be DOWNGRADED:
libssl1.0.0
The following NEW packages will be installed:
libssl-dev libssl-doc{a} zlib1g-dev{a}
0 packages upgraded, 3 newly installed, 1 downgraded, 0 to remove and 1 not upgraded.
Need to get 2,913 kB of archives. After unpacking 6,877 kB will be used.
Do you want to continue? [Y/n/?] y
Get: 1 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libssl1.0.0 i386 1.0.1f-1ubuntu2 [778 kB]
Get: 2 http://cn.archive.ubuntu.com/ubuntu/ trusty/main zlib1g-dev i386 1:1.2.8.dfsg-1ubuntu1 [181 kB]
Get: 3 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libssl-dev i386 1.0.1f-1ubuntu2 [990 kB]
Get: 4 http://cn.archive.ubuntu.com/ubuntu/ trusty/main libssl-doc all 1.0.1f-1ubuntu2 [965 kB]
Fetched 2,913 kB in 1min 21s (35.8 kB/s)
Preconfiguring packages ...
dpkg: warning: downgrading libssl1.0.0:i386 from 1.0.1f-1ubuntu2.4 to 1.0.1f-1ubuntu2
(Reading database ... 172705 files and directories currently installed.)
Preparing to unpack .../libssl1.0.0_1.0.1f-1ubuntu2_i386.deb ...
Unpacking libssl1.0.0:i386 (1.0.1f-1ubuntu2) over (1.0.1f-1ubuntu2.4) ...
Selecting previously unselected package zlib1g-dev:i386.
Preparing to unpack .../zlib1g-dev_1%3a1.2.8.dfsg-1ubuntu1_i386.deb ...
Unpacking zlib1g-dev:i386 (1:1.2.8.dfsg-1ubuntu1) ...
Selecting previously unselected package libssl-dev:i386.
Preparing to unpack .../libssl-dev_1.0.1f-1ubuntu2_i386.deb ...
Unpacking libssl-dev:i386 (1.0.1f-1ubuntu2) ...
Selecting previously unselected package libssl-doc.
Preparing to unpack .../libssl-doc_1.0.1f-1ubuntu2_all.deb ...
Unpacking libssl-doc (1.0.1f-1ubuntu2) ...
Processing triggers for man-db (2.6.7.1-1) ...
Setting up libssl1.0.0:i386 (1.0.1f-1ubuntu2) ...
Setting up zlib1g-dev:i386 (1:1.2.8.dfsg-1ubuntu1) ...
Setting up libssl-dev:i386 (1.0.1f-1ubuntu2) ...
Setting up libssl-doc (1.0.1f-1ubuntu2) ...
Processing triggers for libc-bin (2.19-0ubuntu6) ...