Author Topic: Install build via USB  (Read 6499 times)

sonic

  • New to the forum
  • *
  • Posts: 23
  • 550D
Install build via USB
« on: May 31, 2013, 03:56:13 AM »
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

Code: [Select]
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 10439
  • 5D Mark Free
Re: Install build via USB
« Reply #1 on: May 31, 2013, 06:46:07 AM »
make ptpinstall, but wasn't touched for years...

1%

  • Developer
  • Hero Member
  • *****
  • Posts: 5936
  • 600D/6D/50D/EOSM/7D
Re: Install build via USB
« Reply #2 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.

sonic

  • New to the forum
  • *
  • Posts: 23
  • 550D
Re: Install build via USB
« Reply #3 on: May 31, 2013, 02:14:37 PM »
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:
Code: [Select]
[email protected]:~/ptp-dir/mweerden-CHDK-5273d12/tools/ptpcam$ ls -lh autoexec.bin
-rwxr-xr-x 1 sonic sonic 453K Mai 31 13:14 autoexec.bin
[email protected]:~/ptp-dir/mweerden-CHDK-5273d12/tools/ptpcam$ time echo "upload autoexec.bin B:/ULTEST.BIN" | ./ptpcam --chdk
real    0m18.585s
[email protected]:~/ptp-dir/mweerden-CHDK-5273d12/tools/ptpcam$ time echo "download B:/ULTEST.BIN ULTEST.BIN" | ./ptpcam --chdk
real    0m4.162s
[email protected]:~/ptp-dir/mweerden-CHDK-5273d12/tools/ptpcam$ diff ULTEST.BIN autoexec.bin
[email protected]:~/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

  • New to the forum
  • *
  • Posts: 23
  • 550D
Re: Install build via USB
« Reply #4 on: May 31, 2013, 04:51:07 PM »
Where might be the source code for it?

Never mind, got it :)

sonic

  • New to the forum
  • *
  • Posts: 23
  • 550D
Re: Install build via USB
« Reply #5 on: June 03, 2013, 02:10:49 AM »
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

  • Administrator
  • Hero Member
  • *****
  • Posts: 10439
  • 5D Mark Free
Re: Install build via USB
« Reply #6 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. Make them larger too.

sonic

  • New to the forum
  • *
  • Posts: 23
  • 550D
Re: Install build via USB
« Reply #7 on: June 03, 2013, 12:33:25 PM »
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.

Make them larger too.

Testing 128K...

sonic

  • New to the forum
  • *
  • Posts: 23
  • 550D
Re: Install build via USB
« Reply #8 on: June 03, 2013, 12:50:46 PM »
Testing 128K...

Wow:

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

:D

a1ex

  • Administrator
  • Hero Member
  • *****
  • Posts: 10439
  • 5D Mark Free
Re: Install build via USB
« Reply #9 on: June 03, 2013, 01:38:34 PM »
Too slow... a USB 3 card reader is faster

:P