...your main source of everything AVR32 Linux

Navigation

FrankBennett - 06 Jun 2007

My AVR32 Build Notes:

I'm up (minicom 115200 8N1)

~ # uname -a
Linux ngw.example.net 2.6.18-atngw #1 Fri Apr 27 13:45:58 CEST 2007 avr32 unknown
~ # ls
bin      etc      linuxrc  mnt      sys      usr      x
config   home     list     proc     tmp      var
dev      lib      media    sbin     uImage   www
~ # df
Filesystem           1k-blocks      Used Available Use% Mounted on
/dev/root                 8000      6572      1428  82% /
dev                      15468         0     15468   0% /dev
tmp                      15468         0     15468   0% /tmp
run                      15468         0     15468   0% /var/run
samba                    15468         0     15468   0% /var/lib/samba
log                      15468        12     15456   0% /var/log
/dev/mtdblock3            8448      8180       268  97% /usr
/dev/mmcblk0p1          246912       576    246336   0% /x
~ # lsmod
Module                  Size  Used by    Not tainted
atmel_mci               7808  0
mmc_block               4712  2
mmc_core               15056  2 atmel_mci,mmc_block
vfat                    8288  1
fat                    36668  1 vfat

Need to be sure I have a backup image before I putz with the Network setup.

My Previous Embedded Project Methods

  • Power PC - MPC5200, Linux-2.4.25
  • Cross_tool set - Denx - Embedded Linux Development Kit (ELDK)
    • ppc-linux-gcc, etc.
    • x86 server
      • cross_tools
      • tftp
      • NFS server
      • subversion
      • gedit for non-vi folks
  • u-boot (/dev/mtd0)
    • JTAG programmed (BDI2000) via tftp
    • env shared with Linux
  • kernel (/dev/mtd1)
    • u-boot programmed via tftp
  • rootfs - user space (/dev/mtd2)
    • NFS mounted for application/driver development (BIG)
      • application developed without reboot
      • drivers initially modules
    • target rootfs
      • used denmkrootfs script (mostly mkdir, cp) to copy BIG NFS fs to small rootfs
      • jffs2 small rootfs -> image
      • ftp image to target
      • linux cp image /dev/mtd2
      • change u-boot env, reboot
    • applications
      • Embedded web appliance
        • Configure Wizard
        • mini-http (boa didn't support authenication)
      • busybox
      • Data Acquisition
      • Floating Point Flow calculations
      • Legacy LCD, 5 button user I/F
      • Posix Threads, shm
  • app info (/dev/mtd3)
    • mounted to rootfs
    • application: open, read, write, close
    • error log & config data, ftp access
  • env (/dev/mtd4)
    • shared between u-boot & linux
    • setenv, printenv
    • IP address, netmask, etc

T2 Build Adventure

  • LinuxDevices T2 Intro
  • T2 home page
  • T2 Online Howto Book
  • svn co http://svn.exactcode.de/t2/trunk t2-trunk
  • working in /opt/avr32/svn/t2-trunk
    • svn st to see whatś new or changed
  • needed, fairly new, packages on build machine
    • autoconf, automake, make
    • ncurses
    • curl
    • bison, flex
    • makeinfo (texinfo)
  • ./scripts/Config
    • select Generic embedded, avr32, cross build
    • annoying how the config window goes away, then comes back!
  • ./scripts/Download -required
  • ./scripts/Build-Target
    • cross-tools - built
    • Building filesystem/squashfs-tools [3.2 7.0-trunk] trouble
      • did a - ./scripts/Emerge-Pkg libz
      • fixed the build ( missing libz dependency? )
  • ./scripts/Build-Target ....
  • T2 currently set up for full system local or cross build, embedded little support, no:
    • u-boot
    • busybox
  • I like buildroot best so far (more below)

Atmel git repos:

git clone git://www.atmel.no/~hskinnemoen/linux/kernel/avr32.git
works to clone a local copy of the kernel
git clone git://www.atmel.no/~hskinnemoen/linux/u-boot/avr32.git
works to clone a local copy of u-boot

BSP-CD build-linux-environment.sh Notes

  • build_u-boot/ avr32-makefile-modifications.patch:
    • was +CROSS_COMPILE = avr32-
    • sb +CROSS_COMPILE = avr32-linux-
    • and might be good idea to wrap with
      • ifndef CROSS_COMPILE
    • this fixes build-uboot
  • build_flash_upgrade - broke!
  • what rebuild u-boot again?...woof !
  • build_uclibc - broke!
  • build_kernel - broke!
  • Forget this script

buildroot - part of uclibc project

  • BuildRoot website
  • trying: revision 18803
  • partial avr32 support, active : svn co svn://uclibc.org/trunk/buildroot
    • no board selection yet
    • need config sub-menu for u-boot, linux kernel (make menuconfig)
  • like:
    • Configuration menu is responsive & doesn't go away for each selection
    • downloads selected tool version, only if it hasn't been download before
    • applies patches to supported tool versions
  • make menuconfig - select :
    • Target Arch (avr32)
    • GNU target suffix (linux) ??
    • Toolchain Options -> like how you can select tool versions :
      • Linux 2.6.20
      • uClinc 0.9.29
      • binutils 2.16.1-atmel.0.99.2
        • after changing toolchain/binutils/Config.in
        • adding atmel path toolchain/binutils/binutils.mk
      • worked !
    • toolchain/gcc - tried to add gcc 4.0.2a
      • 4.0.2/ has a bunch of patches
      • the gcc-4.0.2-atmel patch is relative to 4.0.2 also
      • need to get gcc-4.0.2 from gcc, but the patch from atmel
    • bottom line - merging patches, for different architectures is complicated
    • buildroot approach has patches in svn distribution
    • I hate working with patches...wonder if git solves this arch/revision/branch problem
    • Atmel or an avr32 interest group need to have a way of an auto checkout & build process
      • or have a complete set of patched tool versions available via wget

buildroot-avr32 (Atmel's Haavard's work)

yes, a promising automatic build script similar to DENX ELDK

https://avr32linux.org/twiki/pub/Main/HaavardSkinnemoen/buildroot-avr32.tar.gz (the patch file has an older date than the file??)

$ tar zvtf buildroot-avr32.tar.gz : produces funny paths:

   drwxrwxrwx git/git           0 2007-04-16 09:27:09 buildrootdocs/
   drwxrwxrwx git/git           0 2007-04-16 09:27:09 buildrootpackage/
   drwxrwxrwx git/git           0 2007-04-16 09:27:09 buildroottarget/
looks like a git repo?

By hand I did some mv re-org to get
  • /opt/avr32/buildroot
  • /opt/avr32/buildroot/docs
  • /opt/avr32/buildroot/package
  • etc

unset LD_LIBRARY_PATH

make menuconfig
select avr32

script required an upgrade to Local Host
GNU Make 3.81

make dies
    **** BFD does not support target avr32-unknown-linux-uclibc.
    **** Look in bfd/config.bfd for supported targets.
    make[2]: *** [configure-bfd] Error 1
    make[2]: Leaving directory `/opt/avr32/buildroot/toolchain_build_avr32/binutils-2.16.91.0.7-build'
    make[1]: *** [all] Error 2
    make[1]: Leaving directory `/opt/avr32/buildroot/toolchain_build_avr32/binutils-2.16.91.0.7-build'
    make: **** [/opt/avr32/buildroot/toolchain_build_avr32/binutils-2.16.91.0.7-build/binutils/objdump] Error 2

r28 - 27 Mar 2008 - 22:42 - FrankBennett
Copyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Linux® is the registered trademark of Linus Torvalds in the U.S. and other countries.
Atmel®, AVR® and others are registered trademarks or trademarks of Atmel Corporation or its subsidiaries.
All other trademarks are the property of their respective owners.
Powered by Wed, 08 Feb 2006 build 8740
Syndicate this site