From 646257d1f4004855d486024527a4784bf57c4c4d Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Mon, 3 Mar 2014 12:19:26 +0100 Subject: rsa: add sha256-rsa2048 algorithm based on patch from andreas@oetken.name: http://patchwork.ozlabs.org/patch/294318/ commit message: I currently need support for rsa-sha256 signatures in u-boot and found out that the code for signatures is not very generic. Thus adding of different hash-algorithms for rsa-signatures is not easy to do without copy-pasting the rsa-code. I attached a patch for how I think it could be better and included support for rsa-sha256. This is a fast first shot. aditionally work: - removed checkpatch warnings - removed compiler warnings - rebased against current head Signed-off-by: Heiko Schocher Cc: andreas@oetken.name Cc: Simon Glass --- doc/uImage.FIT/signature.txt | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/uImage.FIT/signature.txt b/doc/uImage.FIT/signature.txt index bc9f3fa6e1..71f8b6c06a 100644 --- a/doc/uImage.FIT/signature.txt +++ b/doc/uImage.FIT/signature.txt @@ -346,7 +346,9 @@ Simple Verified Boot Test Please see doc/uImage.FIT/verified-boot.txt for more information +/home/hs/ids/u-boot/sandbox/tools/mkimage -D -I dts -O dtb -p 2000 Build keys +do sha1 test Build FIT with signed images Test Verified Boot Run: unsigned signatures:: OK Sign images @@ -355,10 +357,20 @@ Build FIT with signed configuration Test Verified Boot Run: unsigned config: OK Sign images Test Verified Boot Run: signed config: OK +Test Verified Boot Run: signed config with bad hash: OK +do sha256 test +Build FIT with signed images +Test Verified Boot Run: unsigned signatures:: OK +Sign images +Test Verified Boot Run: signed images: OK +Build FIT with signed configuration +Test Verified Boot Run: unsigned config: OK +Sign images +Test Verified Boot Run: signed config: OK +Test Verified Boot Run: signed config with bad hash: OK Test passed - Future Work ----------- - Roll-back protection using a TPM is done using the tpm command. This can -- cgit v1.2.1 From 29a23f9d6c533f8371be3ae0268c4c75866291b2 Mon Sep 17 00:00:00 2001 From: Heiko Schocher Date: Mon, 3 Mar 2014 12:19:30 +0100 Subject: tools, fit_check_sign: verify a signed fit image add host tool "fit_check_sign" which verifies, if a fit image is signed correct. Signed-off-by: Heiko Schocher Cc: Simon Glass --- doc/uImage.FIT/signature.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'doc') diff --git a/doc/uImage.FIT/signature.txt b/doc/uImage.FIT/signature.txt index 71f8b6c06a..9502037705 100644 --- a/doc/uImage.FIT/signature.txt +++ b/doc/uImage.FIT/signature.txt @@ -357,6 +357,9 @@ Build FIT with signed configuration Test Verified Boot Run: unsigned config: OK Sign images Test Verified Boot Run: signed config: OK +check signed config on the host +OK +Test Verified Boot Run: signed config: OK Test Verified Boot Run: signed config with bad hash: OK do sha256 test Build FIT with signed images @@ -367,6 +370,9 @@ Build FIT with signed configuration Test Verified Boot Run: unsigned config: OK Sign images Test Verified Boot Run: signed config: OK +check signed config on the host +OK +Test Verified Boot Run: signed config: OK Test Verified Boot Run: signed config with bad hash: OK Test passed -- cgit v1.2.1 From 0f605c1501f6e82553e9affc6e17876a85db408c Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 22 Mar 2014 17:14:51 -0600 Subject: Start the deprecation process for generic board We should move forward to remove the old board init code. Add a prominent message to encourage maintainers to get started on this work. Signed-off-by: Simon Glass --- doc/README.generic-board | 189 +++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 189 insertions(+) create mode 100644 doc/README.generic-board (limited to 'doc') diff --git a/doc/README.generic-board b/doc/README.generic-board new file mode 100644 index 0000000000..50d3a26849 --- /dev/null +++ b/doc/README.generic-board @@ -0,0 +1,189 @@ +# +# (C) Copyright 2014 Google, Inc +# Simon Glass +# +# SPDX-License-Identifier: GPL-2.0+ +# + +DEPRECATION NOTICE FOR arch//lib/board.c + +For board maintainers: Please submit patches for boards you maintain before +July 2014, to make them use generic board. + +For architecture maintainers: Please submit patches to remove your +architecture-specific board.c file before October 2014. + + +Background +---------- + +U-Boot has tranditionally had a board.c file for each architecture. This has +introduced quite a lot of duplication, with each architecture tending to do +initialisation slightly differently. To address this, a new 'generic board +init' feature was introduced a year ago in March 2013 (further motivation is +provided in the cover letter below). + + +What has changed? +----------------- + +The main change is that the arch//lib/board.c file is being removed in +favour of common/board_f.c (for pre-relocation init) and common/board_r.c +(for post-relocation init). + +Related to this, the global_data and bd_t structures now have a core set of +fields which are common to all architectures. Architecture-specific fields +have been moved to separate structures. + + +Supported Arcthitectures +------------------------ + +If you are unlucky then your architecture may not support generic board. +The following architectures are supported at the time of writing: + + arc + arm + powerpc + sandbox + x86 + +If your architecture is not supported, you need to adjust your +arch//config.mk file to include: + + __HAVE_ARCH_GENERIC_BOARD := y + +and test it with a suitable board, as follows. + + +Adding Support for your Board +----------------------------- + +To enable generic board for your board, define CONFIG_SYS_GENERIC_BOARD in +your board config header file. + +Test that U-Boot still functions correctly on your board, and fix any +problems you find. Don't be surprised if there are no problems - generic +board has had a reasonable amount of testing with common boards. + + +DeadLine +-------- + +Please don't take this the wrong way - there is no intent to make your life +miserable, and we have the greatest respect and admiration for U-Boot users. +However, with any migration there has to be a period where the old way is +deprecated and removed. Every patch to the deprecated code introduces a +potential breakage in the new unused code. Therefore: + +Boards or architectures not converted over to general board by the +end of 2014 may be forcibly changed over (potentially causing run-time +breakage) or removed. + + + +Further Background +------------------ + +The full text of the original generic board series is reproduced below. + +--8<------------- + +This series creates a generic board.c implementation which contains +the essential functions of the major arch/xxx/lib/board.c files. + +What is the motivation for this change? + +1. There is a lot of repeated code in the board.c files. Any change to +things like setting up the baud rate requires a change in 10 separate +places. + +2. Since there are 10 separate files, adding a new feature which requires +initialisation is painful since it must be independently added in 10 +places. + +3. As time goes by the architectures naturely diverge since there is limited +pressure to compare features or even CONFIG options against simiilar things +in other board.c files. + +4. New architectures must implement all the features all over again, and +sometimes in subtley different ways. This places an unfair burden on getting +a new architecture fully functional and running with U-Boot. + +5. While it is a bit of a tricky change, I believe it is worthwhile and +achievable. There is no requirement that all code be common, only that +the code that is common should be located in common/board.c rather than +arch/xxx/lib/board.c. + +All the functions of board_init_f() and board_init_r() are broken into +separate function calls so that they can easily be included or excluded +for a particular architecture. It also makes it easier to adopt Graeme's +initcall proposal when it is ready. + +http://lists.denx.de/pipermail/u-boot/2012-January/114499.html + +This series removes the dependency on generic relocation. So relocation +happens as one big chunk and is still completely arch-specific. See the +relocation series for a proposed solution to this for ARM: + +http://lists.denx.de/pipermail/u-boot/2011-December/112928.html + +or Graeme's recent x86 series v2: + +http://lists.denx.de/pipermail/u-boot/2012-January/114467.html + +Instead of moving over a whole architecture, this series takes the approach +of simply enabling generic board support for an architecture. It is then up +to each board to opt in by defining CONFIG_SYS_GENERIC_BOARD in the board +config file. If this is not done, then the code will be generated as +before. This allows both sets of code to co-exist until we are comfortable +with the generic approach, and enough boards run. + +ARM is a relatively large board.c file and one which I can test, therefore +I think it is a good target for this series. On the other hand, x86 is +relatively small and simple, but different enough that it introduces a +few issues to be solved. So I have chosen both ARM and x86 for this series. +After a suggestion from Wolfgang I have added PPC also. This is the +largest and most feature-full board, so hopefully we have all bases +covered in this RFC. + +A generic global_data structure is also required. This might upset a few +people. Here is my basic reasoning: most fields are the same, all +architectures include and need it, most global_data.h files already have +#ifdefs to select fields for a particular SOC, so it is hard to +see why architecures are different in this area. We can perhaps add a +way to put architecture-specific fields into a separate header file, but +for now I have judged that to be counter-productive. + +Similarly we need a generic bd_info structure, since generic code will +be accessing it. I have done this in the same way as global_data and the +same comments apply. + +There was dicussion on the list about passing gd_t around as a parameter +to pre-relocation init functions. I think this makes sense, but it can +be done as a separate change, and this series does not require it. + +While this series needs to stand on its own (as with the link script +cleanup series and the generic relocation series) the goal is the +unification of the board init code. So I hope we can address issues with +this in mind, rather than focusing too narrowly on particular ARM, x86 or +PPC issues. + +I have run-tested ARM on Tegra Seaboard only. To try it out, define +CONFIG_SYS_GENERIC_BOARD in your board file and rebuild. Most likely on +x86 and PPC at least it will hang, but if you are lucky it will print +something first :-) + +I have run this though MAKEALL with CONFIG_SYS_GENERIC_BOARD on for all +ARM, PPC and x86 boards. There are a few failures due to errors in +the board config, which I have sent patches for. The main issue is +just the difference between __bss_end and __bss_end__. + +Note: the first group of commits are required for this series to build, +but could be separated out if required. I have included them here for +convenience. + +------------->8-- + +Simon Glass, sjg@chromium.org +March 2014 -- cgit v1.2.1 From bef67f1f32ba742b3a4ee4e36092d4d45eeecdf6 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 31 Mar 2014 12:57:17 +0900 Subject: cosmetic: README.scrapyard: sort in reverse chronological order Signed-off-by: Masahiro Yamada --- doc/README.scrapyard | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'doc') diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 7d670339dd..6abefd5ffd 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -26,11 +26,15 @@ pdnb3 arm ixp 304db0b 2013-09-24 Stefan Roese scpu arm ixp 304db0b 2013-09-24 Stefan Roese omap1510inn arm arm925t 0610a16 2013-09-23 Kshitij Gupta CANBT powerpc 405CR fb8f4fd 2013-08-07 Matthias Fuchs +omap2420h4 arm omap24xx 7f5eef9 2013-06-04 Richard Woodruff Alaska8220 powerpc mpc8220 d6ed322 2013-05-11 Yukon8220 powerpc mpc8220 d6ed322 2013-05-11 sorcery powerpc mpc8220 d6ed322 2013-05-11 smdk6400 arm arm1176 52587f1 2013-04-12 Zhong Hongbo ns9750dev arm arm926ejs 4cfc611 2013-02-28 Markus Pietrek +eNET x86 x86 7e8c53d 2013-02-14 Graeme Russ +PCIPPC2 powerpc MPC740/MPC750 7c9e89b 2013-02-07 Wolfgang Denk +PCIPPC6 powerpc MPC740/MPC750 7c9e89b 2013-02-07 Wolfgang Denk AMX860 powerpc mpc860 1b0757e 2012-10-28 Wolfgang Denk c2mon powerpc mpc855 1b0757e 2012-10-28 Wolfgang Denk EP88x powerpc mpc885 1b0757e 2012-10-28 @@ -87,13 +91,13 @@ B2 arm s3c44b0 5dcf536 2011-07-16 Andrea Scian armadillo arm arm720t be28857 2011-07-16 Rowel Atienza assabet arm sa1100 c91e90d 2011-07-16 George G. Davis trab arm S3C2400 566e5cf 2011-05-01 Gary Jennejohn -xsengine ARM PXA2xx 4262a7c 2010-10-20 -wepep250 ARM PXA2xx 7369478 2010-10-20 Peter Figuli -delta ARM PXA2xx 75e2035 2010-10-20 mp2usb ARM AT91RM2900 ee986e2 2011-01-25 Eric BĂ©nard barco powerpc MPC8245 afaa27b 2010-11-23 Marc Leeman ERIC powerpc 405GP d9ba451 2010-11-21 Swen Anderson VoVPN-GW_100MHz powerpc MPC8260 26fe3d2 2010-10-24 Juergen Selent +xsengine ARM PXA2xx 4262a7c 2010-10-20 +wepep250 ARM PXA2xx 7369478 2010-10-20 Peter Figuli +delta ARM PXA2xx 75e2035 2010-10-20 NC650 powerpc MPC852 333d86d 2010-10-19 Wolfgang Denk CP850 powerpc MPC852 333d86d 2010-10-19 Wolfgang Denk logodl ARM PXA2xx 059e778 2010-10-18 August Hoeraendl @@ -110,7 +114,3 @@ MVS1 powerpc MPC823 306620b 2008-08-26 Andre Schwar adsvix ARM PXA27x 7610db1 2008-07-30 Adrian Filipi R5200 ColdFire - 48ead7a 2008-03-31 Zachary P. Landau CPCI440 powerpc 440GP b568fd2 2007-12-27 Matthias Fuchs -PCIPPC2 powerpc MPC740/MPC750 7c9e89b 2013-02-07 Wolfgang Denk -PCIPPC6 powerpc MPC740/MPC750 - - Wolfgang Denk -omap2420h4 arm omap24xx - 2013-06-04 Richard Woodruff -eNET x86 x86 7e8c53d 2013-02-14 Graeme Russ -- cgit v1.2.1 From 6873fae3a960b85c1465013424fdf01fc98fbc5c Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 31 Mar 2014 12:58:54 +0900 Subject: cosmetic: README.scrapyard: fix false removed date and commit Describe removed date in the form of YYYY-MM-DD, not YYYY-DD-MM. And wrong commit hash also should be fixed. Signed-off-by: Masahiro Yamada Cc: Marek Vasut Acked-by: Marek Vasut --- doc/README.scrapyard | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'doc') diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 6abefd5ffd..e49de542f8 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -49,10 +49,10 @@ tb0229 mips mips32 3f3110d 2011-12-12 rmu powerpc MPC850 fb82fd7 2011-12-07 Wolfgang Denk OXC powerpc MPC8240 309a292 2011-12-07 BAB7xx powerpc MPC740/MPC750 c53043b 2011-12-07 Frank Gottschling -xm250 arm pxa c746cdd 2011-25-11 -pleb2 arm pxa b185a1c 2011-25-11 -cradle arm pxa 4e24f8a 2011-25-11 Kyle Harris -cerf250 arm pxa a3f1241 2011-25-11 Prakash Kumar +xm250 arm pxa c477d72 2011-11-25 +pleb2 arm pxa d299173 2011-11-25 +cradle arm pxa 00c4aca 2011-11-25 Kyle Harris +cerf250 arm pxa f13eba6 2011-11-25 Prakash Kumar mpq101 powerpc mpc85xx e877fab 2011-10-23 Alex Dubov ixdpg425 arm ixp 0ca8eb7 2011-09-22 Stefan Roese ixdp425 arm ixp 0ca8eb7 2011-09-22 Kyle Harris -- cgit v1.2.1 From 585cd86c78d291f291a8c153f69298d7b9345609 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 31 Mar 2014 12:59:58 +0900 Subject: board: esd: remove remainders of dead boards Commit 99bcad18 deleted ADCIOP and DASA_SIM board support but missed to delete board/esd/adciop and board/esd/dasa_sim. It also missed to add entries to doc/README.scrapyard. Signed-off-by: Masahiro Yamada Cc: Stefan Roese Acked-by: Stefan Roese Acked-by: Matthias Fuchs --- doc/README.scrapyard | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/README.scrapyard b/doc/README.scrapyard index e49de542f8..0a6c6b5617 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -44,6 +44,8 @@ LANTEC powerpc mpc850 1b0757e 2012-10-28 Wolfgang Den SCM powerpc mpc8260 1b0757e 2012-10-28 Wolfgang Grandegger SX1 arm arm925t 53c4154 2012-10-26 TQM85xx powerpc MPC85xx d923a5d 2012-10-04 Stefan Roese +ADCIOP powerpc ppc4xx 99bcad1 2012-09-19 Matthias Fuchs +DASA_SIM powerpc ppc4xx 99bcad1 2012-09-19 Matthias Fuchs apollon arm omap24xx 535c74f 2012-09-18 Kyungmin Park tb0229 mips mips32 3f3110d 2011-12-12 rmu powerpc MPC850 fb82fd7 2011-12-07 Wolfgang Denk -- cgit v1.2.1 From dc2164da46c1ba4a2ff44ed3cd48e5f6211640e2 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 1 Apr 2014 17:15:13 +0900 Subject: powerpc: mpc8xx: delete an unused source file References to the wireless keyboard should also be removed from README.console. Signed-off-by: Masahiro Yamada Cc: Wolfgang Denk Acked-by: Wolfgang Denk --- doc/README.console | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'doc') diff --git a/doc/README.console b/doc/README.console index c9ef59e9a5..e7970ed379 100644 --- a/doc/README.console +++ b/doc/README.console @@ -25,7 +25,7 @@ stdout or stderr) to any device you see in that list simply by assigning its name to the corresponding environment variable. For example: - setenv stdin wl_kbd <- To use the wireless keyboard + setenv stdin serial <- To use the serial input setenv stdout video <- To use the video console Do a simple "saveenv" to save the console settings in the environment -- cgit v1.2.1 From a146e8b189abf73b8bac0bfa9c8c3c1b3bfe5507 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:02 +0900 Subject: powerpc: remove NX823 board support Enough time has passed since this board was moved to Orphan. Remove. - Remove board/nx823/* - Remove include/configs/NX823.h - Clean-up ifdef(CONFIG_NX823) - Move the entry from boards.cfg to doc/README.scrapyard Signed-off-by: Masahiro Yamada --- doc/README.scrapyard | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 0a6c6b5617..7f519916fd 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,8 +11,9 @@ easily if here is something they might want to dig for... Board Arch CPU Commit Removed Last known maintainer/contact ================================================================================================= -idmr m68k mcf52x2 - 2014-01-28 -M5271EVB m68k mcf52x2 - 2014-01-28 +nx823 powerpc mpc8xx - 2014-04-04 +idmr m68k mcf52x2 ba650e9b 2014-01-28 +M5271EVB m68k mcf52x2 ba650e9b 2014-01-28 dvl_host arm ixp e317de6b 2014-01-28 Michael Schwingen actux4 arm ixp 6ff7aafa 2014-01-28 Michael Schwingen actux3 arm ixp 38da33f3 2014-01-28 Michael Schwingen -- cgit v1.2.1 From d6b11fd1f0ef1b6cbc81ca7655c47bf68a16f32d Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:03 +0900 Subject: powerpc: remove MBX and MBX860T boards support Enough time has passed since these boards were moved to Orphan. Remove. - Remove board/mbx8xx/* - Remove include/configs/{MBX.h,MBX860T.h} - Clean-up if defined(CONFIG_MBX) - Move the entries from boards.cfg to doc/README.scrapyard Signed-off-by: Masahiro Yamada --- doc/README.scrapyard | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 7f519916fd..4e0ad323c7 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,6 +11,7 @@ easily if here is something they might want to dig for... Board Arch CPU Commit Removed Last known maintainer/contact ================================================================================================= +mbx8xx powerpc mpc8xx - 2014-04-04 nx823 powerpc mpc8xx - 2014-04-04 idmr m68k mcf52x2 ba650e9b 2014-01-28 M5271EVB m68k mcf52x2 ba650e9b 2014-01-28 -- cgit v1.2.1 From b8a49bdaaad386d09a47d450d00c4e64f1f354a3 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:04 +0900 Subject: powerpc: remove genietv board support Enough time has passed since this board was moved to Orphan. Remove. - Remove board/genietv/* - Remove include/configs/GENIETV.h - Clean-up if defined(CONFIG_GENIETV) - Move the entry from boards.cfg to doc/README.scrapyard Signed-off-by: Masahiro Yamada --- doc/README.console | 1 - doc/README.scrapyard | 1 + doc/README.video | 2 -- 3 files changed, 1 insertion(+), 3 deletions(-) (limited to 'doc') diff --git a/doc/README.console b/doc/README.console index e7970ed379..aadf596a8a 100644 --- a/doc/README.console +++ b/doc/README.console @@ -99,4 +99,3 @@ The driver has been tested with the following configurations (see CREDITS for other contact informations): - MPC823FADS with AD7176 on a PAL TV (YCbYCr) - arsenio@tin.it -- GENIETV with AD7177 on a PAL TV (YCbYCr) - arsenio@tin.it diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 4e0ad323c7..b068544c3b 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,6 +11,7 @@ easily if here is something they might want to dig for... Board Arch CPU Commit Removed Last known maintainer/contact ================================================================================================= +genietv powerpc mpc8xx - 2014-04-04 mbx8xx powerpc mpc8xx - 2014-04-04 nx823 powerpc mpc8xx - 2014-04-04 idmr m68k mcf52x2 ba650e9b 2014-01-28 diff --git a/doc/README.video b/doc/README.video index f09d5f9f6b..dadbfcd2fd 100644 --- a/doc/README.video +++ b/doc/README.video @@ -11,8 +11,6 @@ U-Boot MPC8xx video controller driver The driver has been tested with the following configurations: - MPC823FADS with AD7176 on a PAL TV (YCbYCr) - arsenio@tin.it -- GENIETV with AD7177 on a PAL TV (YCbYCr) - arsenio@tin.it - "video-mode" environment variable =============================== -- cgit v1.2.1 From 4fb3925ff8b64422eb904c630e914c29ed824e85 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:06 +0900 Subject: powerpc: remove RPXClassic, RPXlite boards support Enough time has passed since these boards were moved to Orphan. Remove. - Remove board/RPXlite/* - Remove board/RPXClassic/* - Remove include/configs/RPXlite.h - Remove include/configs/RPXClassic.h - Clean-up defined(CONFIG_RPXCLASSIC) - Move the entry from boards.cfg to doc/README.scrapyard Signed-off-by: Masahiro Yamada --- doc/README.scrapyard | 2 ++ 1 file changed, 2 insertions(+) (limited to 'doc') diff --git a/doc/README.scrapyard b/doc/README.scrapyard index b068544c3b..99155007df 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,6 +11,8 @@ easily if here is something they might want to dig for... Board Arch CPU Commit Removed Last known maintainer/contact ================================================================================================= +RPXClassic powerpc mpc8xx - 2014-04-04 +RPXlite powerpc mpc8xx - 2014-04-04 genietv powerpc mpc8xx - 2014-04-04 mbx8xx powerpc mpc8xx - 2014-04-04 nx823 powerpc mpc8xx - 2014-04-04 -- cgit v1.2.1 From 0ebf5f5c128207b02b2000e9f75cae3b36186c04 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:07 +0900 Subject: powerpc: remove RPXsuper board support Enough time has passed since this board was moved to Orphan. Remove. - Remove board/rpxsuper/* - Remove include/configs/RPXsuper.h - Move the entry from boards.cfg to doc/README.scrapyard Signed-off-by: Masahiro Yamada --- doc/README.scrapyard | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 99155007df..125ba809c9 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,6 +11,7 @@ easily if here is something they might want to dig for... Board Arch CPU Commit Removed Last known maintainer/contact ================================================================================================= +RPXsuper powerpc mpc8260 - 2014-04-04 RPXClassic powerpc mpc8xx - 2014-04-04 RPXlite powerpc mpc8xx - 2014-04-04 genietv powerpc mpc8xx - 2014-04-04 -- cgit v1.2.1 From 8b043e6dc2e53743b0271debb6f506b95e788fd7 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:08 +0900 Subject: powerpc: remove rsdproto board support Enough time has passed since this board was moved to Orphan. Remove. - Remove board/rsdproto/* - Remove include/configs/rsdproto.h - Move the entry from boards.cfg to doc/README.scrapyard Signed-off-by: Masahiro Yamada --- doc/README.scrapyard | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 125ba809c9..adcf163a81 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,6 +11,7 @@ easily if here is something they might want to dig for... Board Arch CPU Commit Removed Last known maintainer/contact ================================================================================================= +rsdproto powerpc mpc8260 - 2014-04-04 RPXsuper powerpc mpc8260 - 2014-04-04 RPXClassic powerpc mpc8xx - 2014-04-04 RPXlite powerpc mpc8xx - 2014-04-04 -- cgit v1.2.1 From 03f2ecc2cb28efeb35912710754d9857cdc05190 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:09 +0900 Subject: powerpc: remove MOUSSE board support Enough time has passed since this board was moved to Orphan. Remove. - Remove board/mousse/* - Remove include/configs/MOUSSE.h - Clean-up defined(CONFIG_MOUSSE) - Move the entry from boards.cfg to doc/README.scrapyard Signed-off-by: Masahiro Yamada --- doc/README.scrapyard | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/README.scrapyard b/doc/README.scrapyard index adcf163a81..0e4d329ed1 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,6 +11,7 @@ easily if here is something they might want to dig for... Board Arch CPU Commit Removed Last known maintainer/contact ================================================================================================= +MOUSSE powerpc mpc824x - 2014-04-04 rsdproto powerpc mpc8260 - 2014-04-04 RPXsuper powerpc mpc8260 - 2014-04-04 RPXClassic powerpc mpc8xx - 2014-04-04 -- cgit v1.2.1 From 36bf57b6fb37089510b6dcfa6487dc5e2445c9f2 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 4 Apr 2014 15:25:11 +0900 Subject: arm: remove lubbock board support Enough time has passed since this board was moved to Orphan. Remove. - Remove board/lubbock/* - Remove include/configs/lubbock.h - Cleanup defined(CONFIG_LUBBOCK) - Move the entry from boards.cfg to doc/README.scrapyard Signed-off-by: Masahiro Yamada --- doc/README.scrapyard | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 0e4d329ed1..15c39e7675 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -11,6 +11,7 @@ easily if here is something they might want to dig for... Board Arch CPU Commit Removed Last known maintainer/contact ================================================================================================= +lubbock arm pxa - 2014-04-04 Kyle Harris MOUSSE powerpc mpc824x - 2014-04-04 rsdproto powerpc mpc8260 - 2014-04-04 RPXsuper powerpc mpc8260 - 2014-04-04 -- cgit v1.2.1 From ccfc89cb16ef1407a475cfce1dac1555745d8268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=81ukasz=20Majewski?= Date: Mon, 7 Apr 2014 14:34:44 +0200 Subject: doc:power:pmic: Add doc entry for PMIC(v2) framework Well written documentation for PMIC framework was missing and hence it has been probably difficult and time consuming for other developers to understand rationale for key design decisions and overall design structure. This commit provides proper documentation entry. Signed-off-by: Lukasz Majewski Acked-by: Simon Glass --- doc/README.power-framework | 166 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 166 insertions(+) create mode 100644 doc/README.power-framework (limited to 'doc') diff --git a/doc/README.power-framework b/doc/README.power-framework new file mode 100644 index 0000000000..1f6fd43203 --- /dev/null +++ b/doc/README.power-framework @@ -0,0 +1,166 @@ +# +# (C) Copyright 2014 Samsung Electronics +# Lukasz Majewski +# +# SPDX-License-Identifier: GPL-2.0+ +# + +Introduction +------------ + +This document describes the second version of the u-boot's PMIC (Power +Management IC) framework. As a reference boards please consider Samsungs' Trats +and Trats2. + +Background +---------- + +Boards supported by u-boot are getting increasingly complex. Developers and +designers strive to cut down power consumption. Hence several different types of +devices are now available on the board - namely power managers (PMIC), fuel +gauges (FG), micro USB interface controllers (MUIC), batteries, multi-function +devices (MFD). + +Explanation of key design decisions +----------------------------------- + +One package can integrate PMIC and MUIC with different addresses on the I2C bus. +The same device - e.g. MAX8997 uses two different I2C busses and addresses. + +Power devices use not only I2C for communication, but SPI as well. Additionally +different ICs use different endianess. For this reason struct pmic holds +information about I2C/SPI transmission, which is used with generic +pmic_req_write() function. + +The "flat" hierarchy for power devices works well when each device performs only +one operation - e.g. PMIC enables LDO. + +The problem emerges when we have a device (battery) which conceptually shall be +the master and uses methods exported by other devices. We need to control MUIC +to start charging the battery, use PMIC to reduce board's overall power +consumption (by disabling not needed LDOs, BUCKs) and get current state of +energy on the battery from FG. +Up till now u-boot doesn't support device model, so a simple one had to be +added. + +The directory hierarchy has following structure: +./include/power/_.h +e.g. ./include/power/max8997_pmic.h + +./drivers/power/pmic/power_{core files}.c +e.g. ./drivers/power/pmic/power_core.c + +./drivers/power/pmic//_.c +e.g. ./drivers/power/pmic/pmic_max8997.c +e.g. ./drivers/power/battery/trats/bat_trats.c +e.g. ./drivers/power/fuel_gauge/fg_max17042.c + +The framework classifies devices by their function - separate directories should +be maintained for different classes of devices. + +Current design +-------------- + +Everything is a power device described by struct pmic. Even battery is +considered as a valid power device. This helps for better management of those +devices. + +- Block diagram of the hierarchy: + ----------------- + --------| BAT |------------ + | | | | + | ----------------- | + | | | + \|/ \|/ \|/ + ----------- ----------------- --------- + |FG | |MUIC | |CHRG | + | | | | | | + ----------- ----------------- --------- + + +1. When hierarchy is not needed (no complex battery charge): + +Definition of the struct pmic is only required with proper name and parameters +for communication. This is enough to use the "pmic" command in the u-boot +prompt to change values of device's register (enable/disable LDO, BUCK). + +The PG, MUIC and CHRG above are regarded to be in the same level in the +hierarchy. + +2. Complex battery charging. + +To charge a battery, information from several "abstract" power devices is +needed (defined at ./include/power/pmic.h): +- FG device (struct power_fg): + -- *fg_battery_check - check if battery is not above its limits + -- *fg_battery_update - update the pmic framework with current + battery state(voltage and current capacity) + +- Charger device (struct power_chrq): + -- *chrg_type - type/capacity of the charger (including information + about USB cable disconnection) + -- *chrg_bat_present - detection if battery to be charged is + present + -- *chrg_state - status of the charger - if it is enabled or + disabled + +- Battery device (struct power_battery): + -- *battery_init - assign proper callbacks to be used by top + hierarchy battery device + -- *battery_charge - called from "pmic" command, responsible + for performing the charging + +Now two batteries are supported; trats and trats2 [*]. Those differ in the way +how they handle the exact charging. Trats uses polling (MAX8997) and trats2 +relies on the PMIC/MUIC HW completely (MAX77693). + +__Example for trats (this can be very different for other board):__ + -- *fg_battery_check -> FG device (fg_max17042.c) + -- *fg_battery_update -> FG device (fg_max17042.c) + -- *chrg_type -> MUIC device (muic_max8997.c) + -- *chrg_bat_present -> PMIC device (pmic_max8997.c) + -- *chrg_state -> PMIC device (pmic_max8997.c) + -- *battery_init -> BAT device (bat_trats.c) + -- *battery_charge -> BAT device (bat_trats.c) + +Also the struct pmic holds method (*low_power_mode) for reducing board's +power consumption when one calls "pmic BAT_TRATS bat charge" command. + +How to add a new power device +----------------------------- + +1. Simple device should be added with creation of file +_.c, _.h according to the +proposed and described above scheme. + +Then "pmic" command supports reading/writing/dump of device's internal +registers. + +2. Charging battery with hierarchy +Define devices as listed at 1. + +Define battery file (bat_.c). Please also note that one might need a +corresponding battery model description for FG. + +For points 1 and 2 use a generic function power_init_board() to initialise the +power framework on your board. + +For reference, please look into the trats/trats2 boards. + +TO DO list (for PMICv3) - up till v2014.04 +------------------------------------------ + +1. Description of the devices related to power via device tree is not available. +This is the main problem when a developer tries to build a multi-boot u-boot +binary. The best would be to parse the DTS from Linux kernel. + +2. To support many instances of the same IC, like two MAX8997, one needs to +copy the corresponding pmic_max8997.c file with changed name to "MAX8997_PMICX", +where X is the device number. This problem will be addressed when extended +pmic_core.c will support storing available devices in a list. + +3. Definition of batteries [*] (for trats/trats2) should be excluded from the +code responsible for charging them and since it in fact describes the charging +profile it should be put to a separate file. + +4. Adjust the framework to work with the device model. -- cgit v1.2.1 From 71ba24581c8b6fae2d6f04681c8a2fe310aec4c0 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Tue, 15 Apr 2014 13:30:51 +0900 Subject: kbuild: docbook: sync with Linux Kernel v3.15-rc1 This commit imports DocBook-related updates from v3.14 to v3.15-rc1. - commit ec3fadd64b9940baa2a369bf978e8561837db3f5 kbuild: docbook: use $(obj) and $(src) rather than specific path - commit 100da4c0150c97ce34d4d3b38bf2f5449b05ae4f kbuild: docbook: specify KERNELDOC dependency correctly - commit 6f89b9c1d6b29eaa600ac4a8ac1314b0d06f15e3 kbuild: docbook: include cmd files more simply - commit ac6d662a95a6989d83b259ccf8ec01dd7903af73 doc: Add "*.svg" to DocBook/.gitignore - commit 832919bfcf0cfd75767c68b0c61f7cf48be860a8 DocBook: Make mandocs parallel-safe - commit c4d79a4799719f2b0cd354ee498aad605730c97e work around xmlto bug in htmldocs Signed-off-by: Masahiro Yamada --- doc/DocBook/.gitignore | 1 + doc/DocBook/Makefile | 28 +++++++++------------------- 2 files changed, 10 insertions(+), 19 deletions(-) (limited to 'doc') diff --git a/doc/DocBook/.gitignore b/doc/DocBook/.gitignore index 720f245ceb..7ebd5465d9 100644 --- a/doc/DocBook/.gitignore +++ b/doc/DocBook/.gitignore @@ -10,5 +10,6 @@ *.out *.png *.gif +*.svg media-indices.tmpl media-entities.tmpl diff --git a/doc/DocBook/Makefile b/doc/DocBook/Makefile index 9b4a9b6762..593237f04a 100644 --- a/doc/DocBook/Makefile +++ b/doc/DocBook/Makefile @@ -26,6 +26,7 @@ PS_METHOD = $(prefer-db2x) # The targets that may be used. PHONY += xmldocs sgmldocs psdocs pdfdocs htmldocs mandocs installmandocs cleandocs +targets += $(DOCBOOKS) BOOKS := $(addprefix $(obj)/,$(DOCBOOKS)) xmldocs: $(BOOKS) sgmldocs: xmldocs @@ -44,17 +45,18 @@ htmldocs: $(HTML) MAN := $(patsubst %.xml, %.9, $(BOOKS)) mandocs: $(MAN) + $(if $(wildcard $(obj)/man/*.9),gzip -f $(obj)/man/*.9) installmandocs: mandocs mkdir -p /usr/local/man/man9/ - install doc/DocBook/man/*.9.gz /usr/local/man/man9/ + install $(obj)/man/*.9.gz /usr/local/man/man9/ ### #External programs used KERNELDOC = $(srctree)/scripts/kernel-doc DOCPROC = $(objtree)/scripts/docproc -XMLTOFLAGS = -m $(srctree)/doc/DocBook/stylesheet.xsl +XMLTOFLAGS = -m $(srctree)/$(src)/stylesheet.xsl XMLTOFLAGS += --skip-validation ### @@ -76,21 +78,9 @@ define rule_docproc ) > $(dir $@).$(notdir $@).cmd endef -%.xml: %.tmpl FORCE +%.xml: %.tmpl $(KERNELDOC) $(DOCPROC) FORCE $(call if_changed_rule,docproc) -### -#Read in all saved dependency files -cmd_files := $(wildcard $(foreach f,$(BOOKS),$(dir $(f)).$(notdir $(f)).cmd)) - -ifneq ($(cmd_files),) - include $(cmd_files) -endif - -### -# Changes in kernel-doc force a rebuild of all documentation -$(BOOKS): $(KERNELDOC) - # Tell kbuild to always build the programs always := $(hostprogs-y) @@ -128,16 +118,16 @@ quiet_cmd_db2pdf = PDF $@ index = index.html -main_idx = doc/DocBook/$(index) +main_idx = $(obj)/$(index) build_main_index = rm -rf $(main_idx); \ echo '

U-Boot Bootloader HTML Documentation

' >> $(main_idx) && \ echo '

U-Boot Version: $(UBOOTVERSION)

' >> $(main_idx) && \ cat $(HTML) >> $(main_idx) quiet_cmd_db2html = HTML $@ - cmd_db2html = xmlto xhtml $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \ + cmd_db2html = xmlto html $(XMLTOFLAGS) -o $(patsubst %.html,%,$@) $< && \ echo ' \ - $(patsubst %.html,%,$(notdir $@))

' > $@ + $(patsubst %.html,%,$(notdir $@))

' > $@ %.html: %.xml @(which xmlto > /dev/null 2>&1) || \ @@ -149,7 +139,7 @@ quiet_cmd_db2html = HTML $@ cp $(PNG-$(basename $(notdir $@))) $(patsubst %.html,%,$@); fi quiet_cmd_db2man = MAN $@ - cmd_db2man = if grep -q refentry $<; then xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; gzip -f $(obj)/man/*.9; fi + cmd_db2man = if grep -q refentry $<; then xmlto man $(XMLTOFLAGS) -o $(obj)/man $< ; fi %.9 : %.xml @(which xmlto > /dev/null 2>&1) || \ (echo "*** You need to install xmlto ***"; \ -- cgit v1.2.1 From 538cf92c8c2e8ea7f78c87b5bfb2f705b4b02fa8 Mon Sep 17 00:00:00 2001 From: Daniel Schwierzeck Date: Thu, 10 Apr 2014 00:39:28 +0200 Subject: MIPS: drop incaip board This is dead hardware and no one is interested in making the necessary changes for upcoming features like generic board or driver model. Signed-off-by: Daniel Schwierzeck Cc: Wolfgang Denk --- doc/README.scrapyard | 1 + 1 file changed, 1 insertion(+) (limited to 'doc') diff --git a/doc/README.scrapyard b/doc/README.scrapyard index 15c39e7675..f9742e7d49 100644 --- a/doc/README.scrapyard +++ b/doc/README.scrapyard @@ -125,3 +125,4 @@ MVS1 powerpc MPC823 306620b 2008-08-26 Andre Schwar adsvix ARM PXA27x 7610db1 2008-07-30 Adrian Filipi R5200 ColdFire - 48ead7a 2008-03-31 Zachary P. Landau CPCI440 powerpc 440GP b568fd2 2007-12-27 Matthias Fuchs +incaip mips mips32 - 2014-04-17 Wolfgang Denk -- cgit v1.2.1 From c5dfe6ec58e0b504cba5b429200f6a5d217d5bd9 Mon Sep 17 00:00:00 2001 From: Prabhakar Kushwaha Date: Tue, 8 Apr 2014 19:13:44 +0530 Subject: board/b4qds:Add support of 2 stage NAND boot-loader Add support of 2 stage NAND boot loader using SPL framework. here, PBL initialise the internal SRAM and copy SPL(160KB). This further initialise DDR using SPD and environment and copy u-boot(768 KB) from NAND to DDR. Finally SPL transer control to u-boot. Initialise/create followings required for SPL framework - Add spl.c which defines board_init_f, board_init_r - update tlb and ddr accordingly Signed-off-by: Prabhakar Kushwaha Reviewed-by: York Sun --- doc/README.b4860qds | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) (limited to 'doc') diff --git a/doc/README.b4860qds b/doc/README.b4860qds index 3da77d9f0f..eada0c7dd8 100644 --- a/doc/README.b4860qds +++ b/doc/README.b4860qds @@ -328,3 +328,39 @@ The below commands apply to both B4860QDS and B4420QDS. On Linux the interfaces are renamed as: . eth2 -> fm1-gb2 . eth3 -> fm1-gb3 + +NAND boot with 2 Stage boot loader +---------------------------------- +PBL initialise the internal SRAM and copy SPL(160KB) in SRAM. +SPL further initialise DDR using SPD and environment variables and copy +u-boot(768 KB) from flash to DDR. +Finally SPL transer control to u-boot for futher booting. + +SPL has following features: + - Executes within 256K + - No relocation required + + Run time view of SPL framework during boot :- + ----------------------------------------------- + Area | Address | +----------------------------------------------- + Secure boot | 0xFFFC0000 (32KB) | + headers | | + ----------------------------------------------- + GD, BD | 0xFFFC8000 (4KB) | + ----------------------------------------------- + ENV | 0xFFFC9000 (8KB) | + ----------------------------------------------- + HEAP | 0xFFFCB000 (30KB) | + ----------------------------------------------- + STACK | 0xFFFD8000 (22KB) | + ----------------------------------------------- + U-boot SPL | 0xFFFD8000 (160KB) | + ----------------------------------------------- + +NAND Flash memory Map on B4860 and B4420QDS +------------------------------------------ + Start End Definition Size +0x000000 0x0FFFFF u-boot 1MB +0x140000 0x15FFFF u-boot env 128KB +0x1A0000 0x1BFFFF FMAN Ucode 128KB -- cgit v1.2.1 From b6036993ebf12d360692a7df227537277afe3a1f Mon Sep 17 00:00:00 2001 From: Shaohui Xie Date: Tue, 22 Apr 2014 15:10:44 +0800 Subject: powerpc/T4QDS: add two stage boot of nand/sd Add support of 2 stage NAND/SD boot loader using SPL framework. PBL initialise the internal SRAM and copy SPL, this further initialise DDR using SPD and environment and copy u-boot from NAND/SD to DDR, finally SPL transfer control to u-boot. NOR uses CS1 instead of CS2 when NAND boot, fix it. Signed-off-by: Shaohui Xie Reviewed-by: York Sun --- doc/README.t4240qds | 53 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) (limited to 'doc') diff --git a/doc/README.t4240qds b/doc/README.t4240qds index a9841fb5f7..ef8c75f3b2 100644 --- a/doc/README.t4240qds +++ b/doc/README.t4240qds @@ -120,3 +120,56 @@ The override voltage takes effect when booting. Note: voltage adjustment needs to be done step by step. Changing voltage too rapidly may cause current surge. The voltage stepping is done by software. Users can set the final voltage directly. + +2-stage NAND/SD boot loader +------------------------------- +PBL initializes the internal SRAM and copy SPL(160K) in SRAM. +SPL further initialise DDR using SPD and environment variables +and copy u-boot(768 KB) from NAND/SD device to DDR. +Finally SPL transers control to u-boot for futher booting. + +SPL has following features: + - Executes within 256K + - No relocation required + +Run time view of SPL framework +------------------------------------------------- +|Area | Address | +------------------------------------------------- +|SecureBoot header | 0xFFFC0000 (32KB) | +------------------------------------------------- +|GD, BD | 0xFFFC8000 (4KB) | +------------------------------------------------- +|ENV | 0xFFFC9000 (8KB) | +------------------------------------------------- +|HEAP | 0xFFFCB000 (50KB) | +------------------------------------------------- +|STACK | 0xFFFD8000 (22KB) | +------------------------------------------------- +|U-boot SPL | 0xFFFD8000 (160KB) | +------------------------------------------------- + +NAND Flash memory Map on T4QDS +-------------------------------------------------------------- +Start End Definition Size +0x000000 0x0FFFFF u-boot img 1MB +0x140000 0x15FFFF u-boot env 128KB +0x160000 0x17FFFF FMAN Ucode 128KB + +Micro SD Card memory Map on T4QDS +---------------------------------------------------- +Block #blocks Definition Size +0x008 2048 u-boot img 1MB +0x800 0016 u-boot env 8KB +0x820 0128 FMAN ucode 64KB + +Switch Settings: (ON is 1, OFF is 0) +=============== +NAND boot SW setting: +SW1[1:8] = 10000010 +SW2[1.1] = 0 +SW6[1:4] = 1001 + +SD boot SW setting: +SW1[1:8] = 00100000 +SW2[1.1] = 0 -- cgit v1.2.1