[Skiboot] [PATCH 4/4] external: Add dynamically linked pflash

Samuel Mendoza-Jonas sam at mendozajonas.com
Thu May 26 13:37:17 AEST 2016


On Wed, May 25, 2016 at 09:54:31PM -0400, Brad Bishop wrote:
> Modify the $(EXE) and install target dependencies if LINKAGE=dynamic.
> The default remains a statically linked pflash binary.
> 
> Signed-off-by: Brad Bishop <bradleyb at fuzziesquirrel.com>
> ---
>  external/pflash/Makefile |  2 +-
>  external/pflash/rules.mk | 19 ++++++++++++++++---
>  2 files changed, 17 insertions(+), 4 deletions(-)
> 
> diff --git a/external/pflash/Makefile b/external/pflash/Makefile
> index bc371a3..3a4c563 100644
> --- a/external/pflash/Makefile
> +++ b/external/pflash/Makefile
> @@ -10,7 +10,7 @@ all: links arch_links $(EXE)
>  	@cmp -s $@ $@.tmp || cp $@.tmp $@
>  	@rm -f $@.tmp
>  
> -install: all
> +install: all $(INSTALLDEPS)
>  	install -D pflash $(DESTDIR)$(sbindir)/pflash
>  
>  .PHONY: dist
> diff --git a/external/pflash/rules.mk b/external/pflash/rules.mk
> index 9e73adf..df814fe 100644
> --- a/external/pflash/rules.mk
> +++ b/external/pflash/rules.mk
> @@ -1,16 +1,29 @@
>  .DEFAULT_GOAL := all
>  
>  override CFLAGS  += -O2 -Wall -I.
> -OBJS    = pflash.o progress.o version.o
> +PFLASH_OBJS    = pflash.o progress.o version.o common-arch_flash.o
>  LIBFLASH_FILES := libflash.c libffs.c ecc.c blocklevel.c file.c
>  LIBFLASH_OBJS := $(addprefix libflash-, $(LIBFLASH_FILES:.c=.o))
>  LIBFLASH_SRC := $(addprefix libflash/,$(LIBFLASH_FILES))
> -OBJS	+= $(LIBFLASH_OBJS)
> -OBJS	+= common-arch_flash.o
> +OBJS	= $(PFLASH_OBJS) $(LIBFLASH_OBJS)
>  EXE     = pflash
>  sbindir?=/usr/sbin
>  
>  PFLASH_VERSION ?= $(shell ../../make_version.sh $(EXE))
> +LINKAGE?=static
> +
> +ifeq ($(LINKAGE),dynamic)
> +include ../shared/rules.mk
> +SHARED=../shared/$(SHARED_NAME)
> +OBJS=$(PFLASH_OBJS) $(SHARED)
> +INSTALLDEPS+=install-shared
> +
> +install-shared:
> +	$(MAKE) -C ../shared install PREFIX=$(PREFIX)
> +
> +$(SHARED):
> +	$(MAKE) -C ../shared
> +endif
>  
>  version.c: .version
>  	@(if [ "a$(PFLASH_VERSION)" = "a" ]; then \
> -- 
> 2.7.4 (Apple Git-66)

I can't seem to apply this particular patch succesfully:

$ pwclient git-am 626495 -p skiboot
Applying patch #626495 using 'git am'
Description: [4/4] external: Add dynamically linked pflash
Applying: external: Add dynamically linked pflash
error: patch failed: external/pflash/rules.mk:1
error: external/pflash/rules.mk: patch does not apply
Patch failed at 0001 external: Add dynamically linked pflash


> 
> _______________________________________________
> Skiboot mailing list
> Skiboot at lists.ozlabs.org
> https://lists.ozlabs.org/listinfo/skiboot



More information about the Skiboot mailing list