9
0
Fork 0

ARM: add Canon A1100 ROM image generation

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
This commit is contained in:
Antony Pavlov 2014-07-29 01:15:26 +04:00 committed by Sascha Hauer
parent 0e2111deb3
commit f708453459
4 changed files with 23 additions and 1 deletions

1
.gitignore vendored
View File

@ -46,6 +46,7 @@ barebox.uimage
barebox.map
barebox.kwb
barebox.kwbuart
barebox.canon-a1100.bin
barebox-flash-image
System.map
Module.symvers

View File

@ -997,7 +997,8 @@ CLEAN_FILES += barebox System.map include/generated/barebox_default_env.h \
.tmp_kallsyms* common/barebox_default_env* barebox.ldr \
scripts/bareboxenv-target barebox-flash-image \
Doxyfile.version barebox.srec barebox.s5p barebox.ubl \
barebox.uimage barebox.spi barebox.kwb barebox.kwbuart
barebox.uimage barebox.spi barebox.kwb barebox.kwbuart \
barebox.canon-a1100.bin
# Directories & files removed with 'make mrproper'
MRPROPER_DIRS += include/config include2 usr/include

View File

@ -185,6 +185,16 @@ ifeq ($(machine-y),zynq)
KBUILD_IMAGE := barebox.zynq
endif
quiet_cmd_canon_a1100_image = DD $@
cmd_canon_a1100_image = scripts/canon-a1100-image $< $@ || \
echo "WARNING: Couldn't create Canon A1100 image due to previous errors."
barebox.canon-a1100.bin: $(KBUILD_BINARY) FORCE
$(call if_changed,canon_a1100_image)
ifeq ($(CONFIG_MACH_CANON_A1100),y)
KBUILD_IMAGE := barebox.canon-a1100.bin
endif
KWBIMAGE_OPTS = \
-c -i $(srctree)/$(BOARD)/kwbimage.cfg -d $(TEXT_BASE) -e $(TEXT_BASE)

10
scripts/canon-a1100-image Executable file
View File

@ -0,0 +1,10 @@
#!/bin/bash -e
IFILE=$1
OFILE=$2
dd if=/dev/zero bs=4M count=1 of=$OFILE 2>/dev/null
dd if=$IFILE of=$OFILE conv=notrunc 2>/dev/null
# 0xffff0000: fe 3f f0 ea b 0xffc00000
echo -n -e "\xfe\x3f\xf0\xea" | dd of=$OFILE bs=64K seek=63 conv=notrunc 2>/dev/null