All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 09/55] Stop referencing the crazy target/device stuff
Date: Tue, 7 Dec 2010 21:18:18 +0100	[thread overview]
Message-ID: <20101207211818.0e36c8ce@surf> (raw)
In-Reply-To: <AANLkTikq-exQbC1vA965hRN0g-G2qiOoJ-BdAwmsiCZm@mail.gmail.com>

Hello Thomas,

On Tue, 7 Dec 2010 08:26:31 +0100
Thomas De Schampheleire <patrickdepinguin+buildroot@gmail.com> wrote:

> Hello Thomas, (this will become confusing for other readers :-p )

Yes, but it's funny :-)

> > At least in the existing target/device/*/Config.in files, there
> > were no such options.
> 
> For example, in a manufacturer specific Config.in file, I added an
> option for a new board. This board has two variants, each having a
> different processor architecture. Other than that, the selection of
> components for the root filesystem, the kernel etc. would all be the
> same (except for the kernel configuration).
> By adding 'depends on' and 'default' options to the config, I could
> make the selection for the right board variant automatic based on the
> global buildroot architecture selection.
> 
> e.g.
> config MYBOARD
>     config MYBOARD_PPC
>         depends on MYBOARD && BR2_powerpc
>         default y if BR2_powerpc
> 
>     config MYBOARD_X86
>         depends on MYBOARD && BR2_i386
>         default y if BR2_i386
> 
> Then, based on the above selection, I'd automatically determine the
> board name:
> 
> config BR2_BOARD_NAME
>     default "myboard_ppc" if MYBOARD_PPC
>     default "myboard_x86" if MYBOARD_X86
> 
> config BR2_BOARD_PATH
>     default "target/device/<manufacturer>/$(BR2_BOARD_NAME)"

Just provide two different defconfig files for your two boards.

> Additionally, I liked the idea of 'status' targets in the board
> Makefiles. These targets print out certain configuration variables,
> e.g. the Linux kernel used, the name of the board selected, etc.
> This may not need to be in a board-specific file, but in my opinion
> this is worth implementing globally. Do you agree?

With my changes, there isn't anymore the concept of a "board" inside
Buildroot, because IMO it doesn't make sense. A "board" is just a
initial configuration file that is known to work for a particular
hardware platform, but a defconfig file should be sufficient. So from
that perspective, there's no way Buildroot would know the "board" name.
The user just starts by doing :

	make foobar_defconfig

and (s)he knows that the architecture, kernel, bootloader are correct,
and so (s)he can go ahead with

	make menuconfig

and add whatever software is needed for the system (s)he is building.

With regard to the version of the Linux kernel selected or things like
that, we could obviously add a "make status" thing, but I don't really
what this would buy us compared to running "make menuconfig". And what
do we put in this "make status" ? The version of the kernel ? Why
only ? There should be the version of all the components, no ?

> > BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/friendlyarm/mini2440/linux-2.6.32.2.config"
> 
> The disadvantage of this is that the above configuration setting needs
> to change if the board name changes.

If the name of the board changes, you have to rename the defconfig file
*and rename the directory. So changing two paths in the defconfig file
shouldn't be a very big deal compared to all the renames already
needed. And renaming a board is really a corner use case, for which
changing two paths in a defconfig sounds reasonable.

> If the board name is abstracted
> in a variable like BR2_BOARD_NAME, the setting stays the same
> (although of course the expanded string is different). This makes
> configuration files more generic.

Configuration files are specific to a particular board. Even their name
is, so I don't see the point of making them whatsoever generic :-)

I agree that my patch set is changing things, but that's why it has
been written in the first place.

Regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2010-12-07 20:18 UTC|newest]

Thread overview: 84+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-12-05 20:52 [Buildroot] [pull request] Pull request for branch for-2011.02/boards-cleanup Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 01/55] defconfigs: keep only one defconfig per board Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 02/55] Remove unused Atmel-specific mirror definitions Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 03/55] Update defconfigs after Atmel mirror related options removal Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 04/55] Remove completely useless set of Makefiles specific to Atmel Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 05/55] Remove useless target/device/mips Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 06/55] Move Config.in.mirrors out of target/device Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 07/55] Use the new BR2_ROOTFS_SKELETON_CUSTOM options Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 08/55] Remove mini device table, it isn't used Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 09/55] Stop referencing the crazy target/device stuff Thomas Petazzoni
2010-12-06  7:35   ` Thomas De Schampheleire
2010-12-06 19:43     ` Thomas Petazzoni
2010-12-07  7:26       ` Thomas De Schampheleire
2010-12-07 20:18         ` Thomas Petazzoni [this message]
2010-12-08  6:57           ` Thomas De Schampheleire
2010-12-05 20:52 ` [Buildroot] [PATCH 10/55] Remove all Config.in/Makefile.in files in target/device Thomas Petazzoni
     [not found]   ` <522C1DF17AF50042AD8AE87F7887BD3D01E0B5DDE7@exch.hq.tensilica.com>
2010-12-06 21:02     ` Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 11/55] Remove Busybox skeleton from target/device/Atmel Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 12/55] Remove crazy set of empty directories Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 13/55] Re-add target/generic/Config.in options to menuconfig Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 14/55] documentation: Update to explain how board support works Thomas Petazzoni
2010-12-10  6:46   ` [Buildroot] skeleton updates Steve Calfee
2010-12-10 14:23     ` Heiko Zuerker
2010-12-10 16:34       ` Steve Calfee
2010-12-10 16:55         ` Heiko Zuerker
2010-12-11  4:37   ` [Buildroot] [PATCH 14/55] documentation: Update to explain how board support works Steve Calfee
2010-12-11 10:05     ` Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 15/55] at91bootstrap: switch to the official version Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 16/55] at91bootstrap: rename config options for consistency Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 17/55] board: update and minify at91sam9263ek_defconfig Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 18/55] board: update and minify at91sam9261ek_defconfig Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 19/55] board: update and minify at91sam9g20dfc_defconfig Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 20/55] at91bootstrap: no board name check when 'make source' is used Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 21/55] dependencies: add unzip Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 22/55] u-boot: add U-Boot 2010.09 Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 23/55] barebox: bump Barebox to 2010.11 Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 24/55] board: minify integrator926_defconfig Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 25/55] board: remove integrator926_huge_defconfig Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 26/55] Remove useless kernel config files for integrator926 Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 27/55] board: remove i386/i686_defconfig Thomas Petazzoni
2010-12-05 20:52 ` [Buildroot] [PATCH 28/55] Minify arm_toolchain_defconfig Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 29/55] Minify arm_nptl_toolchain_defconfig Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 30/55] board: simplify atngw100 support Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 31/55] board: simplify kb9202 board Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 32/55] board: update and minify at91rm9200df_defconfig Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 33/55] board: update and minify at91sam9260dfc_defconfig Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 34/55] board: remove support for at91sam9260pf Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 35/55] board: update and minimize atstk100x_defconfig Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 36/55] board: remove atstk1005_defconfig Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 37/55] board: remove Valka v100sc2 Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 38/55] Remove the few remaining unused Atmel-specific bits Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 39/55] board: add Qemu Versatile defconfig Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 40/55] board: add support for Mini 2440 Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 41/55] board: add new Qemu x86 configuration file Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 42/55] u-boot: add CROSS_COMPILE/ARCH when building host tools Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 43/55] Free text field for serial port configuration Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 44/55] Add network scripting folders to fs/skeleton Thomas Petazzoni
2010-12-16 14:16   ` Peter Korsgaard
2010-12-05 20:53 ` [Buildroot] [PATCH 45/55] Create menu entry to select device creation method Thomas Petazzoni
2010-12-16 14:26   ` Peter Korsgaard
2010-12-05 20:53 ` [Buildroot] [PATCH 46/55] linux: Import minimal defconfigs as defconfigs Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 47/55] linux: support a space-separated list of patches Thomas Petazzoni
2010-12-16 21:34   ` Peter Korsgaard
2010-12-16 22:21     ` Mike Frysinger
2010-12-17  9:41       ` Peter Korsgaard
2010-12-17 13:35         ` Mike Frysinger
2010-12-05 20:53 ` [Buildroot] [PATCH 48/55] linux: always enable support for tmpfs in the kernel Thomas Petazzoni
2010-12-17 15:43   ` Peter Korsgaard
2010-12-05 20:53 ` [Buildroot] [PATCH 49/55] Improve handling of mdev/udev Thomas Petazzoni
2010-12-17 15:51   ` Peter Korsgaard
2011-03-07 18:52   ` William Wagner
2011-03-07 19:32     ` Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 50/55] xtensa: remove unused and useless skeleton patch Thomas Petazzoni
2010-12-06  1:08   ` Marc Gauthier
2010-12-06 19:48     ` Thomas Petazzoni
2010-12-08  5:45       ` Marc Gauthier
2010-12-06  1:22   ` Marc Gauthier
2010-12-05 20:53 ` [Buildroot] [PATCH 51/55] board: Add Qemu SH4 r2d configuration Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 52/55] linux: add support for ELF vmlinux image Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 53/55] board: Add a Qemu PPC g3beige board Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 54/55] board: Add a Qemu mipsel Malta board Thomas Petazzoni
2010-12-05 20:53 ` [Buildroot] [PATCH 55/55] linux: add KERNEL_ARCH_PATH to fix x86-specific issue Thomas Petazzoni
2010-12-17 16:01 ` [Buildroot] [pull request] Pull request for branch for-2011.02/boards-cleanup Peter Korsgaard
2010-12-18 16:55   ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20101207211818.0e36c8ce@surf \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.