Canon EOS 1300D / Rebel T6

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

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

dfort

Quote from: alawiggle on May 02, 2019, 12:49:32 AM
Okay, I see - I hadn't switched to the 1300D branch (it wasn't letting me due to an unsaved commit or something).

Use the -C/--clean option, uncommitted changes are discarded.

hg update -C 1300D

Quote from: alawiggle on May 02, 2019, 12:49:32 AM
Still unsure of the mounting of this sd.img card, it just gives me this:

Have you tried just double clicking on the sd.img file icon? It looks like you have a Linux distribution that is using a different method to mount disk image files. The ROM dumps belong in the ~/qemu-eos/1300D directory. Also note that the dump needs to be patched. Check back on Reply #198 for instructions on how to do this.

alawiggle

Quote from: dfort on May 02, 2019, 04:43:21 AM

Have you tried just double clicking on the sd.img file icon? It looks like you have a Linux distribution that is using a different method to mount disk image files. The ROM dumps belong in the ~/qemu-eos/1300D directory. Also note that the dump needs to be patched. Check back on Reply #198 for instructions on how to do this.

I'm using Windows 10 WSL - which is the problem I think. Can't mount it in windows, it claims it's corrupted. mouning in bash/ubuntu just says unknown filesystem type.

Thanks, I did the -C thing and had already patched the ROM files - Ill figure it out in the morning, should have just used a VM probably would have been easier

critix

For copy to img, use:
./mtools_copy_ml.sh ../magic-lantern/minimal/hello-world/zip/
Canon 1300D, 500D, EOS M, EOS M2

alawiggle

Quote from: critix on May 02, 2019, 09:11:00 AM
For copy to img, use:
./mtools_copy_ml.sh ../magic-lantern/minimal/hello-world/zip/

I didn't have a ML directory yet (I don't think) so did this:

Quote
https://bitbucket.org/hudson/magic-lantern/src/qemu/contrib/qemu/README.rst#rst-header-running-magic-lantern

# from the magic-lantern directory
cd platform/1300D.110
make clean; make
make install

But it throws these errors after make install:

Quote
WARNING: module edmac failed to build, deleting
********************************************************

make[5]: Entering directory '/home/test/magic-lantern/modules/edmac'
[ RM       ]   edmac.o edmac_util.o edmac_test.o md5.o edmac.mo edmac.sym edmac.dep edmac.zip module_strings.h hgdiff.tmp *.o *.d *.dep *.sym hgstamp
make[5]: Leaving directory '/home/test/magic-lantern/modules/edmac'
make[4]: Leaving directory '/home/test/magic-lantern/modules/edmac'
make[3]: Leaving directory '/home/test/magic-lantern/modules'
[ MKDIR    ]   ML directory structure...
cp ../modules/*/*.mo /ML/modules/
cp: cannot stat '../modules/*/*.mo': No such file or directory
Makefile:31: recipe for target 'install' failed
make[2]: *** [install] Error 1
make[2]: Leaving directory '/home/test/magic-lantern/modules'
../../Makefile.inc:27: recipe for target 'CONFIG_MODULES_install' failed
make[1]: *** [CONFIG_MODULES_install] Error 2
make[1]: Leaving directory '/home/test/magic-lantern/platform/1300D.110'
../../Makefile.inc:34: recipe for target 'install' failed
make: *** [install] Error 2

calle2010

I think this is the error if no module was built on install and install_qemu targets.

There's a simple fix for that:

https://bitbucket.org/calle2010/obsolete-magic-lantern/commits/7c425ae2c0d0e17855e4811dcb6ac0ae998dc00f

I think I should create a PR.

Also you can save a lot of time if you add

ML_MODULES=


to your make comand line. It will skip module builds which anyways fail at this stage.

critix

mtools_copy_ml.sh is in qemu directory.
Please read here:
https://www.magiclantern.fm/forum/index.php?topic=2864.msg190596#msg190596
For "Hello Word":
hg update 1300D
cd minimal/hello-world
make MODEL=1300D


make install not work yet on 1300D.
Canon 1300D, 500D, EOS M, EOS M2

alawiggle

Quote from: calle2010 on May 02, 2019, 07:22:22 PM
I think this is the error if no module was built on install and install_qemu targets.

There's a simple fix for that:

https://bitbucket.org/calle2010/obsolete-magic-lantern/commits/7c425ae2c0d0e17855e4811dcb6ac0ae998dc00f

I think I should create a PR.

Also you can save a lot of time if you add

ML_MODULES=


to your make comand line. It will skip module builds which anyways fail at this stage.

Thanks, this helped.



I think I got it, now it's showing this:



Is this normal? Never seen this screen before so it's progress on my end to me. Sorry for the back and forth, I see this info is available it just seems spread out a lot, especially if it's for a camera that isn't working yet -  this is to be expected of course though

critix

If I'm not mistaken, it seems like this error is when you have another version of ROM than the one you work with.
Canon 1300D, 500D, EOS M, EOS M2

alawiggle

Quote from: critix on May 06, 2019, 11:26:58 AM
If I'm not mistaken, it seems like this error is when you have another version of ROM than the one you work with.

Not sure how that can be - ive only used the only one I have?

I was told to comment out the ROM0 size line in model_list.c to fix to - perhaps that's it?

One thing though, I can't get the md5 to match on the ROM0 (I think) - no matter what I do, what SD card size I use, it's always the same md5 and never matches.

calle2010

Quote from: alawiggle on May 02, 2019, 07:56:32 PM
Is this normal?

The model detection error comes up if the computed ROM signature doesn't match the one in fw-signature.h. What did you define there?

At least in the digic6-dumper branch in reboot.c if you compile with CONFIG_QEMU=y it will print in Qemu the expected signature. Just put this to fw-signature.h.

alawiggle

Quote from: calle2010 on May 06, 2019, 07:57:55 PM
The model detection error comes up if the computed ROM signature doesn't match the one in fw-signature.h. What did you define there?

At least in the digic6-dumper branch in reboot.c if you compile with CONFIG_QEMU=y it will print in Qemu the expected signature. Just put this to fw-signature.h.

alex helped me in IRC, apparently I had firmware 1.1.0 / 4.4.7 37(0b) instead of 1.1.0 / 4.4.6 37(0b).

alawiggle

could anyone confirm if this is the right address for this:


NSTUB(0xFE14BCE4,  LightMeasure_n_Callback_r0)              /* present on 7D.203, 5D2.212 */     


Not sure if it's even important for that on the 1300d, but wanna make sure I'm doing this right.

dfort

I'm just doing simple pattern checking but that doesn't look right. What camera are you checking this against? Only the 7D and 5D2 seem to have it.

alawiggle

Quote from: dfort on May 21, 2019, 07:25:43 AM
I'm just doing simple pattern checking but that doesn't look right. What camera are you checking this against? Only the 7D and 5D2 seem to have it.

None - I don't have any other cameras. Alex was saying that it's not used in the 1300D  - he also said they leave stuff in they don't use. I had "found" this stub before I knew that though, so wanted to see if I had the right idea.

alawiggle

I was wondering, is there anyone who knows exactly what needs to happen with this, what I can do (or anyone else) can do to make some progress? I know there's the "next steps" post, but it seems like those are already done - if they aren't, Im not sure what isn't done.

Just want to try and move this along and help any way I can.



atrayan

Though I dont have expertise in reverse Engineering ROMs but yet I tried to dump the ROM which was a pretty easy task....



Now what do I do?

juvo

Hi, is there a ML ROM available for 1300D? I went through the thread but I am bit confused, seems like work in progress, right?

Bringer

Quote from: juvo on June 24, 2019, 10:15:22 PM
Hi, is there a ML ROM available for 1300D? I went through the thread but I am bit confused, seems like work in progress, right?

Same question from me.

dfort

Start reading this topic from the beginning. If you want to get involved download the firmware dumper for this camera and dump the ROM, set up a development environment -- including QEMU, patch the ROM, clone the ML repository and get started. Make sure you also check out the pull requests posted by critix, he has worked on this camera up a point where it is almost ready to run on real hardware.

Quote from: a1ex on January 28, 2019, 12:56:47 PM
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).

If anyone has a deep enough understanding of ARM code to help figure this out then maybe we'll get ML working on this camera.

ROME

Has their been any movement on this ML build since July's post?

vwnut8392

any progress on this? been watching this post all of 2019 to see if a finished version came out.

adamnock

@ROME @vwnut8392

Pending someone with the requisite skill-set becoming involved, its unlikely this will progress any further.

critix

I try to run in qemu ML on 1300D, but when I run ./run_canon_fw.sh 1300D, firmware="boot=1" I get the error
QuoteModel detection error.
If I run ./run_canon_fw.sh 1300D, firmware="boot=0" is ok.
I get the error after I commented on rom0_size in model_list.c
Quote from: a1ex on April 24, 2019, 08:38:35 AM
Comment out rom0_size in model_list.c. Will fix ASAP.
, because I received the error:
Quote[EOS] mirrored data; unique 0x4 bytes repeated 0x800000 times
qemu-system-arm: /home/cristi/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 $*
Canon 1300D, 500D, EOS M, EOS M2