Linux on your Canon DSLR? Why not?

Started by a1ex, April 01, 2015, 08:00:24 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

g3gg0

On the road atm.

Yeah decompressor is working fine. Kernel is at the correct position and booting fine.
I think its related to config_dram_base which I set to the whole memory.
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

Albert

g3gg0: I realized this later,  after making my post. That's where my knowledge plateaus.

g3gg0

Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

g3gg0

okay thats the MPU set up i use:

void setup_mpu(void)
{
    asm(
        /* 0: basic setup: 4 GiB of addressable memory */
        "MOV     R0, #0x0000003F\n"
        "MCR     p15, 0, R0, c6, c0, 0\n"
       
        /* 1: flash: 16 MiB of addressable flash memory */
        "MOV     R0, #0xF8000000\n"
        "ORR     R0, #0x0000002F\n"
        "MCR     p15, 0, R0, c6, c1, 0\n"
       
        /* 2: I/O: 512 MiB of memory mapped IO devices */
        "MOV     R0, #0xC0000000\n"
        "ORR     R0, #0x00000039\n"
        "MCR     p15, 0, R0, c6, c2, 0\n"
       
        /* 3: uncached RAM: 1 GiB of addressable memory */
        "MOV     R0, #0x40000000\n"
        "ORR     R0, #0x0000003B\n"
        "MCR     p15, 0, R0, c6, c3, 0\n"
       
        /* disable 4-7 */
        "MOV     R0, #0x00\n"
        "MCR     p15, 0, R0, c6, c4, 0\n"
        "MCR     p15, 0, R0, c6, c5, 0\n"
        "MCR     p15, 0, R0, c6, c6, 0\n"
        "MCR     p15, 0, R0, c6, c7, 0\n"
       
        /* cacheable/bufferable bits: enable 0 and 1, disable others */
        "MOV     R0, #0x03\n"
        "MCR     p15, 0, R0, c2, c0, 0\n"
        "MCR     p15, 0, R0, c2, c0, 1\n"
        "MCR     p15, 0, R0, c3, c0, 0\n"
       
        /* access permissions: allow all */
        "MOV     R0, #0x33\n"
        "ORR     R0, R0, LSL#0x08\n"
        "ORR     R0, R0, LSL#0x10\n"
        "MCR     p15, 0, R0, c5, c0, 2\n"
        "MCR     p15, 0, R0, c5, c0, 3\n"
       
        /* enable MPU */
        "MRC     p15, 0, R0, c1, c0, 0\n"
        "ORR     R0, R0, #1\n"
        "MCR     p15, 0, R0, c1, c0, 0\n"
       
        : : : "r0"
    );
}


basically i had to add it to
- loader
- uncompressor
- linux kernel

still the same problem with start_task ending up at PABT exception in qemu as you reported.
weird, i cannot even breakpoint when reaching it (i am using IDA and qemu's GDB interface)
Help us with datasheets - Help us with register dumps
magic lantern: 1Magic9991E1eWbGvrsx186GovYCXFbppY, server expenses: [email protected]
ONLY donate for things we have done, not for things you expect!

Albert

Well anyways, I'm quite thrilled by the prospects of this newfound kernel booting stuff. I don't think anyone can predict just how it'll impact ML over the next few years, but I'm thinking it'll be for the better.

kitor

Link to download from first post does not work. Nslookup says that upload.g3gg0.de does not exist in dns (g3gg0.de does)
Too many Canon cameras.
If you have a dead R, RP, 250D mainboard (e.g. after camera repair) and want to donate for experiments, I'll cover shipping costs.

blackghr

Link to download from first post does not work.g3gg0.de how make a build

far.in.out

Anyone still working on this?
Had to post here to receive notifications (can't find the subscribe button).
EOS M (was 600D > 50D)

ElectricImages

I'm hoping to get started on this soon.   Might need to find another camera to test on though, as my existing equipment is used for commercial work, and I can't afford to have anything "bricked" - even temporarily!

krisc

Getting other OS (kernel) on DSLR is a quite an achievement - congratulations!
Linux kernel seems to be rather optimal for servers. I am looking at other kernels that optimized for ARM CPUs.
1. STlinux.com - I am going to try it on my autonomous robot which controls telescope DIY AZ mount. By the way currently the system is simple round robin event driven scheduler on ARM328p.
2. minix3.org - it has been around for many years, now is minix3. I used it in 1990s for OEM controller development
3. http://www.oberon.ethz.ch - amazing OS. Very small kernel for diskless workstations. In 1980s, when it was devised, I build machine running on 6809 CPU, do not know what my employer at that time did with it ????
4. Nokia's SYMBIAN - not sure if source or specification is available, The most efficient/fastest embedded OS ever developed. Nokia development team is very friendly, so something may be negotiated???? ( I am not talking about Microsoft )

It is just food for thought .... Not sure which way I will go yet for my EOS-M as astro cam.


jc

Hi team

So not sure how development of Linux on canon dslr's is going but one huge problem at the moment must be any sort of IO .. Even keyboard input must be currently impossible and this I guess makes debugging tricky ?

One possible way to let IO would be to use a wifi card like so :

http://hackaday.com/2015/08/15/hacking-an-sd-slot-for-wifi/

You could then remotely save files onto the card, and the OS could check for changes and run the issues commands ? A possibility at least

Looking forward to what Linux on a dslr can eventually do !

J