summaryrefslogtreecommitdiffstats
path: root/common/Makefile
Commit message (Collapse)AuthorAgeFilesLines
* common: Makefile: allow for spl builds with env_fatFelipe Balbi2014-10-231-0/+1
| | | | | | | If CONFIG_SPL_BUILD and CONFIG_ENV_IS_IN_FAT are defined, u-boot spl will fail to build. Fix that. Signed-off-by: Felipe Balbi <balbi@ti.com>
* crypto/fsl: Add command for encapsulating/decapsulating blobsRuchika Gupta2014-10-161-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Freescale's SEC block has built-in Blob Protocol which provides a method for protecting user-defined data across system power cycles. SEC block protects data in a data structure called a Blob, which provides both confidentiality and integrity protection. Encapsulating data as a blob Each time that the Blob Protocol is used to protect data, a different randomly generated key is used to encrypt the data. This random key is itself encrypted using a key which is derived from SoC's non volatile secret key and a 16 bit Key identifier. The resulting encrypted key along with encrypted data is called a blob. The non volatile secure key is available for use only during secure boot. During decapsulation, the reverse process is performed to get back the original data. Commands added -------------- blob enc - encapsulating data as a cryptgraphic blob blob dec - decapsulating cryptgraphic blob to get the data Commands Syntax --------------- blob enc src dst len km Encapsulate and create blob of data $len bytes long at address $src and store the result at address $dst. $km is the 16 byte key modifier is also required for generation/use as key for cryptographic operation. Key modifier should be 16 byte long. blob dec src dst len km Decapsulate the blob of data at address $src and store result of $len byte at addr $dst. $km is the 16 byte key modifier is also required for generation/use as key for cryptographic operation. Key modifier should be 16 byte long. Signed-off-by: Ruchika Gupta <ruchika.gupta@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
* kbuild: refactor some makefilesMasahiro Yamada2014-09-241-7/+2
| | | | | | | | | | | | | | | | | | [1] Move driver/core/, driver/input/ and drivers/input/ entries from the top Makefile to drivers/Makefile [2] Remove the conditional by CONFIG_DM in drivers/core/Makefile because the whole drivers/core directory is already selected by CONFIG_DM in the upper level [3] Likewise for CONFIG_DM_DEMO in drivers/demo/Makefile [4] Simplify common/Makefile - both CONFIG_DDR_SPD and CONFIG_SPD_EEPROM are boolean macros so they can directly select objects Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Marek Vasut <marex@denx.de>
* usb/gadget: fastboot: implement sparse formatSteve Rae2014-09-241-0/+1
| | | | | | | - add capability to "fastboot flash" with sparse format images Signed-off-by: Steve Rae <srae@broadcom.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
* usb/gadget: fastboot: add eMMC support for flash commandSteve Rae2014-09-241-0/+5
| | | | | | - add support for 'fastboot flash' command for eMMC devices Signed-off-by: Steve Rae <srae@broadcom.com>
* common/Makefile: Consolidate SPL ENV options, correct inclusionTom Rini2014-08-251-7/+5
| | | | | | | CONFIG_SPL_NET_SUPPORT is not the only time we want SPL to ahve environment, CONFIG_SPL_ENV_SUPPORT is when we want it. Signed-off-by: Tom Rini <trini@ti.com>
* Add an I/O tracing featureSimon Glass2014-06-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | When debugging drivers it is useful to see what I/O accesses were done and in what order. Even if the individual accesses are of little interest it can be useful to verify that the access pattern is consistent each time an operation is performed. In this case a checksum can be used to characterise the operation of a driver. The checksum can be compared across different runs of the operation to verify that the driver is working properly. In particular, when performing major refactoring of the driver, where the access pattern should not change, the checksum provides assurance that the refactoring work has not broken the driver. Add an I/O tracing feature and associated commands to provide this facility. It works by sneaking into the io.h heder for an architecture and redirecting I/O accesses through its tracing mechanism. For now no commands are provided to examine the trace buffer. The format is fairly simple, so 'md' is a reasonable substitute. Note: The checksum feature is only useful for I/O regions where the contents do not change outside of software control. Where this is not suitable you can fall back to manually comparing the addresses. It might be useful to enhance tracing to only checksum the accesses and not the data read/written. Signed-off-by: Simon Glass <sjg@chromium.org>
* bootm: Split out code from cmd_bootm.cSimon Glass2014-06-191-1/+1
| | | | | | | | | | | | | | | | | This file has code in three different categories: - Command processing - OS-specific boot code - Locating images and setting up to boot Only the first category really belongs in a file called cmd_bootm.c. Leave the command processing code where it is. Split out the OS-specific boot code into bootm_os.c. Split out the other code into bootm.c Header files and extern declarations are tidied but otherwise no code changes are made, to make it easier to review. Signed-off-by: Simon Glass <sjg@chromium.org>
* Move bootretry code into bootretry.c and clean upSimon Glass2014-05-291-0/+5
| | | | | | | This code is only used by one board, so it seems a shame to clutter up the readline code with it. Move it into its own file. Signed-off-by: Simon Glass <sjg@chromium.org>
* Move command line API into cli.cSimon Glass2014-05-291-0/+1
| | | | | | | We now have a single entry point to the CLI, whether simple or hush. Put this in its own file. Signed-off-by: Simon Glass <sjg@chromium.org>
* Move autoboot code to autoboot.cSimon Glass2014-05-291-0/+5
| | | | | | | The autoboot code is complex and long. It deserves its own file with a simple interface from main.c. Signed-off-by: Simon Glass <sjg@chromium.org>
* Split out simple parser and readline into separate filesSimon Glass2014-05-291-1/+8
| | | | | | | It doesn't make sense to have the simple parser and the readline code all in main. Split them out into separate files. Signed-off-by: Simon Glass <sjg@chromium.org>
* Rename hush to cli_hushSimon Glass2014-05-291-1/+1
| | | | | | Hush is a command-line interpreter, so rename it to make that clearer. Signed-off-by: Simon Glass <sjg@chromium.org>
* usb/gadget: add the fastboot gadgetSebastian Siewior2014-05-081-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch contains an implementation of the fastboot protocol on the device side and documentation. This is based on USB download gadget infrastructure. The fastboot function implements the getvar, reboot, download and reboot commands. What is missing is the flash handling i.e. writting the image to media. v3 (Rob Herring): This is based on http://patchwork.ozlabs.org/patch/126798/ with the following changes: - Rebase to current mainline and updates for current gadget API - Use SPDX identifiers for licenses - Traced the history and added missing copyright to cmd_fastboot.c - Use load_addr/load_size for transfer buffer - Allow vendor strings to be optional - Set vendor/product ID from config defines - Allow Ctrl-C to exit fastboot mode v4: - Major re-write to use the USB download gadget. Consolidated function code to a single file. - Moved globals into single struct. - Use puts and putc as appropriate. - Added CONFIG_USB_FASTBOOT_BUF_ADDR and CONFIG_USB_FASTBOOT_BUF_SIZE to set the fastboot transfer buffer. v5: - Add CONFIG option documentation to README - Rebase using new downloader registration Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Rob Herring <robh@kernel.org>
* image: add support for Android's boot image formatSebastian Siewior2014-05-081-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for the Android boot-image format. The header file is from the Android project and got slightly alterted so the struct + its defines are not generic but have something like a namespace. The header file is from bootloader/legacy/include/boot/bootimg.h. The header parsing has been written from scratch and I looked at bootloader/legacy/usbloader/usbloader.c for some details. The image contains the physical address (load address) of the kernel and ramdisk. This address is considered only for the kernel image. The "second image" defined in the image header is currently not supported. I haven't found anything that is creating this. v3 (Rob Herring): This is based on http://patchwork.ozlabs.org/patch/126797/ with the following changes: - Rebased to current mainline - Moved android image handling to separate functions in common/image-android.c - s/u8/char/ in header to fix string function warnings - Use SPDX identifiers for licenses - Cleaned-up file source information: android_image.h is from file include/boot/bootimg.h in repository: https://android.googlesource.com/platform/bootable/bootloader/legacy The git commit hash is 4205b865141ff2e255fe1d3bd16de18e217ef06a usbloader.c would be from the same commit, but it does not appear to have been used for any actual code. v4: - s/andriod/android/ - Use a separate flag ep_found to track if the entry point has been set rather than using a magic value. Cc: Wolfgang Denk <wd@denx.de> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Tom Rini <trini@ti.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
* Merge branch 'next'Tom Rini2014-04-171-0/+1
|\
| * aes: Add 'aes' command to access AES-128-CBCMarek Vasut2014-03-211-0/+1
| | | | | | | | | | | | | | Add simple 'aes' command, which allows using the AES-128-CBC encryption and decryption functions from U-Boot command line. Signed-off-by: Marek Vasut <marex@denx.de>
* | Add lzmadec commandPatrice Bouchand2014-03-221-0/+3
|/ | | | | | | | | I needed to be able to uncompress lzma files. I did this command based on unzip command and propose it if it could help. Signed-off-by: Patrice Bouchand <pbfwdlist@gmail.com> Changed to work with sandbox Signed-off-by: Simon Glass <sjg@chromium.org>
* cros_ec: Move EC interface into common libraryVadim Bendebury2014-03-171-0/+1
| | | | | | | | | | Add a common library for obtaining access to the Chrome OS EC. This is used by boards which need to talk to the EC. Reviewed-by: Vadim Bendebury <vbendeb@google.com> Tested-by: Vadim Bendebury <vbendeb@google.com> Signed-off-by: Vadim Bendebury <vbendeb@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: Add a demonstration/example driverSimon Glass2014-03-041-0/+1
| | | | | | | | | | | | | | | | As an example of how to write a uclass and a driver, provide a demo version of each, accessible through the 'demo' command. To use these with driver model, define CONFIG_CMD_DEMO and CONFIG_DM_DEMO. The two demo drivers are enabled with CONFIG_DM_DEMO_SIMPLE and CONFIG_DM_DEMO_SHAPE. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Marek Vasut <marex@denx.de> Signed-off-by: Pavel Herrmann <morpheus.ibis@gmail.com> Signed-off-by: Viktor Křivák <viktor.krivak@gmail.com> Signed-off-by: Tomas Hlavacek <tmshlvck@gmail.com>
* Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2014-02-261-2/+0
|\ | | | | | | | | | | | | | | | | Conflicts: arch/arm/cpu/armv7/config.mk board/ti/am43xx/mux.c include/configs/am43xx_evm.h Signed-off-by: Tom Rini <trini@ti.com>
| * arm: Switch to -mno-unaligned-access when supported by the compilerTom Rini2014-02-261-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When we tell the compiler to optimize for ARMv7 (and ARMv6 for that matter) it assumes a default of SCTRL.A being cleared and unaligned accesses being allowed and fast at the hardware level. We set this bit and must pass along -mno-unaligned-access so that the compiler will still breakdown accesses and not trigger a data abort. To better help understand the requirements of the project with respect to unaligned memory access, the Documentation/unaligned-memory-access.txt file has been added as doc/README.unaligned-memory-access.txt and is taken from the v3.14-rc1 tag of the kernel. Cc: Albert ARIBAUD <albert.u.boot@aribaud.net> Cc: Mans Rullgard <mans@mansr.com> Signed-off-by: Tom Rini <trini@ti.com>
* | fs/fdos: RemoveTom Rini2014-02-211-2/+1
|/ | | | | | We have an unused FAT implementation in fs/fdos, remove. Signed-off-by: Tom Rini <trini@ti.com>
* kbuild: use Linux Kernel build scriptsMasahiro Yamada2014-02-191-7/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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-191-5/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* common: spl: Add spl sata boot supportDan Murphy2014-02-191-0/+3
| | | | | | | | 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>
* common: Add new clk commandMichal Simek2014-02-041-0/+1
| | | | | | | | Command provides just dump subcommand for showing clock frequencies in a soc. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Acked-by: Stefano Babic <sbabic@denx.de>
* spl: common: Support for USB MSD FAT image loadingDan Murphy2014-01-241-0/+4
| | | | | | | | 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>
* Makefile: delete unnecessary CPPFLAGS settingsMasahiro Yamada2013-12-131-2/+0
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* common: Delete unnecessary rules.Masahiro Yamada2013-11-251-4/+1
| | | | | | | | The directory tools/ is always built before common/. So when envcrc tool is necessary in common/Makefile, it already exists. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* common: convert makefiles to Kbuild styleMasahiro Yamada2013-10-311-208/+183
| | | | Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* cmd:thor: Support for TIZEN's download command (thordown)Lukasz Majewski2013-10-201-0/+1
| | | | | | | | New command - thordown - has been added to support downloading data via lthor TIZEN program. It is similar to dfu command syntax and reuses its code for flashing data. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
* powerpc/ppc4xx: Add fpgad command for dumping gdsys fpga registersDirk Eibach2013-07-251-0/+1
| | | | | Signed-off-by: Dirk Eibach <dirk.eibach@gdsys.cc> Signed-off-by: Stefan Roese <sr@denx.de>
* Add GPL-2.0+ SPDX-License-Identifier to source filesWolfgang Denk2013-07-241-17/+1
| | | | | | Signed-off-by: Wolfgang Denk <wd@denx.de> [trini: Fixup common/cmd_io.c] Signed-off-by: Tom Rini <trini@ti.com>
* video: lcd: Add CONFIG_SPLASH_SCREEN_PREPARE support to CONFIG_VIDEORobert Winkler2013-07-011-0/+1
| | | | | | | | Create splash.c/h to put the function and any future common splash screen code in. Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
* image: Add signing infrastructureSimon Glass2013-06-261-0/+1
| | | | | | | Add a structure to describe an algorithm which can sign and (later) verify images. Signed-off-by: Simon Glass <sjg@chromium.org>
* Add a trace commandSimon Glass2013-06-261-0/+1
| | | | | | | Add a trace command with sub-commands to start/stop tracing, print out statistics and dump trace information to memory for later upload to a host. Signed-off-by: Simon Glass <sjg@chromium.org>
* Makefile: move the common makefile line to public areaYing Zhang2013-06-201-8/+9
| | | | | | | | | | | | | | Move the common makefile line shared by the SPL and non-SPL to the public area, so that we can avoid excessive SPL symbols. Some of them will be used by the SPL later. This patch is on top of the patch "common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPL". Signed-off-by: Ying Zhang <b40530@freescale.com> Acked-by: Tom Rini <trini@ti.com> Acked-by: Tom Rini <trini@ti.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
* common/Makefile: Add new symbol CONFIG_SPL_ENV_SUPPORT for environment in SPLYing Zhang2013-06-201-10/+17
| | | | | | | | | | | | There will need the environment in SPL for reasons other than network support (in particular, hwconfig contains info for how to set up DDR). Add a new symbol CONFIG_SPL_ENV_SUPPORT to replace CONFIG_SPL_NET_SUPPORT for environment in common/Makefile. Signed-off-by: Ying Zhang <b40530@freescale.com> Reviewed-by: Tom Rini <trini@ti.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
* Merge branch 'u-boot/master' into 'u-boot-arm/master'Albert ARIBAUD2013-05-301-0/+3
|\ | | | | | | | | | | Conflicts: common/cmd_fpga.c drivers/usb/host/ohci-at91.c
| * image: Split libfdt code into image-fdt.cSimon Glass2013-05-141-0/+1
| | | | | | | | | | | | | | The image file is still very large, and some of the code is only used when libfdt is in use. Move this code into a new file. Signed-off-by: Simon Glass <sjg@chromium.org>
| * image: Split FIT code into new image-fit.cSimon Glass2013-05-141-0/+1
| | | | | | | | | | | | | | | | The FIT code is about half the size of the >3000-line image.c. Split this code into its own file. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Marek Vasut <marex@denx.de>
| * blackfin: bf609: add softswitch config commandBob Liu2013-05-131-0/+1
| | | | | | | | | | | | | | Add softswitch_output command for bf609-ezkit to enable softswitches. Signed-off-by: Bob Liu <lliubbo@gmail.com> Signed-off-by: Sonic Zhang <sonic.zhang@analog.com>
* | Add fuse API and commandsBenoît Thébaudeau2013-04-281-0/+1
|/ | | | | | This can be useful for fuse-like hardware, OTP SoC options, etc. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
* env: Add support for UBI environmentJoe Hershberger2013-04-111-0/+1
| | | | | | | | | UBI is a better place for the environment on NAND devices because it handles wear-leveling and bad blocks. Gluebi is needed in Linux to access the env as an MTD partition. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
* New command bootmenu: ANSI terminal boot menu supportPali Rohár2013-03-291-0/+1
| | | | | | | | | | | | | | | | | | The "bootmenu" command uses U-Boot menu interfaces and provides a simple mechanism for creating menus with several boot items. When running this command the menu will be assembled as defined by a set of environment variables which contain a title and command key-value pairs. The "Up" and "Down" keys are used for navigation through the items. Current active menu item is highlighted and can be selected using the "Enter" key. The command interprets and generates various ANSI escape sequencies, so for proper menu rendering and item selection the used terminal should support them. Signed-off-by: Pali Rohár <pali.rohar@gmail.com> [agust: various fixes and documentation updates] Signed-off-by: Anatolij Gustschin <agust@denx.de>
* usb:gadget: USB Mass Storage Gadget supportLukasz Majewski2013-03-181-0/+1
| | | | | | | | | | | | | | This patch adds the USB Mass Storage Gadget to u-boot New command called "ums" is implemented to provide access to on-device embedded persistent memory. USB Mass Storage is supposed to work on top of the USB Gadget framework Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Marek Vasut <marek.vasut@gmail.com>
* Introduce generic post-relocation board_r.cSimon Glass2013-03-151-0/+1
| | | | | | | This file handles common post-relocation init for boards which use the generic framework. Signed-off-by: Simon Glass <sjg@chromium.org>
* Introduce generic pre-relocation board_f.cSimon Glass2013-03-151-0/+3
| | | | | | | | | | | | This file handles common pre-relocation init for boards which use the generic framework. It starts up the console, DRAM, performs relocation and then jumps to post-relocation init. Signed-off-by: Simon Glass <sjg@chromium.org> Tested-by: Wolfgang Denk <wd@denx.de> Acked-by: Wolfgang Denk <wd@denx.de>
* sandbox: Add 'sb' command to access filesystem featuresSimon Glass2013-03-041-0/+1
| | | | | | | | | The new 'sb' command is intended to deal with sandbox-specific features that have no parallel in other archs. This commit adds two sub-commands to list a directory and read a file from the host filesystem. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@ti.com>
OpenPOWER on IntegriCloud