Install build via USB

Started by sonic, May 31, 2013, 03:56:13 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

sonic

Hello!

Do you developers remove the memory card each time you install your autoexec.bin build?

I want to try to implement the HIJACK_CACHE_HACK_*_SIZE_* boot hack to free memory on the 550D. Since this is still quite obscure to me, I'm afraid I have to install many builds until it works. And since I'm too lazy to remove the SD Card each time, I was wondering if anyone else would be interested in something like

ruby contrib/mlusb/write2card.rb platform/550D.109/autoexec.bin autoexec.bin

to transfer a new build via USB to the memory card.
If so, I'd try to implement this. Or are there other ways already?

a1ex

make ptpinstall, but wasn't touched for years...

1%

It was tried months ago... would fail transferring. Loading different bins off the card worked at one point.

sonic

Quote from: 1% on May 31, 2013, 10:19:13 AM
It was tried months ago... would fail transferring. Loading different bins off the card worked at one point.

Oh, it was already done ::)
And it actually works:

sonic@sonic-VGN-Z41WD-B:~/ptp-dir/mweerden-CHDK-5273d12/tools/ptpcam$ ls -lh autoexec.bin
-rwxr-xr-x 1 sonic sonic 453K Mai 31 13:14 autoexec.bin
sonic@sonic-VGN-Z41WD-B:~/ptp-dir/mweerden-CHDK-5273d12/tools/ptpcam$ time echo "upload autoexec.bin B:/ULTEST.BIN" | ./ptpcam --chdk
real    0m18.585s
sonic@sonic-VGN-Z41WD-B:~/ptp-dir/mweerden-CHDK-5273d12/tools/ptpcam$ time echo "download B:/ULTEST.BIN ULTEST.BIN" | ./ptpcam --chdk
real    0m4.162s
sonic@sonic-VGN-Z41WD-B:~/ptp-dir/mweerden-CHDK-5273d12/tools/ptpcam$ diff ULTEST.BIN autoexec.bin
sonic@sonic-VGN-Z41WD-B:~/ptp-dir/mweerden-CHDK-5273d12/tools/ptpcam$


...but only with this autoexec.bin binary from Alex. Where might be the source code for it?

sonic


sonic

Quote from: sonic on May 31, 2013, 04:51:07 PM
Never mind, got it :)

...at least the upload. The download has strange difference patterns. I already tried to shrink BUF_SIZE to 32 bytes, FIO_WriteFile() at the same time (works correct) and msleep(10) after send_data(). Strange things going on with the latter. I wonder what the difference from the current repository to the correctly working version magiclantern-2011Mar11.550d.fw109.AudioMon.PTP.alex.zip is...

a1ex

You may need to allocate the buffers with alloc_dma_memory / free_dma_memory, this should fix it. Make them larger too.

sonic

Quote from: a1ex on June 03, 2013, 09:02:55 AM
You may need to allocate the buffers with alloc_dma_memory / free_dma_memory, this should fix it.

It works :D I also thought about this, but saw that only the filename was allocated this way in PTP_CHDK_UploadFile.
Pull requested.

Quote from: a1ex on June 03, 2013, 09:02:55 AM
Make them larger too.

Testing 128K...

sonic

Quote from: sonic on June 03, 2013, 12:33:25 PMTesting 128K...

Wow:


sonic@sonic-VGN-Z41WD-B:~/ML/sonic74/magic-lantern/platform/550D.109$ ls -lh autoexec.bin
-rwxrwxr-x 1 sonic sonic 523K Jun  3 12:41 autoexec.bin
sonic@sonic-VGN-Z41WD-B:~/ML/sonic74/magic-lantern/platform/550D.109$ time cat ../../src/ptpcam.txt | ptpcam --chdk
real    0m1.257s


:D

a1ex

Too slow... a USB 3 card reader is faster

:P