* [flasher PATCH] Adapt to new U-Boot build commands @ 2014-07-31 17:48 Stephen Warren [not found] ` <1406828885-8561-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Stephen Warren @ 2014-07-31 17:48 UTC (permalink / raw) To: swarren-3lzwWm7+Weoh9ZMKESR00Q Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren, Masahiro Yamada From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> U-Boot commit 51148790f26e "kconfig: switch to Kconfig" changed the commands required to configure U-Boot. Adapt the flasher build script to those changes, in a way that automatically works with either old or new U-Boot source trees. Cc: Masahiro Yamada <yamada.m-NAum8xwdG0+S7A1Ibl2khg@public.gmane.org> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> --- build | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/build b/build index af863dd3b395..e61cac8ea4c7 100755 --- a/build +++ b/build @@ -186,7 +186,17 @@ def build_uboot_one_board(boardname): out_board_dir = gen_out_board_dir(boardname) mkdir(out_board_dir) - run(uboot_dir, 'make O=' + build_uboot_dir + ' ' + boardname + '_config') + # U-Boot commit 51148790f26e "kconfig: switch to Kconfig" changed the + # build commands from "make ${board}_config; make" to + # "make ${board}_defconfig; make". That commit also added file + # scripts/multiconfig.py, so we happen to have an easy way to check for + # the existence of that file to tell how to compile U-Boot:-/ + new_build_commands_file = os.path.join(uboot_dir, "scripts/multiconfig.py") + if os.path.exists(new_build_commands_file): + config_target_suffix = '_defconfig' + else: + config_target_suffix = '_config' + run(uboot_dir, 'make O=' + build_uboot_dir + ' ' + boardname + config_target_suffix) run(uboot_dir, 'make O=' + build_uboot_dir + ' -s ' + makejobs) import_uboot_one_board(boardname, build_uboot_dir) -- 1.9.1 ^ permalink raw reply related [flat|nested] 5+ messages in thread
[parent not found: <1406828885-8561-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>]
* Re: [flasher PATCH] Adapt to new U-Boot build commands [not found] ` <1406828885-8561-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> @ 2014-08-01 2:13 ` Masahiro Yamada [not found] ` <20140801111328.D505.AA925319-NAum8xwdG0+S7A1Ibl2khg@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Masahiro Yamada @ 2014-08-01 2:13 UTC (permalink / raw) To: Stephen Warren; +Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren Hi Stephen, On Thu, 31 Jul 2014 11:48:05 -0600 Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> wrote: > From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > > U-Boot commit 51148790f26e "kconfig: switch to Kconfig" changed the > commands required to configure U-Boot. Adapt the flasher build script > to those changes, in a way that automatically works with either old or > new U-Boot source trees. > > Cc: Masahiro Yamada <yamada.m-NAum8xwdG0+S7A1Ibl2khg@public.gmane.org> > Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> > --- > build | 12 +++++++++++- > 1 file changed, 11 insertions(+), 1 deletion(-) > > diff --git a/build b/build > index af863dd3b395..e61cac8ea4c7 100755 > --- a/build > +++ b/build > @@ -186,7 +186,17 @@ def build_uboot_one_board(boardname): > out_board_dir = gen_out_board_dir(boardname) > mkdir(out_board_dir) > > - run(uboot_dir, 'make O=' + build_uboot_dir + ' ' + boardname + '_config') > + # U-Boot commit 51148790f26e "kconfig: switch to Kconfig" changed the > + # build commands from "make ${board}_config; make" to > + # "make ${board}_defconfig; make". That commit also added file > + # scripts/multiconfig.py, so we happen to have an easy way to check for > + # the existence of that file to tell how to compile U-Boot:-/ > + new_build_commands_file = os.path.join(uboot_dir, "scripts/multiconfig.py") > + if os.path.exists(new_build_commands_file): > + config_target_suffix = '_defconfig' > + else: > + config_target_suffix = '_config' > + run(uboot_dir, 'make O=' + build_uboot_dir + ' ' + boardname + config_target_suffix) > run(uboot_dir, 'make O=' + build_uboot_dir + ' -s ' + makejobs) > > import_uboot_one_board(boardname, build_uboot_dir) IMHO, this way depends on how Kconfig is implemented in U-Boot, right? Maybe you can check the returncode of make help 2>/dev/null | grep -q 'Configuration targets' Best Regards Masahiro Yamada ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <20140801111328.D505.AA925319-NAum8xwdG0+S7A1Ibl2khg@public.gmane.org>]
* Re: [flasher PATCH] Adapt to new U-Boot build commands [not found] ` <20140801111328.D505.AA925319-NAum8xwdG0+S7A1Ibl2khg@public.gmane.org> @ 2014-08-05 21:41 ` Stefan Agner [not found] ` <1364a21ed6c2d2c002d3c2d6daf63972-XLVq0VzYD2Y@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Stefan Agner @ 2014-08-05 21:41 UTC (permalink / raw) To: Masahiro Yamada, Stephen Warren Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren, linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA Am 2014-08-01 04:13, schrieb Masahiro Yamada: > Hi Stephen, > > > On Thu, 31 Jul 2014 11:48:05 -0600 > Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> wrote: > >> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> >> >> U-Boot commit 51148790f26e "kconfig: switch to Kconfig" changed the >> commands required to configure U-Boot. Adapt the flasher build script >> to those changes, in a way that automatically works with either old or >> new U-Boot source trees. >> >> Cc: Masahiro Yamada <yamada.m-NAum8xwdG0+S7A1Ibl2khg@public.gmane.org> >> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> >> --- >> build | 12 +++++++++++- >> 1 file changed, 11 insertions(+), 1 deletion(-) >> >> diff --git a/build b/build >> index af863dd3b395..e61cac8ea4c7 100755 >> --- a/build >> +++ b/build >> @@ -186,7 +186,17 @@ def build_uboot_one_board(boardname): >> out_board_dir = gen_out_board_dir(boardname) >> mkdir(out_board_dir) >> >> - run(uboot_dir, 'make O=' + build_uboot_dir + ' ' + boardname + '_config') >> + # U-Boot commit 51148790f26e "kconfig: switch to Kconfig" changed the >> + # build commands from "make ${board}_config; make" to >> + # "make ${board}_defconfig; make". That commit also added file >> + # scripts/multiconfig.py, so we happen to have an easy way to check for >> + # the existence of that file to tell how to compile U-Boot:-/ >> + new_build_commands_file = os.path.join(uboot_dir, "scripts/multiconfig.py") >> + if os.path.exists(new_build_commands_file): >> + config_target_suffix = '_defconfig' >> + else: >> + config_target_suffix = '_config' >> + run(uboot_dir, 'make O=' + build_uboot_dir + ' ' + boardname + config_target_suffix) >> run(uboot_dir, 'make O=' + build_uboot_dir + ' -s ' + makejobs) >> >> import_uboot_one_board(boardname, build_uboot_dir) Funny discovered and tried to fix that on Thursday too. Stephens upstream change now just created a merge conflict on my local changes :-) > > > IMHO, this way depends on how Kconfig is implemented in U-Boot, right? > > > Maybe you can check the returncode of > > make help 2>/dev/null | grep -q 'Configuration targets' > IMHO the check now depends on the help message, which easily might change. My approach was to simple check if the file Kconfig is in the root folder. Since the change to switch to defconfig was done at the same time the kernel build system was introduced, this works perfectly and matches the reasons behind the renaming (align with the kernel)... os.path.isfile(os.path.join(uboot_dir, "Kconfig") I bet U-Boot will not change the build system anytime soon, especially not before they move to another build system :-) Regarding the help message, I'm not so sure about that... -- Stefan ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <1364a21ed6c2d2c002d3c2d6daf63972-XLVq0VzYD2Y@public.gmane.org>]
* Re: [flasher PATCH] Adapt to new U-Boot build commands [not found] ` <1364a21ed6c2d2c002d3c2d6daf63972-XLVq0VzYD2Y@public.gmane.org> @ 2014-08-05 21:45 ` Stephen Warren [not found] ` <53E15063.3060202-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 0 siblings, 1 reply; 5+ messages in thread From: Stephen Warren @ 2014-08-05 21:45 UTC (permalink / raw) To: Stefan Agner, Masahiro Yamada Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren, linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA On 08/05/2014 03:41 PM, Stefan Agner wrote: > Am 2014-08-01 04:13, schrieb Masahiro Yamada: >> Hi Stephen, >> >> >> On Thu, 31 Jul 2014 11:48:05 -0600 >> Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> wrote: >> >>> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> >>> >>> U-Boot commit 51148790f26e "kconfig: switch to Kconfig" changed the >>> commands required to configure U-Boot. Adapt the flasher build script >>> to those changes, in a way that automatically works with either old or >>> new U-Boot source trees. >>> >>> Cc: Masahiro Yamada <yamada.m-NAum8xwdG0+S7A1Ibl2khg@public.gmane.org> >>> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> >>> --- >>> build | 12 +++++++++++- >>> 1 file changed, 11 insertions(+), 1 deletion(-) >>> >>> diff --git a/build b/build >>> index af863dd3b395..e61cac8ea4c7 100755 >>> --- a/build >>> +++ b/build >>> @@ -186,7 +186,17 @@ def build_uboot_one_board(boardname): >>> out_board_dir = gen_out_board_dir(boardname) >>> mkdir(out_board_dir) >>> >>> - run(uboot_dir, 'make O=' + build_uboot_dir + ' ' + boardname + '_config') >>> + # U-Boot commit 51148790f26e "kconfig: switch to Kconfig" changed the >>> + # build commands from "make ${board}_config; make" to >>> + # "make ${board}_defconfig; make". That commit also added file >>> + # scripts/multiconfig.py, so we happen to have an easy way to check for >>> + # the existence of that file to tell how to compile U-Boot:-/ >>> + new_build_commands_file = os.path.join(uboot_dir, "scripts/multiconfig.py") >>> + if os.path.exists(new_build_commands_file): >>> + config_target_suffix = '_defconfig' >>> + else: >>> + config_target_suffix = '_config' >>> + run(uboot_dir, 'make O=' + build_uboot_dir + ' ' + boardname + config_target_suffix) >>> run(uboot_dir, 'make O=' + build_uboot_dir + ' -s ' + makejobs) >>> >>> import_uboot_one_board(boardname, build_uboot_dir) > > Funny discovered and tried to fix that on Thursday too. Stephens > upstream change now just created a merge conflict on my local changes > :-) > >> >> >> IMHO, this way depends on how Kconfig is implemented in U-Boot, right? >> >> >> Maybe you can check the returncode of >> >> make help 2>/dev/null | grep -q 'Configuration targets' >> > > IMHO the check now depends on the help message, which easily might > change. > > My approach was to simple check if the file Kconfig is in the root > folder. Since the change to switch to defconfig was done at the same > time the kernel build system was introduced, this works perfectly and > matches the reasons behind the renaming (align with the kernel)... > os.path.isfile(os.path.join(uboot_dir, "Kconfig") > > I bet U-Boot will not change the build system anytime soon, especially > not before they move to another build system :-) Regarding the help > message, I'm not so sure about that... Unfortunately, the specific commit which changed the commands required to build U-Boot wasn't the one that added the Kconfig file. Checking for the Kconfig file would work fine for a bunch of release commits, but not arbitrary points in the development history. ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <53E15063.3060202-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org>]
* Re: [flasher PATCH] Adapt to new U-Boot build commands [not found] ` <53E15063.3060202-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> @ 2014-08-05 21:57 ` Stefan Agner 0 siblings, 0 replies; 5+ messages in thread From: Stefan Agner @ 2014-08-05 21:57 UTC (permalink / raw) To: Stephen Warren Cc: Masahiro Yamada, linux-tegra-u79uwXL29TY76Z2rM5mHXA, Stephen Warren, linux-tegra-owner-u79uwXL29TY76Z2rM5mHXA Am 2014-08-05 23:45, schrieb Stephen Warren: > On 08/05/2014 03:41 PM, Stefan Agner wrote: >> Am 2014-08-01 04:13, schrieb Masahiro Yamada: >>> Hi Stephen, >>> >>> >>> On Thu, 31 Jul 2014 11:48:05 -0600 >>> Stephen Warren <swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> wrote: >>> >>>> From: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> >>>> >>>> U-Boot commit 51148790f26e "kconfig: switch to Kconfig" changed the >>>> commands required to configure U-Boot. Adapt the flasher build script >>>> to those changes, in a way that automatically works with either old or >>>> new U-Boot source trees. >>>> >>>> Cc: Masahiro Yamada <yamada.m-NAum8xwdG0+S7A1Ibl2khg@public.gmane.org> >>>> Signed-off-by: Stephen Warren <swarren-DDmLM1+adcrQT0dZR+AlfA@public.gmane.org> >>>> --- >>>> build | 12 +++++++++++- >>>> 1 file changed, 11 insertions(+), 1 deletion(-) >>>> >>>> diff --git a/build b/build >>>> index af863dd3b395..e61cac8ea4c7 100755 >>>> --- a/build >>>> +++ b/build >>>> @@ -186,7 +186,17 @@ def build_uboot_one_board(boardname): >>>> out_board_dir = gen_out_board_dir(boardname) >>>> mkdir(out_board_dir) >>>> >>>> - run(uboot_dir, 'make O=' + build_uboot_dir + ' ' + boardname + '_config') >>>> + # U-Boot commit 51148790f26e "kconfig: switch to Kconfig" changed the >>>> + # build commands from "make ${board}_config; make" to >>>> + # "make ${board}_defconfig; make". That commit also added file >>>> + # scripts/multiconfig.py, so we happen to have an easy way to check for >>>> + # the existence of that file to tell how to compile U-Boot:-/ >>>> + new_build_commands_file = os.path.join(uboot_dir, "scripts/multiconfig.py") >>>> + if os.path.exists(new_build_commands_file): >>>> + config_target_suffix = '_defconfig' >>>> + else: >>>> + config_target_suffix = '_config' >>>> + run(uboot_dir, 'make O=' + build_uboot_dir + ' ' + boardname + config_target_suffix) >>>> run(uboot_dir, 'make O=' + build_uboot_dir + ' -s ' + makejobs) >>>> >>>> import_uboot_one_board(boardname, build_uboot_dir) >> >> Funny discovered and tried to fix that on Thursday too. Stephens >> upstream change now just created a merge conflict on my local changes >> :-) >> >>> >>> >>> IMHO, this way depends on how Kconfig is implemented in U-Boot, right? >>> >>> >>> Maybe you can check the returncode of >>> >>> make help 2>/dev/null | grep -q 'Configuration targets' >>> >> >> IMHO the check now depends on the help message, which easily might >> change. >> >> My approach was to simple check if the file Kconfig is in the root >> folder. Since the change to switch to defconfig was done at the same >> time the kernel build system was introduced, this works perfectly and >> matches the reasons behind the renaming (align with the kernel)... >> os.path.isfile(os.path.join(uboot_dir, "Kconfig") >> >> I bet U-Boot will not change the build system anytime soon, especially >> not before they move to another build system :-) Regarding the help >> message, I'm not so sure about that... > > Unfortunately, the specific commit which changed the commands required > to build U-Boot wasn't the one that added the Kconfig file. Checking > for the Kconfig file would work fine for a bunch of release commits, > but not arbitrary points in the development history. > Ok, didn't catch that. Well then, I guess this solution is more appropriate... -- Stefan ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2014-08-05 21:57 UTC | newest] Thread overview: 5+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2014-07-31 17:48 [flasher PATCH] Adapt to new U-Boot build commands Stephen Warren [not found] ` <1406828885-8561-1-git-send-email-swarren-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2014-08-01 2:13 ` Masahiro Yamada [not found] ` <20140801111328.D505.AA925319-NAum8xwdG0+S7A1Ibl2khg@public.gmane.org> 2014-08-05 21:41 ` Stefan Agner [not found] ` <1364a21ed6c2d2c002d3c2d6daf63972-XLVq0VzYD2Y@public.gmane.org> 2014-08-05 21:45 ` Stephen Warren [not found] ` <53E15063.3060202-3lzwWm7+Weoh9ZMKESR00Q@public.gmane.org> 2014-08-05 21:57 ` Stefan Agner
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).