赞
踩
GNU位置:
/home/zh/Linux/GNU/GNU-4.9.4/gcc-linaro-4.9.4-2017.01-rc1-x86_64_arm-linux-gnueabihf/bin
NFS目录
/home/zh/Linux/NFS
sudo apt-get update
sudo apt-get install axel
axel https://snapshots.linaro.org/components/toolchain/binaries/4.9-2017.01-rc1/arm-linux-gnueabihf/gcc-linaro-4.9.4-2017.01-rc1-x86_64_arm-linux-gnueabihf.tar.xz
tar -xf gcc-linaro-4.9.4-2017.01-rc1-x86_64_arm-linux-gnueabihf.tar.xz
sudo apt-get install vim
sudo vim ~/.bashrc
##添加
export PATH=$PATH:/home/zh/Desktop/Linux/Linux/GNU/GNU-4.9.4/gcc-linaro-4.9.4-2017.01-rc1-x86_64_arm-linux-gnueabihf/bin
##生效
source ~/.bashrc
sudo apt-get install lsb-core lib32stdc++6
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
vim ~/.bashrc
写入
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
export PATH=$PATH:/home/zh/Desktop/Linux/Linux/GNU/Tool/gcc-linaro-4.9.4-2017.01-rc1-x86_64_arm-linux-gnueabihf/bin
wget https://mirrors.edge.kernel.org/pub/linux/kernel/v5.x/linux-5.4.32.tar.xz
sudo apt-get install lzop
sudo apt-get install libncurses5-dev
sudo apt-get install libssl-dev
sudo apt-get install flex
sudo apt-get install bison
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
或修改Make
##252行
ARCH = arm
CROSS_COMPILE = arm-linux-gnueabihf-
make distclean
##汇总
cp imx_v7_mfg_defconfig imx_alientek_emmc_defconfig
cp arch/arm/configs/imx_v7_mfg_defconfig arch/arm/configs/imx_alientek_emmc_defconfig
1-1修改 imx_alientek_emmc_defconfig 文件
屏蔽
#CONFIG_ARCH_MULTI_V6
配置内核
make imx_alientek_emmc_defconfig
查询配置文件
ls arch/arm/configs | grep imx
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
HOSTCC scripts/kconfig/confdata.o
HOSTCC scripts/kconfig/expr.o
LEX scripts/kconfig/lexer.lex.c
/bin/sh: 1: flex: not found
make[1]: *** [scripts/Makefile.host:9: scripts/kconfig/lexer.lex.c] Error 127
make: *** [Makefile:567: imx_v6_v7_defconfig] Error 2
sudo apt-get install flex
sudo apt-get install bison
cd arch/arm/boot/dts
cp arch/arm/boot/dts/imx6ull-14x14-evk.dts arch/arm/boot/dts/imx6ull-alientek-emmc.dts
#汇总
cp arch/arm/boot/dts/imx6ull-14x14-evk.dts arch/arm/boot/dts/imx6ull-alientek-emmc.dts
#添加到Makefile
#422行
imx6ull-alientek-emmc.dtb \
imx6ull_luatao_emmc.sh
#!/bin/sh
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- distclean
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- imx_alientek_emmc_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- menuconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- all -j16
export ARCH=arm
export CROSS_COMPILE=arm-linux-gnueabihf-
make dtbs
ls arch/arm/boot/dts | grep imx6ull
##
cp /home/zh/Desktop/Linux/Linux/Kernel/Kernel-4.1.15-NXP/linux-imx-rel_imx_4.1.15_2.1.0_ga/arch/arm/boot/dts/imx6ull-alientek-emmc.dtb /home/zh/linux/tftpboot/imx6ull-14x14-zhihui-evk.dtb
##
cp /home/zh/Desktop/Linux/Linux/Kernel/Kernel-4.1.15-NXP/linux-imx-rel_imx_4.1.15_2.1.0_ga/arch/arm/boot/zImage /home/zh/linux/tftpboot/zImage
cp
sudo apt-get install nfs-kernel-server rpcbind
mkdir /home/zh/linux/nfs
mkdir /home/zh/linux/nfs/rootfs
sudo vim /etc/exports
/home/zh/linux/nfs *(rw,sync,no_root_squash)
sudo vim /etc/default/nfs-kernel-server
内容
# Number of servers to start up
#RPCNFSDCOUNT=8
RPCNFSDCOUNT="-V 2 8"
# Runtime priority of server (see nice(1))
RPCNFSDPRIORITY=0
# Options for rpc.mountd.
# If you have a port-based firewall, you might want to set up
# a fixed port here using the --port option. For more information,
# see rpc.mountd(8) or http://wiki.debian.org/SecuringNFS
# To disable NFSv4 on the server, specify '--no-nfs-version 4' here
#RPCMOUNTDOPTS="--manage-gids"
RPCMOUNTDOPTS="-V 2 --manage-gids"
# Do you want to start the svcgssd daemon? It is only required for Kerberos
# exports. Valid alternatives are "yes" and "no"; the default is "no".
NEED_SVCGSSD=""
# Options for rpc.svcgssd.
RPCSVCGSSDOPTS="--nfs-version2,3,4 --debug --syslog"
sudo /etc/init.d/nfs-kernel-server restart
1.安装ssh
sudo apt-get install openssh-server
sudo apt-get install tftp-hpa tftpd-hpa
sudo apt-get install xinetd
mkdir /home/zh/Linux/tftpboot
sudo mkdir /etc/xinetd.d
sudo vim /etc/xinetd.d/tftp
server tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /home/zh/linux/tftpboot/ -c
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
sudo service tftpd-hpa start
sudo vim /etc/default/tftpd-hpa
# /etc/default/tftpd-hpa
TFTP_USERNAME="tftp"
TFTP_DIRECTORY="/home/zh/linux/tftpboot"
TFTP_ADDRESS=":69"
TFTP_OPTIONS="-l -c -s"
sudo service tftpd-hpa start
axel https://buildroot.org/downloads/buildroot-2019.02.6.tar.gz
tar -xf buildroot-2019.02.6.tar.gz
make menuconfig
TODO
配置1
/home/zh/Desktop/Linux/Linux/GNU/GNU-4.9.4/gcc-linaro-4.9.4-2017.01-rc1-x86_64_arm-linux-gnueabihf
-gnueabihf
Buildroot-190206/buildroot-2019.02.6/.config
配置2(buildroot的modules.dep)
如不配置可能会遇到
需要配置 modules.dep 加载驱动时提示 depmod、modprobe、modinfo:not found ;
1、进入buildroot源码文件夹 …/buildroot-2022.02.1/output//build/busybox-X.XX.XX/,执行 sudo make menuconfig 打开busybox配置界面
sudo make menuconfig
2.进入 linux Module Utilities, 上下键选择depmod,并按 y 选中; 以此方式继续添加 modprobe 、 modinfo
3.填上 busybox.config,点击 ok保存后退出所有界面,在 …/buildroot-2022.02.1/output//build/busybox-1.35.0/就会生成busybox.config 文件。
4、将…/buildroot-2022.02.1/output/build/busybox-1.35.0/busybox.config 替换 …/buildroot-2022.02.1/package/busybox/路径下的 busybox.config
5、在busybox源码文件夹下…/buildroot-2022.02.1/ 执行以下指令:
sudo make busybox
sudo make
之后在 …/buildroot-2022.02.1/output/images/路径下重新生成 rootfs.tar
6、开发板使用新的rootfs.tar 根文件系统,成功执行depmod指令。
sudo make
输入 sudu make 命令配置,如果出现如下错误:
You must install 'python' on your build machine
make: *** [support/dependencies/dependencies.mk:27:dependencies] 错误 1
安装python
输入 sudu make 命令配置,如果出现如下错误:
configure: error: you should not run configure as root (set FORCE_UNSAFE_CONFIGURE=1 in environment to bypass this check)
See `config.log' for more details
make: *** [package/pkg-generic.mk:231:/home/zyc/linux/tools/buildroot-2019.02.6/output/build/host-tar-1.29/.stamp_configured] 错误 1
解决
sudo su root
make export FORCE_UNSAFE_CONFIGURE=1
TODO
配置NTFS镜像下载
setenv ipaddr 192.168.10.101
setenv ethaddr b8:ae:1d:01:00:01
setenv gatewayip 192.168.10.1
setenv netmask 255.255.255.0
setenv serverip 192.168.10.100
saveenv
setenv bootcmd 'tftp 80800000 zImage; tftp 83000000 imx6ull-14x14-zhihui-evk.dtb; bootz 80800000 - 83000000'
saveenv
setenv bootargs 'console=ttymxc0,115200 rw nfsroot=192.168.10.100:/home/zh/linux/nfs/rootfs ip=192.168.10.101:192.168.10.100:192.168.101.1:255.255.255.0::eth0::off'
saveenv
reset
##DTS:
cp /home/zh/Desktop/Linux/Linux/Kernel/Kernel-5.4.32/linux-5.4.32/arch/arm/boot/dts/imx6ull-14x14-zhihui-evk.dtb /home/zh/Linux/tftpboot
##内核
cp /home/zh/Desktop/Linux/Linux/Kernel/Kernel-5.4.32/linux-5.4.32/arch/arm/boot/zImage /home/zh/Linux/tftpboot
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。