Ubuntu系统编译
电脑硬件配置
编译 Ubuntu 开发环境电脑硬件配置建议:
- 64-bit CPU
- Ubuntu 22.04
- 16GB 内存
- 50GB 空闲空间用来编译
电脑软件配置
apt-get update
apt-get install autoconf bash-completion bc bison build-essential btop ccache chrpath cmake curl cpio device-tree-compiler diffstat dosfstools \
expect fakeroot flex g++ g++-multilib gawk gcc gcc-multilib git gperf gnupg liblz4-tool libncurses-dev libncurses5-dev libgl1-mesa-dev libxml2-utils \
libssl-dev locales lunzip make mtools net-tools parted patchelf pkg-config rsync scons ssh sudo time tree texinfo unrar unzip vim wget whiptail \
zip zlib1g-dev
apt-get install -y software-properties-common && \
add-apt-repository -y ppa:deadsnakes/ppa && \
apt-get update && \
apt-get install -y file && \
apt-get install -y python2 && \
apt-get install -y python-is-python3 && \
apt-get install -y libmpc-dev && \
apt-get install -y libgmp-dev && \
apt-get install -y bsdmainutils && \
SDK获取
创建 SDK 工作目录
mkdir neardi-agx-linux5.1-release
cd neardi-agx-linux5.1-release
初始化并同步 SDK
repo init --no-clone-bundle \
--repo-url=http://git.neardi.com/repo-release/tools/repo.git \
--repo-rev=master \
-u http://git.neardi.com/nvidia/linux/manifests.git \
-b agx \
-m neardi_agx_linux5.1_release.xml
然后执行以下命令同步完整的 SDK:
.repo/repo/repo sync -l
编译 SDK
步骤1:进入rootfs目录
cd rootfs
第 2 步:提取根文件系统(仅运行一次)
sudo tar -xpf Tegra_Linux_Sample-Root-Filesystem_R36.3.0_aarch64.tbz2 -C ../Linux_for_Tegra/rootfs/ && sync
步骤 3:进入 Linux_for_Tegra 目录
cd ../Linux_for_Tegra
步骤 4:应用 NVIDIA 二进制 blob(仅运行一次)
sudo ./apply_binaries.sh && sync
步骤 5:创建默认用户(用于初始启动)
sudo ./tools/l4t_create_default_user.sh -u neardi -p neardi
在此步骤中,将出现一个交互式提示。 出现提示时,**选择“应用”并按“Enter”**确认.
步骤 6:进入源构建目录
cd ../source/build/
步骤 7:开始构建过程
./build.sh