lazyzero / kkMulticopterFlashTool

The kkflashtool is a easy to use tool to flash all kind of Atmel based RC equipment.
kkflashtool.de
GNU General Public License v3.0
24 stars 6 forks source link

strip linux avrdude executables #1

Open jim-perkins opened 10 years ago

jim-perkins commented 10 years ago

I noticed the linux avrdude executables you supply with the tool are not stripped. This will reduce the size of the files. I just run 'strip avrdude' but I believe it can be incorporated into the Makefile.

I am considering making a bootable iso that includes open source RC tools, and this tool is on my list

lazyzero commented 10 years ago

It is not in the makefile of avrdude. If I am right it removes only unneeded parts like debug informations. I'll test it and will consider if I will strip them in future.

I like the idea of such a live system. But my tool will need write access in the folder it runs to work

jim-perkins commented 10 years ago

Hi I looked around the latest svn of avrdude.
You are right the stripping the file removes the debug information and symbols. On the latest svn stripping the binary reduces the size from 1.6MB to 417KB

the Makefile strips the binary during the 'install' process sudo make install ( just installs the binaries, doesnt strip them) sudo make install-strip (strips the binaries before it installs them)

usually when I dont use 'make install' is just run 'strip avrdude' from the command line

It appears avrdude is in the flash tool 10 times. I am working on reducing the footprint in the live system. Yes it will have write access in the folder it runs.

/trunk/lib/avrdude/linux64/avrdude ./trunk/lib/avrdude/linux/usbtiny/avrdude ./trunk/lib/avrdude/linux/avrdude ./trunk/lib/avrdude/mac/usbtiny/avrdude ./trunk/lib/avrdude/mac/avrdude ./trunk/test/lib/avrdude/linux64/avrdude ./trunk/test/lib/avrdude/linux/usbtiny/avrdude ./trunk/test/lib/avrdude/linux/avrdude ./trunk/lib/avrdude/windows/usbtiny/avrdude.exe ./trunk/lib/avrdude/windows/avrdude.exe

jim-perkins commented 10 years ago

linux script that reduces the size of the zip file and the files needed to run the program by 75%. probably isnt a big deal in most situations. works on the svn as well as the release version. Works on 32 and 64 bit linux. Deleted all the Mac and Windows stuff. strips the avrdude binaries

reduces by: zip 7.6M to 1.9M unzipped 17M to 4.5M


!/bin/sh

REMOVELIST=".classpath build.xml librxtxSerial.dynlib libgwin32 lib/win64 lib/SVN lib/avrdude/windows lib/avrdude/mac \ .gitignore kkflashtool_win32_template.exe4j kkflashtool_win32.exe .project macOSX .settings \ kkflashtool_win64_template.exe4j kkflashtool_win64.exe resources librxtxSerial.jnilib src" for each in $REMOVELIST do rm -rf $each done
AVRDUDELIST=$(find ./ -type f -name avrdude) for each in $AVRDUDELIST do strip $each done

-----------------------------------