eduperez
0xAF
please share your experience when you compile it in the qemu...
Yes, of course; expect a full guide.
As promised:
Create a VM
- I used Fedora 13 (64 bits) as the "host" OS, and Fedora 14 (32 bits) as the "guest" OS, for no other particular reason that it is what I am used to run; I downloaded the "Fedora 14 Desktop Edition" (32 bit CD ISO) from "http://fedoraproject.org/en/get-fedora-options".
- Basically, I followed the guide at "http://fedoraproject.org/wiki/Virtualization_Quick_Start" to create the virtual machine. Most relevant parameters for the emulation were: 4GB of disk space, 512 MB of RAM, 1 CPU. Select an i686 architecture (should work with a 64b arch, as long as you install a 32b OS) and use KVM if your processor supports it (it is way faster than the non-KVM alternative).
- Boot the VM, using the ISO downloaded previously, and install it to the (virtual) disk drive (there are no critical parameters here, just follow the installation assistant).
Prepare the VM
No special preparation is required here, just update the software:
su -c "yum -y update"
su -c "yum -y update"
Yes: it must be run twice, as the first update will only update the updater itself; then reboot (just the VM) and install the required dependencies:
su -c "yum -y install gcc mpfr-devel libmpc-devel"
Install the cross-compiler
I mostly followed the procedure outlined at "
http://chdk.wikia.com/wiki/Compiling_CHDK_under_Linux" and "
http://chdk.wikia.com/wiki/Gcc433", with some minor variations (installed to "[tt]/opt/arm-elf[/tt]", and changed some parameters to avoid a bug in GCC):
Create the destination directory:
su -c "mkdir /opt/arm-elf".
Install binutils:
wget [url]ftp://ftp.gnu.org/gnu/binutils/binutils-2.21.tar.bz2[/url]
tar xvjf binutils-2.21.tar.bz2
mkdir binutils-2.21-arm-elf
cd binutils-2.21-arm-elf/
../binutils-2.21/configure --srcdir=../binutils-2.21/ --target=arm-elf --prefix=/opt/arm-elf/
make
su -c "make install"
Install gcc:
wget [url]ftp://ftp.gnu.org/gnu/gcc/gcc-4.5.2/gcc-4.5.2.tar.bz2[/url]
tar -xvjf gcc-4.5.2.tar.bz2
Now edit the file "[tt]gcc-4.5.2/gcc/config/arm/t-arm-elf[/tt]" and
uncomment the following lines:
MULTILIB_OPTIONS += mno-thumb-interwork/mthumb-interwork
MULTILIB_DIRNAMES += normal interwork
We can continue the installation:
mkdir gcc-4.5.2-arm-elf
cd gcc-4.5.2-arm-elf/
../gcc-4.5.2/configure --srcdir=../gcc-4.5.2 --target=arm-elf --enable-languages=c --enable-clocale=gnu --disable-libm --disable-libc --disable-threads --disable-nls --disable-libssp --disable-intl --with-dpu=arm9 --with-newlib --prefix=/opt/arm-elf/
su -c "make install"
Compile
Finally, we are ready to download the latest "[tt]autoexec[/tt]" source code, and compile it:
export PATH=/opt/arm-elf/bin/:$PATH
unzip autoexec_2011-01-30.zip
cd autoexec_2011-01-30
make
Go to bed
If everything goes as expected, you will get a new and shiny "[tt]AUTOEXEC.BIN[/tt]" file; now I just need to find
an idiot a brave man willing to
sacrifice his camera test it.