Monday, March 22, 2010

ARM-Cortex cross compiler on MAC

Use MacPorts and add:
  • gmp (GNU multiple precision arithmetic library)
  • mpfr (C library for multiple-precision floating-point computations)
Download latest versions of gcc, binutils, and newlib. Note that GCC has to be of version 4.3 or newer to include support for newer Cortex CPU's.

$ cd binutils-2.20
$ mkdir build
$ cd build/
$ ../configure --target=arm-none-eabi --prefix=/opt/arm-none-eabi --enable-interwork --enable-multilib --with-gnu-as --with-gnu-ld --disable-nls --disable-werror
…
$ make -j2
…
$ sudo make install
…
$ cd ../..
$ PATH=/opt/arm-none-eabi/bin/:$PATH
$ cd gcc-4.4.3
$ mkdir build
$ cd build/
$ ../configure --with-libiconv-prefix=/opt/local --target=arm-none-eabi --prefix=/opt/arm-none-eabi --enable-interwork --enable-multilib --enable-languages="c" --with-newlib --without-headers --disable-shared --with-gnu-as --with-gnu-ld --with-gmp=/opt/local --with-mpfr=/opt/local --disable-werror
…
$ make -j2 all-gcc
…
$ sudo make install-gcc
…
$ cd ../..
$ cd newlib-1.18.0
$ mkdir build
$ cd build/
$ ../configure --target=arm-none-eabi --prefix=/opt/arm-none-eabi --enable-interwork --enable-multilib --with-gnu-as --with-gnu-ld --disable-nls
…
$ make -j2
…
$ sudo make install
…
$ cd ../..
$ cd gcc-4.4.3
$ cd build
$ ../configure --with-libiconv-prefix=/opt/local --target=arm-none-eabi --prefix=/opt/arm-none-eabi --enable-interwork --enable-multilib --enable-languages="c" --with-newlib --disable-shared --with-gnu-as --with-gnu-ld --with-gmp=/opt/local --with-mpfr=/opt/local --disable-werror
…
$ make
 -j2
…
$ sudo make install

…

Sunday, March 14, 2010

No valid VPN secrets


The VPN connection 'xxxxx' failed because there were no valid VPN secrets

You get this message if you have installed openvpn or vpnc in Ubuntu and haven't restarted the network manager. The error is due to GNOME keyring manager cannot find your password in the keyring due to an incomplete configuration. Just restart network manager and you are all set.

hl@braoha:~$ sudo aptitude install network-manager-vpnc
hl@braoha:~$ sudo /etc/init.d/network-manager restart