Difference between revisions of "Armadeus 3"

From ArmadeusWiki
Jump to: navigation, search
m (How-to obtain the Armadeus 3)
(How-to obtain the Armadeus 3)
 
(20 intermediate revisions by 4 users not shown)
Line 1: Line 1:
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.
+
This page will help you use the Armadeus 3.x software release. It also provides you with information about changes compared to the previous 2.x versions of Armadeus.
 
+
  
  
 
==Introduction==
 
==Introduction==
 
  
 
Armadeus 3 adds many new features, including the following:
 
Armadeus 3 adds many new features, including the following:
  
*Some architectural changes to support different hardware targets ([[APF27]] is coming)
+
*Some architectural changes to support different hardware targets: [[APF9328]] and [[APF27]]
 
*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 16: Line 14:
 
==Important Information regarding documentation==
 
==Important Information regarding documentation==
  
With the introduction of Armadeus 3 the Wiki documentation is also moving to support the new software. Nevertheless you can download the following HTML dump to have the Armadeus 2.x compatible documentation: [http://www.armadeus.com/assos_downloads/wiki/wiki_assoc_html_dump_03_12_2008.tar.gz Armadeus 2.x wiki]
+
{{Note|With the introduction of the Armadeus 3 SDK, the Wiki documentation has moved to support the new software. Nevertheless you can download the following HTML dump to have the Armadeus 2.x compatible documentation: [http://www.armadeus.com/assos_downloads/wiki/wiki_assoc_html_dump_03_12_2008.tar.gz Armadeus 2.x wiki]. Wiki will also moved in the next weeks so to have an always Armadeus 3.x compatible HTML dump [http://www.armadeus.com/assos_downloads/wiki/wiki_assoc_html_dump_02_03_2009.tar.gz it's here]
 +
}}
  
 
To summarize the documentation changes, here are the rules to adapt the documentation according to your target and version of Armadeus.
 
To summarize the documentation changes, here are the rules to adapt the documentation according to your target and version of Armadeus.
 
* First Armadeus configuration once you have downloaded the Armadeus package found somewhere in First Setup pages:
 
* First Armadeus configuration once you have downloaded the Armadeus package found somewhere in First Setup pages:
: Armadeus 3 first command to use according to your <board> (apf9328 or the future apf27): make <board>_defconfig
+
: Armadeus 3 first command to use according to your <board> (apf9328 or apf27): make <board>_defconfig
 
: Armadeus 2 first command for apf9328: make
 
: Armadeus 2 first command for apf9328: make
  
* Binary files location according to your <board> (apf9328 or the future apf27):
+
* Binary files location according to your <board> (apf9328 or apf27):
 
: Armadeus 3 is buildroot/binaries/<board>/
 
: Armadeus 3 is buildroot/binaries/<board>/
 
: Armadeus 2 was buildroot/armadeus/
 
: Armadeus 2 was buildroot/armadeus/
  
* Armadeus 3 binary files naming convention according to your <board> (apf9328 or the future apf27):
+
* Armadeus 3 binary files naming convention according to your <board> (apf9328 or apf27):
 
: <board>-u-boot.brec
 
: <board>-u-boot.brec
 
: <board>-u-boot.bin
 
: <board>-u-boot.bin
Line 41: Line 40:
 
: rootfs.arm.tar
 
: rootfs.arm.tar
  
* Non configurable users-space tools including compiler for your board (apf9328 or the future apf27):
+
* Non configurable users-space tools including compiler for your board (apf9328 or apf27):
 
: Armadeus 3 tools for the apf9328 are located at buildroot/build_armv4t/
 
: Armadeus 3 tools for the apf9328 are located at buildroot/build_armv4t/
 
: Armadeus 3 tools for the apf27 are located at buildroot/build_armv5te/
 
: Armadeus 3 tools for the apf27 are located at buildroot/build_armv5te/
 
: Armadeus 2 tools are located at buildroot/build_arm/
 
: Armadeus 2 tools are located at buildroot/build_arm/
  
* Configurable user-space tools (Linux, rootfs, U-Boot, Busybox...) for your board (apf9328 or the future apf27):
+
* Configurable user-space tools (Linux, rootfs, U-Boot, Busybox...) for your board (apf9328 or apf27):
 
: Armadeus 3 tools for the apf9328 are located at buildroot/project_build_armv4t/apf9328/
 
: Armadeus 3 tools for the apf9328 are located at buildroot/project_build_armv4t/apf9328/
 
: Armadeus 3 tools for the apf27 are located at buildroot/project_build_armv5te/apf27/
 
: Armadeus 3 tools for the apf27 are located at buildroot/project_build_armv5te/apf27/
 
: Armadeus 2 tools are located at buildroot/project_build_arm/armadeus/
 
: Armadeus 2 tools are located at buildroot/project_build_arm/armadeus/
  
* cross compilation toolchain for your board (apf9328 or the future apf27):
+
* cross compilation toolchain for your board (apf9328 or apf27):
 
: Armadeus 3 source toolchain for the apf9328 is located at buildroot/toolchain_build_armv4t/
 
: Armadeus 3 source toolchain for the apf9328 is located at buildroot/toolchain_build_armv4t/
 
: Armadeus 3 source toolchain for the apf27 is located at buildroot/toolchain_build_armv5te/
 
: Armadeus 3 source toolchain for the apf27 is located at buildroot/toolchain_build_armv5te/
 
: Armadeus 2 toolchain is located at buildroot/toolchain_build_arm/
 
: Armadeus 2 toolchain is located at buildroot/toolchain_build_arm/
  
Keeping these rules in mind, you are ready to use any wiki page as guideline whatever you are working with Armadeus 2.x or 3 or even the future board apf27.  
+
Keeping these rules in mind, you are ready to use any wiki page as a guideline whatever you are working with: Armadeus 2.x or 3.
  
 
==How-to obtain the Armadeus 3==
 
==How-to obtain the Armadeus 3==
  
The third generation of Armadeus is either available on the Subversion repository: https://armadeus.svn.sourceforge.net/svnroot/armadeus/tags/release-3.0 or by download: https://sourceforge.net/project/showfiles.php?group_id=122057
+
The third generation of Armadeus is either available on the gitlab repository: https://gitlab.com/armadeus/armadeus-bsp/-/tags/release-3.4 or by download: https://gitlab.com/armadeus/armadeus-bsp/-/archive/release-3.4/armadeus-bsp-release-3.4.tar.gz
  
 
You can checkout the new version of armadeus or update your working version of armadeus. '''We strongly suggest you to checkout the new version of Armadeus because the new naming convention of files will produce a second directory structure of toolchain, projects, build and image files that could be a source of confusion.'''
 
You can checkout the new version of armadeus or update your working version of armadeus. '''We strongly suggest you to checkout the new version of Armadeus because the new naming convention of files will produce a second directory structure of toolchain, projects, build and image files that could be a source of confusion.'''
Line 66: Line 65:
 
* Checkout the new version:
 
* Checkout the new version:
  
$ svn checkout https://armadeus.svn.sourceforge.net/svnroot/armadeus/tags/release-3.0 armadeus
+
<pre class="host">
 +
  git clone git@gitlab.com:armadeus/armadeus-bsp.git armadeus
 +
</pre>
  
 
this commmand will download the latest version of Armadeus.
 
this commmand will download the latest version of Armadeus.
Line 75: Line 76:
 
* Update your working version of armadeus
 
* Update your working version of armadeus
  
'''WARNING: Do not use a simple svn update because some legacy buildroot patches will break your compilation!'''
+
'''WARNING: Do not use a simple "git checkout" because some legacy buildroot patches will break your compilation!'''
  
  $ cd armadeus
+
<pre class="host">
  $ rm -rf buildroot/package
+
  cd armadeus
  $ rm -rf buildroot/target
+
  rm -rf buildroot/package
  $ rm -rf buildroot/toolchain
+
  rm -rf buildroot/target
  $ svn update
+
  rm -rf buildroot/toolchain
  $ make apf9328_defconfig
+
  git checkout -f
 +
  make apf9328_defconfig or make apf27_defconfig
 +
</pre>
  
'''WARNING: the latest command (make apf9328_defconfig) is very important to start with an up to date configuration!'''
+
'''WARNING: the latest command (make <board>_defconfig ) is very important to start with an up to date configuration!'''
  
 
At any time you can cleanup the old directories built with armadeus 2:
 
At any time you can cleanup the old directories built with armadeus 2:
$ rm -rf buildroot/binaries/armadeus
 
$ rm -rf buildroot/build_arm
 
$ rm -rf buildroot/project_build_arm
 
$ rm -rf buildroot/toolchain_build_arm
 
  
 +
<pre class="host">
 +
rm -rf buildroot/binaries/armadeus
 +
rm -rf buildroot/build_arm
 +
rm -rf buildroot/project_build_arm
 +
rm -rf buildroot/toolchain_build_arm
 +
</pre>
  
* How-to obtain the legacy Armadeus 2 (If you're not ready to upgrade your target):
 
  
$ svn co https://armadeus.svn.sourceforge.net/svnroot/armadeus/trunk@914 armadeus2
+
* How-to obtain the legacy Armadeus 2 (If you're not ready to upgrade your target): Download tar.gz at https://gitlab.com/armadeus/armadeus-bsp/-/tags/release-2.x
  
 
==How-to configure and build Armadeus 3==
 
==How-to configure and build Armadeus 3==
  
* After changing to the directory ''armadeus'', you have to configure Armadeus software for the APF9328 target.
+
* After changing the directory to ''armadeus'', you have to configure Armadeus software for the APF target.
  
  $ cd armadeus/
+
<pre class="host">
  $ make '''apf9328_defconfig'''
+
  cd armadeus/
 +
  make '''apf9328_defconfig''' or make '''apf27_defconfig'''
 +
</pre>
  
  
<b>The 'apf9328_defconfig' configuration option is the first difference with the previous releases of Armadeus.  
+
<b>The '<board>_defconfig' 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 configure Armadeus for the apf9328 board then launch the regular Buildroot configuration menu:</b>
+
This configuration has to be done only once after a checkout or after an update from an older version Armadeus. This command configures Armadeus for the apf board then launches the regular Buildroot configuration menu:</b>
  
  
Line 114: Line 120:
 
* Configure Armadeus
 
* 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 value 16MB is just fine with all APF9328 boards).
+
In System configuration ---> Armadeus Device Support menu, you can check and change the quantity of RAM available on your Armadeus board. (Default value 16MB is just fine with all APF9328 boards and 64MB for the smallest apf27).
  
<b>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).</b>
+
<b>In Filesystem images --> 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).</b>
  
<b>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</b>  
+
<b>In Bootloaders --> 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</b>  
  
 
<b>In Kernel --> Destination for linux kernel binaries --> You will find options to copy linux to a secondary location like /tftpboot</b>  
 
<b>In Kernel --> Destination for linux kernel binaries --> You will find options to copy linux to a secondary location like /tftpboot</b>  
Line 126: Line 132:
  
  
* Launch the build process and take a cup of coffee for the next hour
+
* Launch the build process and enjoy a cup of coffee for the next hour
  
  $ make
+
<pre class="host">
 +
  make
 +
</pre>
  
 
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 to compile everything!<br>
 
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 to compile everything!<br>
Line 136: Line 144:
  
  
The generated binary files can be found in the new subdirectory <b>''buildroot/binaries/apf9328/'':</b>
+
The generated binary files can be found in the new subdirectory <b>''buildroot/binaries/<board>/'':</b>
  
: '''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.brec''' (apf9328 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 [[BootLoader#Update_U-Boot | updating U-Boot]])
+
: '''<board>-u-boot.bin''' (U-Boot image file to be used with U-Boot itself, see [[BootLoader#Update_U-Boot | updating U-Boot]])
: '''apf9328-linux.bin''' (Linux image to use with U-Boot, see [[Target_Software_Installation#Linux_kernel_installation | InstallLinux]])
+
: '''<board>-linux.bin''' (Linux image to use with U-Boot, see [[Target_Software_Installation#Linux_kernel_installation | InstallLinux]])
: '''apf9328-rootfs.arm.jffs2''' (FileSystem/RootFS image to use with U-Boot, see [[Target_Software_Installation#Linux_rootfs_installation | RootFS flashing]])
+
: '''<board>-rootfs.arm.jffs2''' (FileSystem/RootFS image to use with U-Boot, see [[Target_Software_Installation#Linux_rootfs_installation | RootFS flashing]])
: '''apf9328-rootfs.arm.tar''' (for an NFS/MMC RootFS, see [[Network_Configuration#Boot_from_NFS|Booting from NFS]] & [[MultiMediaCard#Booting_from_MMC.2FSD | Booting from a MMC/SD]])
+
: '''<board>-rootfs.arm.tar''' (for an NFS/MMC RootFS, see [[Network_Configuration#Boot_from_NFS|Booting from NFS]] & [[MultiMediaCard#Booting_from_MMC.2FSD | Booting from a MMC/SD]])
  
 
<b> Please note the new naming convention of binary files and directories</b>
 
<b> Please note the new naming convention of binary files and directories</b>
  
 
The toolchain and project files share a new nameing convention too:
 
The toolchain and project files share a new nameing convention too:
: '''buildroot/build_armv4t''' (contains all non configurable user-space tools)
+
: '''buildroot/build_armv<x>t''' (contains all non configurable user-space tools)
: '''buildroot/project_build_armv4t/apf9328''' (contains all configurable user-space tools: target filesystem, <b>linux</b>, busybox and <b>u-boot</b>...)
+
: '''buildroot/project_build_armv<x>t/<board>''' (contains all configurable user-space tools: target filesystem, <b>linux</b>, busybox and <b>u-boot</b>...)
: '''buildroot/toolchain_build_armv4t''' (cross compilation toolchain)
+
: '''buildroot/toolchain_build_armv<x>t''' (cross compilation toolchain)
  
 
More information is available in the  [http://buildroot.uclibc.org/buildroot.html buildroot documentation]
 
More information is available in the  [http://buildroot.uclibc.org/buildroot.html buildroot documentation]
Line 158: Line 166:
 
The simplest method to prepare binary files for a download to target is to copy them in the tftpboot public directory (for example /tftpboot). You can do it manually:
 
The simplest method to prepare binary files for a download to target is to copy them in the tftpboot public directory (for example /tftpboot). You can do it manually:
  
$ cp -f buildroot/binaries/apf9328/* /tftpboot
+
<pre class="host">
 +
cp -f buildroot/binaries/<board>/* /tftpboot
 +
</pre>
  
 
Or you can configure buildroot to copy the image files automatically as described hereabove in '''Configure Armadeus'''.<br>
 
Or you can configure buildroot to copy the image files automatically as described hereabove in '''Configure Armadeus'''.<br>
Line 367: Line 377:
 
===update your fpga firmware (on the target)===
 
===update your fpga firmware (on the target)===
  
Please, follow the standard procedure [[InstallTargetSoftware#FPGA_firmware_installation | Firmware installation]]
+
Please follow the standard procedure [[InstallTargetSoftware#FPGA_firmware_installation | Firmware installation]]
  
==How-to develop with Armadeus==
+
==How-to develop with Armadeus / customize your SDK==
  
Your new Armadeus 3 is running fine on the target. Now you probably would like to customize the target for your project.
+
Your new Armadeus 3 is running fine on the target. Now you probably would like to customize the target for your project.<br>
 +
If you are a Buildroot user, the following instructions should sound familiar.
  
===How-to add a software===
+
===How-to add a software package===
  
 
Use the command '''make menuconfig'''':
 
Use the command '''make menuconfig'''':
 +
<pre class="host">
 
  $ make menuconfig
 
  $ make menuconfig
 +
</pre>
 +
 +
[[Image:menuconfig_package.png]]
  
 
Select your package in the menu "package", save the configuration and compile a new rootfs
 
Select your package in the menu "package", save the configuration and compile a new rootfs
 +
<pre class="host">
 
  $ make  
 
  $ make  
 +
</pre>
 +
 +
{{Note|For a given release, not all packages are tested/running. You can consult the list of the working packages [[Buildroot-20081103_integration| here]].}}
  
 
On the target, download and flash the new rootfs:
 
On the target, download and flash the new rootfs:
 +
<pre class="apf">
 
  BIOS> run update_rootfs
 
  BIOS> run update_rootfs
 
  ...
 
  ...
 
 
  BIOS> boot
 
  BIOS> boot
 +
</pre>
  
===How-to remove a software===
+
===How-to remove a package===
  
 
Supposing you would like to remove an unwanted package from the target.
 
Supposing you would like to remove an unwanted package from the target.
* The first step is to use the command '''make menuconfig''' to unselect this package but this commnand will not remove the package from the rootfs. You have to use the ''clean'' command of buildroot. In the lines hereafter replace the word <package> with the real name of your package.
+
* The first step is to use the command '''make menuconfig''' to unselect this package but this command will not remove the package from the rootfs. You have to use the ''clean'' command of buildroot. In the lines hereafter replace the word <package> with the real name of your package.
 +
<pre class="host">
 
   $ make menuconfig
 
   $ make menuconfig
 
   ... deselect your <package>
 
   ... deselect your <package>
 
   $ make <package>-clean
 
   $ make <package>-clean
 
   $ make
 
   $ make
 
+
</pre>
 
Your new rootfs is now ready to use - Enjoy
 
Your new rootfs is now ready to use - Enjoy
 
  
 
* Some packages do not support any uninstall behavior. In such a case you can rebuild your environment using the global clean command. This command requests to compile almost everything and therefore will take time.
 
* Some packages do not support any uninstall behavior. In such a case you can rebuild your environment using the global clean command. This command requests to compile almost everything and therefore will take time.
 +
<pre class="host">
 
   $ make menuconfig
 
   $ make menuconfig
 
   ... deselect your <package>
 
   ... deselect your <package>
 
   $ make clean
 
   $ make clean
 
   $ make
 
   $ make
 +
</pre>
  
'''WARNING: Using this method you will lose any modification you could have done directly in the directory buildroot/project_build_armv4t/apf9328/root.'''
+
{{Warning|Using this method you will lose any modification you could have done directly in the directory buildroot/project_build_armvYY/apfXX/root.
<br> Please read the chapter '''How-to modifify root filesystem''' hereafter.
+
Please read the chapter [[Armadeus_3#How-to_modify_root_filesystem| How-to modify root filesystem]] hereafter.}}
  
 
Your new rootfs is ready to use - Enjoy
 
Your new rootfs is ready to use - Enjoy
  
 
* A faster method exists to force to rebuild rootfs. You can delete the root directory. <b>Unfortunately some libraries (ie c++ lib) are not reinstalled using this method.</b>
 
* A faster method exists to force to rebuild rootfs. You can delete the root directory. <b>Unfortunately some libraries (ie c++ lib) are not reinstalled using this method.</b>
 +
<pre class="host">
 
   $ make menuconfig
 
   $ make menuconfig
 
   ... deselect your <package>
 
   ... deselect your <package>
Line 416: Line 439:
 
   $ rm -rf buildroot/project_build_armv4t/apf9328/.root
 
   $ rm -rf buildroot/project_build_armv4t/apf9328/.root
 
   $ make
 
   $ make
 +
</pre>
  
'''WARNING: Using this method you will lose any modification you could have done directly in the directory buildroot/project_build_armv4t/apf9328/root.'''
+
{{Warning|Using this method you will lose any modification you could have done directly in the directory buildroot/project_build_armvYY/apfXX/root.
<br> Please read the chapter '''How-to modify root filesystem''' hereafter.
+
Please read the chapter [[Armadeus_3#How-to_modify_root_filesystem| How-to modify root filesystem]] hereafter.}}
  
 
Your new rootfs is ready to use - Enjoy
 
Your new rootfs is ready to use - Enjoy
Line 425: Line 449:
  
 
You would like to modify a package and test your modification on the target. The command '''make <package>-clean''' will force to rebuild the package you modified:
 
You would like to modify a package and test your modification on the target. The command '''make <package>-clean''' will force to rebuild the package you modified:
 +
<pre class="host">
 
   $ make <package>-clean
 
   $ make <package>-clean
 
   $ make
 
   $ make
 
+
</pre>
 
Your new rootfs is ready to use - Enjoy
 
Your new rootfs is ready to use - Enjoy
  
 
===How-to create a buildroot package===
 
===How-to create a buildroot package===
  
The creation of a new buildroot package is more in depth described in the specific wiki page [[Buildroot_Packages]] and in the [http://buildroot.uclibc.org/buildroot.html buildroot documentation]
+
The creation of a new buildroot package is described more in depth in the specific wiki page [[Buildroot_Packages]] and in the [http://buildroot.uclibc.org/buildroot.html buildroot documentation]
  
 
===How-to modify root filesystem===
 
===How-to modify root filesystem===
Line 440: Line 465:
 
# modify files in buildroot/project_build_armv4t/apf9328/root/ (to validate your modification with armadeus)
 
# modify files in buildroot/project_build_armv4t/apf9328/root/ (to validate your modification with armadeus)
 
# modify files in buildroot/target/device/aramdeus/rootfs/target_skeleton (your modifcation will support a '''make clean''' )
 
# modify files in buildroot/target/device/aramdeus/rootfs/target_skeleton (your modifcation will support a '''make clean''' )
# create a patch file in armadeus/patches (your modification will support a '''svn update''')
+
# create a patch file in armadeus/patches (your modification will support a '''git checkout''')
  
 
===How-to modify Linux kernel===
 
===How-to modify Linux kernel===
  
To rebuild the kernel or any kernel driver you can use the command '''make linux26-clean; make'''.
+
To rebuild the kernel or any kernel driver you can use the commands:
<b>please note the new package name use by buildroot for Linux: linux26</b>
+
<pre class="host">
  $ make linux26-clean
+
  $ make linux-clean
 
  $ make
 
  $ make
 +
</pre>
  
 
your new Linux kernel and rootfs containing drivers are ready to use - Enjoy
 
your new Linux kernel and rootfs containing drivers are ready to use - Enjoy
  
 
There is another method to rebuild the kernel faster than the previous one:
 
There is another method to rebuild the kernel faster than the previous one:
  $ make linux26
+
<pre class="host">
 +
  $ make linux
 
  $ make
 
  $ make
 
+
</pre>
 
With this method only the modified files are compiled.
 
With this method only the modified files are compiled.
 
  
 
===How-to configure a Linux kernel===
 
===How-to configure a Linux kernel===
  
 
There is a command to modify the linux kernel configuration:
 
There is a command to modify the linux kernel configuration:
  $make linux26-menuconfig
+
<pre class="host">
 
+
  $make linux-menuconfig
 +
</pre>
 
Modify your kernel configuration, save your change and rebuild Armadeus in few seconds:
 
Modify your kernel configuration, save your change and rebuild Armadeus in few seconds:
 +
<pre class="host">
 
  $make
 
  $make
 +
</pre>
  
 
===How-to configure U-Boot===
 
===How-to configure U-Boot===
  
 
you can change the U-Boot configuration using the buildroot command '''make menuconfig'''. U-Boot options are in the sub-menu '''target filesystem options'''. In order to rebuild U-Boot with new options it is necessary to remove U-Boot first:
 
you can change the U-Boot configuration using the buildroot command '''make menuconfig'''. U-Boot options are in the sub-menu '''target filesystem options'''. In order to rebuild U-Boot with new options it is necessary to remove U-Boot first:
 
+
<pre class="host">
 
  $make menuconfig
 
  $make menuconfig
 
  ...
 
  ...
 
  $make u-boot-dirclean
 
  $make u-boot-dirclean
 
  $make
 
  $make
 +
</pre>
  
<b>WARNING:</b> the command '''make u-boot-dirclean''' delete the U-Boot directory and any modification you did in this directory.
+
{{Warning| the command '''make u-boot-dirclean''' delete the U-Boot directory and any modification you did in this directory.}}
  
 
===How-to modify U-Boot===
 
===How-to modify U-Boot===
  
 
To rebuild U-Boot you can use the command '''make u-boot-clean; make'''.
 
To rebuild U-Boot you can use the command '''make u-boot-clean; make'''.
 +
<pre class="host">
 
  $ make u-boot-clean
 
  $ make u-boot-clean
 
  $ make
 
  $ make
 
+
</pre>
 
your new U-Boot is ready to use - Enjoy
 
your new U-Boot is ready to use - Enjoy
  
 
If you modify the config file ''apf9328.h'' located in ''buildroot/project_build_armv4t/apf9328/u-boot-1.3.4/include/configs/apf9328.h'', then we suggest you to rebuild the whole u-boot package:
 
If you modify the config file ''apf9328.h'' located in ''buildroot/project_build_armv4t/apf9328/u-boot-1.3.4/include/configs/apf9328.h'', then we suggest you to rebuild the whole u-boot package:
 +
<pre class="host">
 
  $ make u-boot-distclean
 
  $ make u-boot-distclean
 
  $ make
 
  $ make
 +
</pre>
  
 
===How-to configure busybox===
 
===How-to configure busybox===
 
It also possible to modify the Busybox configuration to add or remove some features:
 
It also possible to modify the Busybox configuration to add or remove some features:
 +
<pre class="host">
 
  $make busybox-menuconfig
 
  $make busybox-menuconfig
 +
</pre>
 +
 +
To be continued...
 +
 +
==Links==
 +
* [http://buildroot.uclibc.org/buildroot.html Buildroot's documentation]
  
to be continued...
+
[[Category:Software]]

Latest revision as of 13:12, 30 June 2022

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


Introduction

Armadeus 3 adds many new features, including the following:

  • Some architectural changes to support different hardware targets: APF9328 and APF27
  • 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 partition mapping on the target
  • TBC

Important Information regarding documentation

Note Note: With the introduction of the Armadeus 3 SDK, the Wiki documentation has moved to support the new software. Nevertheless you can download the following HTML dump to have the Armadeus 2.x compatible documentation: Armadeus 2.x wiki. Wiki will also moved in the next weeks so to have an always Armadeus 3.x compatible HTML dump it's here


To summarize the documentation changes, here are the rules to adapt the documentation according to your target and version of Armadeus.

  • First Armadeus configuration once you have downloaded the Armadeus package found somewhere in First Setup pages:
Armadeus 3 first command to use according to your <board> (apf9328 or apf27): make <board>_defconfig
Armadeus 2 first command for apf9328: make
  • Binary files location according to your <board> (apf9328 or apf27):
Armadeus 3 is buildroot/binaries/<board>/
Armadeus 2 was buildroot/armadeus/
  • Armadeus 3 binary files naming convention according to your <board> (apf9328 or apf27):
<board>-u-boot.brec
<board>-u-boot.bin
<board>-linux.bin
<board>-rootfs.arm.jffs2
<board>-rootfs.arm.tar
  • Armadeus 2 binary files naming convention for apf9328 only:
u-boot.brec
u-boot.bin
linux-kernel-2.6.xx.x-arm.bin
rootfs.arm.jffs2
rootfs.arm.tar
  • Non configurable users-space tools including compiler for your board (apf9328 or apf27):
Armadeus 3 tools for the apf9328 are located at buildroot/build_armv4t/
Armadeus 3 tools for the apf27 are located at buildroot/build_armv5te/
Armadeus 2 tools are located at buildroot/build_arm/
  • Configurable user-space tools (Linux, rootfs, U-Boot, Busybox...) for your board (apf9328 or apf27):
Armadeus 3 tools for the apf9328 are located at buildroot/project_build_armv4t/apf9328/
Armadeus 3 tools for the apf27 are located at buildroot/project_build_armv5te/apf27/
Armadeus 2 tools are located at buildroot/project_build_arm/armadeus/
  • cross compilation toolchain for your board (apf9328 or apf27):
Armadeus 3 source toolchain for the apf9328 is located at buildroot/toolchain_build_armv4t/
Armadeus 3 source toolchain for the apf27 is located at buildroot/toolchain_build_armv5te/
Armadeus 2 toolchain is located at buildroot/toolchain_build_arm/

Keeping these rules in mind, you are ready to use any wiki page as a guideline whatever you are working with: Armadeus 2.x or 3.

How-to obtain the Armadeus 3

The third generation of Armadeus is either available on the gitlab repository: https://gitlab.com/armadeus/armadeus-bsp/-/tags/release-3.4 or by download: https://gitlab.com/armadeus/armadeus-bsp/-/archive/release-3.4/armadeus-bsp-release-3.4.tar.gz

You can checkout the new version of armadeus or update your working version of armadeus. We strongly suggest you to checkout the new version of Armadeus because the new naming convention of files will produce a second directory structure of toolchain, projects, build and image files that could be a source of confusion.

  • Checkout the new version:
  git clone git@gitlab.com:armadeus/armadeus-bsp.git armadeus

this commmand will download the latest version of Armadeus.

Remarks: Do not use spaces in the directory name !


  • Update your working version of armadeus

WARNING: Do not use a simple "git checkout" because some legacy buildroot patches will break your compilation!

 cd armadeus
 rm -rf buildroot/package
 rm -rf buildroot/target
 rm -rf buildroot/toolchain
 git checkout -f
 make apf9328_defconfig or make apf27_defconfig

WARNING: the latest command (make <board>_defconfig ) is very important to start with an up to date configuration!

At any time you can cleanup the old directories built with armadeus 2:

 rm -rf buildroot/binaries/armadeus
 rm -rf buildroot/build_arm
 rm -rf buildroot/project_build_arm
 rm -rf buildroot/toolchain_build_arm


How-to configure and build Armadeus 3

  • After changing the directory to armadeus, you have to configure Armadeus software for the APF target.
 cd armadeus/
 make '''apf9328_defconfig''' or make '''apf27_defconfig''' 


The '<board>_defconfig' 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 configures Armadeus for the apf board then launches the regular Buildroot configuration menu:


Menuconfig3.png


  • Configure Armadeus

In System configuration ---> Armadeus Device Support menu, you can check and change the quantity of RAM available on your Armadeus board. (Default value 16MB is just fine with all APF9328 boards and 64MB for the smallest apf27).

In Filesystem images --> 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 Bootloaders --> 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 options to copy linux to a secondary location like /tftpboot


  • Exit the configuration tool and save your configuration


  • Launch the build process and enjoy 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 to compile everything!


  • Enjoy the result


The generated binary files can be found in the new subdirectory buildroot/binaries/<board>/:

apf9328-u-boot.brec (apf9328 BRecord image that can be used with the bootstrap, if U-Boot is not installed or not working, see BootLoader page)
<board>-u-boot.bin (U-Boot image file to be used with U-Boot itself, see updating U-Boot)
<board>-linux.bin (Linux image to use with U-Boot, see InstallLinux)
<board>-rootfs.arm.jffs2 (FileSystem/RootFS image to use with U-Boot, see RootFS flashing)
<board>-rootfs.arm.tar (for an NFS/MMC RootFS, see Booting from NFS & 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_armv<x>t (contains all non configurable user-space tools)
buildroot/project_build_armv<x>t/<board> (contains all configurable user-space tools: target filesystem, linux, busybox and u-boot...)
buildroot/toolchain_build_armv<x>t (cross compilation toolchain)

More information is available in the buildroot documentation


  • Prepare binary images for download

The simplest method to prepare binary files for a download to target is to copy them in the tftpboot public directory (for example /tftpboot). You can do it manually:

cp -f buildroot/binaries/<board>/* /tftpboot

Or you can configure buildroot to copy the image files automatically as described hereabove in Configure Armadeus.
From here we will suppose all the image files are available at the root of your tftp server

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 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. !! You will loose all the variables you had defined before !!

BIOS> run flash_reset_env

. done
Un-Protected 1 sectors

. done
Erased 1 sectors
Erasing of flash environment variables done!
BIOS>

And do not forget to 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 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 automatically 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 is 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>

update your fpga firmware (on the target)

Please follow the standard procedure Firmware installation

How-to develop with Armadeus / customize your SDK

Your new Armadeus 3 is running fine on the target. Now you probably would like to customize the target for your project.
If you are a Buildroot user, the following instructions should sound familiar.

How-to add a software package

Use the command make menuconfig':

 $ make menuconfig

Menuconfig package.png

Select your package in the menu "package", save the configuration and compile a new rootfs

 $ make 
Note Note: For a given release, not all packages are tested/running. You can consult the list of the working packages here.


On the target, download and flash the new rootfs:

 BIOS> run update_rootfs
 ...
 BIOS> boot

How-to remove a package

Supposing you would like to remove an unwanted package from the target.

  • The first step is to use the command make menuconfig to unselect this package but this command will not remove the package from the rootfs. You have to use the clean command of buildroot. In the lines hereafter replace the word <package> with the real name of your package.
  $ make menuconfig
  ... deselect your <package>
  $ make <package>-clean
  $ make

Your new rootfs is now ready to use - Enjoy

  • Some packages do not support any uninstall behavior. In such a case you can rebuild your environment using the global clean command. This command requests to compile almost everything and therefore will take time.
  $ make menuconfig
  ... deselect your <package>
  $ make clean
  $ make
Warning Warning: Using this method you will lose any modification you could have done directly in the directory buildroot/project_build_armvYY/apfXX/root.

Please read the chapter How-to modify root filesystem hereafter.


Your new rootfs is ready to use - Enjoy

  • A faster method exists to force to rebuild rootfs. You can delete the root directory. Unfortunately some libraries (ie c++ lib) are not reinstalled using this method.
  $ make menuconfig
  ... deselect your <package>
  $ rm -rf buildroot/project_build_armv4t/apf9328/root
  $ rm -rf buildroot/project_build_armv4t/apf9328/.root
  $ make
Warning Warning: Using this method you will lose any modification you could have done directly in the directory buildroot/project_build_armvYY/apfXX/root.

Please read the chapter How-to modify root filesystem hereafter.


Your new rootfs is ready to use - Enjoy

How-to modify a software

You would like to modify a package and test your modification on the target. The command make <package>-clean will force to rebuild the package you modified:

  $ make <package>-clean
  $ make

Your new rootfs is ready to use - Enjoy

How-to create a buildroot package

The creation of a new buildroot package is described more in depth in the specific wiki page Buildroot_Packages and in the buildroot documentation

How-to modify root filesystem

There are different methods to modify the rootfs of the apf9328:

  1. modify files directly on the target (ideal solution for first trials)
  2. modify files in buildroot/project_build_armv4t/apf9328/root/ (to validate your modification with armadeus)
  3. modify files in buildroot/target/device/aramdeus/rootfs/target_skeleton (your modifcation will support a make clean )
  4. create a patch file in armadeus/patches (your modification will support a git checkout)

How-to modify Linux kernel

To rebuild the kernel or any kernel driver you can use the commands:

 $ make linux-clean
 $ make

your new Linux kernel and rootfs containing drivers are ready to use - Enjoy

There is another method to rebuild the kernel faster than the previous one:

 $ make linux
 $ make

With this method only the modified files are compiled.

How-to configure a Linux kernel

There is a command to modify the linux kernel configuration:

 $make linux-menuconfig

Modify your kernel configuration, save your change and rebuild Armadeus in few seconds:

 $make

How-to configure U-Boot

you can change the U-Boot configuration using the buildroot command make menuconfig. U-Boot options are in the sub-menu target filesystem options. In order to rebuild U-Boot with new options it is necessary to remove U-Boot first:

 $make menuconfig
 ...
 $make u-boot-dirclean
 $make
Warning Warning: the command make u-boot-dirclean delete the U-Boot directory and any modification you did in this directory.


How-to modify U-Boot

To rebuild U-Boot you can use the command make u-boot-clean; make.

 $ make u-boot-clean
 $ make

your new U-Boot is ready to use - Enjoy

If you modify the config file apf9328.h located in buildroot/project_build_armv4t/apf9328/u-boot-1.3.4/include/configs/apf9328.h, then we suggest you to rebuild the whole u-boot package:

 $ make u-boot-distclean
 $ make

How-to configure busybox

It also possible to modify the Busybox configuration to add or remove some features:

 $make busybox-menuconfig

To be continued...

Links