[Skiboot] [PATCH 13/13] external/opal-prd: Add userspace support for PRD facility
Benjamin Herrenschmidt
benh at kernel.crashing.org
Sat Feb 28 08:27:36 AEDT 2015
On Fri, 2015-02-27 at 17:11 +0800, Jeremy Kerr wrote:
> diff --git a/external/opal-prd/Makefile b/external/opal-prd/Makefile
> new file mode 100644
> index 0000000..7006431
> --- /dev/null
> +++ b/external/opal-prd/Makefile
> @@ -0,0 +1,56 @@
> +CC = $(CROSS_COMPILE)gcc
> +
> +CFLAGS = -m64 -Werror -Wall -g2 -ggdb
> +LDFLAGS = -m64
> +ASFLAGS = -m64
> +CPPFLAGS = -I. -I../../include -I../../
> +
> +# Use make V=1 for a verbose build.
> +ifndef V
> + Q_CC= @echo ' CC ' $@;
> + Q_LINK= @echo ' LINK ' $@;
> + Q_LN= @echo ' LN ' $@;
> +endif
> +
> +OBJS = opal-prd.o thunk.o pnor.o i2c.o libffs.o libflash.o ecc.o
You're missing the libflash links no ?
> +all: opal-prd
> +
> +LINKS = ccan
> +
> +ifdef KERNEL_DIR
> +LINKS += asm/opal-prd.h
> +endif
> +
> +ccan:
> + $(Q_LN)ln -sfr ../../ccan ./ccan
> +
> +asm/opal-prd.h:
> + $(Q_LN)ln -sfr $(KERNEL_DIR)/arch/powerpc/include/uapi/asm/opal-prd.h \
> + asm/opal-prd.h
> +
> +$(OBJS): $(LINKS)
> +
> +%.o: %.c
> + $(Q_CC)$(COMPILE.c) $< -o $@
> +
> +%.o: ../../libflash/%.c
> + $(Q_CC)$(COMPILE.c) $< -o $@
> +
> +%.o: %.S
> + $(Q_CC)$(COMPILE.S) $< -o $@
> +
> +opal-prd: $(OBJS)
> + $(Q_LINK)$(LINK.o) -o $@ $^
> +
> +test: test/test_pnor
> +
> +test/test_pnor: test/test_pnor.o pnor.o libflash/libflash.o libflash/libffs.o
> + $(Q_LINK)$(LINK.o) -o $@ $^
> +
> +clean:
> + $(RM) *.[odsa] opal-prd
> + $(RM) test/*.[odsa] test/test_pnor
> +
> +distclean: clean
> + $(RM) -f $(LINKS) asm
Cheers,
Ben.
More information about the Skiboot
mailing list