2

I have customized buildroot with the new board ( derived from raspberry pi zero ). So my changes are (in-tree):

.config
board/passkeeper/genimage-passkeeper.cfg
board/passkeeper/post-build.sh
board/passkeeper/post-image.sh
board/passkeeper/rootfs_overlay/etc/init.d/S41passkeeper
board/passkeeper/rootfs_overlay/etc/mdev.conf
board/passkeeper/rootfs_overlay/etc/udhcpd.conf
configs/passkeeper_defconfig
output/build/linux-custom/.config

Now, reading the documentation - I am a bit confused on how to put all these things into the separate folder via BR2_EXTERNAL. Also I'm not sure how do I move the linux configuration from output/build/linux-custom/.config

make linux-update-defconfig BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE=/tmp/passkeeper/linux/linux-config

results in

Unable to perform linux-update-defconfig when using a defconfig rule

Can somebody please provide step-by-step guide on that?

jdevelop
  • 12,176
  • 10
  • 56
  • 112

1 Answers1

4

[You are asking two questions. I will answer only the question about saving the linux .config file; the other question is too generic.]

You need to set the appropriate options in menuconfig, not just override on the command line, otherwise they are inconsistent.

The process complete for creating a linux defconfig based on a pre-existing in-tree defconfig is the following. You have already done steps 1, 2 and 3.

  1. In the Buildroot configuration, select BR2_LINUX_KERNEL_USE_DEFCONFIG or BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG.
  2. Run make linux-menuconfig and adapt the linux configuration to your needs.
  3. Build and test, iterate over 2 until you have the configuration you want.
  4. In the Buildroot configuration, switch to BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG and set BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE to the place where you want to save it (typically board/passkeeper/linux.config or $(BR2_EXTERNAL_PASSKEEPER)/board/passkeeper/linux.config if you are using an external).
  5. Run make linux-update-defconfig. It is essential you do this before doing anything else, otherwise Buildroot will complain that the file doesn't exist.
Arnout
  • 2,927
  • 16
  • 24
  • Thanks. I already have the customized configuration for the board's kernel under `output/build/linux-custom/.config`. Is it possible to re-use it somehow? I'm not sure I recall what exactly I had added there ( it was all try/fail sequence to get all the necessary modules in). – jdevelop Feb 21 '19 at 13:51
  • 2
    As I wrote, you have already done steps 1-3, so you pick it up at step 4: set BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG and BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE from the Buildroot menuconfig. – Arnout Feb 21 '19 at 22:39