$ sudo apt install libc6-i386 lib32z1
$ sudo apt install lib32stdc++6
$ sudo vim /etc/apt/sources.list 添加:
deb http://security.ubuntu.com/ubuntu bionic-security main
$ sudo apt update && apt-cache policy libssl1.0-dev
$ sudo apt install libssl1.0-dev
$ sudo apt install python2.7
$ sudo ln -s /usr/bin/python2.7 /usr/bin/python2
$ tar -zxvf Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux.tar.gz -C ../
$ mv Sourcery_CodeBench_Lite_for_Xilinx_GNU_Linux xilinx-tools
$ vim env_z7.sh 添加:
#!/bin/sh
export PATH=/home/venom/zynq/xilinx-tools/bin:${PATH}
ARCH=arm
CROSS_COMPILE=arm-linux-
$ source env_z7.sh
$ arm-linux-gcc -v
$ tar u-boot-xlnx.tar.gz -C ../
$ ./build.sh
$ tar zynq_boot.tar.gz -C ../
$ vim bootimage.bif
the_ROM_image:
{
[bootloader]/home/venom/zynq/zynq_boot/zynq_fsbl_0.elf
/home/venom/zynq/zynq_boot/system.bit
/home/venom/zynq/zynq_boot/u-boot.elf
}
$ cp ../u-boot-xlnx/u-boot.elf ./
$ ./build.sh
$ cp boot.bin ../backups/boot/
$ sudo cp mkimage /bin
$ tar linux-kernel.tar.gz -C ../
$ ./build.sh
$ cp arch/arm/boot/uImage /home/venom/zynq/backups/boot/
$ tar device_tree.tar.gz -C ../
$ ./build.sh
$ cp devicetree.dtb ../backups/boot/
点击‘-’删除所有分区
点击‘+’号进行创建分区
第一个分区0.5G,设置卷名boot,格式是 FAT 格式
第二个分区是剩余空间,设置卷名rootfs,格式是 ext4
分区好后,点击 ▶ 符号进行挂载
进入sd目录
$ cd /media/venom
$ sudo touch umount.sh
$ chmod 777 umount.sh
$ vim umount.sh 填入
sudo umount /media/venom/boot/
sudo umount /media/venom/rootfs/
$ cp uramdisk.image.gz ../backups/boot/
$ tar -zxvf rootfs.tar.gz -C ../backups/
$ sudo cp -ardf boot/* /media/venom/boot/
$ sudo cp -ardf rootfs/* /media/venom/rootfs/
$ ./umount
$ sudo apt install nfs-kernel-server
$ vim /etc/exports 添加:
/home/venom/work/nfs_share*(rw,sync,insecure,no_subtree_check,no_root_squash)
$ ip addr 先查看
$ ifconfig eth0 192.168.10.110
$ mount -t nfs -o nolock 192.168.10.116:/home/venom/work/nfs_share /mnt
来源于上课笔记,老师是:海牛rocky
压缩包下载:
链接:https://pan.baidu.com/s/1S8tYfoq07OBfjTuG2CHCSg
提取码:zynq