summaryrefslogtreecommitdiff
path: root/scripts/Makefile.spl
Commit message (Collapse)AuthorAgeLines
* x86: Add SPL build rules for start-up codeSimon Glass2017-02-06-1/+8
| | | | | | | | When SPL is used we need to build the 16-bit start-up code. Add Makefile rules to handle this. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* spl: Don't create a BSS padding when it is separateSimon Glass2017-02-06-1/+2
| | | | | | | | When BSS does not immediate follow the SPL image we don't need padding before the device tree. Remove it in this case. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* spl: Makefile: Define SPL_ earlierSimon Glass2017-02-06-0/+6
| | | | | | | | | This Makefile variable can be used in the architecture's main Makefile but at present it is not set up until later. Set it just before this Makefile is included. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* Makefile: preserve output for images that can contain HAB BlocksSven Ebenfeld2017-01-02-1/+3
| | | | | | | | | | | | | | | | | | | To being able to sign created binaries, we need to know the HAB Blocks for that image. Especially for the imximage type the HAB Blocks are only available during creation of the image. We want to preserve the information until we get to sign the files. In the verbose case we still get them printed out instead of writing to log files. Cc: sbabic@denx.de v2-Changes: - No usage of MKIMAGEOUTPUT_$(@F) macro. - Predefine default value /dev/null in every involved Makefile. Signed-off-by: Sven Ebenfeld <sven.ebenfeld@gmail.com> Reviewed-by: George McCollister <george.mccollister@gmail.com> Tested-by: George McCollister <george.mccollister@gmail.com>
* spl: add USB Gadget config optionStefan Agner2016-11-28-1/+1
| | | | | | | | | Introduce USB Gadget config option. This allows to combine Makefile entries for SPL_USBETH_SUPPORT and SPL_DFU_SUPPORT. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Ravi Babu <ravibabu@ti.com>
* spl: dfu: move DFU Kconfig to SPL KconfigStefan Agner2016-11-28-3/+0
| | | | | | | | | | | | | | | | The DFU Kconfig menu entries should be part of the SPL Kconfig file. Also avoid using the top level Makefile by moving the config dependent build artifacts to the driver/ and driver/usb/gadget/ Makfiles. With that, DFU can be built again in SPL if CONFIG_SPL_DFU_SUPPORT is enabled. Fixes: 6ad6102246d8 ("usb:gadget: Disallow DFU in SPL for now") Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
* tools: mkimage: Add support for initialization table for Zynq and ZynqMPMike Looijmans2016-11-15-2/+2
| | | | | | | | | | | | | | | | | | The Zynq/ZynqMP boot.bin file contains a region for register initialization data. Filling in proper values in this table can reduce boot time (e.g. about 50ms faster on QSPI boot) and also reduce the size of the SPL binary. The table is a simple text file with register+data on each line. Other lines are simply skipped. The file can be passed to mkimage using the "-R" parameter. It is recommended to add reg init file to board folder. For example: CONFIG_BOOT_INIT_FILE="board/xilinx/zynqmp/xilinx_zynqmp_zcu102/reg.int Signed-off-by: Mike Looijmans <mike.looijmans@topic.nl> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* sunxi: Rename CONFIG_SUNXI to CONFIG_ARCH_SUNXIJagan Teki2016-10-30-1/+1
| | | | | | | | | | | | CONFIG_SUNXI -> CONFIG_ARCH_SUNXI and removed CONFIG_SUNIX from config_whitelist.txt Cc: Simon Glass <sjg@chromium.org> Cc: Ian Campbell <ijc@hellion.org.uk> Cc: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Jagan Teki <jteki@openedev.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* kbuild: generate u-boot.cfg as a byproduct of include/autoconf.mkMasahiro Yamada2016-10-07-19/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Our build system still parses ad-hoc CONFIG options in header files and generates include/autoconf.mk so that Makefiles can reference them. This gimmick was introduced in the pre-Kconfig days and will be kept until Kconfig migration is completed. The include/autoconf.mk is generated like follows: [1] Preprocess include/common.h with -DDO_DEPS_ONLY and retrieve macros into include/autoconf.mk.tmp [2] Reformat include/autoconf.mk.dep into include/autoconf.mk with tools/scripts/define2mk.sed script [3] Remove include/autoconf.mk.tmp Here, include/autoconf.mk.tmp is similar to u-boot.cfg, which is also generated by preprocessing include/config.h with -DDO_DEPS_ONLY. In other words, there is much overlap among include/autoconf.mk and u-boot.cfg build rules. So, the idea is to split the build rule of include/autoconf.mk into two stages. The first preprocesses headers into u-boot.cfg. The second parses the u-boot.cfg into include/autoconf.mk. The build rules of u-boot.cfg in Makefile and spl/Makefile will be gone. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* spl: dfu: add dfu support in SPLB, Ravi2016-09-27-0/+4
| | | | | | | | | | | | | | | | | | | | | | | Traditionally the DFU support is available only as part 2nd stage boot loader(u-boot) and DFU is not supported in SPL. The SPL-DFU feature is useful for boards which does not have MMC/SD, ethernet boot mechanism to boot the board and only has USB inteface. This patch add DFU support in SPL with RAM memory device support to load and execute u-boot. And then leverage full functionality DFU in u-boot to flash boot inital binary images to factory or bare-metal boards to memory devices like SPI, eMMC, MMC/SD card using USB interface. This SPL-DFU support can be enabled through Menuconfig->Boot Images->Enable SPL-DFU support Signed-off-by: Ravi Babu <ravibabu@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* Makefile: rm u-boot.cfg dependencies are missingStephen Warren2016-09-22-0/+11
| | | | | | | | | | | | | | | | | | | | | | | Prior to the previous patch, a freshly created .u-boot.cfg.cmd may not correctly represent all dependencies for u-boot.cfg. The previous change only solved this issue for fresh builds; when performing an incremental build, the deficient .u-boot.cfg.cmd is already present, so u-boot.cfg is not rebuilt, and hence .u-boot.cfg.cmd is not rebuilt with the correct content. Solve this by explicitly detecting when the dependency file .u-boot.cfg.d has not been integrated into .u-boot.cfg.cmd, and force u-boot.cfg to be rebuilt in this case by deleting it first. This is possible since if_changed_dep will always delete .u-boot.cfg.d when it executes successfully, so its presence means either that the previous build was made by a source tree that contained a Makefile that didn't include the previous patch, or that the build failed part way through executing if_changed_dep for u-boot.cfg. Forcing a rebuild of u-boot.cfg is required in the former case, and will cause no additional work in the latter case, since the file would be rebuilt anyway for the same reason it was being rebuilt by the previous build. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Makefile: use if_change_dep for u-boot.cfgStephen Warren2016-09-22-1/+1
| | | | | | | | | | | | | | | | cmd_cpp_cfg generates a dependency output, but because it's invoked using if_changed rather than if_changed_dep, that dependency file is ignored. This results in Kbuild not knowing about which files u-boot.cfg depends on, so it may not be rebuilt when required. A practical result of this is that u-boot.cfg may continue to reference CONFIG_ options that no longer exist in the source tree, and this can cause the adhoc config options check to fail. This change modifies Makefile to use if_changed_dep, which in turn causes all dependencies to be known to the next make invocation. Signed-off-by: Stephen Warren <swarren@nvidia.com>
* Use separate options for TPL supportSimon Glass2016-09-16-1/+9
| | | | | | | | | | | | | | | At present TPL uses the same options as SPL support. In a few cases the board config enables or disables the SPL options depending on whether CONFIG_TPL_BUILD is defined. With the move to Kconfig, options are determined for the whole build and (without a hack like an #undef in a header file) cannot be controlled in this way. Create new TPL options for these and update users. This will allow Kconfig conversion to proceed for these boards. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: Don't attach the device tree to SPL with of-platdataSimon Glass2016-07-14-1/+1
| | | | | | | | When of-platdata is used in SPL we don't use the device tree. So there is no point in attaching it. Adjust the Makefile to skip attaching the device tree when of-platdata is enabled. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: Makefile: Build of-platdata files when the feature is enabledSimon Glass2016-07-14-3/+36
| | | | | | | Update the Makefile to call dtoc to create the C header and source files, then build these into the image. Signed-off-by: Simon Glass <sjg@chromium.org>
* Makefile: Allow the SPL final link rule to be overriddenSimon Glass2016-07-14-2/+4
| | | | | | | | | | Overriding the final link rule is possible with U-Boot proper. It us used to create a sandbox image links with host libraries. To build a sandbox SPL image we need the same feature for SPL. To support this, update the SPL link rule so sandbox can override it. Signed-off-by: Simon Glass <sjg@chromium.org>
* ARM64: zynq: Fix boot.bin generation for Zynq and ZynqMPMichal Simek2016-06-06-5/+2
| | | | | | | Fix boot.bin generation for Zynq and ZynqMP. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Marek Vasut <marex@denx.de>
* tools: zynqmpimage: Add Xilinx ZynqMP boot header generationMichal Simek2016-05-24-0/+7
| | | | | | | | | | Add support for the zynqmpimage to mkimage. Only basic functionality is supported without encryption and register initialization with one partition which is filled by U-Boot SPL. For more detail information look at Xilinx ZynqMP TRM. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* kbuild: Do not append dtb for OF_EMBED caseMichal Simek2016-05-02-1/+1
| | | | | | | | | | | dtb is already included in binary that's why there is no need to replace u-boot-spl.bin with u-boot-spl-dtb.bin. This is only needed for OF_SEPARATE is enabled. Only copy -nodtb.bin version which is straight output from objcopy -O binary. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* kbuild: fix build rule of u-boot-spl.dtbMasahiro Yamada2016-02-08-2/+2
| | | | | | | | | | | | The build command of u-boot-spl.dtb is not constant, but dependent on CONFIG_OF_SPL_REMOVE_PROPS. Use $(call if_changed,...) so that the change of CONFIG_OF_SPL_REMOVE_PROPS is detected. Also, add tools/fdtgrep to the dependency to make sure u-boot-spl.dtb is generated by the up-to-date fdtgrep in case the tool is modified. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* kbuild: add missing FORCE where $(call if_changed, ) is usedMasahiro Yamada2016-02-08-5/+5
| | | | | | | | | FORCE is needed for $(call if_changed,...) to be evaluated every time. Otherwise, the command is not executed when the command line has changed but any prerequisite has not been updated. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* kbuild: remove unneeded ifdef conditionals around build rulesMasahiro Yamada2016-02-08-4/+0
| | | | | | | | These rules are only used for SOCFPGA, SUNXI, but no need to hide them from other SoCs. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* socfpga: Simplify Makefile filenamesSimon Glass2016-02-01-3/+3
| | | | | | | We don't need the -dtb suffix anymore, so drop it. Tested-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* fdt: Build an SPL binary without device treeSimon Glass2016-02-01-9/+16
| | | | | | | | | | | | | | At present u-boot-spl.bin holds the plain SPL binary without the device tree. This is somewhat annoying since you need either u-boot-spl.bin or u-boot-spl-dtb.bin depending on whether device tree is used. Adjust the build such that u-boot-spl.bin includes a device tree (if enabled), and the plain binary is in u-boot-spl-nodtb.bin. For now u-boot-spl-dtb.bin remains the same. Tested-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Stephen Warren <swarren@nvidia.com> Signed-off-by: Simon Glass <sjg@chromium.org>
* Move all command code into its own directorySimon Glass2016-01-25-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | There are a lot of unrelated files in common, including all of the commands. Moving them into their own directory makes them easier to find and is more logical. Some commands include non-command code, such as cmd_scsi.c. This should be sorted out at some point so that the function can be enabled with or without the associated command. Unfortunately, with m68k I get this error: m68k: + M5329AFEE +arch/m68k/cpu/mcf532x/start.o: In function `_start': +arch/m68k/cpu/mcf532x/start.S:159:(.text+0x452): relocation truncated to fit: R_68K_PC16 against symbol `board_init_f' defined in .text.board_init_f section in common/built-in.o I hope someone can shed some light on what this means. I hope it isn't depending on the position of code in the image. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Heiko Schocher <hs@denx.de> Acked-by: Stefan Roese <sr@denx.de> Acked-by: Przemyslaw Marczak <p.marczak@samsung.com>
* ARM: zynq: Add target for building bootable SPL image for ZynqNathan Rossi2015-11-19-0/+11
| | | | | | | | | | | | | | | | Add a build target to generate 'boot.bin' which includes SPL. This is used by the platforms BootROM to load SPL directly. This change also conditionally changes what the 'boot.bin' target generates depending on the SoC. Leaving the behaviour unchanged for the AT91 targets. Signed-off-by: Nathan Rossi <nathan@nathanrossi.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Cc: Tom Rini <trini@konsulko.com> Cc: Andreas Bießmann <andreas.devel@googlemail.com> Cc: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
* spl: Add support for CONFIG_OF_EMBED=yMichal Simek2015-11-12-0/+1
| | | | | | | | | | | | | | | | | | | | CONFIG_OF_EMBED=y is the option which is here only for testing purpose and shouldn't be enabled by default as is describe at: "dts: Add a comment about CONFIG_OF_EMBED being for local use" (sha1: 3d3f60cb7a6bb6c338e00a9769fa918a8536096c) But still enabling this option locally shouldn't end up with compilation error when you build SPL. This patch fix it. Compilation error: lib/built-in.o: In function `fdtdec_setup': /mnt/disk/u-boot/lib/fdtdec.c:1246: undefined reference to `__dtb_dt_begin' Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reported-by: Tom Rini <trini@konsulko.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* dm: spl: Generate u-boot-spl-dtb.bin only when enabledSimon Glass2015-11-04-0/+2
| | | | | | | | At present this file is generated even when device tree is not enabled in SPL. Avoid this, since this file serves no purpose in that case. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* Move board_init_f_mem() into a common locationSimon Glass2015-10-24-0/+1
| | | | | | | | | This function will be used by both SPL and U-Boot proper. So move it into a common place. Also change the #ifdef so that the early malloc() area is not set up in SPL if CONFIG_SYS_SPL_MALLOC_START is defined. In that case it would never actually be used, and just chews up stack space. Signed-off-by: Simon Glass <sjg@chromium.org>
* spl: move SPL driver entries to driver/MakefileMasahiro Yamada2015-08-18-30/+1
| | | | | | | | | | | | | Just preparing for upcoming cleaning. The board-specific linker script board/vpac270/u-boot-spl.lds has been touched to avoid build error. It does not change the size of spl/u-boot-spl.bin for this board, so it should be OK. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Stefano Babic <sbabic@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* Makefile: Add target for building bootable SPL image for SoCFPGAMarek Vasut2015-08-08-0/+10
| | | | | | | | | | | | Add build target for generating boot partition images recognised by the SoCFPGA BootROM. The SoCFPGA BootROM expects four copies of the u-boot-spl-dtb.sfp at the beginning of boot partition. Those are u-boot-spl-dtb.bin augmented by a header with which the BootROM can work. The u-boot-dtb.img uImage is appended to this to produce a full boot partition image, the u-boot-with-spl-dtb.sfp . This is the name of the final target. Signed-off-by: Marek Vasut <marex@denx.de>
* driver/ddr/altera: Add DDR driver for Altera's SDRAM controllerDinh Nguyen2015-08-08-0/+1
| | | | | | | | This patch enables the SDRAM controller that is used on Altera's SoCFPGA family. This patch configures the SDRAM controller based on a configuration file that is generated from the Quartus tool, sdram_config.h. Signed-off-by: Dinh Nguyen <dinguyen@opensource.altera.com>
* Merge git://git.denx.de/u-boot-marvellTom Rini2015-07-23-1/+2
|\
| * arm: mvebu: Add Armada 38x DDR3 training code from Marvell bin_hdrStefan Roese2015-07-23-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the DDR3 setup and training code taken from the Marvell U-Boot repository. This code used to be included as a binary (bin_hdr) into the Armada A38x boot image. Not linked with the main U-Boot. With this code addition and the serdes/PHY setup code, the Armada A38x support in mainline U-Boot is finally self-contained. So the complete image for booting can be built from mainline U-Boot. Without any additional external inclusion. Note: This code has undergone many hours (days!) of coding-style cleanup and refactoring. It still is not checkpatch clean though, I'm afraid. As the factoring of the code has so many levels of indentation that many lines are longer than 80 chars. Signed-off-by: Stefan Roese <sr@denx.de>
| * arm: mvebu: drivers/ddr: Move Armada XP DDR init code into new directoryStefan Roese2015-07-23-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the upcoming addition of the Armada 38x DDR support, which is not compatible to the Armada XP DDR init code, we need to introduce a new directory infrastructure. To support multiple Marvell DDR controller. This will be the new structure: drivers/ddr/marvell/axp Supporting Armada XP (AXP) devices (and perhaps Armada 370) drivers/ddr/marvell/a38x Supporting Armada 38x devices (and perhaps Armada 39x) Signed-off-by: Stefan Roese <sr@denx.de>
* | dm: Add a clock uclassSimon Glass2015-07-21-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clocks are an important feature of platforms and have become increasing complex with time. Most modern SoCs have multiple PLLs and dozens of clock dividers which distribute clocks to on-chip peripherals. Some SoC implementations have a clock API which is private to that SoC family, e.g. Tegra and Exynos. This is useful but it would be better to have a common API that can be understood and used throughout U-Boot. Add a simple clock API as a starting point. It supports querying and setting the rate of a clock. Each clock is a device. To reduce memory and processing overhead the concept of peripheral clocks is provided. These do not need to be explicit devices - it is possible to write a driver that can adjust the I2C clock (for example) without an explicit I2C clock device. This can dramatically reduce the number of devices (and associated overhead) in a complex SoC. Clocks are referenced by a number, and it is expected that SoCs will define that numbering themselves via an enum. Signed-off-by: Simon Glass <sjg@chromium.org>
* | dm: Add support for RAM driversSimon Glass2015-07-21-0/+1
| | | | | | | | | | | | | | | | Add support for a driver which sets up DRAM and can return information about the amount of RAM available. This is a first step towards moving RAM init to driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
* | dm: power: Allow use of regulators in SPLSimon Glass2015-07-21-0/+1
| | | | | | | | | | | | | | This functionality may be useful for setting up regulators early during boot. Signed-off-by: Simon Glass <sjg@chromium.org>
* | dm: Add support for LEDsSimon Glass2015-07-21-0/+1
| | | | | | | | | | | | | | | | | | Add a simple uclass for LEDs, so that these can be controlled by the device tree and activated when needed. LEDs are referred to by their label. This implementation requires a driver for each type of LED (e.g GPIO, I2C). Signed-off-by: Simon Glass <sjg@chromium.org>
* | dm: Reduce SPL device tree sizeSimon Glass2015-07-21-0/+28
|/ | | | | | | | | The SPL device tree size must be minimised to save memory. Only include properties that are needed by SPL - this is determined by the presence of the "u-boot,dm-pre-reloc" property. Also remove a predefined list of unused properties from the nodes that remain. Signed-off-by: Simon Glass <sjg@chromium.org>
* kbuild: define DO_DEPS_ONLY for u-boot.cfg to fix build errorMasahiro Yamada2015-05-28-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since 741e58e0fc8e (Create a .cfg file containing the CONFIG options used to build), all the Blackfin boards fail to build if the parallel (-j) option is passed. $ make -s bf506f-ezkit_defconfig # # configuration written to .config # $ make -j8 CROSS_COMPILE=bfin-elf- scripts/kconfig/conf --silentoldconfig Kconfig CHK include/config.h UPD include/config.h GEN include/autoconf.mk GEN include/autoconf.mk.dep CHK include/config/uboot.release CHK include/generated/timestamp_autogenerated.h UPD include/generated/timestamp_autogenerated.h CFG u-boot.cfg include/asm-offsets.h:3:43: fatal error: generated/generic-asm-offsets.h: No such file or directory compilation terminated. make: *** [u-boot.cfg] Error 1 When parsing header files for defined CONFIG options, DO_DEPS_ONLY must be defined to exclude generated headers that might not have been available yet. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* Create a .cfg file containing the CONFIG options used to buildSimon Glass2015-04-18-1/+8
| | | | | | | | | | At present CONFIG options are split across Kconfig and board config headers files. Also we have multiple files containing these CONFIG options. In order to see exactly what is being used for building, create a .cfg file which holds these options as reported by the C preprocessor. Signed-off-by: Simon Glass <sjg@chromium.org>
* kconfig: switch to single .config configurationMasahiro Yamada2015-02-24-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When Kconfig for U-boot was examined, one of the biggest issues was how to support multiple images (Normal, SPL, TPL). There were actually two options, "single .config" and "multiple .config". After some discussions and thought experiments, I chose the latter, i.e. to create ".config", "spl/.config", "tpl/.config" for Normal, SPL, TPL, respectively. It is true that the "multiple .config" strategy provided us the maximum flexibility and helped to avoid duplicating CONFIGs among Normal, SPL, TPL, but I have noticed some fatal problems: [1] It is impossible to share CONFIG options across the images. If you change the configuration of Main image, you often have to adjust some SPL configurations correspondingly. Currently, we cannot handle the dependencies between them. It means one of the biggest advantages of Kconfig is lost. [2] It is too painful to change both ".config" and "spl/.config". Sunxi guys started to work around this problem by creating a new configuration target. Commit cbdd9a9737cc (sunxi: kconfig: Add %_felconfig rule to enable FEL build of sunxi platforms.) added "make *_felconfig" to enable CONFIG_SPL_FEL on both images. Changing the configuration of multiple images in one command is a generic demand. The current implementation cannot propose any good solution about this. [3] Kconfig files are getting ugly and difficult to understand. Commit b724bd7d6349 (dm: Kconfig: Move CONFIG_SYS_MALLOC_F_LEN to Kconfig) has sprinkled "if !SPL_BUILD" over the Kconfig files. [4] The build system got more complicated than it should be. To adjust Linux-originated Kconfig to U-Boot, the helper script "scripts/multiconfig.sh" was introduced. Writing a complicated text processor is a shell script sometimes caused problems. Now I believe the "single .config" will serve us better. With it, all the problems above would go away. Instead, we will have to add some CONFIG_SPL_* (and CONFIG_TPL_*) options such as CONFIG_SPL_DM, but we will not have much. Anyway, this is what we do now in scripts/Makefile.spl. I admit my mistake with my apology and this commit switches to the single .config configuration. It is not so difficult to do that: - Remove unnecessary processings from scripts/multiconfig.sh This file will remain for a while to support the current defconfig format. It will be removed after more cleanups are done. - Adjust some makefiles and Kconfigs - Add some entries to include/config_uncmd_spl.h and the new file scripts/Makefile.uncmd_spl. Some CONFIG options that are not supported on SPL must be disabled because one .config is shared between SPL and U-Boot proper going forward. I know this is not a beautiful solution and I think we can do better, but let's see how much we will have to describe them. - update doc/README.kconfig More cleaning up patches will follow this. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* sunxi: Normalise FEL supportSimon Glass2015-02-16-2/+0
| | | | | | | | | | | | Make sunxi's FEL code fit with the normal U-Boot boot sequence instead of creating its own. There are some #ifdefs required in start.S. Future work will hopefully remove these. This series is available at u-boot-dm, branch sunxi-working. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* scripts/Makefile.spl: Add MVEBU DDR code to SPLStefan Roese2015-02-06-0/+1
| | | | | Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Luka Perkov <luka.perkov@sartura.hr>
* Kbuild: introduce Makefile in arch/$ARCH/Daniel Schwierzeck2014-12-08-22/+1
| | | | | | | | | | | | | | | Introduce a Makefile under arch/$ARCH/ and include it in the top Makefile (similar to Linux kernel). This allows further refactoringi like moving architecture-specific code out of global makefiles, deprecating config variables (CPU, CPUDIR, SOC) or deprecating arch/$ARCH/config.mk. In contrary to Linux kernel, U-Boot defines the ARCH variable by Kconfig, thus the arch Makefile can only included conditionally after the top config.mk. Signed-off-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Acked-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Merge git://git.denx.de/u-boot-dmTom Rini2014-11-24-0/+1
|\ | | | | | | | | | | | | Conflicts: drivers/serial/serial-uclass.c Signed-off-by: Tom Rini <trini@ti.com>
| * dm: spl: Allow driver model to be usedSimon Glass2014-11-21-0/+1
| | | | | | | | | | | | | | | | When enabled, set up driver model for SPL. This allows SPL to use the same drivers as the main U-Boot. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Tom Rini <trini@ti.com>
* | spl: fix descending condition to drivers/mtd/nand/Masahiro Yamada2014-11-23-1/+1
| | | | | | | | | | | | | | | | SPL should not reference CONFIG_CMD_NAND to decide whether or not it should build drivers/mtd/nand. CONFIG_CMD_NAND should be only used to select the NAND utility command on the command parser. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | kbuild: Descend into SOC directory from CPU directoryMasahiro Yamada2014-11-23-3/+0
|/ | | | | | | | | Some CPUs of some architectures have SOC directories. At present, the build system directly descends into SOC directories from the top Makefile, but it should generally descend into each directory from its parent directory. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>