Skip to contentSkip to conversation

JUST-FOR-FUN: run barebox on Canon digital camera

RFC In review Antony Pavlov 2 participants 8 messages Aug 4, 2013 – Aug 6, 2013

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

cover JUST-FOR-FUN: run barebox on Canon digital camera

Please don't commit the patches!

This patch series introduce minimal support
for Canon DIGIC4-based cameras.

Supported cameras:

* Canon PowerShot A1100;
* Canon EOS 600D;
* Canon EOS Magic Lantern qemu-based emulator.

After booting barebox starts compiled-in script
that use 'mw' command to blink camera's LED.

Just now barebox for Canon cameras is a demo but after some improvements it can become very handy tool for CHDK and Magic Lantern development.

Very short Instruction
======================

***************************************************
* *
* THIS IS DANGEROUS AND MIGHT DAMAGE YOUR CAMERA. *
* NO WARRANTIES. NO GUARANTEES. DO NOT TAUNT. *
* *
***************************************************

1. Canon EOS 600D DSLR
----------------------

1.1 Install Magic Lantern firmware on SD-card
(see http://magiclantern.wikia.com/wiki/Unified/Install#First-time_installation)

1.2 Download and build barebox

    $ git clone -b next.digic https://github.com/frantony/barebox barebox.digic
    $ cd barebox.digic
    $ export ARCH=arm
    $ export CROSS_COMPILE=<your_ARM_toolchain_prefix>
    $ make canon-600d_defconfig
    $ make

You will get the 'arch/arm/pbl/zbarebox.bin' file.

1.3 Overwrite Magic Lantern boot file on your 600D SD-card with the 'zbarebox.bin' file. E.g., if your SD-card is mounted to the '/mnt/sd' dir, then

    $ sudo cp arch/arm/pbl/zbarebox.bin /mnt/sd/autoexec.bin

1.4 Insert SD-card into your camere.

1.5 Close your camera's SD-card slot.

1.6 Just after SD-card slot closing the barebox will start. If all going well the SD-card led start blink.

1.7 Uninstall barebox
Remove battery from your camera and erase the 'autoexec.bin' file from your SD-card.

2. Canon EOS emulator
---------------------

2.1 Download Magic Lantern sources

$ hg clone https://bitbucket.org/hudson/magic-lantern
$ cd magic-lantern

2.2 Setup your build environment

E.g., for Debian Linux:

$ cat > Makefile.user
RST2LATEX=rst2latex
PYTHON=python

GCC_VERSION=
CROSS_COMPILE=<your toolchain path>
<ctrl-d>
$

2.3 Buld Magic Lantern for 600D

$ make 600D

If all going well you can try qemu.

2.4 Bulding qemu

 $ cd contrib/qemu
 $ ./install.sh

...

Use install.sh prompt:
1) Compile QEMU
2) Grab a copy of the Canon firmware
3) Enable CONFIG_QEMU=y in your Makefile.user

2.5 Build barebox image (see paragraph 1.2 Download and build barebox)

Don't forget to edit arch/arm/boards/canon-600d/env/bin/init __before__ build: comment the 'while true; do' and the 'done' strings.

2.6 Copy zbarebox.bin to autoexec.bin in your qemu dir.

2.7 Go to your qemu dir and start emulation with ./run_ml_600D.sh

3. Canon PowerShot A1100 IS
---------------------------
Installing to the A1100 camera is a bit tricky as you need "encrypt" barebox image.

3.1 Install CHDK firmware on SD-card
(see http://chdk.wikia.com/wiki/CHDK_For_Newbies_-_How_To_Install
and http://chdk.wikia.com/wiki/A1100).

3.2 Make your SD-card bootable
(see http://chdk.wikia.com/wiki/Prepare_your_SD_card)

3.3 Download and build barebox

    $ git clone -b next.digic https://github.com/frantony/barebox barebox.digic
    $ cd barebox.digic
    $ export ARCH=arm
    $ export CROSS_COMPILE=<your_ARM_toolchain_prefix>
    $ make canon-a1100_defconfig
    $ make

You will get the 'arch/arm/pbl/zbarebox.bin' file.

3.4 Download CHDK sources

    $ git clone https://github.com/c10ud/CHDK.git
    $ cd CHDK

3.5 Build the 'dancingbits' encoder

    $ cd tools
    $ cc -o dancingbits dancingbits.c

3.6 encode your barebox image

Go to your barebox dir

3.6.1 Make zbarebox.bin > 128K; camera don't like small binaries :)

    $ dd if=/dev/zero bs=1k count=128 >> arch/arm/pbl/zbarebox.bin

3.6.2 encode

    $ <path-to-dancingbits> arch/arm/pbl/zbarebox.bin DISKBOOT.BIN 2

3.7 Overwrite CHDK boot file on your SD-card with the 'DISKBOOT.BIN' file.

3.9 Lock your SD-card (use small switch on the card).

3.10 Insert SD-card into your camera.
Close your camera's SD-card slot.

3.11 Turn your camera on.
If all going well the 'direct print' led start blink.

3.12 Uninstall barebox
Remove battery from your camera and erase the 'DISKBOOT.BIN' file from your SD-card.

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox

#2 lore raw

RFC 2/5 ARM: DIGIC: add Canon EOS 600D support

---
 arch/arm/boards/Makefile                |  1 +
 arch/arm/boards/canon-600d/Kconfig      | 10 ++++++++++
 arch/arm/boards/canon-600d/Makefile     |  2 ++
 arch/arm/boards/canon-600d/board.c      | 29 +++++++++++++++++++++++++++++
 arch/arm/boards/canon-600d/env/bin/init | 27 +++++++++++++++++++++++++++
 arch/arm/boards/canon-600d/lowlevel.c   | 10 ++++++++++
 arch/arm/mach-digic/Kconfig             |  5 +++++
 7 files changed, 84 insertions(+)
 create mode 100644 arch/arm/boards/canon-600d/Kconfig
 create mode 100644 arch/arm/boards/canon-600d/Makefile
 create mode 100644 arch/arm/boards/canon-600d/board.c
 create mode 100644 arch/arm/boards/canon-600d/env/bin/init
 create mode 100644 arch/arm/boards/canon-600d/lowlevel.c
arch/arm/boards/Makefile +1 -0
index 2e924fd..f1160f4 100644
@@ -12,6 +12,7 @@ obj-$(CONFIG_MACH_AT91SAM9N12EK)		+= at91sam9n12ek/
 obj-$(CONFIG_MACH_AT91SAM9X5EK)			+= at91sam9x5ek/
 obj-$(CONFIG_MACH_BEAGLE)			+= beagle/
 obj-$(CONFIG_MACH_BEAGLEBONE)			+= beaglebone/
+obj-$(CONFIG_MACH_CANON_600D)			+= canon-600d/
 obj-$(CONFIG_MACH_CCMX51)			+= ccxmx51/
 obj-$(CONFIG_MACH_CFA10036)			+= crystalfontz-cfa10036/
 obj-$(CONFIG_MACH_CHUMBY)			+= chumby_falconwing/
arch/arm/boards/canon-600d/Kconfig new file +10 -0
new file mode 100644
index 0000000..8aebe74
@@ -0,0 +1,10 @@
+if MACH_CANON_600D
+
+config ARCH_TEXT_BASE
+	hex
+	default 0x00800000
+
+config BOARDINFO
+	default "Canon EOS 600D"
+
+endif
arch/arm/boards/canon-600d/Makefile new file +2 -0
new file mode 100644
index 0000000..01c7a25
@@ -0,0 +1,2 @@
+obj-y += board.o
+lwl-y += lowlevel.o
arch/arm/boards/canon-600d/board.c new file +29 -0
new file mode 100644
index 0000000..9768f91
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2013 Antony Pavlov <[email protected]>
+ *
+ * This file is part of barebox.
+ * See file CREDITS for list of people who contributed to this project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <common.h>
+#include <init.h>
+#include <sizes.h>
+#include <asm/memory.h>
+
+static int mem_init(void)
+{
+	arm_add_mem_device("ram0", 0, SZ_256M);
+
+	return 0;
+}
+mem_initcall(mem_init);
arch/arm/boards/canon-600d/env/bin/init new file +27 -0
new file mode 100644
index 0000000..99c54ca
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# Canon EOS 600D "sd-card activity" led (red)
+LED_ADDR=0xC0220134
+LED_ON=0x46
+LED_OFF=0x44
+
+mw $LED_ADDR $LED_ON
+echo "== /env/bin/init started =="
+echo
+echo "HELLO!"
+mw $LED_ADDR $LED_OFF
+echo
+iomem
+echo
+
+# blink forever
+# use 'echo' for delay
+while true; do
+	echo "led_on"
+	mw $LED_ADDR $LED_ON
+	echo "led_off"
+	mw $LED_ADDR $LED_OFF
+done
+
+#echo
+#echo "== /env/bin/init done =="
arch/arm/boards/canon-600d/lowlevel.c new file +10 -0
new file mode 100644
index 0000000..b694c89
@@ -0,0 +1,10 @@
+#include <common.h>
+#include <sizes.h>
+#include <asm/barebox-arm-head.h>
+#include <asm/barebox-arm.h>
+
+void __naked barebox_arm_reset_vector(void)
+{
+	arm_cpu_lowlevel_init();
+	barebox_arm_entry(0x0, SZ_64M, 0);
+}
arch/arm/mach-digic/Kconfig +5 -0
index 49ce44a..d1561e8 100644
@@ -3,6 +3,11 @@ if ARCH_DIGIC
 choice
 	prompt "camera type"
 
+config MACH_CANON_600D
+	bool "Canon EOS 600D"
+
 endchoice
 
+source arch/arm/boards/canon-600d/Kconfig
+
 endif
Signature · 7 lines
1.8.3.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#3 lore raw

RFC 3/5 ARM: DIGIC: add Canon PowerShot A1100 IS support

In reply to Antony Pavlov
---
 arch/arm/boards/Makefile                 |  1 +
 arch/arm/boards/canon-a1100/Kconfig      | 10 ++++++++++
 arch/arm/boards/canon-a1100/Makefile     |  2 ++
 arch/arm/boards/canon-a1100/board.c      | 29 +++++++++++++++++++++++++++++
 arch/arm/boards/canon-a1100/env/bin/init | 27 +++++++++++++++++++++++++++
 arch/arm/boards/canon-a1100/lowlevel.c   | 10 ++++++++++
 arch/arm/mach-digic/Kconfig              |  4 ++++
 7 files changed, 83 insertions(+)
 create mode 100644 arch/arm/boards/canon-a1100/Kconfig
 create mode 100644 arch/arm/boards/canon-a1100/Makefile
 create mode 100644 arch/arm/boards/canon-a1100/board.c
 create mode 100644 arch/arm/boards/canon-a1100/env/bin/init
 create mode 100644 arch/arm/boards/canon-a1100/lowlevel.c
arch/arm/boards/Makefile +1 -0
index f1160f4..1eb120d 100644
@@ -13,6 +13,7 @@ obj-$(CONFIG_MACH_AT91SAM9X5EK)			+= at91sam9x5ek/
 obj-$(CONFIG_MACH_BEAGLE)			+= beagle/
 obj-$(CONFIG_MACH_BEAGLEBONE)			+= beaglebone/
 obj-$(CONFIG_MACH_CANON_600D)			+= canon-600d/
+obj-$(CONFIG_MACH_CANON_A1100)			+= canon-a1100/
 obj-$(CONFIG_MACH_CCMX51)			+= ccxmx51/
 obj-$(CONFIG_MACH_CFA10036)			+= crystalfontz-cfa10036/
 obj-$(CONFIG_MACH_CHUMBY)			+= chumby_falconwing/
arch/arm/boards/canon-a1100/Kconfig new file +10 -0
new file mode 100644
index 0000000..4936336
@@ -0,0 +1,10 @@
+if MACH_CANON_A1100
+
+config ARCH_TEXT_BASE
+	hex
+	default 0x00001900
+
+config BOARDINFO
+	default "Canon PowerShot A1100 IS"
+
+endif
arch/arm/boards/canon-a1100/Makefile new file +2 -0
new file mode 100644
index 0000000..01c7a25
@@ -0,0 +1,2 @@
+obj-y += board.o
+lwl-y += lowlevel.o
arch/arm/boards/canon-a1100/board.c new file +29 -0
new file mode 100644
index 0000000..e508399
@@ -0,0 +1,29 @@
+/*
+ * Copyright (C) 2013 Antony Pavlov <[email protected]>
+ *
+ * This file is part of barebox.
+ * See file CREDITS for list of people who contributed to this project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <common.h>
+#include <init.h>
+#include <sizes.h>
+#include <asm/memory.h>
+
+static int mem_init(void)
+{
+	arm_add_mem_device("ram0", 0, SZ_8M);
+
+	return 0;
+}
+mem_initcall(mem_init);
arch/arm/boards/canon-a1100/env/bin/init new file +27 -0
new file mode 100644
index 0000000..d9173b2
@@ -0,0 +1,27 @@
+#!/bin/sh
+
+# Canon PowerShot A1100 IS "direct print" led (blue)
+LED_ADDR=0xC02200CC
+LED_ON=0x46
+LED_OFF=0x44
+
+mw $LED_ADDR $LED_ON
+echo "== /env/bin/init started =="
+echo
+echo "HELLO!"
+mw $LED_ADDR $LED_OFF
+echo
+iomem
+echo
+
+# blink forever
+# use 'echo' for delay
+while true; do
+	echo "led_on"
+	mw $LED_ADDR $LED_ON
+	echo "led_off"
+	mw $LED_ADDR $LED_OFF
+done
+
+#echo
+#echo "== /env/bin/init done =="
arch/arm/boards/canon-a1100/lowlevel.c new file +10 -0
new file mode 100644
index 0000000..aed34e0
@@ -0,0 +1,10 @@
+#include <common.h>
+#include <sizes.h>
+#include <asm/barebox-arm-head.h>
+#include <asm/barebox-arm.h>
+
+void __naked barebox_arm_reset_vector(void)
+{
+	arm_cpu_lowlevel_init();
+	barebox_arm_entry(0x0, SZ_8M, 0);
+}
arch/arm/mach-digic/Kconfig +4 -0
index d1561e8..7354540 100644
@@ -6,8 +6,12 @@ choice
 config MACH_CANON_600D
 	bool "Canon EOS 600D"
 
+config MACH_CANON_A1100
+	bool "Canon PowerShot A1100 IS"
+
 endchoice
 
 source arch/arm/boards/canon-600d/Kconfig
+source arch/arm/boards/canon-a1100/Kconfig
 
 endif
Signature · 7 lines
1.8.3.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#4 lore raw

RFC 4/5 ARM: DIGIC: add canon-600d_defconfig

In reply to Antony Pavlov
---
 arch/arm/configs/canon-600d_defconfig | 40 +++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 arch/arm/configs/canon-600d_defconfig
arch/arm/configs/canon-600d_defconfig new file +40 -0
new file mode 100644
index 0000000..862abf2
@@ -0,0 +1,40 @@
+CONFIG_ARCH_DIGIC=y
+CONFIG_MACH_CANON_600D=y
+CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_PBL_IMAGE=y
+CONFIG_PBL_RELOCATABLE=y
+CONFIG_IMAGE_COMPRESSION_LZ4=y
+CONFIG_TEXT_BASE=0x00300000
+CONFIG_MALLOC_SIZE=0x200000
+CONFIG_PANIC_HANG=y
+CONFIG_PROMPT="canon> "
+CONFIG_LONGHELP=y
+CONFIG_GLOB=y
+CONFIG_HUSH_FANCY_PROMPT=y
+CONFIG_HUSH_GETOPT=y
+CONFIG_CMDLINE_EDITING=y
+CONFIG_AUTO_COMPLETE=y
+CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/canon-600d/env"
+CONFIG_DEBUG_LL=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_GLOBAL=y
+# CONFIG_CMD_RM is not set
+# CONFIG_CMD_MKDIR is not set
+# CONFIG_CMD_RMDIR is not set
+# CONFIG_CMD_PWD is not set
+# CONFIG_CMD_MOUNT is not set
+# CONFIG_CMD_UMOUNT is not set
+# CONFIG_CMD_CLEAR is not set
+CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_IOMEM=y
+# CONFIG_CMD_MEMCMP is not set
+# CONFIG_CMD_MEMCPY is not set
+# CONFIG_CMD_MEMSET is not set
+# CONFIG_CMD_BOOTM is not set
+# CONFIG_CMD_BOOTU is not set
+# CONFIG_CMD_TEST is not set
+# CONFIG_CMD_VERSION is not set
+# CONFIG_CMD_HELP is not set
+# CONFIG_CMD_DEVINFO is not set
+# CONFIG_SPI is not set
+CONFIG_ZLIB=y
Signature · 7 lines
1.8.3.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#5 lore raw

RFC 5/5 ARM: DIGIC: add canon-a1100_defconfig

In reply to Antony Pavlov
---
 arch/arm/configs/canon-a1100_defconfig | 40 ++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)
 create mode 100644 arch/arm/configs/canon-a1100_defconfig
arch/arm/configs/canon-a1100_defconfig new file +40 -0
new file mode 100644
index 0000000..6fad0c6
@@ -0,0 +1,40 @@
+CONFIG_ARCH_DIGIC=y
+CONFIG_MACH_CANON_A1100=y
+CONFIG_ARM_OPTIMZED_STRING_FUNCTIONS=y
+CONFIG_PBL_IMAGE=y
+CONFIG_PBL_RELOCATABLE=y
+CONFIG_IMAGE_COMPRESSION_LZ4=y
+CONFIG_TEXT_BASE=0x00300000
+CONFIG_MALLOC_SIZE=0x200000
+CONFIG_PANIC_HANG=y
+CONFIG_PROMPT="canon> "
+CONFIG_LONGHELP=y
+CONFIG_GLOB=y
+CONFIG_HUSH_FANCY_PROMPT=y
+CONFIG_HUSH_GETOPT=y
+CONFIG_CMDLINE_EDITING=y
+CONFIG_AUTO_COMPLETE=y
+CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/canon-a1100/env"
+CONFIG_DEBUG_LL=y
+CONFIG_CMD_SLEEP=y
+CONFIG_CMD_GLOBAL=y
+# CONFIG_CMD_RM is not set
+# CONFIG_CMD_MKDIR is not set
+# CONFIG_CMD_RMDIR is not set
+# CONFIG_CMD_PWD is not set
+# CONFIG_CMD_MOUNT is not set
+# CONFIG_CMD_UMOUNT is not set
+# CONFIG_CMD_CLEAR is not set
+CONFIG_CMD_ECHO_E=y
+CONFIG_CMD_IOMEM=y
+# CONFIG_CMD_MEMCMP is not set
+# CONFIG_CMD_MEMCPY is not set
+# CONFIG_CMD_MEMSET is not set
+# CONFIG_CMD_BOOTM is not set
+# CONFIG_CMD_BOOTU is not set
+# CONFIG_CMD_TEST is not set
+# CONFIG_CMD_VERSION is not set
+# CONFIG_CMD_HELP is not set
+# CONFIG_CMD_DEVINFO is not set
+# CONFIG_SPI is not set
+CONFIG_ZLIB=y
Signature · 7 lines
1.8.3.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

RFC 1/5 ARM: add very initial support for Canon DIGIC chips

In reply to Antony Pavlov
---
 arch/arm/Kconfig                            |  8 +++++
 arch/arm/Makefile                           |  1 +
 arch/arm/mach-digic/Kconfig                 |  8 +++++
 arch/arm/mach-digic/Makefile                |  1 +
 arch/arm/mach-digic/core.c                  | 25 +++++++++++++++
 arch/arm/mach-digic/include/mach/debug_ll.h | 48 +++++++++++++++++++++++++++++
 6 files changed, 91 insertions(+)
 create mode 100644 arch/arm/mach-digic/Kconfig
 create mode 100644 arch/arm/mach-digic/Makefile
 create mode 100644 arch/arm/mach-digic/core.c
 create mode 100644 arch/arm/mach-digic/include/mach/debug_ll.h
arch/arm/Kconfig +8 -0
index e4db8da..377f667 100644
@@ -54,6 +54,13 @@ config ARCH_CLPS711X
 	select GPIOLIB
 	select MFD_SYSCON
 
+config ARCH_DIGIC
+	bool "Canon DIGIC-based cameras"
+	select CPU_32v5
+	select HAS_DEBUG_LL
+	help
+	  Support for Canon's digital cameras that use the DIGIC4 ASIC.
+
 config ARCH_EP93XX
 	bool "Cirrus Logic EP93xx"
 	select CPU_ARM920T
@@ -171,6 +178,7 @@ source arch/arm/cpu/Kconfig
 source arch/arm/mach-at91/Kconfig
 source arch/arm/mach-bcm2835/Kconfig
 source arch/arm/mach-clps711x/Kconfig
+source arch/arm/mach-digic/Kconfig
 source arch/arm/mach-ep93xx/Kconfig
 source arch/arm/mach-highbank/Kconfig
 source arch/arm/mach-imx/Kconfig
arch/arm/Makefile +1 -0
index d80c12c..1b3040e 100644
@@ -54,6 +54,7 @@ AFLAGS   += -include asm/unified.h -msoft-float $(AFLAGS_THUMB2)
 machine-$(CONFIG_ARCH_AT91)		:= at91
 machine-$(CONFIG_ARCH_BCM2835)		:= bcm2835
 machine-$(CONFIG_ARCH_CLPS711X)		:= clps711x
+machine-$(CONFIG_ARCH_DIGIC)		:= digic
 machine-$(CONFIG_ARCH_EP93XX)		:= ep93xx
 machine-$(CONFIG_ARCH_HIGHBANK)		:= highbank
 machine-$(CONFIG_ARCH_IMX)		:= imx
arch/arm/mach-digic/Kconfig new file +8 -0
new file mode 100644
index 0000000..49ce44a
@@ -0,0 +1,8 @@
+if ARCH_DIGIC
+
+choice
+	prompt "camera type"
+
+endchoice
+
+endif
arch/arm/mach-digic/Makefile new file +1 -0
new file mode 100644
index 0000000..820eb10
@@ -0,0 +1 @@
+obj-y += core.o
arch/arm/mach-digic/core.c new file +25 -0
new file mode 100644
index 0000000..f222c5b
@@ -0,0 +1,25 @@
+/*
+ * Copyright (C) 2013 Antony Pavlov <[email protected]>
+ *
+ * This file is part of barebox.
+ * See file CREDITS for list of people who contributed to this project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License version 2
+ * as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ */
+
+#include <common.h>
+
+void __noreturn reset_cpu(unsigned long ignored)
+{
+	while (1)
+		;
+}
+EXPORT_SYMBOL(reset_cpu);
arch/arm/mach-digic/include/mach/debug_ll.h new file +48 -0

48 lines not on this page · raw message

Signature · 7 lines
1.8.3.1


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#6 lore raw
In reply to Antony Pavlov
Quoted 11 lines · Antony Pavlov

Please don't commit the patches!

This patch series introduce minimal support for Canon DIGIC4-based cameras.

Supported cameras:

* Canon PowerShot A1100;
* Canon EOS 600D;
* Canon EOS Magic Lantern qemu-based emulator.

Quoted 6 lines

After booting barebox starts compiled-in script that use 'mw' command to blink camera's LED.

Just now barebox for Canon cameras is a demo but after some improvements it can become very handy tool for CHDK and Magic Lantern development.

Very cool stuff.

I'll have to have a look what model my wifes camera is ;)

I'd be amazed if barebox could be used to help the magic lantern project.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#7 lore raw
Quoted 15 lines · On Tue, 6 Aug 2013 09:13:53 +0200 Sascha Hauer <[email protected]> wrote:
Quoted 14 lines · Antony Pavlov

Please don't commit the patches!

This patch series introduce minimal support for Canon DIGIC4-based cameras.

Supported cameras:

* Canon PowerShot A1100;
* Canon EOS 600D;
* Canon EOS Magic Lantern qemu-based emulator.

After booting barebox starts compiled-in script that use 'mw' command to blink camera's LED.

Quoted 7 lines
Quoted 3 lines

Just now barebox for Canon cameras is a demo but after some improvements it can become very handy tool for CHDK and Magic Lantern development.

Very cool stuff.

I'll have to have a look what model my wifes camera is ;)

To tell the truth there is no big difference in Canon cameras for barebox developer. You can see, that there are no differences in a1100 and 600d code in barebox (just memory size, but it can be moved into device tree file). Moreover AFAIR there are no significant software model differences between the chips in the DIGIC family.

To blink the LED of your PowerShot camera you only need to know the led-related GPIO address and canon binary file encode algorithm. Both of this things can be obtained in the CHDK sources.

For DSRL cameras the situation is even less difficult.

Quoted 2 lines

I'd be amazed if barebox could be used to help the magic lantern project.

If you want to help the Magic Lantern project please briefly describe your mode of operation with incoming patches. AFAIR you have some scripts to check all boards build after every single commit. The Magic Lantern developers have some problems as they use very different mode of operation:
1. commit the change to the repo;
2. fix build or functional error some time later.

I have adapted MAKEALL script from barebox for Magic Lantern, but I have not not yet finished the script to check every new mercurial commit (as Magic Lantern developers use mercurial).

--
Best regards,
  Antony Pavlov

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox