summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-06-12tools: moveconfig: report when defconfig is updatedMasahiro Yamada
There are various factors that determine if the given defconfig is updated, and it is probably what users are more interested in. Show the log when the defconfig is updated. Also, copy the file only when the file content was really updated to avoid changing the time stamp needlessly. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: report when CONFIGs are removed by savedefconfigMasahiro Yamada
This is a rare case, but there is still possibility that some CONFIG is moved to the .config, but it is removed by "make savedefconfig". (For example, it happens when the specified CONFIG has no prompt in the Kconfig entry, i.e. it is not user-configurable.) It might be an unexpected case. So, display the log in this case (in yellow color to gain user's attention if --color option is given). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: display log when savedefconfig occursMasahiro Yamada
Now, "make savedefconfig" does not always happen. Display the log when it happens. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: skip savedefconfig if .config was not updatedMasahiro Yamada
If no CONFIG option is moved to the .config, no need to sync the defconfig file. This accelerates the processing by skipping needless "make savedefconfig". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: refactor code to go back to idle stateMasahiro Yamada
Move similar code to finish() function. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: display log atomically in more readable formatMasahiro Yamada
Before this commit, the log was displayed in the format: <defconfig_name> : <action1> <defconfig_name> : <action2> <defconfig_name> : <action3> When we move multiple CONFIGs at the same time, we see as many <defconfig_name> strings as actions for every defconfig, which is redundant information. Moreover, since normal log and error log are displayed separately, Messages from different threads could be mixed, like this: <foo> : <action1> <foo> : <action2> <bar> : <action1> <bar> : <action2> <foo> : <error_log> This commit makes sure to call "print" once a defconfig, which enables atomic logging for each defconfig. It also makes it possible to refactor the log format as follows: <foo_defconfig> <action1> <action2> <error_log> <bar_defconfig> <action1> <action2> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: move log output code out of Kconfig Parser classMasahiro Yamada
This will help further improvement/clean-up. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: compute file paths just onceMasahiro Yamada
The paths to .config, include/autoconf.mk, include/config/auto.conf are not changed during the defconfig walk. Compute them only once when a new class instance is created. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: allow to give CONFIG names as argument directlyMasahiro Yamada
We still pass the input file with CONFIG name, type, default value in each line, but the last two fields are just ignored by the tool. So, let's deprecate the input file and allow users to give CONFIG names directly from the command line. The types and default values are automatically detected and handled nicely by the tool. Going forward, we can use this tool more easily like: tools/moveconfig.py CONFIG_FOO CONFIG_BAR Update the documentation and fix some typos I noticed while I was working on. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: drop code for handling type and default valueMasahiro Yamada
Now types and defalut values given by the input file are just ignored. Delete unnecessary code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: do not rely on type and default value given by usersMasahiro Yamada
Commit 96464badc794 ("moveconfig: Always run savedefconfig on the moved config") changed the work flow of this tool a lot from the original intention when this tool was designed first. Since then, before running this tool, users must edit the Kconfig to add the menu entries for the configs they are moving. It means users had already specified the type and the default value for each CONFIG via its Kconfig entry. Nevertheless, users are still required to dictate the same type and the default value in the input file. This is tedious to use. So, my idea here is to deprecate the latter. Before moving forward with it, there is one issue worth mentioning; since the savedefconfig re-sync was introduced, this tool has not been able to move bool options with "default y". Joe sent a patch to solve this problem about a year ago, but it was not applied for some reasons. Now, he came back with an updated patch, so this problem will be fixed soon. For other use cases, I see no reason to require redundant dictation in the input file. Instead, the tool can know the types and default values by parsing the .config file. This commit changes the tool to use the CONFIG names, but ignore the types and default values given by the input file. This commit also fixes one bug. Prior to this commit, it could not move an integer-typed CONFIG with value 1. For example, assume we are moving CONFIG_CONS_INDEX. Please note this is an integer type option. Many board headers define this CONFIG as 1. #define CONFIG_CONS_INDEX 1 It will be converted to CONFIG_CONS_INDEX=y and moved to include/autoconf.mk, by the tools/scripts/define2mk.sed. It will cause "make savedefconfig" to fail due to the type conflict. This commit takes care of it by detecting the type and converting the CONFIG value correctly. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: increment number of processed files monotonicallyMasahiro Yamada
Currently, the progress " * defconfigs out of 1133" does not increase monotonically. Moreover, the number of processed defconfigs does not match the total number of defconfigs when this tool finishes, like: 1132 defconfigs out of 1133 Clean up headers? [y/n]: It looks like the task was not completed, and some users might feel upset about it. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: exit with error message for not clean directoryMasahiro Yamada
When the source tree is not clean, this tool raises an exception with a message like follows: Traceback (most recent call last): File "tools/moveconfig.py", line 939, in <module> main() File "tools/moveconfig.py", line 934, in main move_config(config_attrs, options) File "tools/moveconfig.py", line 808, in move_config while not slots.available(): File "tools/moveconfig.py", line 733, in available if slot.poll(): File "tools/moveconfig.py", line 645, in poll self.parser.update_dotconfig(self.defconfig) File "tools/moveconfig.py", line 503, in update_dotconfig with open(autoconf_path) as f: IOError: [Errno 2] No such file or directory: '/tmp/tmpDtzCgl/include/autoconf.mk' This does not explain what is wrong. Show an appropriate error message "source tree is not clean, please run 'make mrproper'" in such a situation. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: check compilers before starting defconfig walkMasahiro Yamada
Since commit 25400090b1e2 ("moveconfig: Print a message for missing compiler"), this tool parses an error message every time an error occurs during the process in order to detect missing compiler. Instead of that, we can look for compilers in the PATH environment only once before starting the defconfig walk. If a desired compiler is missing, "make include/config/auto.conf" will apparently fail for that architecture. So, the tool can just skip those board, showing "Compiler is missing. Do nothing.". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: check directory location before compilersMasahiro Yamada
We must ensure this tool is run from the top of source directory before calling update_cross_compile(). Otherwise, the following exception is thrown: Traceback (most recent call last): File "./moveconfig.py", line 918, in <module> main() File "./moveconfig.py", line 908, in main update_cross_compile() File "./moveconfig.py", line 292, in update_cross_compile for arch in os.listdir('arch'): OSError: [Errno 2] No such file or directory: 'arch' Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: remove redundant else: after sys.exit()Masahiro Yamada
Nesting by "else:" is not generally useful after such statements as return, break, sys.exit(), etc. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: rename update_defconfig() to update_dotconfig()Masahiro Yamada
Commit 96464badc794 ("moveconfig: Always run savedefconfig on the moved config") changed how defconfig files were updated. Since then, the function update_defconfig() does not modify defconfig files at all (instead, they are updated by "make savedefconfig"), so update_dotconfig() is a better fit for this function. Also, update the comment block to match the actual behavior. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-12tools: moveconfig: fix --dry-run optionMasahiro Yamada
Since commit 96464badc794 ("moveconfig: Always run savedefconfig on the moved config"), --dry-run option is broken. The --dry-run option prevents the .config from being modified, but defconfig files might be updated by "make savedefconfig" regardless of the --dry-run option. Move the "if not self.options.dry_run" conditional to the correct place. Fixes 96464badc794 ("moveconfig: Always run savedefconfig on the moved config") Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
2016-06-09siemens,am33x: add draco etamin boardHeiko Schocher
In the draco CPU board family, etamin is a new variant with bigger flash and more RAM. Due to new flash that uses larger pages (4K) some changes are necessary because it impacts the MTD partition layout and the ubi mount parameters. Signed-off-by: Samuel Egli <samuel.egli@siemens.com> Signed-off-by: Heiko Schocher <hs@denx.de> [trini: Move BOOTDELAY into defconfig, just always be 3 now] Signed-off-by: Tom Rini <trini@konsulko.com>
2016-06-09dfu, nand, ubi: fix erasing after write finishHeiko Schocher
writting to ubi nand partitions need after write ends an erase of the remaining sectors. This fail, if dfu write size was not a multiple of erasesize, example log: Failure erase: -1 Fix this error. Signed-off-by: Heiko Schocher <hs@denx.de>
2016-06-09am335x, dxr2: get ECC sType from I2C eepromHeiko Schocher
read the ECC Type field from the i2c eeprom, instead configuring it static in the U-Boot binary. see RM: Table 26-17. NAND Geometry Information on I2C EEPROM Signed-off-by: Heiko Schocher <hs@denx.de>
2016-06-09mtd: nand: omap: allow to switch to BCH16Heiko Schocher
support in omap_nand_switch_ecc() also an eccstrength from 16. Signed-off-by: Heiko Schocher <hs@denx.de>
2016-06-09nand: add nand mtd concat supportHeiko Schocher
add for nand devices mtd concat support. Generic MTD concat support is already ported to mainline, and used in the cfi_mtd driver. This patch adds it similiar for nand devices. Signed-off-by: Heiko Schocher <hs@denx.de>
2016-06-09ubi: add new ubi command "ubi detach"Heiko Schocher
simple detachs ubi from the mtd partition. Signed-off-by: Heiko Schocher <hs@denx.de>
2016-06-09siemens,am33x: add ubi fastmap supportSamuel Egli
From: Samuel Egli <samuel.egli@siemens.com> Signed-off-by: Heiko Schocher <hs@denx.de>
2016-06-09am335x, shc: add support for the am335x based bosch shc boardHeiko Schocher
U-Boot SPL 2016.03-rc3-00019-g6dfb4c2-dirty (Mar 09 2016 - 07:40:06) SHC C3-Sample MPU reference clock runs at 6 MHz Setting MPU clock to 594 MHz Enabling Spread Spectrum of 18 permille for MPU Trying to boot from MMC reading u-boot.img reading u-boot.img U-Boot 2016.03-rc3-00019-g6dfb4c2-dirty (Mar 09 2016 - 07:05:35 +0100) Watchdog enabled I2C: ready DRAM: 512 MiB reloc off 1f783000 MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1 Net: cpsw U-Boot# Signed-off-by: Heiko Schocher <hs@denx.de>
2016-06-09doc, spl, am335x: update am335x-networkHeiko Schocher
on the shc board we see when booting in net boot mode, that the ROM bootloader sends "AM335x ROM" as vendor-class-identifier. U-Boots doc says "DM814x ROM". So, add the info to the doc, that there is also "AM335x ROM" possible. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-06-09armv7: omap-common: make SPL board_mmc_init() weakHeiko Schocher
make this function weak, so board code can setup in SPL MMC init with board special values. Signed-off-by: Heiko Schocher <hs@denx.de>
2016-06-09mmc: omap_hsmmc: enable 8bit interface for eMMC for AM33xxHeiko Schocher
Enable 8bit interface on HSMMC2 for am33xx to support 8bit eMMC chips. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-06-09mmc: revert mmc: Handle switch error status bit in MMC card statusHeiko Schocher
revert patch: commit: 6b2221b008e0: mmc: Handle switch error status bit in MMC card status to get eMMC working on shc board Signed-off-by: Heiko Schocher <hs@denx.de>
2016-06-09bootstage: call show_boot_progress also in SPLHeiko Schocher
show_boot_progress() is now called from SPL also. Signed-off-by: Heiko Schocher <hs@denx.de>
2016-06-09arm, am335x: Enable Spread Spectrum for the MPUHeiko Schocher
Enable Spread Spectrum for the MPU by calculating the required values and setting the registers accordingly. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-06-09am335x: add some missing CM_CLKMODE_DPLL_SSC macrosHeiko Schocher
add missing CM_CLKMODE_DPLL_SSC_ACK_MASK, CM_CLKMODE_DPLL_SSC_DOWNSPREAD_MASK and CM_CLKMODE_DPLL_SSC_TYPE_MASK defines. Used for enabling spread spectrum. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-06-09arm, am335x: add some missing GPIO register definitionsHeiko Schocher
add missing: OMAP_GPIO_IRQSTATUS_SET_0 and OMAP_GPIO_IRQSTATUS_SET_1 registers. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-06-09power, tps65217: add some definesHeiko Schocher
add the following defines, needed for the upcoming shc board support: Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-06-09tests: py: disable main_signon check for printenv cmdHeiko Schocher
if CONFIG_VERSION_VARIABLE is set, the U-Boot environment contains a "vers" variable with the current U-Boot version string. If now "printenv" is called, test/py fails as it detects the main_sign string, which is in this case correct. So check only the main_sign as an error, if CONFIG_VERSION_VARIABLE is not set. Signed-off-by: Heiko Schocher <hs@denx.de>
2016-06-09common: bootdelay: move CONFIG_BOOTDELAY into a Kconfig optionHeiko Schocher
move CONFIG_BOOTDELAY into a Kconfig option. Used for this purpose the moveconfig.py tool in tools. Signed-off-by: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Acked-by: Viresh Kumar <viresh.kumar@linaro.org> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
2016-06-09tiny-printf: Correct the snprintf() implementationSimon Glass
This current code passes the variable arguments list to sprintf(). This is not correct. Fix it by calling _vprintf() directly. This makes firefly-rk3288 boot again. Fixes: abeb272 ("tiny-printf: Support snprintf()") Reviewed-by: Stefan Roese <sr@denx.de> Acked-by: Marek Vasut <marex@denx.de> Signed-off-by: Simon Glass <sjg@chromium.org>
2016-06-08ARM: uniphier: insert dsb barrier to ensure visibility of storeMasahiro Yamada
I noticed secondary CPUs sometimes fail to wake up, and the root cause is that the sev instruction wakes up slave CPUs before the preceding the register write is observed by them. The read-back of the accessed register does not guarantee the order. In order to ensure the order between the register write and the sev instruction, a dsb instruction should be executed prior to the sev. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-06-08ARM: uniphier: do not erase when updating U-Boot image in eMMC deviceMasahiro Yamada
Unlike NAND, eMMC can be re-written without erasing. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-06-08ARM: uniphier: do not overwrite fdt_file environmentMasahiro Yamada
This code auto-detects the best-match FDT file name, but it should respect the user's choice if "fdt_file" environment is found in a saved set of environments. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-06-08ARM: uniphier: check return code of setenv()Masahiro Yamada
Because setenv() may fail, it is better to check its return code. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-06-08ARM: uniphier: fix boot mode for PH1-LD11Masahiro Yamada
This function is shared between PH1-LD11 and PH1-LD20. The difference is the boot-mode latch for the USB boot mode. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-06-08ARM: uniphier: support eMMC boot for PH1-LD11 and PH1-LD20Masahiro Yamada
The Boot ROM on PH1-LD11/LD20 exports built-in APIs to load images from an eMMC device. They are useful to reduce the memory footprint of SPL, rather than compiling the whole MMC framework. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2016-06-06Prepare v2016.07-rc1Tom Rini
Signed-off-by: Tom Rini <trini@konsulko.com>
2016-06-06Merge http://git.denx.de/u-boot-samsungTom Rini
Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: configs/peach-pi_defconfig configs/peach-pit_defconfig
2016-06-06ti_armv7_common: env: Fix hard coded mmc device for uuidB, Ravi
Avoid use of hard coded mmcdev value, use bootpart instead, so finduuid works based on bootpart set for a specific platform. Signed-off-by: Ravi Babu <ravibabu@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
2016-06-06arm/arm64: implement a boot header capabilityAndre Przywara
Some SPL loaders (like Allwinner's boot0, and Broadcom's boot0) require a header before the actual U-Boot binary to both check its validity and to find other data to load. Sometimes this header may only be a few bytes of information, and sometimes this might simply be space that needs to be reserved for a post-processing tool. Introduce a config option to allow assembler preprocessor commands to be inserted into the code at the appropriate location; typical assembler preprocessor commands might be: .space 1000 .word 0x12345678 Signed-off-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Steve Rae <srae@broadcom.com> Commit Notes: Please note that the current code: start.S (arm64) and vectors.S (arm) already jumps over some portion of data already, so this option basically just increases the size of this region (and the resulting binary). For use with Allwinner's boot0 blob there is a tool called boot0img[1], which fills the header to allow booting A64 based boards. For the Pine64 we need a 1536 byte header (including the branch instruction) at the moment, so we add this to the defconfig. [1] https://github.com/apritzel/pine64/tree/master/tools END Reviewed-by: Tom Rini <trini@konsulko.com>
2016-06-06lib: make strmhz available in SPLChris Packham
When setting up a DDR controller it is useful to be able to display frequencies in a readable form. Make the strmhz() function available in SPL builds provided there is full vsprintf available. Reviewed-by: Tony O'Brien <tony.obrien@alliedtelesis.co.nz> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Chris Packham <judge.packham@gmail.com>
2016-06-06Remove unneeded remnants of bcopy().Robert P. J. Day
Since bcopy() is no longer used, delete all remaining references to it. Signed-off-by: Robert P. J. Day <rpjday@crashcourse.ca>