Hardware/ARMEBS/3/DevEnv

From UIT
(Difference between revisions)
Jump to: navigation, search
(Created page with "{{private}} {{TOC right}} = ARMEBS/Linux Development Environment = Here is the ''recommanded'' way for setting up a development environment for ARMEBS3/Linux * A decent x86 r...")
 
 
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{private}}
+
{{public}}
 
{{TOC right}}
 
{{TOC right}}
 
= ARMEBS/Linux Development Environment =
 
= ARMEBS/Linux Development Environment =
Here is the ''recommanded'' way for setting up a development environment for ARMEBS3/Linux
+
Here is the ''recommented'' way for setting up a development environment for ARMEBS3/Linux
* A decent x86 running Linux is recommended (all the provided development binaries are for i686-linux host, but if you want to compile all your tools from sources and run it on your OSX machine... you can... If you make it work on cygwin, please let me know, I'm curious how a ntfs filesystem will handle the 560'643 files my /opt/armeb3 directory holds)
+
* A decent x86 running Linux is recommended (all the provided development binaries are for i686-linux host, but if you want to compile all your tools from sources and run it on your OSX machine... you can... If you make it work on cygwin, please let me know, I'm curious how a ntfs filesystem will handle the 560'643 files my /opt/armeb3 directory holds)
* The development machine will be called '''{{{devmachine}}}''', and must have standard development tools installed ({{{make}}}, {{{gcc}}}, {{{subversion}}}, a nfs server, libncurses, ...)
+
* The development machine will be called ''''''devmachine'''''', and must have standard development tools installed ('''make''', '''gcc''', '''subversion''', a nfs server, libncurses, ...)
* The target armebs3 board will be '''{{{target}}}'''
+
* The target armebs3 board will be '''target'''
* You need to have root access (for setup and for NFS file access) to your Linux machine and a standard user account, for instance '''devr'''
+
* You need to have root access (for setup and for NFS file access) to your Linux machine and a standard user account, for instance '''devr'''
 +
 
 
== Setup ==
 
== Setup ==
* setup a work place for daily use
+
* setup a work place for daily use
{{{
+
  su                                              # got root?
u anywhere su -                                             # got root?
+
  mkdir -p /opt/armebs3            # create the working directory
root@devmachine anywhere > mkdir -p /opt/armebs3            # create the working directory
+
  mkdir /opt/armebs3/nfs            # create the NFS directory
root@devmachine anywhere > mkdir /opt/armebs3/nfs            # create the NFS directory
+
  mkdir /opt/armebs3/tfp            # create the working directory
root@devmachine anywhere > mkdir /opt/armebs3/tfp            # create the working directory
+
  chown devuser:users /opt/armebs3  # change the owner the regular user
root@devmachine anywhere > chown devuser:users /opt/armebs3  # change the owner the regular user
+
  chown devuser:users /opt/armebs3  # change the owner the regular user
root@devmachine anywhere > chown devuser:users /opt/armebs3  # change the owner the regular user
+
  exit                              # quit superuser mode
root@devmachine anywhere > exit                              # quit superuser mode
+
  cd /opt/armebs3                  # go to it
devr@devmachine anywhere > cd /opt/armebs3                  # go to it
+
  mkdir download                # create a directory for file download
devr@devmachine /opt/armebs3 > mkdir download                # create a directory for file download
+
 
devr@devmachine /opt/armebs3
+
* Get all necessary files (into /opt/armebs3/download)
}}}
+
** toolchain [http://vlegit.hevs.ch/ARMEBS3/arm-linux-tools-20070918.tar.bz2 download]
* Get all necessary files (into /opt/armebs3/download)
+
** jffs2 utility [[Media:ARMEBS3-mkfs.jffs2.zip|mkfs.jffs2]]
  * toolchain [attachment:wiki:Files:arm-linux-tools-20070918.tar.bz2?format=raw arm-linux-tools-20070918.tar.bz2]
+
** mkimage u-boot utility [[Media:ARMEBS3-uboot-mkimage.zip|mkimage]]
  * jffs2 utility [attachment:wiki:Files:mkfs.jffs2?format=raw mkfs.jffs2]
+
** bdi configuration file : [[Media:ARMEBS3-bdi.cfg.zip|armebs3.cfg]]
  * mkimage u-boot utility [attachment:wiki:Files:mkimage?format=raw mkimage]
+
 
  * bdi configuration file : [attachment:wiki:Files:armebs3.cfg?format=raw armebs3.cfg]
+
* Setup the tool chain
* Setup the tool chain
+
 
{{{
+
  su -                                                          # got root?
devr@devmachine anywhere > su -                                                          # got root?
+
  cd /opt/armebs3/                                              #  
root@devmachine anywhere > cd /opt/armebs3/                                              #  
+
  tar xvzf /opt/armebs3/download/arm-linux-tools-xxx.tar.gz  # uncompress/install the toolchain
root@devmachine /opt/armebs3 > tar xvzf /opt/armebs3/download/arm-linux-tools-xxx.tar.gz  # uncompress/install the toolchain
+
                                                                                                  # you can add the /opt/armebs3/cross/bin directory to your path, but this isn't requiered with our Makefiles
root@devmachine /opt/armebs3 >                                                            # you can add the /opt/armebs3/cross/bin directory to your path, but this isn't requiered with our Makefiles
+
exit                                                                    # quit superuser mode
root@devmachine / exit                                                                    # quit superuser mode
+
 
devr@devmachine anywhere
+
* Setup the NFS
}}}
+
* Setup the NFS
+
{{{
+
 
# /etc/exports: NFS file systems being exported.  See exports(5).
 
# /etc/exports: NFS file systems being exported.  See exports(5).
 
/opt/armebs3/nfs 153.109.5.0/255.255.255.0(sync,rw,no_root_squash,no_all_squash)
 
/opt/armebs3/nfs 153.109.5.0/255.255.255.0(sync,rw,no_root_squash,no_all_squash)
}}}
+
 
* Start the NFS server
+
* Start the NFS server
{{{
+
su -                  # become root
devr@devmachine anywhere > su -                  # become root
+
/etc/init.d/nfs start  # start the NFS server
root@devmachine anywhere > /etc/init.d/nfs start  # start the NFS server
+
exit                  # quit superuser mode
root@devmachine anywhere > exit                  # quit superuser mode
+
 
devr@devmachine anywhere >
+
* Setup the TFTP server
}}}
+
** TFTP server is used for holding BDI2000 configuration, files to program, and network booting
* Setup the TFTP server
+
** Make sure the bdi will use this [[Media:ARMEBS3-bdi.cfg.zip|armebs3.cfg]] (only for BDI2000 users)
  * TFTP server is used for holding BDI2000 configuration, files to program, and network booting
+
  cd /opt/armebs3  
  * Make sure the bdi will use this [attachment:wiki:Files:armebs3.cfg configuration file] (only for BDI2000 users)
+
  mkdir tftp
{{{
+
  cp download/armebs3.cfg tftp/
devr@devmachine anywhere > cd /opt/armebs3  
+
 
devr@devmachine /opt/armebs3/ > mkdir tftp
+
* configuration example for the '''atftp''' tftp server
devr@devmachine /opt/armebs3/ > cp download/armebs3.cfg tftp/
+
 
devr@devmachine /opt/armebs3/ >
+
  # /etc/conf.d/atftp Config file for tftp server
}}}
+
  TFTPD_ROOT="/opt/armebs3/tftp"
* configuration example for the {{{atftp}}} tftp server
+
  TFTPD_OPTS="--daemon --user nobody --group nobody"
{{{
+
 
# /etc/conf.d/atftp Config file for tftp server
+
[[Category:Hardware]] [[Category:ARMEBS]]
TFTPD_ROOT="/opt/armebs3/tftp"
+
TFTPD_OPTS="--daemon --user nobody --group nobody"
+
}}}
+

Latest revision as of 14:41, 26 June 2015

Contents

ARMEBS/Linux Development Environment

Here is the recommented way for setting up a development environment for ARMEBS3/Linux

  • A decent x86 running Linux is recommended (all the provided development binaries are for i686-linux host, but if you want to compile all your tools from sources and run it on your OSX machine... you can... If you make it work on cygwin, please let me know, I'm curious how a ntfs filesystem will handle the 560'643 files my /opt/armeb3 directory holds)
  • The development machine will be called 'devmachine', and must have standard development tools installed (make, gcc, subversion, a nfs server, libncurses, ...)
  • The target armebs3 board will be target
  • You need to have root access (for setup and for NFS file access) to your Linux machine and a standard user account, for instance devr

Setup

  • setup a work place for daily use
 su                                              # got root?
 mkdir -p /opt/armebs3             # create the working directory
 mkdir /opt/armebs3/nfs            # create the NFS directory
 mkdir /opt/armebs3/tfp            # create the working directory
 chown devuser:users /opt/armebs3  # change the owner the regular user
 chown devuser:users /opt/armebs3  # change the owner the regular user
 exit                              # quit superuser mode
 cd /opt/armebs3                   # go to it
 mkdir download                # create a directory for file download
  • Setup the tool chain
 su -                                                           # got root?
 cd /opt/armebs3/                                               # 
 tar xvzf /opt/armebs3/download/arm-linux-tools-xxx.tar.gz  # uncompress/install the toolchain
                                                                                                  # you can add the /opt/armebs3/cross/bin directory to your path, but this isn't requiered with our Makefiles

exit # quit superuser mode

  • Setup the NFS
  1. /etc/exports: NFS file systems being exported. See exports(5).

/opt/armebs3/nfs 153.109.5.0/255.255.255.0(sync,rw,no_root_squash,no_all_squash)

  • Start the NFS server

su - # become root /etc/init.d/nfs start # start the NFS server exit # quit superuser mode

  • Setup the TFTP server
    • TFTP server is used for holding BDI2000 configuration, files to program, and network booting
    • Make sure the bdi will use this armebs3.cfg (only for BDI2000 users)
 cd /opt/armebs3 
 mkdir tftp
 cp download/armebs3.cfg tftp/
  • configuration example for the atftp tftp server
 # /etc/conf.d/atftp Config file for tftp server
 TFTPD_ROOT="/opt/armebs3/tftp"
 TFTPD_OPTS="--daemon --user nobody --group nobody"
Personal tools
Namespaces
Variants
Actions
Navigation
Browse
Toolbox