mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Antony Pavlov <antonynpavlov@gmail.com>
To: barebox@lists.infradead.org
Subject: [PATCH v2 07/11] ARM: add Canon A1100 ROM image generation
Date: Tue, 29 Jul 2014 01:15:26 +0400	[thread overview]
Message-ID: <1406582130-10116-8-git-send-email-antonynpavlov@gmail.com> (raw)
In-Reply-To: <1406582130-10116-1-git-send-email-antonynpavlov@gmail.com>

Signed-off-by: Antony Pavlov <antonynpavlov@gmail.com>
---
 .gitignore                |  1 +
 Makefile                  |  2 +-
 arch/arm/Makefile         | 10 ++++++++++
 scripts/canon-a1100-image | 10 ++++++++++
 4 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/.gitignore b/.gitignore
index ddeb7b1..a62e08c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -47,6 +47,7 @@ barebox.map
 barebox.kwb
 barebox.kwbuart
 barebox.efi
+barebox.canon-a1100.bin
 barebox-flash-image
 System.map
 Module.symvers
diff --git a/Makefile b/Makefile
index 3d08818..1ec0bfd 100644
--- a/Makefile
+++ b/Makefile
@@ -994,7 +994,7 @@ CLEAN_FILES +=	barebox System.map include/generated/barebox_default_env.h \
 		scripts/bareboxenv-target barebox-flash-image \
 		barebox.srec barebox.s5p barebox.ubl barebox.zynq \
 		barebox.uimage barebox.spi barebox.kwb barebox.kwbuart \
-		barebox.efi
+		barebox.efi barebox.canon-a1100.bin
 
 # Directories & files removed with 'make mrproper'
 MRPROPER_DIRS  += include/config include2 usr/include
diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 1b0d7fe..337aef1 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -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)
 
diff --git a/scripts/canon-a1100-image b/scripts/canon-a1100-image
new file mode 100755
index 0000000..6c08d74
--- /dev/null
+++ b/scripts/canon-a1100-image
@@ -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
-- 
2.0.1


_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

  parent reply	other threads:[~2014-07-28 21:16 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-07-28 21:15 [PATCH v2 00/11] ARM: add support for Canon DIGIC chips and Canon PowerShot A1100 IS Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 01/11] ARM: add ARM946E-S CPU type Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 02/11] ARM: add very initial support for Canon DIGIC chips Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 03/11] clocksource: add driver for Canon DIGIC timer Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 04/11] serial: add driver for Canon DIGIC UART Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 05/11] gpio: add driver for Canon DIGIC Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 06/11] ARM: DIGIC: add Canon PowerShot A1100 IS support Antony Pavlov
2014-07-28 21:15 ` Antony Pavlov [this message]
2014-07-28 21:15 ` [PATCH v2 08/11] ARM: DIGIC: add canon-a1100_defconfig Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 09/11] Documentation: add QEMU Canon A1100 barebox mini-howto Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 10/11] ARM: add Canon A1100 DISKBOOT.BIN image generation stuff Antony Pavlov
2014-07-28 21:15 ` [PATCH v2 11/11] Documentation: add real Canon A1100 camera barebox mini-howto Antony Pavlov
2014-07-29 13:20 ` [PATCH v2 00/11] ARM: add support for Canon DIGIC chips and Canon PowerShot A1100 IS Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1406582130-10116-8-git-send-email-antonynpavlov@gmail.com \
    --to=antonynpavlov@gmail.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox