summaryrefslogtreecommitdiffstats
path: root/external/pflash
Commit message (Collapse)AuthorAgeFilesLines
* external/pflash: Add testsCyril Bur2017-08-0127-0/+982
| | | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Reinstate the progress barsCyril Bur2017-08-011-16/+63
| | | | | | | | | | | | | | | | | | Recent work did some optimising which unfortunately removed some of the progress bars in pflash. It turns out that there's only one thing people prefer to correctly programmed flash chips, it is the ability to watch little equals characters go across their screens for potentially minutes. Personally I don't understand the appeal but I have received strongly worded requests for the reinstatement of the progress bars in pflash and I fear for the stability of our society if pflash doesn't promptly regain its most unimportant feature. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Make the progress bar safe for big numbersCyril Bur2017-08-012-17/+24
| | | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Remove use of exit() and fix memory leaksCyril Bur2017-08-011-169/+213
| | | | | | | | | | | | | Using exit() all over the place has lead to a huge mess of leaving all sorts of dangling references to malloc()ed memory, to blocklevel_devices and even sometimes file descriptors. Stop using exit() and simply report everything back to the main where everything can be freed on the way back out. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Move write and read size calculation togetherCyril Bur2017-08-011-13/+11
| | | | | | | | Very simple rework, makes sense to calculate those at the same time. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Update the code pathes for "--tune"Cyril Bur2017-08-011-3/+11
| | | | | | | | | It doesn't make sense for --tune to do anything unless --direct was passed. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Remove global flash detailsCyril Bur2017-08-011-59/+63
| | | | | | | | | | | | | | Currently all the flash details including the pointer to the blocklevel_device to access the flash is global. This is annoying since it makes it hard to know when it was allocated, some of the code just changes it which makes tracking difficult. Rather than have it globally accessible, pass it around as a structure so better control who modifies it and where and when. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Correct erase alignment checksCyril Bur2017-08-011-27/+13
| | | | | | | | | | | | | | | | | | pflash should check the alignment of addresses and sizes when asked to erase. There are two possibilities: 1. The user has specified sizes manually in which case pflash should be as flexible as possible, blocklevel_smart_erase() permits this. To prevent possible mistakes pflash will require --force to perform a manual erase of unaligned sizes. 2. The user used -P to specify a partition, partitions aren't necessarily erase granule aligned anymore, blocklevel_smart_erase() can handle. In this it doesn't make sense to warn/error about misalignment since the misalignment is inherent to the FFS partition and not really user input. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Stop using exit() in the mainCyril Bur2017-08-011-23/+49
| | | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Check the result of strtoulCyril Bur2017-08-011-8/+27
| | | | | | | | | | Also add 0x in front of --info output to avoid a copy and paste mistake. Reported-by: Michael Neuling <mikey@neuling.org> Suggested-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Add description of flagsCyril Bur2017-08-011-2/+4
| | | | | | | | | | | Recent reworks of pflash expose more partition flags, the --info command only prints them in their one character short names. It isn't obvious what they all are, add a little description Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* libflash: Adding debugging outputCyril Bur2017-08-011-0/+2
| | | | | | | | Also add usage text to pflash. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Reviewed-by: Samuel Mendoza-Jonas <sam@mendozajonas.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* pflash: include ccan/list/list.c to be able to build -DDEBUGStewart Smith2017-07-191-1/+9
| | | | | | | This enables some extra linked list checking Reviewed-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* pflash: build with skiboot HOSTCFLAGS warningsStewart Smith2017-07-192-1/+2
| | | | | | | mostly missing prototypes and unused parameters. Reviewed-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* pflash option to retrieve PNOR partition flagsMichael Tritz2017-07-191-11/+123
| | | | | | | | | | | | | | This commit extends pflash with an option to retrieve and print information for a particular partition, including the content from "pflash -i" and a verbose list of set miscellaneous flags. -i option is also updated to print a short list of flags in addition to the ECC flag, with one character per flag. A test of the new option is included in libflash/test. Signed-off-by: Michael Tritz <mtritz@us.ibm.com> Reviewed-by: Cyril Bur <cyril.bur@au1.ibm.com> [stewart@linux.vnet.ibm.com: various test fixes, enable gcov] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Use blocklevel_smart_erase()Cyril Bur2017-04-071-27/+4
| | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* remove 'update mode for partitions' from TODO listWerner Fischer2017-02-151-2/+0
| | | | | | | | Remove 'Support pnor "update" mode which only update selected partitions' from TODO list as pflash supports --partition=part_name already Signed-off-by: Werner Fischer <wfischer@thomas-krenn.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Perform the correct cleanupCyril Bur2016-11-111-2/+2
| | | | | | | | | | | | If the -F flag is used then pflash uses a regular file as the flash. On cleanup pflash fails to tell arch_flash_close() if it had passed a filename to arch_flash_init() as such arch_flash_close() assumes that it needs to close the actual flash structure and not simply a file descriptor leading to a NULL dereference. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* pflash: remove stray d in from info messageJoel Stanley2016-11-081-1/+1
| | | | | | Fixes: 86640b032d79ff0 (pflash: Fix printf format warning) Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* pflash: Fail when file is larger than partitionJoel Stanley2016-11-021-2/+8
| | | | | | | | | | | Currently we warn the user and truncate the file by default. Instead abort as this is rarely the desired behaviour. You can still shoot yourself in the foot by passing --force. Signed-off-by: Joel Stanley <joel@jms.id.au> Reviewed-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Make MTD accesses the defaultCyril Bur2016-10-251-24/+22
| | | | | | | | | | | Now that BMC and host kernel mtd drivers exist and have matured we should use them by default. This is especially important since we seem to be telling everyone to use pflash. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Catch incompatible combination of flagsCyril Bur2016-10-251-0/+10
| | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/common: Rename arch_flash_bmc() to arch_flash_access()Cyril Bur2016-10-251-2/+2
| | | | | | | | | | | | | | | Honestly the first name was terrible. Initially this was intended only to serve for BMC/ARM flash access, however, it should be more generic as it is in the external/common arch code it should play nice on all architectures. This change also paves the way to change the default flash access methods in pflash. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Acked-by: Joel Stanley <joel@jms.id.au> [stewart@linux.vnet.ibm.com: preserve Joel's ack] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Remove unused filesCyril Bur2016-10-172-372/+0
| | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Reduce variable scope as indicated by cppcheckCyril Bur2016-10-171-4/+8
| | | | | Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Fix ccpcheck warnings in progress.cCyril Bur2016-10-171-3/+3
| | | | | | | | | | Warnings in progress.c are not critical but warn about %d being used in printf format string when the parameter passed is unsigned. Trivial fixup which should silence the warnings. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* gard/pflash: Honor linker flags passed from the environmentFrederic Bonnard2016-09-221-1/+1
| | | | | | | | | Let use LDFLAGS from the environment for gard and pflash Debian/Ubuntu use this mechanism to do hardened builds. Signed-off-by: Frederic Bonnard <frediz@linux.vnet.ibm.com> [stewart@linux.vnet.ibm.com: also use LDFLAGS for pflash] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* pflash: Don't try to write protect when writing to flash fileStewart Smith2016-09-161-1/+1
| | | | | | | When we're using a file on the filesystem as the flash device, we don't need to write protect it when we flash. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* pflash: Fix printf format warningStewart Smith2016-09-151-1/+2
| | | | | | | | pflash.c: In function ‘print_flash_info’: pflash.c:138:27: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘uint64_t {aka long unsigned int}’ [-Wformat=] printf("Total size = %dMB \n", fl_total_size >> 20); Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* pflash and opal-prd: Fix dist-cleanBreno Leitao2016-09-141-1/+1
| | | | | | | | | | | | | | Currently pflash and opal-prd do not return to its original tree after a 'make distclean'. I understand that distclean should return the tree to its original state, so, the make can restart from scratch. On Debian[1], we need to clear these remaining file 'manually' to make the build 'reproducible' (two builds in sequence). [1] https://packages.debian.org/source/sid/skiboot Signed-off-by: Breno Leitao <breno.leitao@gmail.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* pflash: fix buffer overflow: fl_total_size uint32_t not uint64_tStewart Smith2016-09-021-1/+2
| | | | | | | | | | | | | | | | | | | This ends up being harmless bug due to memory layout. $ ./pflash -F ~/op-build/output/images/firestone.pnor -i ==31829==ERROR: AddressSanitizer: global-buffer-overflow on address 0x00000062f0 80 at pc 0x410226 bp 0x7ffedba9c950 sp 0x7ffedba9c948 WRITE of size 8 at 0x00000062f080 thread T0 #0 0x410225 in file_get_info (/home/stewart/skiboot/external/pflash/pflash+0 x410225) #1 0x40d832 in blocklevel_get_info (/home/stewart/skiboot/external/pflash/pf lash+0x40d832) #2 0x401f0c in main (/home/stewart/skiboot/external/pflash/pflash+0x401f0c) #3 0x7fc77439ab44 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21 b44) #4 0x403884 (/home/stewart/skiboot/external/pflash/pflash+0x403884) Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* pflash: Fix the makefileJoel Stanley2016-07-281-9/+17
| | | | | | | | | Someone was a bit too keen with the cleanups last time. Restore the ability for pflash to build in non-shared mode. Fixes: c327eddd9b29 (pflash: Clean up makefiles and resolve build race) Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* pflash: use atexit for musl compatibilityJoel Stanley2016-07-281-3/+2
| | | | | | | | | | I accidentally built myself a cross-toolchain with the musl libc. It does not support on_exit which we use to clean up in pflash. Instead use atexit with is supported by both uclibc, musl and glibc. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* pflash: Clean up makefiles and resolve build raceJoel Stanley2016-07-272-13/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The pflash build process has regressed from when the were last fixed in 6c21c4ffaf82. This patch resolves that issue and performs some cleanups: - Remove duplicated rules. Patches had moved rules into common files, but forgotten to remove them from the pflash makefiles. - Make assignements simply expanded variables where possible. Form the make manual: Functions referenced in the definition will be executed every time the variable is expanded. This makes make run slower; worse, it causes the wildcard and shell functions to give unpredictable results because you cannot easily control when they are called, or even how many times. To avoid all the problems and inconveniences of recursively expanded variables, there is another flavor: simply expanded variables. - set the 'shared' target as a dependency of the libflash objects. This was the final piece to resolve the race condition. The failed build could be reproduced by doing a `git clean -f -x` and then running the following: $ make -j 32 CROSS_COMPILE=arm-linux-gnueabi- SKIBOOT_VERSION=5.2.4 PFLASH_VERSION=5.2.4 V=1 -C external/pflash all LINKAGE=dynamic make: Entering directory '/home/joel/dev/skiboot/external/pflash' ln -sf ../../libflash ./libflash ln -sf ../../ccan ./ccan ln -sf ../common ./common cc -O2 -Wall -I. -c pflash.c -o pflash.o cc -O2 -Wall -I. -c progress.c -o progress.o make -C ../shared make[1]: Entering directory '/home/joel/dev/skiboot/external/shared' ln -sf ../../hw/ast-bmc/ast-sf-ctrl.c common/ast-sf-ctrl.c ln -sf ../../include/ast.h common/ast.h ln -sf arch_flash_arm_io.h common/io.h cc -O2 -Wall -I. -c common/arch_flash_common.c -o common-arch_flash_common.o cc -O2 -Wall -I. -c common/arch_flash_arm.c -o common-arch_flash_arm.o cc -O2 -Wall -I. -c common/ast-sf-ctrl.c -o common-ast-sf-ctrl.o cc -O2 -Wall -I. -c version.c -o version.o ld -r common-arch_flash_common.o common-arch_flash_arm.o common-ast-sf-ctrl.o -o common-arch_flash.o ln -sf ../../libflash ./libflash ln -sf ../../ccan ./ccan ln -sf ../common ./common make[1]: *** No rule to make target 'libflash/file.c', needed by 'libflash-file.o'. Stop. make[1]: *** Waiting for unfinished jobs.... make[1]: Leaving directory '/home/joel/dev/skiboot/external/shared' rules.mk:25: recipe for target '../shared/libflash.so.skiboot-5.2.4-1-g9f13f64c322f-joel-dirty-d5873ce' failed make: *** [../shared/libflash.so.skiboot-5.2.4-1-g9f13f64c322f-joel-dirty-d5873ce] Error 2 Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* Fix for typosFrederic Bonnard2016-06-201-3/+3
| | | | | | | | | While reviewing the Debian packaging, codespell found those. Most proposed fixes are based on codespell's default dictionnary. Signed-off-by: Frederic Bonnard <frediz@linux.vnet.ibm.com> Reviewed-by: Mukesh Ojha <mukesh02@linux.vnet.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external: Add dynamically linked pflashBrad Bishop2016-06-072-4/+17
| | | | | | | | Modify the $(EXE) and install target dependencies if LINKAGE=dynamic. The default remains a statically linked pflash binary. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external: Fix pflash install targetBrad Bishop2016-06-071-0/+1
| | | | | | | The install target used $(sbindir) which isn't set anywhere. Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* pflash: add support for manipulating file rather than flashStewart Smith2016-05-181-2/+9
| | | | | | | | | | Add command line parameters for passing into libflash to have pflash manipulate a file rather than flash. This is useful for testing. Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com> Reviewed-by: Cyril Bur <cyril.bur@au1.ibm.com>
* external/pflash: Handle incorrect cmd-line options betterCyril Bur2016-05-031-6/+27
| | | | | | | | | | | | | | | | | | The current pflash cmd-line option parsing has two flaws. Firstly, the error reporting leaves quite a bit to be desired. That is, when invalid options or argument are found, not much reporting is done. This patch addresses this. Secondly, pflash doesn't detect when there are leftovers in argv. This often signals a typo in what the user meant to do and could lead to the wrong outcome. For example: `pflash -e -p zImage.next - P BOOTKERNEL` will do quite the wrong thing. This patch addresses both issues. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* pflash: Allow building under yocto.Patrick Williams2016-04-171-2/+0
| | | | | | | | | | | | | | | | | | | | 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>
* Make links target reusableDinar Valeev2016-03-311-23/+1
| | | | | | | | | 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>
* external/pflash: Add --mtdCyril Bur2016-02-231-15/+37
| | | | | | | | | | | | | | | | | | | The current behaviour of --bmc is to take over the flash controller. This flag was written for very early bring-up when the BMC stack would run entirely out of RAM. This is no longer the case and using --bmc on a BMC running out of the very flash --bmc will read is extremely likely to brick the system. It has come to light that there is some requirement to read BMC flash and some thinking that pflash is the appropriate tool. As AMI BMC firmware exposes the flash through /dev/mtd and pflash can be easily taught to read from MTD pflash can be upgraded to be the tool for the job. In order to preserve the current behavior of the --bmc a new flag --mtd has been introduced to have pflash access BMC flash the 'safe' way. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* libflash/blocklevel: Add keep_alive parameterCyril Bur2016-01-151-1/+1
| | | | | | | | | | | | | | | | | | Currently the file backend will keep a file descriptor open until the structure is destroyed. This is undesirable for daemons and long running processes that only have a very occasional need to access the file. Keeping the file open requires users of blocklevel to close and reinit their structures every time, doing is isn't disastrous but can easily be managed at the interface level. This has been done at the blocklevel_device interface so as to provide minimal changes to arch_flash_init(). At the moment there isn't a need for the actually flash driver to be able to do this, this remains unimplmented there. Signed-off-by: Cyril Bur <cyril.bur@au1.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Fix makefile dependenciesJoel Stanley2015-12-041-2/+5
| | | | | | | | | | | | | | | | | | | | | 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>
* pflash: Add an install targetJoel Stanley2015-12-011-0/+3
| | | | | Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* pflash: Don't remove libflash/test/ bins in make cleanStewart Smith2015-11-271-1/+1
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Add script to build all backendsJoel Stanley2015-11-261-0/+35
| | | | | | | | | | | | We need to test all the backends when eg. making changes to libflash, to ensure that something hasn't gone wrong. To encourage developers to do this, add a script to simplify it. Patches welcome to detect the specific cross compilers binaries shipped on your favourite distro. Signed-off-by: Joel Stanley <joel@jms.id.au> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
* external/pflash: Add quiet rules and fix raceJoel Stanley2015-11-262-14/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* pflash: Remove ast.hJoel Stanley2015-11-261-67/+0
| | | | | | | | | | | | | 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>
* Add gitignore for pflashStewart Smith2015-11-181-0/+5
| | | | Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
OpenPOWER on IntegriCloud