Canon EOS 1300D / Rebel T6

Started by the12354, October 03, 2016, 11:51:34 AM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Walter Schulz

Quote from: Rebel99 on March 07, 2019, 07:56:10 PM
So i wanted to ask when it will be available.

ML project has no schedule, no master plan, no release dates, no milestones. Therefore your question doesn't make sense.

Quote from: Rebel99 on March 07, 2019, 07:56:10 PM
And i am new here but do you think that i can help you. If yes how
Can i do it?

Begin with sticky tweet: https://twitter.com/autoexec_bin

critix

Quote from: a1ex on January 28, 2019, 12:56:47 PM
I'll try, but the solution is not straightforward.
....
Now, the hard part - clean up the code and commit it :D

Still need to find a general solution for patching arbitrary functions in Canon code (i.e. to implement long jump support in the patch manager).
Alex, you have not succeeded to find solution for patching arbitrary functions?
It seems that without being able to solve this part, it can not go further with ML to 1300D, 2000D ...
Thanks
Canon 1300D, 500D, EOS M, EOS M2

three_legs

Just found out about this project. I'll see what I can do about the patcher. Any info on the CPU ?


cbbrowne

Quote from: Rebel99 on March 07, 2019, 07:56:10 PM
Hello i have a 1300d and i have watched this thread for 2 years
Theres unfortunatelly still no magic lantern available for my cam.
So i wanted to ask when it will be available.
And i am new here but do you think that i can help you. If yes how
Can i do it?
Thanks for your reply beforly

Well, given that the project takes place based on the efforts of volunteers, the straight answer is that ML/1300D will be available whenever it is ready, and not before.

There is certainly no schedule to be expected on the matter.

The recent discussions are showing that there are some peculiarities about the 1300D platform leading to confusing results.  It sure would be nice if some "silver bullet" falls out that solves problems for this as well as other cameras, but it isn't going to happen until it all gets figured out. 

alawiggle

I have qemu installed in Windows 10 WSL, Ubuntu - trying to run ./run_canon_fw.sh 1300D

without sudo it just says can't find ROM0.BIN

with sudo it says this:

Quote
DebugMsg=0xFE11F394 (from GDB script)
Lockdown read 1
Lockdown read 1
Lockdown read 0
Lockdown read 0
Lockdown read 2
Lockdown read 2
Lockdown read 3
Lockdown read 3
Lockdown read 4
Lockdown read 4
Lockdown read 5
Lockdown read 5
00000000 - 00000FFF: eos.tcm_code
40000000 - 40000FFF: eos.tcm_data
00001000 - 0FFFFFFF: eos.ram
40001000 - 4FFFFFFF: eos.ram_uncached
F0000000 - F1FFFFFF: eos.rom0
F2000000 - F3FFFFFF: eos.rom0_mirror
F4000000 - F5FFFFFF: eos.rom0_mirror
F6000000 - F7FFFFFF: eos.rom0_mirror
F8000000 - F9FFFFFF: eos.rom1
FA000000 - FBFFFFFF: eos.rom1_mirror
FC000000 - FDFFFFFF: eos.rom1_mirror
FE000000 - FFFFFFFF: eos.rom1_mirror
C0000000 - CFFFFFFF: eos.mmio
[EOS] loading './1300D/ROM0.BIN' to 0xF0000000-0xF1FFFFFF
[EOS] mirrored data; unique 0x4 bytes repeated 0x800000 times
qemu-system-arm: /home/test/qemu-eos/qemu-2.5.0/hw/arm/../eos/eos.c:407: check_rom_mirroring: Assertion `0' failed.
./run_canon_fw.sh: line 153:   988 Aborted                 (core dumped) env QEMU_EOS_DEBUGMSG="$QEMU_EOS_DEBUGMSG" $QEMU_PATH/arm-softmmu/qemu-system-arm -drive if=sd,format=raw,file=sd.img -drive if=ide,format=raw,file=cf.img -chardev socket,server,nowait,path=qemu.monitor$QEMU_JOB_ID,id=monsock -mon chardev=monsock,mode=readline -name $CAM -M $*

I'm not sure how to fix this. Any ideas?

a1ex

Very good catch; there's no ROM0 on 1300D. Why did I think otherwise?! [my old dump has some valid strings, apparently copied or shadowed from ROM1, that's why.]

Comment out rom0_size in model_list.c. Will fix ASAP.

Regarding sudo - check permissions of your ROM files. Maybe something happens when copying them from the card (or when they cross the Windows/Linux barrier). I've only tested WSL on virtual machines, without giving them access to a real SD card.

alawiggle

Quote from: a1ex on April 24, 2019, 08:38:35 AM
Very good catch; there's no ROM0 on 1300D. Why did I think otherwise?! [my old dump has some valid strings, apparently copied or shadowed from ROM1, that's why.]

Comment out rom0_size in model_list.c. Will fix ASAP.

Regarding sudo - check permissions of your ROM files. Maybe something happens when copying them from the card (or when they cross the Windows/Linux barrier). I've only tested WSL on virtual machines, without giving them access to a real SD card.

Okay, now I get this - does this seem correct for where I'm at?

Quote
./run_canon_fw.sh 1300D &

DebugMsg=0xFE11F394 (from GDB script)
Lockdown read 1
Lockdown read 1
Lockdown read 0
Lockdown read 0
Lockdown read 2
Lockdown read 2
Lockdown read 3
Lockdown read 3
Lockdown read 4
Lockdown read 4
Lockdown read 5
Lockdown read 5
00000000 - 00000FFF: eos.tcm_code
40000000 - 40000FFF: eos.tcm_data
00001000 - 0FFFFFFF: eos.ram
40001000 - 4FFFFFFF: eos.ram_uncached
F8000000 - F9FFFFFF: eos.rom1
FA000000 - FBFFFFFF: eos.rom1_mirror
FC000000 - FDFFFFFF: eos.rom1_mirror
FE000000 - FFFFFFFF: eos.rom1_mirror
C0000000 - CFFFFFFF: eos.mmio
[EOS] loading './1300D/ROM1.BIN' to 0xF8000000-0xF9FFFFFF
[MPU] warning: non-empty spell #11 (PROP_CARD2_STATUS) has duplicate(s): #52
[MPU] warning: non-empty spell #20 (PROP_TFT_STATUS) has duplicate(s): #37 #38 #75
[MPU] warning: non-empty spell #35 (PROP_VIDEO_MODE) has duplicate(s): #36
[MPU] warning: non-empty spell #43 (PROP_TFT_STATUS) has duplicate(s): #41 #42 #44 #46

[MPU] Available keys:
- Arrow keys   : Navigation
- [ and ]      : Main dial (top scrollwheel)
- SPACE        : SET
- DELETE       : guess (press only)
- M            : MENU (press only)
- P            : PLAY (press only)
- I            : INFO/DISP (press only)
- Q            : guess (press only)
- L            : LiveView (press only)
- A            : Av
- Z/X          : Zoom in/out
- Shift        : Half-shutter
- 0/9          : Mode dial (press only)
- V            : Movie mode (press only)
- B            : Open battery door
- C            : Open card door
- F10          : Power down switch
- F1           : show this help

gtk initialization failed
[MPU] WARNING: forced shutdown.

For clean shutdown, please use 'Machine -> Power Down'
(or 'system_powerdown' in QEMU monitor.)

critix

Canon 1300D, 500D, EOS M, EOS M2

alawiggle

Quote from: critix on April 24, 2019, 04:54:26 PM
You need Xming installed in windows and turned on.
https://sourceforge.net/projects/xming/
or
http://www.straightrunning.com/XmingNotes/
Then run again.

Nice thanks - I'm gonna reread the thread and try and catch up to where it currently is - or is this where it currently is?

alawiggle

What's the next move on this? I'm willing to do whatever on my T6 - I bought it specifically as a camera that I don't have to worry about (I already had the T6i). I got the GUI up and working in QEMU, wondering what to do next though.

dfort

Quote from: alawiggle on April 30, 2019, 02:19:40 AM
What's the next move on this?

This camera is stuck on trying to generate a startup log. Something to do with making "long jumps" in ARM code. Read replies #120, #230 and #297 to get a deeper understanding of the problem.

Seems like every camera has its own particular quirks. Read through the ML on EOS-M2 topic for some good tips. Note that we ran into several issues on that camera. At one point I was ready to give up but eventually we (well mostly a1ex) got it working on the camera.

Also note that we had some "long jump" issues recently on the 7D so you might want to check out how that one was solved on the 12-bit (and 10-bit) RAW video development discussion.

alawiggle

Quote from: dfort on April 30, 2019, 04:22:42 AM
This camera is stuck on trying to generate a startup log. Something to do with making "long jumps" in ARM code. Read replies #120, #230 and #297 to get a deeper understanding of the problem.

Seems like every camera has its own particular quirks. Read through the ML on EOS-M2 topic for some good tips. Note that we ran into several issues on that camera. At one point I was ready to give up but eventually we (well mostly a1ex) got it working on the camera.

Also note that we had some "long jump" issues recently on the 7D so you might want to check out how that one was solved on the 12-bit (and 10-bit) RAW video development discussion.

Mine can move through the menus, is that about right? I guess I'm trying to see how i get to that post someone had of hello world showing on the screen? or is that even relevant at the moment

dfort

Yes, all that works--emulation in QEMU, Hello World. The problem is when trying to create a startup log using ML. Without being able to do that is it not possible to get some of the addresses needed to continue the port. Read through the EOSM2 discussion to see why that is so important. I'm currently away from home on a vacation and don't have time to re-read all of it and point out specific posts.

alawiggle

Quote from: dfort on April 30, 2019, 02:09:27 PM
Yes, all that works--emulation in QEMU, Hello World. The problem is when trying to create a startup log using ML. Without being able to do that is it not possible to get some of the addresses needed to continue the port. Read through the EOSM2 discussion to see why that is so important. I'm currently away from home on a vacation and don't have time to re-read all of it and point out specific posts.

How do I get hello world working? I've read this entire thread, but feel like I'm missing a step - it seems to hinge on using another branch to form off of? Or it hints at having magic lantern already installed?

Sorry, I really have read the guides - they seem to, understandably, focus on cameras where ML already works and I don't have another camera to see how it's "supposed" to work

critix

For run "Hello Word" try this (of course, from qemu):
Quote from: a1ex on August 20, 2018, 09:53:25 PM
Hopefully done; I could finally compile the installer and other minimal examples!


cd minimal/hello-world
make MODEL=1300D clean
make MODEL=1300D install_qemu CONFIG_QEMU=y

Canon 1300D, 500D, EOS M, EOS M2

alawiggle

Quote from: critix on April 30, 2019, 05:13:46 PM
For run "Hello Word" try this (of course, from qemu):

I tried that, but I get this:

Quote
test@Nicolas:~/magic-lantern/minimal/hello-world$ make MODEL=1300D clean
../../platform/Makefile.platform.base:19: FW_VERSION for 1300D is not defined
../../platform/Makefile.platform.base:60: *** ROMBASEADDR is not defined.  Stop.
test@Nicolas:~/magic-lantern/minimal/hello-world$

I'm thinking I need to make a directory called 1300D.110 in platform, but unsure what should go into it.

critix

Yes, create directory 1300D in minimal, and in this directory create file "Makefile" with this:
MODEL=1300D
include ../Makefile.minimal

Then run again.
Canon 1300D, 500D, EOS M, EOS M2

alawiggle

Quote from: critix on April 30, 2019, 06:11:12 PM
Yes, create directory 1300D in minimal, and in this directory create file "Makefile" with this:
MODEL=1300D
include ../Makefile.minimal

Then run again.

Same error - it doesn't have anything to do with Makefile.platform.base ?

Is there code I could just pull that has all this up to that point?

dfort

@alawiggle - looks to me like you are not on the right branch. Make sure you are using the 1300D branch:

cd ~/magic-lantern
hg update 1300D
cd minimal/hello-world
make MODEL=1300D


Next copy the autoexec.bin from the onto the QEMU sd card. I'm on a Mac so I just double click qemu-eos/sd.img, drag in autoexec.bin into the root directory, eject the virtual card and run it.

cd ~/qemu-eos
./run_canon_fw.sh 1300D,firmware="boot=1" -d debugmsg


@critix - I've been meaning to getting around to merging your pull requests for the 1300D and 4000D but want to come up with a strategy. What do you think, make a new 4000D branch or a new digic4+ branch? Just adding the 4000D code into the 1300D branch would probably be confusing.

critix

I think it would be better to create a new digic4+ branch because the 1300D is not the only digic4+.
Canon 1300D, 500D, EOS M, EOS M2

dfort

Sounds good. I'm still on vacation so let's take care of this next week.

alawiggle

Quote from: dfort on May 01, 2019, 02:23:17 PM
@alawiggle - looks to me like you are not on the right branch. Make sure you are using the 1300D branch:

cd ~/magic-lantern
hg update 1300D
cd minimal/hello-world
make MODEL=1300D


Next copy the autoexec.bin from the onto the QEMU sd card. I'm on a Mac so I just double click qemu-eos/sd.img, drag in autoexec.bin into the root directory, eject the virtual card and run it.

Maybe this is where I'm lost - thus far I've just been using the ROM dumps that the FIR file gives me. I'm gonna try uninstalling the whole thing and starting new. I'll try and put the steps I've taken that way if anything seems wrong i can pinpoint which it is.

alawiggle

Quote from: dfort on May 01, 2019, 02:23:17 PM
@alawiggle - looks to me like you are not on the right branch. Make sure you are using the 1300D branch:

cd ~/magic-lantern
hg update 1300D
cd minimal/hello-world
make MODEL=1300D


Next copy the autoexec.bin from the onto the QEMU sd card. I'm on a Mac so I just double click qemu-eos/sd.img, drag in autoexec.bin into the root directory, eject the virtual card and run it.


Reinstalled everything - when I run "hg update 1300D" it just says "abort: uncommitted changes
(commit or update --clean to discard changes)"

Which I guess means I'm up to date, but I get the same errors as before "../../platform/Makefile.platform.base:19: FW_VERSION for 1300D is not defined
../../platform/Makefile.platform.base:60: *** ROMBASEADDR is not defined.  Stop."

So must have something to do with that sd card thing?

alawiggle

Okay, I see - I hadn't switched to the 1300D branch (it wasn't letting me due to an unsaved commit or something).

Still unsure of the mounting of this sd.img card, it just gives me this:

Quote
test@Nicolas:~/qemu-eos$ sudo ./mount.sh
This will mount sd.img and cf.img as a loopback device.
Please enter your password (of course, after reviewing what this script does).
Kernel not configured for semaphores (System V IPC). Not using udev synchronisation code.
/dev/mapper/control: open failed: No such device
Failure to communicate with kernel device-mapper driver.
Check that device-mapper is available in the kernel.
Incompatible libdevmapper 1.02.145 (2017-11-03) and kernel driver (unknown version).
device mapper prerequisites not met
Kernel not configured for semaphores (System V IPC). Not using udev synchronisation code.
/dev/mapper/control: open failed: No such device
Failure to communicate with kernel device-mapper driver.
Check that device-mapper is available in the kernel.
Incompatible libdevmapper 1.02.145 (2017-11-03) and kernel driver (unknown version).
device mapper prerequisites not met
Done.
To remove the device mappings, run:
   sudo kpartx -dv sd.img
   sudo kpartx -dv cf.img