Difference between revisions of "Armadeus 3"

From ArmadeusWiki
Jump to: navigation, search
(upgrade ap9328 target)
Line 1: Line 1:
This page will help you to use the upcoming Armadeus software release 3.
+
This page will help you to use the upcoming Armadeus software release 3. This page also provides information about changes compared to the previous versions of Armadeus.
  
  
Line 8: Line 8:
 
Armeadeus 3 adds many new features, including the following:
 
Armeadeus 3 adds many new features, including the following:
  
*Some architectural changes to support more many hardware targets
+
*Some architectural changes to support many hardware targets (apf27 is coming)
 
*New versions of U-Boot 1.3.4, Linux kernel 2.6.27, GCC 4.2.1, Busybox 1.12.1 and also a recent version of Buildroot
 
*New versions of U-Boot 1.3.4, Linux kernel 2.6.27, GCC 4.2.1, Busybox 1.12.1 and also a recent version of Buildroot
 
*New naming convention of files
 
*New naming convention of files
Line 304: Line 304:
  
 
==How-to develop with Armadeus==
 
==How-to develop with Armadeus==
 +
 +
To be done tomorrow...

Revision as of 01:54, 4 December 2008

This page will help you to use the upcoming Armadeus software release 3. This page also provides information about changes compared to the previous versions of Armadeus.


Introduction

Armeadeus 3 adds many new features, including the following:

  • Some architectural changes to support many hardware targets (apf27 is coming)
  • New versions of U-Boot 1.3.4, Linux kernel 2.6.27, GCC 4.2.1, Busybox 1.12.1 and also a recent version of Buildroot
  • New naming convention of files
  • New Flash partion mapping on the target
  • TBC


How-to obtain the Armeadeus 3

For the time being, The third generation of Armadeus is only available on the Subversion repository: https://armadeus.svn.sourceforge.net/svnroot/armadeus/trunk

You can checkout the new version of armadeus or update your working version of armadeus. We suggest to checkout a new version of Armadeus because of the new naming convention of files.


  • Checkout the new version:
$ svn co https://armadeus.svn.sourceforge.net/svnroot/armadeus/trunk armadeus3

this commmand will download the latest version of Armadeus.

Remarks: Do not use spaces in the directory name !


  • Update your working version of armadeus:
$ svn update


  • How-to obtain the legacy Armadeus 2: I am not ready to upgrade my target
$ svn co https://armadeus.svn.sourceforge.net/svnroot/armadeus/trunk@914 armadeus2


How-to configure and build Armadeus


  • After changing to the directory Armadeus you have to configure Armadeus software for the APF9328 target. Yes the new board apf27 is coming soon. ;-)
$ cd armadeus/
$ make apf9328_defconfig


This configuration option is the first difference with the previous releases of Armadeus. This configuration has to be done only once after a checkout or after an update from an older version Armadeus. This command launch the regular Buildroot configuration menu:


Menuconfig3.png


  • Configure Armadeus

In Target options ---> Armadeus Device Support menu, you can check and change the quantity of RAM available on your Armadeus board (apf9328). (Default values 16MB are just fine with all APF9328 boards).

In Target filesystem options --> for each type of filesystems to build you have the option to copy the binary file to secondary location like your tftp server folder (for exemple /tftpboot).

In Target filesystem options --> You will find U-Boot options at the end of this menu including the option to copy U-Boot to a secondary location like /tftpboot

In Kernel --> Destination for linux kernel binaries --> You will find fine options to copy linux to a secondary location like /tftpboot


  • Exit the configuration tool and save your configuration


  • Launch build and take a cup of coffee for the next hour
$ make

The toolchain is built automatically. During this procedure, several files are downloaded from Internet. Please wait for a while.... it takes at least one hour for the first run!


  • Enjoy the result


The generated binary files can be found in the new subdirectory buildroot/binaries/apf9328/:

  • apf9328-u-boot.brec (BRecord image that can be used with the bootstrap, if U-Boot is not installed or not working, see BootLoader page)
  • apf9328-u-boot.bin (U-Boot image file to be used with U-Boot itself, see updating U-Boot)
  • apf9328-linux.bin (Linux image to use with U-Boot, see InstallLinux)
  • apf9328-rootfs.arm.jffs2 (FileSystem/RootFS image to use with U-Boot, see RootFS flashing)
  • apf9328-rootfs.arm.tar (for an NFS/MMC RootFS, see RootNFS? & Booting from a MMC/SD)

Please note the new naming convention of binary files and directories

The toolchain and project files share a new nameing convention too:

  • buildroot/build_armv4t (contains all non configurable user-space tools)
  • buildroot/project_build_armv4t/apf9328 (contains all configurable user-space tools: target filesystem, linux, busybox and u-boot...)
  • buildroot/toolchain_build_armv4t (cross compilation toolchain)

More information is available in the buildroot documentation

How-to upgrade the apf9328 target

To prepare the upgrade of the target you have to copy binary files from buildroot/binaries/apf9328 to your /tftpboot folder or make this process automatic using the command: make menuconfig. The communication with target is fully compatible with previous versions of Armadeus as explained in communicate with the target

update U-Boot (on the target)

Using the command printenv check the target IP variables:

BIOS> printenv
bootcmd=run jffsboot
bootdelay=20
...
gatewayip=192.168.0.1
netmask=255.255.255.0
ipaddr=192.168.0.10
serverip=192.168.0.2

ipaddr is the target ip address and the serverip is the one of the host pc running the tftp server. the page Target_Software_Installation will help you to set these variables.


If everything is fine you should be ready to download the new release of u-boot:

  • Load the new U-Boot code in RAM

You can use the following commands to download U-boot:
With Ethernet and a TFTP server:

BIOS> tftpboot 08000000 apf9328-u-boot.bin
dm9000 i/o: 0x15c00000, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 00:1e:ac:00:00:02
operating at 100M full duplex mode
TFTP from server 192.168.0.2; our IP address is 192.168.0.10
Filename 'apf9328-u-boot.bin'.
Load address: 0x8000000
Loading: ##################################
done
Bytes transferred = 173036 (2a3ec hex)

Or with Ethernet and a NFS server:

BIOS> nfs 08000000 ${serverip}:/nfs_path_to_buildroot/binaries/apf9328/apf9328-u-boot.bin

Or with the kermit and a serial line

BIOS> loadb 08000000
   <CTRL><ALT GR>\
   c
   send path_to_buildroot/binaries/apf9328/apf9328-u_boot.bin
   c
  • Test the downloaded version of u-boot
BIOS> go 08000000
## Starting application at 0x08000000 ...


U-Boot 1.3.4 (Dec  2 2008 - 18:44:41) apf9328 patch 3.3

I2C:   ready
DRAM:  16 MB
Flash:  8 MB
In:    serial
Out:   serial
Err:   serial

Hit any key to stop autoboot:  0
BIOS>


  • Transfer code from RAM to Flash memory

There is a simple U-Boot command/script to do that:

BIOS> run flash_uboot
.. done
Un-Protected 2 sectors

.. done
Erased 2 sectors
Copy to Flash... done
.. done
Protected 2 sectors
Flashing uboot succeed
BIOS>


Advanced informations can be found at the BootLoader wiki page.


  • Reset the environment variables and reset the board

Note: This is important to support the new flash memory mapping.

BIOS> run flash_reset_env
. done
Un-Protected 1 sectors

. done
Erased 1 sectors
Erasinf flash environment variables done!
BIOS>

And finaly reset the board by hardware or software.

BIOS> reset
U-Boot 1.3.4 (Dec  2 2008 - 18:44:41) apf9328 patch 3.3

I2C:   ready
DRAM:  16 MB
Flash:  8 MB
...

update linux and rootfs (on the target)

  • Check and set the IP variables:
BIOS> printenv
bootcmd=run jffsboot
bootdelay=20
...
gatewayip=192.168.0.1
netmask=255.255.255.0
ipaddr=192.168.0.10
serverip=192.168.0.2

ipaddr is the target ip address and the serverip is the one of the host pc running the tftp server. the page Target_Software_Installation will help you to set these variables.

You can use the dhcp command to configure these variables from your DHCP server. You probably will have to adjust the serverip variable manually.

BIOS> dhcp
dm9000 i/o: 0x15c00000, id: 0x90000a46
MAC: 00:0e:32:00:00:02
operating at 100M full duplex mode
BOOTP broadcast 1
DHCP client bound to address 192.168.0.10
BIOS> setenv serverip 192.168.0.2
BIOS> saveenv

Do not forget to save your changes in FLASH, to have them available at next power up:

BIOS> saveenv


  • Update Linux (still on the target)

Using the new release of U-Boot it quite simple to update linux kernel and rootfs using the news scripts included in the release.

BIOS> run update_kernel
dm9000 i/o: 0x15c00000, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 00:1e:ac:00:00:02
operating at 100M full duplex mode
TFTP from server 192.168.0.2; our IP address is 192.168.0.10
Filename 'apf9328-linux.bin'.
Load address: 0x8000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##############################################
done
Bytes transferred = 1564776 (17e068 hex)

................ done
Erased 16 sectors
Copy to Flash... done
Flashing kernel succeed


  • Update rootfs (still on the target)
BIOS> run update_rootfs
dm9000 i/o: 0x15c00000, id: 0x90000a46
DM9000: running in 16 bit mode
MAC: 00:1e:ac:00:00:02
operating at 100M full duplex mode
TFTP from server 192.168.0.2; our IP address is 192.168.0.10
Filename 'apf9328-rootfs.arm.jffs2'.
Load address: 0x8000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ######################################################
done
Bytes transferred = 3932160 (3c0000 hex)

........................................... done
Erased 43 sectors
Copy to Flash... done
Flashing rootfs succeed
BIOS>


How-to develop with Armadeus

To be done tomorrow...