Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strip linux avrdude executables #1

Open
jim-perkins opened this issue Feb 1, 2014 · 3 comments
Open

strip linux avrdude executables #1

jim-perkins opened this issue Feb 1, 2014 · 3 comments

Comments

@jim-perkins
Copy link

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
Copy link
Owner

lazyzero commented Feb 1, 2014

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
Copy link
Author

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
Copy link
Author

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

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

@jim-perkins jim-perkins reopened this Feb 3, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants