aboutsummaryrefslogtreecommitdiff
path: root/external/common/rules.mk
AgeCommit message (Collapse)AuthorFilesLines
2018-10-31Fixup pflash build for ast refactorStewart Smith1-1/+4
[ Upstream commit f651e8eb56e2c17aeac58fd50c20f874d874169c ] Fixes: 5b1bc2ffe791ae94361d86b2ae063ee543bf2df5 Signed-off-by: Stewart Smith <stewart@linux.ibm.com>
2017-02-23external/gard: Fix make dist targetCyril Bur1-1/+1
Several problems: Firstly, it could never have worked, it was using the wrong variable. Secondly, if it was using GARD_VERSION it produced a broken tarball that still looked into the skiboot source for files despite them having been copied into the tarball. Lastly (and not really a make dist issue) the current way of symlinking make_version.sh was racey. Get around the issue by refering to it in its actual location (if we know it will be there) or by looking at .version if building from tarball. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-06-27external: Fix ARM build failure with parallel makeBrad Bishop1-1/+1
Arch headers need to be linked in before compiling. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-04-17pflash: Allow building under yocto.Patrick Williams1-2/+4
The makefiles under external/* utilize the $(CROSS_COMPILE) variable to determine the cross-compiler prefix. In a few places, $(CROSS_COMPILE)gcc is called instead of $(CC). The issue with this is that yocto build passes some compile flags as part of $(CC) instead of $(CFLAGS), the most important of these is '--sysroot=...'. Without the proper --sysroot flag, pflash compile fails to find critical libc headers like stdio.h. This change delegates setting of $(CC) and $(LD) to external/common/rules.mk, which is widely used in the external tree, and ensures that: 1) $(CC) is used instead of $(CROSS_COMPILE)gcc. 2) CC is only set when not passed from the environment. Signed-off-by: Patrick Williams <patrick@stwcx.xyz> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-03-31Make links target reusableDinar Valeev1-0/+24
Move symlinking target to external/common/rules.mk, so the rule could be reused by gard and opal-prd. Signed-off-by: Dinar Valeev <dvaleev@suse.com> Reviewed-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-15Drop LDFLAGS from common/rules.mkCyril Bur1-1/+1
Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2016-01-15external/opal-prd: Use libflash/blocklevel for MTD/file accessesCyril Bur1-1/+1
pnor.c existed before blocklevel, it is time that this code got updated to use the available libraries. Changes include using the blocklevel accessors for MTD reads and writes rather than read() and write() on a file descriptor. This patch also makes use of the arch_flash_init() auto detection of the /dev/mtd device which corresponds to the MTD device exposed by skiboot for access to platform flash. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-12-04external/pflash: Fix makefile dependenciesJoel Stanley1-8/+12
When building under buildroot, libflash was being built before the links: make[2]: *** No rule to make target 'libflash/libflash.c', needed by 'libflash-libflash.o'. Stop. make[2]: *** Waiting for unfinished jobs.... LN ccan LN common LN libflash To reproduce this outside of buildroot, set PFLASH_VERSION to anything. This is another race that is only exposed in certain conditions. By describing the dependencies on the source files the build works again. I think it's almost time to stop using symlinks. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-26external/pflash: Add quiet rules and fix raceJoel Stanley1-8/+18
Adding quiet rules to make our output a bit cleaner. Building now looks like this: $ make LN libflash LN common LN ccan CC pflash.o CC version.o LD common-arch_flash.o CC pflash You can see the full build ouput by doing a "make V=1". By doing this, we build fractionally faster, exposing arace condition between running the make_version.sh script and the link existing for it. As we run it when creating the variable, there is no way to ensure it exists first. Solved this by not creating the symlink and simply running make_version.sh from the root. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-26pflash: Remove ast.hJoel Stanley1-0/+1
pflash contained a copy of the include/ast.h header. It had grown stale, so remove in and link in the common header. Note that it's hard to test that we haven't broken tools in the external/ directory these days; when making changes we need to test with amd64, ppc64, ppc64le and arm to ensure that everything can build! Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16Make gard and pflash build arch specific files in pwdStewart Smith1-7/+5
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-11-16external/pflash: Fixup LDFLAGSCyril Bur1-1/+1
In order to be able to compile for something that isn't the default for the compiler one should be able to use CFLAGS and LDFLAGS on commandline. ie build a 64bit binary with a compiler which builds by default 32bit or the opposite endian for which the compiler is configured. Currently the common/rules.mk ignores LDFLAGS when it shouldn't and pflash sets LDFLAGS for something which only applies to the final link. This patch addresses both those issues. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
2015-08-28external/common: Write an includeable rules.mk.Cyril Bur1-0/+36
It would be nice if tools like the gard tool or pflash don't have to worry about how to build the arch specific code they want to include through the new external/common code. This patch adds an external/common/rules.mk which each tool can include and with some minor tweaking of the existing makefiles it should get the arch code building nicely. The one caveat is that it requires a symlink in the directory to create common/ dir for everything to behave. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>