Difference between revisions of "User:SamuelM"

From ArmadeusWiki
Jump to: navigation, search
m (A colored (and useful) prompt: misc. fixes)
m (Contributions)
Line 58: Line 58:
  
 
== Contributions ==
 
== Contributions ==
[[OpenCV|Cross-compile OpenCV for your APF]]
 
  
[[CMake]]
+
; [[CMake]]
 +
: CMake infrastructure has been integrated in Buildroot since the BR release 2011.02 (available in Armadeus SDK since the armardeus-4.1 release).
 +
 
 +
Armadeus-4.0 uses the Buildroot 2010.11 release
 +
 
 +
Armadeus-4.1 uses the Buildroot 2011.05 release
 +
 
 +
; [[OpenCV|Cross-compile OpenCV for your APF]]
 +
: Already in Buildroot since the BR release 2011.11 (requires CMake infrastructure).
 +
 
 +
; [[External_Toolchains]]
 +
: How to build an Armadeus rootfs with a Buildroot more recent than the one used by the official Armadeus SDK. '''!!! Experimental !!!'''
  
 
== Tips ==
 
== Tips ==

Revision as of 10:38, 29 January 2012

<< Member list

<< User list

whoami

  • Name:
Samuel MARTIN
  • Background:
Student at ESEO (French engineering school), specialised in Embedded systeme and Automation /
Master student at l'University of Plymouth (UK), in Robotics.
Embedded and System Engineer (Paris, France)

Interests

  • Robotics
  • Computer Vision
  • Image & signal processing
  • Linux

Objectives

or, what I wanna do with the APF board (APF27 + Devfull)

  • Have fun!
  • Improve my skills in:
    • Hardware development (FPGA)
    • System and embedded OS
    • Electronic development
    • Software development for embedded (tiny) target
  • Share my experiments

Contributions

CMake
CMake infrastructure has been integrated in Buildroot since the BR release 2011.02 (available in Armadeus SDK since the armardeus-4.1 release).

Armadeus-4.0 uses the Buildroot 2010.11 release

Armadeus-4.1 uses the Buildroot 2011.05 release

Cross-compile OpenCV for your APF
Already in Buildroot since the BR release 2011.11 (requires CMake infrastructure).
External_Toolchains
How to build an Armadeus rootfs with a Buildroot more recent than the one used by the official Armadeus SDK. !!! Experimental !!!

Tips

A colored (and useful) prompt

zsh and ctafconf users won't be lost ;-)

##
## ~/.profile
##
source /etc/profile

## Enhanced promt
if [ -t 0 ]; then
    bldblk='\033[1;30m' # Black - Bold
    bldred='\033[1;31m' # Red
    bldgrn='\033[1;32m' # Green
    bldylw='\033[1;33m' # Yellow
    bldblu='\033[1;34m' # Blue
    bldpur='\033[1;35m' # Purple
    bldcyn='\033[1;36m' # Cyan
    bldwht='\033[1;37m' # White
    txtrst='\033[0m'    # Text Reset
    undred='\033[4;31m' # Red - Underlined
    bgdred='\033[1;41m' # Red - Background
    bgdblu='\033[1;44m' # Blue - Background
fi;

rootbgd="${bgdred}"
userbgd="${bgdblu}"

export PS1="\$([ \$(id -u) -eq 0 ] && echo -en \"${rootbgd}\" || echo -en \"${userbgd}\")\u${bldylw}@${bldgrn}\h${txtrst} \
${bldpur}[\$(eval \"res=\$?\"; [ \${res} -eq 0 ] && echo -en \"${bldwht}\${res}\" || echo -en \"${bldred}err \${res}\")${bldpur}] \
[${bldblu}\$([ \$(id -u) -eq 0 ] && echo -en \"\\W\" || echo -en \"\\\w\")${bldpur}] ${txtrst}\n\${SHELL:5}${bldgrn}\$${txtrst} "

u-boot configuration

  1. nfs-boot (kernel and rootfs), if the nfs server is alive
  2. boot from the NAND flash, otherwise

u-boot environment

BIOS> setenv nfsboot 'setenv bootargs ${console} ${mtdparts}; \
 run addnfsargs addipargs; \
 setenv autostart yes; \
 nfs ${loadaddr} {serverip}:${rootpath}/${board_name}-linux.bin; \
 bootm'
BIOS> setenv addnfsargs 'setenv bootargs ${bootargs} root=/dev/nfs rw nfsroot=${serverip}:${rootpath}'
BIOS> setenv addipargs 'setenv bootargs ${bootargs} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off'
BIOS> setenv bootcmd 'if ping ${serverip}; then \
  echo; \
  echo Boot over NFS; \
  echo; \
  run nfsboot; \
 else \
  echo; \
  echo Boot from the board;  \
  run jffsboot; \
 fi'
BIOS> setenv board_name apf27
BIOS> setenv netmask 255.255.255.0
BIOS> setenv serverip 192.168.10.2
BIOS> setenv gatewayip 192.168.10.1
BIOS> setenv ipaddr 192.168.10.10
BIOS> setenv rootpath /path/to/where/you/untar/your/rootfs
BIOS> saveenv
BIOS> boot

Adjust the bootdelay if needed.

Next boot will automatically try to boot over NFS, then fallback on the NAND flash

Warning Warning:

If the NFS server is alive, but neither the linux kernel image nor the rootfs are NOT at the expected location: /path/to/where/you/untar/your/rootfs,

the boot will hang up, so booting will fail !


NFS server configuration

Refer to the NFS wiki page to setting the NFS server up.

Note Note: Check that the NFS server configuration allows NFS v2 request.

On Archlinux: /etc/conf.d/nfs-server

#MOUNTD_OPTS="--no-nfs-version 2"
MOUNTD_OPTS=""


Then:

  • untar the rootfs tarball in /path/to/where/you/untar/your/rootfs
  • copy the linux kernel image to /path/to/where/you/untar/your/rootfs
sudo tar xvf apf27-rootfs.tar -C /path/to/where/you/untar/your/rootfs
sudo -fv cp apf27-linux.bin /path/to/where/you/untar/your/rootfs