Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Kernel defconfig in buildroot (arm target)

Debian 8 x64, buildroot 2016.02 / 2016-05-07 / 2016-05-13. After make menuconfig and set some settings I run make. There is an error appears:

linux/linux.mk:424: *** No kernel defconfig name specified, check your BR2_LINUX_KERNEL_DEFCONFIG setting. Stop.

This answer does not help: my arch/arm/configs/ folder does not exist in every release/snapshot I've tried. There is only arch folder with this content:

-rw-r--r--  1 user user  11K May 12 19:21 Config.in
-rw-r--r--  1 user user  176 May 12 19:21 Config.in.aarch64
-rw-r--r--  1 user user 1.7K May 12 19:21 Config.in.arc
-rw-r--r--  1 user user  15K May 12 19:21 Config.in.arm
-rw-r--r--  1 user user 2.2K May 12 19:21 Config.in.bfin
-rw-r--r--  1 user user  735 May 12 19:21 Config.in.m68k
-rw-r--r--  1 user user  279 May 12 19:21 Config.in.microblaze
-rw-r--r--  1 user user 2.1K May 12 19:21 Config.in.mips
-rw-r--r--  1 user user   70 May 12 19:21 Config.in.nios2
-rw-r--r--  1 user user 5.5K May 12 19:21 Config.in.powerpc
-rw-r--r--  1 user user  693 May 12 19:21 Config.in.sh
-rw-r--r--  1 user user  617 May 12 19:21 Config.in.sparc
-rw-r--r--  1 user user 7.5K May 12 19:21 Config.in.x86
-rw-r--r--  1 user user 1.5K May 12 19:21 Config.in.xtensa

I've tried to create arch/arm/configs/ folder and put there arch/Config.in.arm file (renamed to arm_defconfig/whatever) or empty file (renamed). Whatever Kernel - Defconfig name I set, it does not helps. make BR2_LINUX_KERNEL_DEFCONFIG also does not helps. Option is not documented in Buildroot user manual. make linux-menuconfig returns same error if no Kernel - Defconfig name seted or

Can't find default configuration "arch/arm/configs/name_defconfig"!

where name is Kernel - Defconfig name variable. I've tried to set this to arm, BR2_LINUX_KERNEL_DEFCONFIG and many other names.

Can you help me, how to set default kernel configuration from buildroot developers?

like image 564
J. Yellow Avatar asked May 14 '16 02:05

J. Yellow


People also ask

What is kernel Defconfig?

defconfig. Generates a new kernel configuration with the default answer being used for all options. The default values are taken from a file located in the arch/$ARCH/defconfig file, where $ARCH refers to the specific architecture for which the kernel is being built.

What is the use of Defconfig?

The motivation for storing defconfig in such a format is next: in defconfig we can specify only options with non-default values (i.e. options we changed for our board). This way we can keep it small and clear.

Where is the Defconfig file in Linux?

The platform's defconfig contains all of the Linux kconfig settings required to properly configure the kernel build (features, default system parameters, etc) for that platform. Defconfig files are typically stored in the kernel tree at arch/*/configs/ .

How do you change Defconfig?

Using the default defconfig as a base, configure the Linux Kernel, and then use make menuconfig to change the configuration as desired. After the customization, generate a new defconfig file and replace the default one. Review the change and create a commit, with that commit, create a patch.


1 Answers

The kernel defconfig is a configuration file in the kernel tree, not the buildroot tree. You have to look in arch/arm/configs in the kernel. Find the defconfig there that is appropriate for your target CPU. If you are not using an upstream kernel, you'll have to check with the vendor which defconfig to use. Remember to remove the _defconfig part of the name.

If you really have no idea at all, multi_v5 and multi_v7 are safe options: they include support for all possible processors with an ARMv5 resp. ARMv7 architecture.

You will probably encounter the same issue with the device tree. You can find the device trees (the .dts files) in arch/arm/boot/dts in the kernel tree. This one does have to match exactly with your board.

like image 63
Arnout Avatar answered Sep 28 '22 00:09

Arnout