Missing of .config file

we are trying to build a interactive environment for NVIDIA board and we are working with jetpack 5.1.1 for installing this version we followed the following steps:

  1. Downloaded three files Driver package(BSP),Sample Root FIlesystem,Bootlin Toolchain gcc 9.3 and extracted to a folder.

  2. sudo apt install git -core

  3. sudo apt install build essential bc

  4. export CROSS_COMPILE=$HOME/l4t-gcc/aarch64–glibc–stable-2022.08-1/bin/aarch64-buildroot-linux-gnu-

  5. cd /Linux_for_Tegra/source

  6. ./source_sync.sh -k -t

  7. export CROSS_COMPILE=/bin/aarch64-buildroot-linux-gnu-

  8. make -C kernel

While doing step 8 there showing Make not found because of missing .config file, what’s the wrong with this?

1 Like

Hi,

That’s expected because you missed make tegra_defconfig here.
You should just use nvbuild.sh, which handles everything for you:

function build_arm64_kernel_sources {
	kernel_version="${1}"
	echo "Building kernel-${kernel_version} sources"

	# execute building steps
	source_dir="${SCRIPT_DIR}/kernel/kernel-${kernel_version}/"
	config_file="tegra_defconfig"
	tegra_kernel_out="${source_dir}"

	# shellcheck disable=SC2236
	if [ ! -z "${KERNEL_OUT_DIR}" ] ; then
		O_OPT=(O="${KERNEL_OUT_DIR}")
		tegra_kernel_out="${KERNEL_OUT_DIR}"
	else
		O_OPT=()
	fi

	"${MAKE_BIN}" -C "${source_dir}" ARCH=arm64 \
		LOCALVERSION="-tegra" \
		CROSS_COMPILE="${CROSS_COMPILE_AARCH64}" \
		"${O_OPT[@]}" "${config_file}"

	"${MAKE_BIN}" -C "${source_dir}" ARCH=arm64 \
		LOCALVERSION="-tegra" \
		CROSS_COMPILE="${CROSS_COMPILE_AARCH64}" \
		"${O_OPT[@]}" -j"${NPROC}" \
		--output-sync=target Image

	"${MAKE_BIN}" -C "${source_dir}" ARCH=arm64 \
		LOCALVERSION="-tegra" \
		CROSS_COMPILE="${CROSS_COMPILE_AARCH64}" \
		"${O_OPT[@]}" -j"${NPROC}" \
		--output-sync=target dtbs

	"${MAKE_BIN}" -C "${source_dir}" ARCH=arm64 \
		LOCALVERSION="-tegra" \
		CROSS_COMPILE="${CROSS_COMPILE_AARCH64}" \
		"${O_OPT[@]}" -j"${NPROC}" \
		--output-sync=target modules

	image="${tegra_kernel_out}/arch/arm64/boot/Image"
	if [ ! -f "${image}" ]; then
		echo "Error: Missing kernel image ${image}"
		exit 1
	fi
	echo "Kernel sources compiled successfully."
}

You might find information on configuration of use. The included scripts make do some of this for you, but if you manually build without scripts, then this would be useful to you:
https://forums.developer.nvidia.com/t/topic/262647/12

May I know which Jetson platform you’re using? Thanks

Jetson Linux 35.3.1 BSP with Linux Kernel 5.10

Sometimes knowing which particular Jetson is important too (you might add which Jetson you are using, e.g., a specific developer’s kit, or a module on third party carrier board).