mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [RFC 0/8] barebox on Canon cameras: serial console and dts support
@ 2013-08-26  4:57 Antony Pavlov
  2013-08-26  4:57 ` [RFC 1/8] ARM: add very initial support for Canon DIGIC chips Antony Pavlov
                   ` (7 more replies)
  0 siblings, 8 replies; 17+ messages in thread
From: Antony Pavlov @ 2013-08-26  4:57 UTC (permalink / raw)
  To: barebox

Please don't commit the patches!

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

Changes since the previous (2013-08-04) version:
 * serial console support! (tested on Canon PowerShot A1100 only)
   * Y-Modem works!
 * gpio driver;
 * the serial and gpio driver have device tree support.

With serial console support barebox is a handy tool
for Canon DIGIC register map exploration.

Supported cameras:

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

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

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

The recommended ARM toolchain for barebox and Magic Lantern
build is 'gcc-arm-embedded'
see https://launchpad.net/gcc-arm-embedded/4.7/4.7-2013-q2-update

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

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

1.2 Download and build barebox
    $ git clone -b next.digic.20130826 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 camera.

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_ARM_toolchain_prefix>
<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 Go to your qemu dir and start emulation with ./run_ml_600D.sh
The script will build the 'autoexec.bin' and 'qemu-helper.bin'

2.6 Build barebox image (see paragraph 1.2 Download and build barebox).

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

2.8 run qemu manually in qemu dir:

  <path-to-the-eos-qemu>/qemu-system-arm -M ML-600D

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.20130826 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 the 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
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2013-08-27  6:59 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-08-26  4:57 [RFC 0/8] barebox on Canon cameras: serial console and dts support Antony Pavlov
2013-08-26  4:57 ` [RFC 1/8] ARM: add very initial support for Canon DIGIC chips Antony Pavlov
2013-08-26 13:20   ` Jason Cooper
2013-08-26 18:51     ` Antony Pavlov
2013-08-26 19:47       ` Jason Cooper
2013-08-26 23:32         ` Sebastian Hesselbarth
2013-08-27  1:46           ` Jason Cooper
2013-08-27  4:57             ` Antony Pavlov
2013-08-27  7:00           ` Jürgen Beisert
2013-08-26  4:57 ` [RFC 2/8] serial: add driver for Canon DIGIC UART Antony Pavlov
2013-08-26 13:28   ` Jason Cooper
2013-08-26  4:57 ` [RFC 3/8] gpio: add driver for Canon DIGIC Antony Pavlov
2013-08-26  4:57 ` [RFC 4/8] ARM: DIGIC: add Canon PowerShot A1100 IS support Antony Pavlov
2013-08-26  4:57 ` [RFC 5/8] ARM: DIGIC: add canon-a1100_defconfig Antony Pavlov
2013-08-26  4:57 ` [RFC 6/8] ARM: DIGIC: add csrc-dummy Antony Pavlov
2013-08-26  4:57 ` [RFC 7/8] ARM: DIGIC: add Canon EOS 600D support Antony Pavlov
2013-08-26  4:57 ` [RFC 8/8] ARM: DIGIC: add canon-600d_defconfig Antony Pavlov

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox