Friendly ARM

  • Subscribe to our RSS feed.
  • Twitter
  • StumbleUpon
  • Reddit
  • Facebook
  • Digg

Saturday, 26 March 2011

Developing Linux OS for ARM - Part II

Posted on 07:52 by Unknown
With the previous understanding of Part I, the first thing that you need to get is the toolchain. The toolchain might be available in source form as well as in the form of a binary. To avoid the effort of compiling the toolchain, we will start off with a binary. CodeSourcery provides regular, validated releases of the GNU Toolchain for arm processor. The version of the toolchain that we are using can be downloaded from the following link:

http://www.codesourcery.com/public/gnu_toolchain/arm-none-linux-gnueabi/arm-2007q1-10-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2

After downloading this package, extract it to some location (In my case, I have pasted at the following path: /home/sanket/Downloads/Embedded_Linux_Complete/Packages/GNU_GCC_toolchain).


Download the AT91Bootstrap source from the following link:
ftp://www.linux4sam.org/pub/at91bootstrap

The AT91Bootstrap sources will differ based on the media where the secondary level bootloader is located. In our case, we want our secondary bootloader to be loaded in the dataflash and hence we will download the corresponding package. Alternate option for the secondary level bootloader would have been NAND flash.
Extract the AT91Bootstrap source, change to the board directory as shown below:

$cd AT91Bootstrap/Bootstrap-v1.10/board/
$ls

at91cap9adk     at91sam9261ek     at91sam9g20ek     at91sam9xeek
at91sam9260ek     at91sam9263ek     at91sam9rlek

Select your board by going into the corresponding board directory.

/board$ cd at91sam9260ek/
/board/at91sam9260ek$ ls


at91sam9260ek.c    dataflash    nandflash

Select your media by going into the corresponding directory. In our case the media for the secondary bootloader would be dataflash.

/at91sam9260ek$ cd dataflash/
at91sam9260ek/dataflash$ ls

at91sam9260ek.h       dataflash_at91sam9260ek.elf       Makefile
dataflash_at91sam9260ek.bin      dataflash_at91sam9260ek.map

dataflash$ make clean

rm -f *.o *.bin *.elf *.map

Before building the sources, check out the location of your compiler toolchain. In
my case, it is

/home/sanket/Downloads/Embedded_Linux_Complete/Package/GNU_GCC_toolchain/arm-2007q1/bin


While running make we would be specifying the entire path. This is required if you have not installed the toolchain. In our case, instead of installing we have just extracted the tar ball image of the toolchain and hence we need to specify the path as shown below:

/dataflash$ make CROSS_COMPILE=/home/sanket/Downloads/Embedded_Linux_Complete/Package/GNU_GCC_toolchain/arm-2007q1/bin/arm-none-linux-gnueabi-

If everything is fine (compiler path and bootstrap source) a binary file (dataflash_at91sam9260ek.bin) will be generated in the current directory at the end of the compilation process.


/dataflash$ ls

at91sam9260ek.h        crt0_gnu.o        dataflash_at91sam9260ek.elf
dataflash.o     div0.o    main.o    pmc.o    string.o _udivsi3.o
at91sam9260ek.o    dataflash_at91sam9260ek.bin  

dataflash_at91sam9260ek.map    debug.o     gpio.o    Makefile    
sdramc.o     udiv.o      _umodsi3.o


continue ......................................
Read More
Posted in | No comments
Newer Posts Older Posts Home
Subscribe to: Comments (Atom)

Popular Posts

  • Developing Linux OS for ARM - Part III
    Hello. I am back. Its really very long time to pen down where I have stop. I will continue with PART III of developing Linus OS for ARM. As ...
  • Developing Linux OS for ARM - Part II
    With the previous understanding of Part I, the first thing that you need to get is the toolchain. The toolchain might be available in source...
  • Developing Linux OS for ARM - Part I
    The first thing that you possibly need to do after getting your hardware ready is to install the necessary software packages and toolchain o...
  • Basic Operating System Overview
    One killer application of Linux is to be used as the operating system of an embedded system. ARM-based CPUs are killer partners of embedded...
  • Difference between ARM and Intel Processor
    The world of CPUs is a dark, deadly, and dangerous place. After all, the CPU is said to be the literal “heart” of the PC – and as such, it’...
  • Developing Linux OS for ARM - Part IV
    Bootstrap is in place ------- > Yes U-boot is in place      ------->  Yes Now its time to build kernel image, which will take­over con...
  • Deploying u-boot, Linux kernel and GPE onto Mini2440
      Before you start, you will need A mini2440 development board, with or without a 3.5"/7" LCD. A software called minicom on your P...

Blog Archive

  • ►  2013 (2)
    • ►  October (2)
  • ▼  2011 (3)
    • ▼  March (1)
      • Developing Linux OS for ARM - Part II
    • ►  February (1)
    • ►  January (1)
  • ►  2010 (2)
    • ►  December (2)
Powered by Blogger.

About Me

Unknown
View my complete profile