blob: 7442d4a13491b86d6004bd263497149e79e96746 [file] [log] [blame]
#
# Google makefile to build uboot for quantenna qsr1000 products
#
export ARCH=arm
export TOP=$(PWD)
export CROSS_TOOLDIR=$(TOP)/../../toolchains/quantenna/usr/bin/
export CROSS_PREFIX=arc-buildroot-linux-uclibc-
export CROSS_COMPILE=$(CROSS_TOOLDIR)/$(CROSS_PREFIX)
version = $(shell ./version)
LOADERBIN_GFRG240 = ../../loader-bin/quantenna/gfrg240
GFRG240 = gfrg240-dev gfrg240-prod gfrg240-openbox
all: clean $(GFRG240)
# don't run parallel, the several builds would mix .o files
.NOTPARALLEL:
clean:
make clean
rm -rf output.*
clobber: clean
-make distclean
rm -rf output
gfiber_private.pem:
@echo "$@ is required to sign binaries. Get a copy and put it next to Makefile.gfiber"
exit 1
#
# GENERATE_DIGEST(DIR, NAME)
#
define GENERATE_DIGEST
@echo "Generating digest for $(1)/$(2)"
openssl dgst -sign gfiber_private.pem -sha512 -binary -keyform \
PEM $(1)/$(2).bin > $(1)/$(2).sig
endef
install: gfiber_private.pem
mkdir -p $(LOADERBIN_GFRG240)
cp output/gfrg240-dev/*dev.bin $(LOADERBIN_GFRG240)/u-boot-dev.bin
cp output/gfrg240-prod/*prod.bin $(LOADERBIN_GFRG240)/u-boot-prod.bin
cp output/gfrg240-openbox/*openbox.bin $(LOADERBIN_GFRG240)/u-boot-openbox.bin
$(call GENERATE_DIGEST,$(LOADERBIN_GFRG240),u-boot-dev)
$(call GENERATE_DIGEST,$(LOADERBIN_GFRG240),u-boot-prod)
$(call GENERATE_DIGEST,$(LOADERBIN_GFRG240),u-boot-openbox)
gfrg240-dev:
make -f Makefile clean
make -f Makefile ruby_config
make -f Makefile all
make -f Makefile ruby_mini_config
make -f piggy.mk TARGET=u-boot
mkdir -p output/$@
cp u-boot-piggy.bin output/$@/u-boot-dev.bin
gfrg240-prod:
make -f Makefile clean
make -f Makefile ruby_config
echo "#define CONFIG_DISABLE_INPUT" >> include/config.h
echo "#define CONFIG_BOOT_DELAY 0" >> include/config.h
make -f Makefile all
make -f Makefile ruby_mini_config
make -f piggy.mk TARGET=u-boot
mkdir -p output/$@
cp u-boot-piggy.bin output/$@/u-boot-prod.bin
gfrg240-openbox:
make -f Makefile clean
make -f Makefile ruby_config
echo "#undef CONFIG_DISABLE_INPUT" >> include/config.h
make -f Makefile all
make -f Makefile ruby_mini_config
make -f piggy.mk TARGET=u-boot
mkdir -p output/$@
cp u-boot-piggy.bin output/$@/u-boot-openbox.bin