summaryrefslogtreecommitdiff
path: root/spl
Commit message (Collapse)AuthorAgeLines
* kbuild: refactor more IMX image rulesMasahiro Yamada2014-02-25-3/+0
| | | | | | | | | This commit avoids generating ./SPL twice. - Fist time descending to spl/ - Second time as a prerequisite of u-boot-with-spl.imx, u-boot-with-nand-spl.imx. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: use shorten logs for IMX imagesMasahiro Yamada2014-02-25-2/+2
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: use shorten logs for misc targetsMasahiro Yamada2014-02-25-1/+5
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: use shorten logs for mkimage rulesMasahiro Yamada2014-02-25-6/+9
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: use shorten logs objcopy rulesMasahiro Yamada2014-02-25-2/+17
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: Add $(Q) when descending into subdirectoriesMasahiro Yamada2014-02-25-2/+2
| | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Simon Glass <sjg@chromium.org>
* kbuild: rename OBJCFLAGS to OBJCOPYFLAGSMasahiro Yamada2014-02-25-1/+1
| | | | | | | Rename OBJCFLAGS to OBJCOPYFLAGS beforehand to use "cmd_objcopy" in scripts/Makefile.lib in an upcoming commit. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: fix SPL link bug when USE_PRIVATE_LIBGCC is "yes"Masahiro Yamada2014-02-24-1/+2
| | | | | | | | | | | | | | | | Commit 6825a95 (kbuild: use Linux Kernel build scripts) changed the behavior of linkage when USE_PRIAVATE_LIBGCC is defined as "yes". (It dropped arch/arm/lib/eabi_compat.o from the target library.) Affected boards are all Tegra boards. This commit gets back the same behavior as before Kbuild series. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Tom Warren <twarren@nvidia.com> Cc: Tom Rini <trini@ti.com>
* kbuild: refactor Makefile and spl/Makefile moreMasahiro Yamada2014-02-19-57/+56
| | | | | | | | | | | This commit refactors rules of directory descending and defines u-boot-dirs and u-boot-all-dirs. (We will need u-boot-all-dirs when using scripts/Makefile.clean) Additionally, rename LIBS-y to libs-y. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: generate {spl, tpl}-autoconf.mk only when it is necessaryMasahiro Yamada2014-02-19-0/+16
| | | | | | | | | | | | Before this commit, {spl,tpl}-autoconf.mk was always generated at the top Makefile even if SPL(TPL) build was not selected. This commit moves the build rule of {spl,tpl}-autoconf.mk from the top Makefile to spl/Makefile. It prevents unnecessary {spl,tpl}-autoconf.mk from being generated. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: move include directives of board configuration filesMasahiro Yamada2014-02-19-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the location of include directives of board configuration files. The purpose of this change is: - Slim down $(TOPDIR)/config.mk - Prevent $(TOPDIR)/Makefile from including the same configuration file twice - Do not include include/config.mk multiple times because ARCH, CPU, BOARD, VENDOR, SOC are exported Before this commit: - include/autoconf.mk was included from $(TOPDIR)/Makefile and $(TOPDIR)/config.mk (This means $(TOPDIR)/Makefile included include/autoconf.mk twice) - include/{spl,tpl}-autoconf.mk was included from $(TOPDIR)/config.mk - include/config.mk was included from $(TOPDIR)/Makefile and $(TOPDIR)/config.mk (This means $(TOPDIR)/Makefile included include/config.mk twice) After this commit: - include/autoconf.mk is included from $(TOPDIR)/Makefile and $(TOPDIR)/scripts/Makefile.build - include/{spl,tpl}-autoconf.mk is included from $(TOPDIR)/spl/Makefile and $(TOPDIR)/scripts/Makefile.build - include/config.mk is included from $(TOPDIR)/config.mk and $(TOPDIR)/spl/Makefile Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: use Linux Kernel build scriptsMasahiro Yamada2014-02-19-12/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | Now we are ready to switch over to real Kbuild. This commit disables temporary scripts: scripts/{Makefile.build.tmp, Makefile.host.tmp} and enables real Kbuild scripts: scripts/{Makefile.build,Makefile.host,Makefile.lib}. This switch is triggered by the line in scripts/Kbuild.include -build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build.tmp obj +build := -f $(if $(KBUILD_SRC),$(srctree)/)scripts/Makefile.build obj We need to adjust some build scripts for U-Boot. But smaller amount of modification is preferable. Additionally, we need to fix compiler flags which are locally added or removed. In Kbuild, it is not allowed to change CFLAGS locally. Instead, ccflags-y, asflags-y, cppflags-y, CFLAGS_$(basetarget).o, CFLAGS_REMOVE_$(basetarget).o are prepared for that purpose. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
* kbuild: change out-of-tree buildMasahiro Yamada2014-02-19-25/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit changes the working directory where the build process occurs. Before this commit, build process occurred under the source tree for both in-tree and out-of-tree build. That's why we needed to add $(obj) prefix to all generated files in makefiles like follows: $(obj)u-boot.bin: $(obj)u-boot Here, $(obj) is empty for in-tree build, whereas it points to the output directory for out-of-tree build. And our old build system changes the current working directory with "make -C <sub-dir>" syntax when descending into the sub-directories. On the other hand, Kbuild uses a different idea to handle out-of-tree build and directory descending. The build process of Kbuild always occurs under the output tree. When "O=dir/to/store/output/files" is given, the build system changes the current working directory to that directory and restarts the make. Kbuild uses "make -f $(srctree)/scripts/Makefile.build obj=<sub-dir>" syntax for descending into sub-directories. (We can write it like "make $(obj)=<sub-dir>" with a shorthand.) This means the current working directory is always the top of the output directory. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Tested-by: Gerhard Sittig <gsi@denx.de>
* Makefile: move some flags to spl/MakefileMasahiro Yamada2014-02-19-0/+14
| | | | | | | Some flags are used for SPL (and TPL) build only. This commit moves them from config.mk to spl/Makefile. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* kbuild: Use Kbuild.includeMasahiro Yamada2014-02-19-2/+2
| | | | | | | | | | | | | | | | This commit adjusts some files to use Kbuild.include. - Use cc-option defined in Kbuild.include (Delete cc-option in config.mk) - Use cc-version defined in (Delete cc-version in config.mk) - Move binutils-version and dtc-version to Kbuild.include by analogy to cc-version This commit also adds srctree (same as SRCTREE) to use Kbuild scripts. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* board: samsung: refactor host programsMasahiro Yamada2014-02-19-2/+2
| | | | | | | Some Samsung boards have their own tools under board/samsung/<board>/tools/. This commit refactor more makefiles with "hostprogs-y". Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* tools: convert makefiles to kbuild styleMasahiro Yamada2014-02-19-1/+3
| | | | | | | | | | | | | Before this commit, makefiles under tools/ directory were implemented with their own way. This commit refactors them by using "hostprogs-y" variable. Several C sources have been added to wrap other C sources to simplify Makefile. For example, tools/crc32.c includes lib/crc32.c Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* common: spl: Add spl sata boot supportDan Murphy2014-02-19-0/+1
| | | | | | | | Add spl_sata to read a fat partition from a bootable SATA drive. Signed-off-by: Dan Murphy <dmurphy@ti.com> Reviewed-by: Roger Quadros <rogerq@ti.com>
* spl: common: Support for USB MSD FAT image loadingDan Murphy2014-01-24-0/+2
| | | | | | | | Add SPL support to be able to detect a USB Mass Storage device connected to a USB host. Once a USB Mass storage device is detected the SPL will load the u-boot.img from a FAT partition to target address. Signed-off-by: Dan Murphy <dmurphy@ti.com>
* powerpc:mpc85xx: Add ifc nand boot support for TPL/SPLPo Liu2014-01-21-0/+1
| | | | | | | | | | | | | | | Using the TPL method for nand boot by sram was already supported. Here add some code for mpc85xx ifc nand boot. - For ifc, elbc, esdhc, espi, all need the SPL without section .resetvec. - Use a clear function name for nand spl boot. - Add CONFIG_SPL_DRIVERS_MISC_SUPPORT to compile the fsl_ifc.c in spl/Makefile; Signed-off-by: Po Liu <Po.Liu@freescale.com> Acked-by: Scott Wood <scottwood@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
* arm: put .hash, .got.plt and .machine_param back in binariesAlbert ARIBAUD2014-01-14-1/+1
| | | | | | | | | | | Some targets will build fine but not boot if sections .hash and .got.plt are not present in the binary. Add them back. Also, Exynos machines require .machine_param section in SPL. Add it. Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Tested-by: Rajeshwari S Shinde <rajeshwari.s@samsung.com>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2014-01-10-1/+6
|\ | | | | | | | | | | | | | | | | | | Bringing in the MMC tree means that CONFIG_BOUNCE_BUFFER needed to be added to include/configs/exynos5-dt.h now. Conflicts: include/configs/exynos5250-dt.h Signed-off-by: Tom Rini <trini@ti.com>
| * SPL: EXYNOS: Prepare for variable size SPL supportRajeshwari Birje2013-12-30-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When variable size SPL is used, the BL1 expects the SPL to be encapsulated differently: instead of putting the checksum at a fixed offset in the SPL blob, prepend the blob with a header including the size and the checksum. The enhancements include - adding a command line option, '--vs' to indicate the need for the variable size encapsulation - padding the fixed size encapsulated blob with 0xff instead of random memory contents - do not silently truncate the input file, report error instead - no need to explicitly closing files/freeing memory, this all happens on exit; removing cleanups it makes code clearer - profuse commenting - modify Makefile to allow enabling the new feature per board Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Rajeshwari S Shinde <rajeshwari.s@samsung.com> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | Makefile: Select objects by CONFIG_ rather than $(ARCH) or $(CPU)Masahiro Yamada2013-12-16-12/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert like follows: CPU mpc83xx -> CONFIG_MPC83xx CPU mpc85xx -> CONFIG_MPC85xx CPU mpc86xx -> CONFIG_MPC86xx CPU mpc5xxx -> CONFIG_MPC5xxx CPU mpc8xx -> CONFIG_8xx CPU mpc8260 -> CONFIG_8260 CPU ppc4xx -> CONFIG_4xx CPU x86 -> CONFIG_X86 ARCH x86 -> CONFIG_X86 ARCH powerpc -> CONFIG_PPC Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | drivers/mtd: descend into sub directories only when it is necessaryMasahiro Yamada2013-12-13-1/+1
| | | | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | .gitignore: ignore spl/ and tpl/ directories except spl/MakefileMasahiro Yamada2013-12-13-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | Before this commit, output files under tpl/ directry were not ignored. This commit fixes this problem. And we have only one source file under spl/ directory: spl/Makefile So, we can describe .gitignore more simply. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | spl/Makefile: merge LIBS-y += arch/$(ARCH)/imx-commonMasahiro Yamada2013-12-13-5/+1
| | | | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* | Makefile: use two double-quotations as a pairMasahiro Yamada2013-12-13-2/+2
|/ | | | | | | | | | | | Some editors such as Emacs can highlight source files. But their parser algorithm is not perfect. If you use one double-quotation alone, some editor cannot handle it nicely and mark source lines as a string by mistake. It is preferable to use two double-quotations as a pair. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Driver/DDR: Moving Freescale DDR driver to a common driverYork Sun2013-11-25-0/+1
| | | | | | | Freescale DDR driver has been used for mpc83xx, mpc85xx, mpc86xx SoCs. The similar DDR controllers will be used for ARM-based SoCs. Signed-off-by: York Sun <yorksun@freescale.com>
* Makefile: move fs/fat/ entry to drivers/MakefileMasahiro Yamada2013-11-17-1/+1
| | | | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org> Acked-by: Simon Glass <sjg@chromium.org>
* Makefile: refactor a littleMasahiro Yamada2013-11-17-2/+1
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Makefile: rename all libraries to built-in.oMasahiro Yamada2013-11-17-36/+37
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* powerpc: move mpc8xxx entry under arch/powerpc/cpu/Masahiro Yamada2013-11-17-12/+1
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Makefile: convert makefiles to Kbuild style and delete grep switchMasahiro Yamada2013-11-01-21/+4
| | | | | | | | | | | | | We have converted all makefiles needed to build $(LIBS). Until this commit we used to grep switch so that U-Boot style and Kbuild style makefiles coexist. But we do not need any more. Goint forward, use always Kbuild style Makefile when adding a new Makefile Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* ARM: s5pc, exynos: move Samsung ARM SoC specific code under arch/arm/Masahiro Yamada2013-10-31-4/+0
| | | | | | | | | This patch moves S5PC, EXYNOS specific directory entries from the toplevel Makefile to arch/arm/cpu/armv7/Makefile using Kbuild descending feature. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Minkyu Kang <mk7.kang@samsung.com>
* ARM: omap: move OMAP specific code under arch/arm/Masahiro Yamada2013-10-31-4/+0
| | | | | | | | | This patch moves OMAP specific directory entries from the toplevel Makefile and spl/Makefile to arch/arm/cpu/armv7/Makefile using Kbuild descending feature. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Tom Rini <trini@ti.com>
* ARM: tegra: move Tegra specific code under arch/arm/Masahiro Yamada2013-10-31-5/+1
| | | | | | | | | This patch moves Tegra specific directory entries from the toplevel Makefile and spl/Makefile to arch/arm/cpu/*/Makefile using Kbuild descending feature. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Tom Warren <TWarren@nvidia.com>
* ARM: imx-common: convert makefiles to Kbuild styleMasahiro Yamada2013-10-31-1/+3
| | | | | | | | Multiple targets are included in arch/arm/imx-common/Makefile In order to refactor it, we need to tweak Makefile and spl/Makefile. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* Makefile: prepare for using Kbuild-style MakefileMasahiro Yamada2013-10-31-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Every makefile in sub directories has common lines at the top and the bottom. This commit pushes the common parts into script/Makefile.build. Going forward sub-makefiles only need to describe this part: COBJS := ... COBJS += ... SOBJS := ... But using obj-y is preferable to prepare for switching to Kbuild. The conventional (non-Kbuild) Makefile style is still supported. This is achieved by greping the Makefile before entering into it. U-Boot conventional sub makefiles always include some other makefiles. So the build system searches a line beginning with "include" keyword in the makefile in order to distinguish which style it is. If the Makefile include a "include" line, we assume it is a conventional U-Boot style. Otherwise, it is treated as a Kbuild-style makefile. With this tweak, we can switch sub-makefiles from U-Boot style to Kbuild style little by little. obj-y := foo/ syntax (descending into the sub directory) is not supportd yet. It will be implemented in the upcomming commit. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Cc: Simon Glass <sjg@chromium.org> Cc: Tom Rini <trini@ti.com>
* spl/Makefile: Add drivers/power/pmic/libpmic to CONFIG_SPL_POWER_SUPPORTTom Rini2013-09-20-1/+2
| | | | | | We may need to access the PMIC code in SPL, when we have power set. Signed-off-by: Tom Rini <trini@ti.com>
* Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'Albert ARIBAUD2013-09-04-0/+1
|\
| * arm, spl: add watchdog library to SPLHeiko Schocher2013-08-28-0/+1
| | | | | | | | | | Signed-off-by: Heiko Schocher <hs@denx.de> Cc: Tom Rini <trini@ti.com>
* | TPL : introduce the TPL based on the SPLYing Zhang2013-08-20-4/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Due to the nand SPL on some board(e.g. P1022DS)has a size limit, it can not be more than 4K. So, the SPL cannot initialize the DDR with the SPD code. This patch introduces TPL to enable a loader stub that is loaded by the code from the SPL. It initializes the DDR with the SPD or other operations. The TPL's size is sizeable, the maximum size is decided by the memory's size that TPL runs. It initializes the DDR through SPD code, and copys final uboot image to DDR. So there are three stage uboot images: * spl_boot, * tpl_boot, * final uboot image Signed-off-by: Ying Zhang <b40530@freescale.com> Acked-by: York Sun <yorksun@freescale.com>
* | powerpc: mpc85xx: Support booting from SD Card with SPLYing Zhang2013-08-20-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The code from the internal on-chip ROM. It loads the final uboot image into DDR, then jump to it to begin execution. The SPL's size is sizeable, the maximum size must not exceed the size of L2 SRAM. It initializes the DDR through SPD code, and copys final uboot image to DDR. So there are two stage uboot images: * spl_boot, 96KB size. The env variables are copied to L2 SRAM, so that ddr spd code can get the interleaving mode setting in env. It loads final uboot image from offset 96KB. * final uboot image, size is variable depends on the functions enabled. Signed-off-by: Ying Zhang <b40530@freescale.com> Acked-by: York Sun <yorksun@freescale.com>
* | SPL: Makefile: Build a separate autoconf.mk for SPLJoel Fernandes2013-08-19-0/+1
|/ | | | | | | | | | | | | | | | | | | | | SPL defines CONFIG_SPL_BUILD but this does not percolate to the autoconf.mk Makefile. As a result the build breaks when CONFIG_SPL_BUILD is used in the board-specific include header file. With this, there is a possibility of having a CONFIG option defined in the header file but not defined in the Makefile causing all kinds of build failure and problems. It also messes things for up, for example, when one might want to undefine options to keep the SPL small and doesn't want to be stuck with the CONFIG options used for U-boot. Lastly, this also avoids defining special CONFIG_SPL_ variables for cases where some options are required in U-boot but not in SPL. We add a spl-autoconf.mk rule that is generated for SPL with the CONFIG_SPL_BUILD flag and conditionally include it for SPL builds. Signed-off-by: Joel Fernandes <joelf@ti.com> Signed-off-by: Ying Zhang <b40530@freescale.com>
* ARM: OMAP: Add CONFIG_OMAP_COMMONLokesh Vutla2013-08-15-1/+1
| | | | | | | Adding a new CONFIG_OMAP_COMMON which is included by all boards that needs to build cpu/armv7/omap-common folder. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-24-2/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'Albert ARIBAUD2013-06-19-0/+8
|\ | | | | | | | | Conflicts: spl/Makefile
| * exynos: update tzpc to make it common for exynos4 and exynos5Inderpal Singh2013-06-04-0/+4
| | | | | | | | | | | | | | | | | | | | This requires that cpu_is_exynos4/5 should be made available before tzpc_init. Hence this patch also makes necessary changes to have cpu_info in spl and invokes arch_cpu_init before tzpc_init in low_level_init.S for smdk5250. Signed-off-by: Inderpal Singh <inderpal.singh@linaro.org> Acked-by: Chander Kashyap <chander.kashyap@linaro.org> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | imx: spl: Merge libimx-common make rulesBenoît Thébaudeau2013-05-16-5/+1
|/ | | | Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>