Commit Graph

427 Commits

Author SHA1 Message Date
Peter Korsgaard
8852f08eed Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-12-01 22:29:56 +01:00
tiago.brusamarello
bf5487e21e uboot: support -b option for mkenvimage
When generating the environment image the target endianess should
be taken in account for CRC calculation purposes. For big endian
targets the -b flag should be passed to the mkenvimage tool.

Signed-off-by: Tiago Brusamarello <tiago.brusamarello@datacom.ind.br>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-11-30 16:10:30 +01:00
Masahiro Yamada
e550e4783a boot-wrapper-aarch64: update upstream repository
cmarinas/boot-wrapper-aarch64.git does not exist any more.
Switch over to mark/boot-wrapper-aarch64.git.

Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
Cc: Catalin Marinas <catalin.marinas@arm.com>
Cc: Mark Rutland <mark.rutland@arm.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-11-16 12:24:19 +01:00
Fabio Estevam
ce7b0b8dfb boot/uboot: bump to version 2016.11
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-11-14 22:52:01 +01:00
Yann E. MORIN
2e29db7d97 package/uboot: define help commands when using Kconfig
Expose the Kconfig-related help commands when U-Boot uses the Kconfig
configuration. Like others (like Linux, barebox, busybox), only expose
menuconfig, not all the configurators.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-11-01 14:51:15 +01:00
Hollis Blanchard
ae3bb50a6c boot-wrapper-aarch64: Allow users to select the PSCI SMP boot method
Signed-off-by: Hollis Blanchard <hollis_blanchard@mentor.com>
[Thomas:
 - remove "default n"
 - pass explicit --disable-psci]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-25 23:59:36 +02:00
Thomas Petazzoni
02e11d02f4 uboot: add option to optionally depend on host-openssl
Some U-Boot board configurations have CONFIG_FIT_SIGNATURE=y. In this
case, when U-Boot builds its tools, it requires OpenSSL support on the
host system.

Since we clearly don't want to unconditionally depend on host-openssl,
we introduce a new option to explicitly enable the dependency on
host-openssl. This is exactly identical to the existing
BR2_TARGET_UBOOT_NEEDS_DTC, for the dependency on host-dtc. It is
therefore the responsibility of the user to enable this option if his
board configuration uses CONFIG_FIT_SIGNATURE=y.

Necessary to fix bug #9316.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-20 23:31:09 +02:00
Yann E. MORIN
fc34cf772c core: introduce per br2-external NAME
This unique NAME is used to construct a per br2-external tree variable,
BR2_EXTERNAL_$(NAME)_PATH, which contains the path to the br2-external
tree.

This variable is available both from Kconfig (set in the Kconfig
snippet) and from the .mk files.

Also, display the NAME and its path as a comment in the menuconfig.

This will ultimately allow us to support multiple br2-external trees at
once, with that NAME (and thus BR2_EXTERNAL_$(NAME)) uniquely defining
which br2-external tree is being used.

The obvious outcome is that BR2_EXTERNAL should now no longer be used to
refer to the files in the br2-external tree; that location is now known
from the BR2_EXTERNAL_$(NAME)_PATH variable instead. This means we no
longer need to expose, and must stop from from exposing BR2_EXTERNAL as
a Kconfig variable.

Finally, this also fixes a latent bug in the pkg-generic infra, where we
would so far always refer to BR2_EXTERNAL (even if not set) to filter
the names of packages (to decide whether they are a bootloader, a
toolchain or a simple package).

Note: since the variables in the Makefile and in Kconfig are named the
same, the one we computed early on in the Makefile will be overridden by
the one in .config when we have it. Thus, even though they are set to
the same raw value, the one from .config is quoted and, being included
later in the Makefile, will take precedence, so we just re-include the
generated Makefile fragment a third time before includeing the
br2-external's Makefiles. That's unfortunate, but there is no easy way
around that as we do want the two variables to be named the same in
Makefile and Kconfig (and we can't ask the user to un-quote that variable
himself either), hence this little dirty triple-inclusion trick.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Romain Naour <romain.naour@openwide.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-10-16 13:01:02 +02:00
Joao Pinto
b5a6299042 arm-trusted-firmware: new package
Signed-off-by: Joao Pinto <jpinto@synopsys.com>
[Thomas:
 - Rename the package from atfirmware to arm-trusted-firmware, in order
   to match upstream.
 - Remove option to apply custom patches. We no longer add such options,
   and use the global patch directory instead.
 - Rename the repo URL/version options, in order to not be Git specific,
   in case support for fetching from other VCS is added later. This is
   consistent with how other bootloaders handle this.
 - Add license information.
 - Do not add a weird dependency on the vexpress-firmware package in
   Config.in. Instead, simply use it if it's available. Of course, some
   configurations (such as the juno configuration) will fail to build if
   vexpress-image is not enabled, but it's the responsibility of the
   user to create a config that builds.
 - Simplify misc aspects in the .mk file.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-15 14:13:34 +02:00
Joao Pinto
82e84a4f35 vexpress-firmware: new package
This commit adds a new package for the SCP (System Control Processor)
firmware for the ARM reference platforms. There will most likely be
other SCP firmware provided by other vendors, but they might be provided
in a different form, so we for now create a vendor-specific package
named vexpress-firmware.

Since this firmware is used for booting, we create the package in boot/
and not in package/.

The package simply installs a single pre-built binary file into the
images directory.

Signed-off-by: Joao Pinto <jpinto@synopsys.com>
[Thomas:
 - Rename the package from scpfirmware to vexpress-firmware.
 - Add a Config.in prompt for the package.
 - Remove the prompt-less Config.in options to select the Git repo and
   version. Since we only support the Vexpress firmware, there's no need
   for configurability here, so we just use the right Git repo/version
   in the .mk file.
 - Use $(INSTALL) -D to install the firmware file.
 - Add license information.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[Thomas: add hash file, as suggested by Yann.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-15 12:35:28 +02:00
Fabio Estevam
55a481bec1 boot/uboot: Call 'make all' unconditionally
Since commit fad58cefa4 ("boot/uboot: allow to build multiple U-Boot
images") the installation of SPL binary fails.

For example, when building the mx6cubox_defconfig target we see:

  LD      u-boot
  OBJCOPY u-boot-nodtb.bin
  COPY    u-boot.bin
  MKIMAGE u-boot.img
>>> uboot 2016.09.01 Installing to target
>>> uboot 2016.09.01 Installing to images directory
cp -dpf /home/fabio/buildroot/output/build/uboot-2016.09.01/u-boot.bin /home/fabio/buildroot/output/images/
cp -dpf /home/fabio/buildroot/output/build/uboot-2016.09.01/u-boot.img /home/fabio/buildroot/output/images/
cp -dpf /home/fabio/buildroot/output/build/uboot-2016.09.01/SPL /home/fabio/buildroot/output/images/
cp: cannot stat '/home/fabio/buildroot/output/build/uboot-2016.09.01/SPL': No such file or directory

Instead of calling 'make all' only for the BR2_TARGET_UBOOT_FORMAT_DTB_IMG
case, call 'make all' unconditionally so that the SPL target can also
be installed.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-10-07 22:35:48 +02:00
Alexey Brodkin
6a4e0314a4 u-boot: Fix building for ARC700
With newer ARC toolchain obsolete -marcXXX were finally deperecated
and so compiler throws errors now about unknown option.

Solution is as simple as switching to more generic -mcu-XXX
options. Which we do. Unfortunately that change in upstream U-Boot [1]
happened right after v2016.09 was released an so we need to have that fix
for v2016.07 which is mentioned in axs10x defconfigs and for the latest
U-Boot release v2016.09 (which is selected by default if no defconfig is
used).

Once we deprecate either U-Boot version in U-Boot corresponding patch
should be removed essentially.

[1] http://git.denx.de/?p=u-boot.git;a=commit;h=7c8d81605302e7d7fdd3e7d8eb69302bddc64a2c

Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Peter Korsgaard <peter@korsgaard.com>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
[Thomas: handle the U-Boot bump to 2016.09.01.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-09-25 23:24:27 +02:00
Fabio Estevam
55a7965273 boot/uboot: bump to version 2016.09.01
2016.09.01 is a bugfix release, so bump to this version.

Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-09-25 23:14:47 +02:00
Biagio Montaruli
3409bcb563 boot/at91bootstrap3: bump to version 3.8.6
Signed-off-by: Biagio Montaruli <biagio.hkr@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-09-23 08:05:57 +02:00
Petr Kulhavy
fad58cefa4 boot/uboot: allow to build multiple U-Boot images
Sometimes it is desired to build multiple U-boot images. E.g. one to
save into flash memory and one for serial load. So far this was not
possible.

This change allows to select any combination of the target formats. They
are all copied to the image folder.

Signed-off-by: Petr Kulhavy <brain@jikos.cz>
[Thomas:
 - Handle the BR2_TARGET_UBOOT_FORMAT_BIN, which wasn't handled, and
   therefore u-boot.bin was not copied when
   BR2_TARGET_UBOOT_FORMAT_BIN=y.
 - Rename UBOOT_BIN to UBOOT_BINS, since it can now contain multiple
   values.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-09-17 19:24:12 +02:00
Fabio Estevam
7f111de1fb boot/uboot: bump to version 2016.09
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-09-12 22:40:15 +02:00
Ryan Coe
f80e50d8a7 syslinux: add patch to disable pie
Ubuntu 16.10 has pie enable by default. This causes a build failure with
syslinux.

https://bugs.launchpad.net/ubuntu/+source/syslinux/+bug/1579023

Signed-off-by: Ryan Coe <bluemrp9@gmail.com>
[Thomas: improve patch description.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-09-12 22:32:47 +02:00
Peter Korsgaard
7353967690 Merge branch 'next'
Quite some conflicts, so here goes ..

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-09-02 16:20:33 +02:00
Raphaël Poggi
6525c6d228 barebox: bump version to 2016.08
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-08-16 12:56:41 +02:00
Raphaël Poggi
bbe71a699a barebox: fix ARCH value for arm64
barebox 2016.08 added arm64 support using ARCH=arm.

[Peter: extend commit message to clarify]
Signed-off-by: Raphael Poggi <poggi.raph@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-08-16 08:05:05 +02:00
Charles Hardin
fc174b7057 grub2: fix build with BR2_STRIP_none
grub2 assumes the strip command will generate output and the output should
always be stripped - so, just use the $(TARGET_CROSS)strip to make sure that
the build succeeds regardless of the buildroot strip configuration.

Signed-off-by: Charles Hardin <ckhardin@exablox.com>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-07-31 20:19:40 +02:00
Thomas Petazzoni
4770c4ef83 grub2: add patch to fix build with recent gcc versions
This commit backports a patch from upstream grub2 that fixes a build
issue occuring at least with recent gcc versions:

gettext/gettext.c:37:36: error: storage size of 'main_context' isn't known
 static struct grub_gettext_context main_context, secondary_context;

Fixes bug #8991.

Bug reproduced with:

BR2_x86_64=y
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_5=y
BR2_TOOLCHAIN_BUILDROOT_GLIBC=y
BR2_GCC_VERSION_6_X=y
BR2_TARGET_GRUB2=y
BR2_TARGET_GRUB2_X86_64_EFI=y
BR2_TARGET_GRUB2_BUILTIN_MODULES="boot linux ext2 fat squash4 part_msdos part_gpt normal efi_gop terminal"

and verified fixed after adding this patch.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-25 22:07:05 +02:00
Thomas Petazzoni
238761e390 grub2: rename patch with the proper naming convention
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-25 21:58:29 +02:00
Patrick Keroulas
d42ec02282 boot: add ts4800-mbrboot package
This MBR routine is based on TS' original bootloader.  It is loaded by
the bootrom stored in the companion FPGA, and chainloads an executable
located at the beginning of the first non-fs (0xda) partition.

Signed-off-by: Patrick Keroulas <patrick.keroulas@savoirfairelinux.com>
[Thomas:
 - add hash file.
 - install image in INSTALL_IMAGES_CMDS instead of
   INSTALL_TARGET_CMDS.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-15 23:15:12 +02:00
Fabio Estevam
f0fa2d1890 boot/uboot: bump to version 2016.07
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-07-12 10:48:08 +02:00
Thomas Petazzoni
61c26cc817 boot/uboot: fix missing closing parenthesis
There was a typo in commit
b05ff12b6c ("uboot: install multiple spl
images"), leading to a missing closing parenthesis. This commit fixes
this typo.

Fixes bug #9086

Reported-by: Jebodiah Sensai <dkaplan65@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-06 21:06:45 +02:00
Jason Abele
b05ff12b6c uboot: install multiple spl images
For some platforms, there are multiple generated spl images.  Extend
BR2_TARGET_UBOOT_SPL_NAME to allow these multiple images to be installed
after uboot build completes.

For example, the NextThingCo C.H.I.P. uses two binaries from uboot,
spl/sunxi-spl.bin and spl/sunxi-spl-with-ecc.bin.

Signed-off-by: Jason Abele <jason@nextthing.co>
[Maxime:
 - Add foreach loop for general case and mkpimage
 - Use firstword for zynq case]
Signe-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>

Signed-off-by: Maxime Hadjinlian <maxime.hadjinlian@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-05 17:30:12 +02:00
Thomas Petazzoni
1c2eb2684f boot/uboot: fix build of old U-Boot versions
Since commit 0dca644e44 ("boot/uboot: fix
missing host-openssl for i.MX28 target"), we pass HOSTCFLAGS/HOSTLDFLAGS
in the environment of U-Boot when building. This is needed to allow
U-Boot to find the OpenSSL headers/libraries when they are
needed. Unfortunately, this breaks the build with old U-Boot versions as
the U-Boot Makefiles were not designed to have HOSTCFLAGS passed in,
which causes some important CFLAGS from the U-Boot build system to be
ignored.

As suggested by Arnout, we pass the HOST_CFLAGS inside HOSTCC directly,
which allows to pass the CFLAGS without overriding the internal U-Boot
CFLAGS.

Tested with an old U-Boot (2012.10), and a modern U-Boot in a
configuration that needs OpenSSL.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-07-05 12:06:47 +02:00
Fabio Porcedda
f732e3362e barebox: bump to version 2016.06.0
Signed-off-by: Fabio Porcedda <fabio.porcedda@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-06-23 21:07:17 +02:00
Yann E. MORIN
3222a10869 package/mxs-bootlets: add hash file
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-06-19 21:54:20 +02:00
Yann E. MORIN
73fa3dc040 package/at91dataflashboot: add hash file
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-06-19 21:11:25 +02:00
Yann E. MORIN
0a51811a1d package/at91bootstrap: add hash file
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-06-19 21:10:16 +02:00
Gilles Chanteperdrix
b64f7b7eee grub2: really disable liblzma
There is no option --enable-liblzma=no in grub2's configure script, so
the only way to disable liblzma support is to pass
ac_cv_lib_lzma_lzma_code=no.

Signed-off-by: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Tested-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Reviewed-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
[Thomas: expand commit log, as suggested by Yann E. Morin.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-06-15 23:01:18 +02:00
Zakharov Vlad
41a077d2b1 uboot: Use "mdbtrick" target when building elf for ARC
By default position independent executables (PIE) are generated
when building U-Boot elf target. MetaWare debugger doesn't support
PIE (position-independent executable).

In order to allow MDB load and run U-Boot elf, we need to do a
special trick, called "mdbtrick".

This special build target is used to fake generated U-Boot elf by:
    1. Reset PIE flag in ELF header
    2. Strip all debug information from elf

Signed-off-by: Zakharov Vlad <vzakhar@synopsys.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-06-12 21:40:19 +02:00
Yann E. MORIN
77f4c205b9 boot/barebox: use the generic help rules
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Arnout Vandecappelle <arnout@mind.be>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
[Thomas: don't use the helper.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-06-07 22:12:08 +02:00
Peter Korsgaard
577021e81b Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-06-01 17:55:16 +02:00
Cam Hutchison
0542bb79e8 uboot: Support multiple environment source files
Allow multiple file names to be listed in
BR2_TARGET_UBOOT_ENVIMAGE_SOURCE, concatenating them in the order
listed.

This allows the bulk of the environment to be shared across multiple
boards using a common environment file with board-specific values
supplied in a secondary environment source file.

Signed-off-by: Cam Hutchison <camh@xdna.net>
[Thomas: adjust indentation in the .mk file.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-05-31 22:59:35 +02:00
Peter Korsgaard
7c4d983628 boot: add s500-bootloader package
This is the first level bootloader for the Actions Semiconductor S500 SoC,
which is used on boards like Roseapple Pi and LeMaker Guitar.

The bootloader performs basic configuration and chain loads u-boot for
futher setup.

This bootloader is unfortunately only available as a binary blob. It gets
configured for a specific board using a binary (32bit x86) tool based on a
.ini file (somewhat similar to sunxi .fex).

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-05-26 10:35:34 +02:00
Julien Boibessot
0dca644e44 boot/uboot: fix missing host-openssl for i.MX28 target
Building an U-Boot image for the i.MX23 or i.MX28 target requires to run the
bootloaders 'mxsimage' tool on the host. As mxsimage needs unconditionally
OpenSSL, building U-Boot for those targets fails if it is not available on
the host:

tools/mxsimage.c:18:25: fatal error: openssl/evp.h: No such file or directory
  #include <openssl/evp.h>

Add the required dependency 'host-openssl' to all the different U-Boot image
types used to build a bootloader image for an i.MX23/i.MX28 target.

Also pass HOST_CFLAGS and HOST_LDFLAGS to the U-Boot build process so the right
-I/-L options will be used to find OpenSSL.

Ported from the Armadeus project:
https://sourceforge.net/p/armadeus/mailman/message/33595402/

Signed-off-by: Julien Boibessot <julien.boibessot@armadeus.com>
[Jörg: port to recent Buildroot version]
Signed-off-by: Jörg Krause <joerg.krause@embedded.rocks>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-05-25 17:09:22 +02:00
Fabio Estevam
316986e336 boot/uboot: bump to version 2016.05
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-05-16 21:14:09 +02:00
Fabio Estevam
3ef13c4996 barebox: bump to version 2016.05.0
Signed-off-by: Fabio Estevam <festevam@gmail.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-05-11 23:06:36 +02:00
Yegor Yefremov
f80735ce39 barebox: add an option to embed environment image
Barebox provides an option to embed a custom environment image into
barebox binary. This image will be used, when the environment found in
the environment sector is invalid. Both embedded and external images
can be used together, so having both options at the same time is
justified.

This patch sets barebox Kconfig option CONFIG_DEFAULT_ENVIRONMENT_PATH
to user specified path. This way one can use such BR's variables like
BR2_EXTERNAL, TOPDIR etc. to provide paths to custom environment
folders.

Cc: Pieter Smith <pieter@boesman.nl>
Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-05-06 15:48:01 +02:00
Peter Korsgaard
2d0bc89ebf uboot: ensure u-boot-dtb.img gets built if enabled
u-boot-dtb.img only gets built by default (all target) if
CONFIG_OF_SEPARATE _AND_ CONFIG_SPL_FRAMEWORK are enabled.

Certain SoCs (E.G. Action Semi S500) use a proprietary first level
bootloader instead of u-boot SPL, but still use u-boot-dtb.img as the first
level bootloader parses the uImage header for size/loadaddr.

Ensure u-boot-dtb.img gets built if enabled by explicitly listing it as a
u-boot make target (next to all) to support such setups.

Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2016-05-05 11:31:39 +02:00
Frank Hunleth
2512fcf41f syslinux: fix boot hang when host-gcc is 5.3
Syslinux uses the host version of gcc to build to bootloader. On systems
with gcc 5.3, this results in a bootloader that hangs. This issue has
been addressed in upstream syslinux, but an official release has not
been made yet. This commit adds the upstream patch to fix the issue.

Most likely fixes bug #8866.

Signed-off-by: Frank Hunleth <fhunleth@troodon-software.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-05-01 22:22:11 +02:00
Pieter Smith
76165265af barebox: support auxiliary config build
Adds support to build barebox with an auxiliary config.

This is useful for building an SPL (Secondary Program Loader) in
addition to the traditional TPL (Tertiary Program Loader). The
Beaglebone Black for example has two barebox configurations:

- am335x_defconfig builds the full barebox bootloader with device
  tree

- am335x_mlo_defconfig builds the smaller MLO bootloader that loads
  the full barebox bootloader from the eMMC or SD card.

Tested with the following defconfig:

  # architecture
  BR2_arm=y
  BR2_cortex_a8=y
  BR2_ARM_EABIHF=y

  # system
  BR2_TARGET_GENERIC_HOSTNAME="beaglebone"
  BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_DEVTMPFS=y
  BR2_TARGET_GENERIC_REMOUNT_ROOTFS_RW=y

  # filesystem
  BR2_PACKAGE_AM33X_CM3=y
  BR2_TARGET_ROOTFS_EXT2=y
  BR2_TARGET_ROOTFS_EXT2_4=y

  # bootloader
  BR2_TARGET_BAREBOX=y
  BR2_TARGET_BAREBOX_BOARD_DEFCONFIG="am335x"
  BR2_TARGET_BAREBOX_IMAGE_FILE="images/barebox-am33xx-beaglebone.img"
  BR2_TARGET_BAREBOX_CUSTOM_ENV=y
  BR2_TARGET_BAREBOX_CUSTOM_ENV_PATH="board/beaglebone/barebox/barebox.env"
  BR2_TARGET_BAREBOX_AUX=y
  BR2_TARGET_BAREBOX_AUX_BOARD_DEFCONFIG="am335x_mlo"
  BR2_TARGET_BAREBOX_AUX_IMAGE_FILE="images/barebox-am33xx-beaglebone-mlo.img"

  # kernel
  BR2_LINUX_KERNEL=y
  BR2_LINUX_KERNEL_USE_DEFCONFIG=y
  BR2_LINUX_KERNEL_DEFCONFIG="omap2plus"
  BR2_LINUX_KERNEL_ZIMAGE=y

  # use the barebox built-in dtb
  # BR2_LINUX_KERNEL_DTS_SUPPORT is not set

Signed-off-by: Pieter Smith <pieter@boesman.nl>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-05-01 14:33:57 +02:00
Pieter Smith
4ce611b987 barebox: prepare for auxiliarry build
No functional changes. In preparation for the auxiliary barebox build,
boot/barebox is split into two parts:
1. boot/barebox:
   - The source and patch specification which are to be shared between the
     barebox and barebox-aux packages.
   - The barebox-package function and build logic.
2. boot/barebox/barebox:
   - The package configuration, fragments, barebox env, etc.
   - The actual barebox package make instantiation.

Signed-off-by: Pieter Smith <pieter@boesman.nl>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-05-01 14:27:45 +02:00
Pieter Smith
66bdd08a82 barebox: extract package name argument
No functional changes: Extracts an argument to the inner-barebox-package
function to automatically determine the uppercase package name. This is needed
to support a 2nd config build. This results in the following renaming:
  'BAREBOX' -> '$(1)'

All barebox packages are meant to be built from the same sources, so related
KConfig variables (origin, version and patch directory) are not extracted.

Signed-off-by: Pieter Smith <pieter@boesman.nl>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-04-24 17:47:02 +02:00
Pieter Smith
4a6c4c8897 barebox: introduce barebox-package function
No functional changes: Introduces a barebox-package function towards
re-use by a 2nd config build.

Because the function is meant to be called from within a $(eval), all
instances of '$' has to be escaped. I.e. rename '$' -> '$$'.

Signed-off-by: Pieter Smith <pieter@boesman.nl>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-04-24 17:45:24 +02:00
Pieter Smith
cb8b5a7321 barebox: support multi-image-build image selection
Support optional selection of the built image filename in a
multi-image barebox build. This makes it possible to specify which
image to pick in a multi-image barebox config such as the
am335x_defconfig.

Signed-off-by: Pieter Smith <pieter@boesman.nl>
[Thomas:
 - remove default "", since this is the default for string options
 - rename the prompt from "Barebox image filename" to "Image filename"
 - slightly improve the Config.in help text.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-04-24 17:36:55 +02:00
Benoît Allard
3177e74c8f syslinux: Allow to build multiple flavors simultaneously
This becomes handy when building hybrid images that needs to be able
to boot in MBR and GPT mode.

Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
Tested-by: Matt Weber <matt@thewebers.ws>
Reviewed-by: Matt Weber <matt@thewebers.ws>
Reviewed-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
2016-04-18 23:41:37 +02:00