Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I update a buildroot setup to a later version?

Tags:

buildroot

A project I've inherited uses a very old version of buildroot, but I'd like to change it to use a feature that was added only in a later buildroot release.

Is there a straightforward way of updating a buildroot setup to use a later release?

e.g. if I save out a defconfig file and import that in a later buildroot release, would that just work, or are there practical reasons why not? Are there additional configuration files I'd need to carry across (e.g. kernel, busybox, etc)? Thanks!

like image 950
Nick Pelling Avatar asked Jul 04 '13 12:07

Nick Pelling


People also ask

How do I add a package to Buildroot?

There are two main methods to add a custom package into buildroot. The first method includes adding a package directly into the source tree and is described here. The second involves the use of an external package tree. A reference to using the second method is provided at the end of this article.

How do you clean Buildroot?

If you want to remove the files from your rootfs without a full rebuild, that's fine - you can just go into output/target/ , rm the files you no longer want, then run make to regenerate your final images. Make sure your Buildroot config is also not set to rebuild and install the package you are trying to remove.

Does Buildroot use BusyBox?

Buildroot allows to use three different types of init systems, which can be chosen from System configuration , Init system : The first solution is BusyBox. Amongst many programs, BusyBox has an implementation of a basic init program, which is sufficient for most embedded systems.

What is a Buildroot package?

Buildroot is a set of Makefiles and patches that simplifies and automates the process of building a complete and bootable Linux environment for an embedded system, while using cross-compilation to allow building for multiple target platforms on a single Linux-based development system.


1 Answers

No.

In fact, it's worse that that.

You can start by using a newer Buildroot version with your old default configuration file, but you will need to check the resulting configuration carefully for deprecated packages and packages whose versions are not compatible with whatever application software you might be adding to the Buildroot filesystem. The names of some packages (e.g. opencv) change over time, so you need to eyeball the resulting .config file to make sure that all of the packages that you need are there.

If you build a toolchain or Linux kernel in Buildroot (commonly done but not generally good practice), then you need to make sure that the new configuration is set to build the old version of the kernel and compiler. These might be too old to build some of the packages in the newer version of Buildroot.

If you upgrade your kernel at the same time that you upgrade Buildroot, then you need to port your old kernel config file to the new kernel version. Since the kernel configuration options change frequently, you will probably need to start from defconfig for your board and then use make menuconfig to manually add the configs that you need.

Busybox is a bit less volatile, so there is a chance that your old config will work.

If your old Buildroot configuration uses postbuild or postimage scripts, you will need to review them, but my guess is that they will not need any changes.

You should allocate at least a week for this work, maybe more, depending on the complexity of the configuration. Remember that if you are forced to use an older vendor kernel due to patches for a specific SoC, for example, the Freescale 2.6.33.9 kernel for the BSC9131, then the upgrade that you want to do might not be possible without doing six to twelve months of work to port the vendor's kernel patches to a newer kernel version.

Cheers.

like image 139
Jonathan Ben-Avraham Avatar answered Sep 28 '22 07:09

Jonathan Ben-Avraham