53 lines
1.9 KiB
Markdown
53 lines
1.9 KiB
Markdown
|
|
Jetson TK1 Build Helper
|
||
|
|
- - -
|
||
|
|
A streamlined Bash utility for building legacy U-Boot/Kernel sources on modern Arch-based systems.
|
||
|
|
This script handles the "headaches" of building older code with modern GCC versions, including ncurses pathing, header conflicts, and DTC version checks.
|
||
|
|
|
||
|
|
|
||
|
|
Quick Start
|
||
|
|
|
||
|
|
|
||
|
|
(0) You might have to chmod build.sh:
|
||
|
|
|
||
|
|
Bashchmod +x build.sh
|
||
|
|
|
||
|
|
(1) Run the setup to install and create all nesessary things
|
||
|
|
./build.sh setup
|
||
|
|
|
||
|
|
(2) Either use the default config or open the menuconfig to configure your uboot.bin
|
||
|
|
|
||
|
|
Default config for TK1
|
||
|
|
./build.sh default_config
|
||
|
|
|
||
|
|
Build using custom config:
|
||
|
|
(1) configure :
|
||
|
|
./build.sh menuconfig
|
||
|
|
(2) Build :
|
||
|
|
./Build
|
||
|
|
|
||
|
|
|
||
|
|
Command Reference
|
||
|
|
|
||
|
|
Command Description
|
||
|
|
./build.sh setup Installs dependencies (using pacman), fixes ncurses symlinks, and patches legacy scripts for modern GCC.
|
||
|
|
./build.sh default_config Applies the jetson-tk1_defconfig.
|
||
|
|
./build.sh menuconfig Opens the interactive configuration menu.
|
||
|
|
./build.sh clear Runs distclean to wipe all build artifacts and start fresh.
|
||
|
|
./build.sh (No args) The Build Command. Compiles using all available CPU cores.
|
||
|
|
|
||
|
|
Key Features
|
||
|
|
|
||
|
|
Header Safety: Automatically hides /usr/include/libfdt.h during the build to prevent conflicts with U-Boot's internal headers.
|
||
|
|
Auto-Restore: Uses a trap function to ensure your system headers are restored even if the build crashes or is interrupted (Ctrl+C).
|
||
|
|
|
||
|
|
Modern Toolchain Patches: * Fixes the lxdialog check for modern Ncurses.
|
||
|
|
|
||
|
|
Forces scripts/dtc-version.sh to pass (ignoring version mismatches).
|
||
|
|
Injects -fcommon via HOSTCFLAGS to handle legacy global variable definitions.
|
||
|
|
|
||
|
|
- - -
|
||
|
|
Requirements
|
||
|
|
|
||
|
|
Host OS: Arch Linux, CachyOS, or EndeavourOS. (you should be able to port it to any distro you want easily )
|
||
|
|
Target: Jetson TK1 (ARMv7).Toolchain: arm-none-eabi-gcc (handled by the setup command).
|