From patchwork Sun Jan 23 23:35:05 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: Use a tag for SeaBIOS stable checkouts. Date: Sun, 23 Jan 2011 23:35:05 -0000 From: Peter Stuge X-Patchwork-Id: 2551 Message-Id: <20110123233505.32567.qmail@stuge.se> To: coreboot@coreboot.org Stefan Reinauer wrote: > Not sure what the right fix is for this. We'll find one, but need to decide on how to handle the situation where there have been changes made in the repo. Both commited ones and uncommitted ones (like what make patch currently produces). > I neither want to check the changes I make to the config file in to > the local repository Can we please not use perl for this? sed can do it just fine. Can I ask why you don't want to create a commit for the changes? > nor do I want to undo/redo the changes for every build, Well, but every build can (outside abuild) switch to a different branch. And we need to handle that. (Ie. a user first building with master, then building with stable.) > nor do I want to re-checkout for every target. Why not? Note we are talking git checkout now, not git clone. > Is this possible with git? Yes, it can do whatever we decide on, but so far we haven't really considered all cases, so what we have right now doesn't work. Kevin O'Connor wrote: > The following makes it less of a problem for me, but I'm not sure it's > the right way either. .. > +++ b/payloads/external/SeaBIOS/Makefile.inc > -TAG-$(CONFIG_SEABIOS_MASTER)=master > +TAG-$(CONFIG_SEABIOS_MASTER)=origin/master > TAG-$(CONFIG_SEABIOS_STABLE)=rel-0.6.1.3 .. > checkout: > echo "Checking out SeaBIOS $(TAG-y)" > - test -d seabios && ( cd seabios; git pull ) || \ > + test -d seabios && ( cd seabios; git fetch ) || \ I agree that git fetch should be here, certainly not git pull. But we need to consider what we want to happen if someone has made local changes in this repository. And we also need to consider *our* local changes that are done in this repository. The fact that they are not so easily distinguishable is a problem. > - cd seabios; git checkout $(TAG-y) > + cd seabios; git checkout -m $(TAG-y) I don't really like trying to do a merge of local changes here. It will quickly conflict with later development from upstream. We need to weigh two objectives against each other: 1. someone has local changes in payloads/external/SeaBIOS/seabios that we don't want to erase 2. we want make to use the particular version of SeaBIOS specified by the user or by abuild during config > The best way is probably to never checkout a branch - only ever pull > a tag. Then the build can detect if the tag ever changes and reapply > the patch. I think merging is always the wrong thing to do, because it will make a mess of the repo and what the user has configured is exclusively one of the tags we offer, so that is what they should always get. What I'm saying is that I think objective 2. above takes priority over objective 1. and then we can not really have local changes in the seabios repo. That means *any* local changes, theirs or ours. The .patched thingy is sorta an ugly trick too. As I see it, what we want is to build a certain way, without having to change any files, so I think we should pass CONFIG_ on the command line. Patches attached. //Peter >From be44530690aabfe4c66351f842bf073e2728ce02 Mon Sep 17 00:00:00 2001 From: Peter Stuge Date: Mon, 24 Jan 2011 00:15:18 +0100 Subject: [PATCH 1/2] Allow initial COMMONCFLAGS to be set from the make command line --- Makefile | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/Makefile b/Makefile index 384bf79..ccdf96a 100644 --- a/Makefile +++ b/Makefile @@ -27,7 +27,7 @@ cc-option = $(shell if test -z "`$(1) $(2) -S -o /dev/null -xc \ /dev/null 2>&1`"; then echo "$(2)"; else echo "$(3)"; fi ;) # Default compiler flags -COMMONCFLAGS = -Os -MD -Wall -Wno-strict-aliasing -Wold-style-definition \ +COMMONCFLAGS += -Os -MD -Wall -Wno-strict-aliasing -Wold-style-definition \ $(call cc-option,$(CC),-Wtype-limits,) \ -m32 -march=i386 -mregparm=3 -mpreferred-stack-boundary=2 \ -mrtd -minline-all-stringops \