From 4251978afccb4b58c477c74f2d9888a063e5a995 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 11 Jun 2014 23:27:09 -0600 Subject: [PATCH 1/4] patman: Only apply patches when we know the original HEAD When patman applies the patches it checks out a new branch, uses 'git am' to apply the patches one by one, and then tries to go back to the old branch. If you try this when the branch is 'undefined', this doesn't work as patman cannot restore the correct branch after applying the patches. It seems that 'undefined' is created by git and is persistent after it is created, so that you can end up on quite an old branch. Add a check for the 'undefined' branch to avoid this. Reported-by: Masahiro Yamada Signed-off-by: Simon Glass --- tools/patman/gitutil.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tools/patman/gitutil.py b/tools/patman/gitutil.py index 3ea256de2e..7b75c83a82 100644 --- a/tools/patman/gitutil.py +++ b/tools/patman/gitutil.py @@ -232,6 +232,10 @@ def ApplyPatches(verbose, args, start_point): print stdout return False old_head = stdout.splitlines()[0] + if old_head == 'undefined': + str = "Invalid HEAD '%s'" % stdout.strip() + print col.Color(col.RED, str) + return False # Checkout the required start point cmd = ['git', 'checkout', 'HEAD~%d' % start_point] From 15a7737515064bf14c5de4127b3219142e3fc7e4 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 7 Jul 2014 20:08:29 +0900 Subject: [PATCH 2/4] cosmetic: doc: update README.generic-board Now MIPS supports 'generic board' feature. Signed-off-by: Masahiro Yamada Cc: Simon Glass Acked-by: Simon Glass --- doc/README.generic-board | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/README.generic-board b/doc/README.generic-board index 17da0b9f87..37c1b03ced 100644 --- a/doc/README.generic-board +++ b/doc/README.generic-board @@ -40,10 +40,11 @@ Supported Arcthitectures ------------------------ If you are unlucky then your architecture may not support generic board. -The following architectures are supported at the time of writing: +The following architectures are supported now: arc arm + mips powerpc sandbox x86 From 1826a18d8dc6d9d00ba40c742aea41cbfdc47acb Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 7 Jul 2014 09:46:36 +0900 Subject: [PATCH 3/4] buildman: fix to display warning message for missing [toolchain] section Toolchains.__init__ is expected to display a warning message when the [toolchain] section is missing from ~/.buildman file. But it never works. In that case, instead, buildmain fails with an error message which is difficult to understand: Traceback (most recent call last): File "tools/buildman/buildman", line 126, in control.DoBuildman(options, args) File "/home/foo/u-boot/tools/buildman/control.py", line 78, in DoBuildman toolchains = toolchain.Toolchains() File "/home/foo/u-boot/tools/buildman/toolchain.py", line 106, in __init__ config_fname) NameError: global name 'config_fname' is not defined Signed-off-by: Masahiro Yamada Cc: Simon Glass Acked-by: Simon Glass --- tools/buildman/toolchain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index b64338680e..e392035ea5 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -103,7 +103,7 @@ class Toolchains: if not toolchains: print ("Warning: No tool chains - please add a [toolchain] section" " to your buildman config file %s. See README for details" % - config_fname) + bsettings.config_fname) for name, value in toolchains: if '*' in value: From 8708267f09fa99be8c12e103f2cbdc14a43623cc Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Mon, 7 Jul 2014 09:47:45 +0900 Subject: [PATCH 4/4] buildman: fix toolchain priority_list '-elf' appears twice in the toolchain priority_list. The second one is rudundant. Signed-off-by: Masahiro Yamada Cc: Simon Glass Acked-by: Simon Glass --- tools/buildman/toolchain.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/buildman/toolchain.py b/tools/buildman/toolchain.py index e392035ea5..1b9771f8e6 100644 --- a/tools/buildman/toolchain.py +++ b/tools/buildman/toolchain.py @@ -66,7 +66,7 @@ class Toolchain: Returns: Priority of toolchain, 0=highest, 20=lowest. """ - priority_list = ['-elf', '-unknown-linux-gnu', '-linux', '-elf', + priority_list = ['-elf', '-unknown-linux-gnu', '-linux', '-none-linux-gnueabi', '-uclinux', '-none-eabi', '-gentoo-linux-gnu', '-linux-gnueabi', '-le-linux', '-uclinux'] for prio in range(len(priority_list)):