1,381
edits
Changes
From IGEP - ISEE Wiki
no edit summary
== Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine HOWTO ==
=== Overview of this HOWTO ===
=== Requirements ===
* [http://www.igep.es/index.php?option=com_content&view=article&id=99&Itemid=112&dir=%2Fvar%2Fwww%2Fvhosts%2Figep.es%2Fhttpdocs%2Fdownloads%2F01-ISEE_Products%2FIGEPv2%2FSW_Tools_SDK%2FSDK Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine]* [http://labs.igep.es/index.php/Getting_started_with_IGEP_v2_board IGEPv2 board] with [[How_to_upgrade_and_recover_the_factory_firmware How to upgrade and recover the factory firmware| factory defaults]]* [http://www.igep.es/index.php?option=com_content&view=article&id=99&Itemid=112&dir=%2Fvar%2Fwww%2Fvhosts%2Figep.es%2Fhttpdocs%2Fdownloads%2F01-ISEE_Products%2FIGEPv2/SW_User_Manuals Software User Manuals]
=== Feedback and Contributing ===
At any point, if you see a mistake you can contribute to this How-To.
=== Which IGEP SDK Virtual Machine do I have ? ===
At this moment (2010-December), your IGEP SDK Virtual Machine could be:
* [[Ubuntu_8Ubuntu 8.04_IGEP_v204 IGEP v2.0_SDK_Virtual_Machine0 SDK Virtual Machine#Ubuntu_8.04_IGEP_v2.0_SDK_Virtual_Machine_.28version_20101124.29| 20101124]] version ( based on: Ubuntu 8.04.4 + Poky 20101124 version + IGEP0020-RC board )* [[Ubuntu_8Ubuntu 8.04_IGEP_v204 IGEP v2.0_SDK_Virtual_Machine0 SDK Virtual Machine#Ubuntu_8.04_IGEP_v2.0_SDK_Virtual_Machine_.28version_20091222.29| 20091222]] version ( based on: Ubuntu 8.04.1 + Poky 20090721 version + IGEP0020-RB board )
=== Which Poky SDK toolchain do I have ? ===
You could see "Poky SDK toolchain" version at '/usr/local/poky/eabi-glibc/version-arm-none-linux-gnueab' file:<pre>jdoe@ubuntu:~$ cat /usr/local/poky/eabi-glibc/version-arm-none-linux-gnueabi
Distro: poky
Distro Version: 3.2.1
Metadata Revision: 949b440e52d637ef52eadb50c87e615eebd64ed4
Timestamp: 20100331130432
</pre> === Which Poky SDK rootfs version do I have ? ===
You could see "Poky nfs exported rootfs demo" version at '/srv/nfs/poky/poky-image-sato/igep0020/etc/version' file:<pre>jdoe@ubuntu:~$ cat /srv/nfs/poky/poky-image-sato/igep0020/etc/version
201011231602
</pre>----
== Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine (version 20101124) ==
* IGEPv2 boards could boot from TFTP+NFS exported installed demos
* It provides installed demos at "/srv/" directory** TFTP exported Linux kernels at "/srv/tftp/poky/poky-image-XXXXX/igep0020/uImage" files** NFS exported rootfs at "/srv/nfs/poky/poky-image-XXXXX/igep0020/" directories
* It provides a compiled toolchain demo at "/usr/local/poky/eabi-glibc" directory * There is a project source code example at "/home/jdoe/staging/x-loader/" directory, that is git cloned from http://git.igep.es public source code repositories* It is based on Ubuntu 8.04.4 distribution* It provides quick links to ISEE IGEP boards ecosystem* What's New:** OMAP3730 processor support** Upgraded toolchain
=== Virtual Machine Enhancements (version 20101124) ===
Setting up uboot-mkimage (0.4build1) ...
</pre>
<br> <br>
==== Upgrade the Poky's SDK ====
*Log on virtual machine login (Username: '''jdoe''' / Password: '''letmein''' / Default IP address: '''192.168.254.10''' )
=== Examples === ==== Example 1: Hello world (built with cross toolchain) ==== * Power up your Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine Power up your development environment and login into bash shell
* Create source code text fileFirst of all you need to initialize a suitable environment in the bash shell console inside your virtual machine. <br />You can do this sourcing once the environment-setup script. <pre>$ source /usr/local/poky/eabi-glibc/environment-setup-arm-none-linux-gnueabi</pre>
First of all you need to initialize a suitable environment in the bash shell console inside your virtual machine. <br> You can do this sourcing once the environment-setup script. <pre>$ source /usr/local/poky/eabi-glibc/environment-setup-arm-none-linux-gnueabi</pre> Create a single .c file (hello-world.c), using your preferred editor (vi, nano, gedit, ...) <br><br>hello-world.c:<pre>#include <<stdio.h> >
int main (int argc, char **argv)
{
printf("Hello world !\n");
return 0;
}
</pre>*Build arm binary executable
$ file hello-world
hello-world: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.6.14, dynamically linked (uses shared libs), not stripped
</pre>*Transfer arm executable file from virtual machine to IGEPv2 board
[sudo] password for jdoe: letmein
</pre>*Execute arm executable file inside IGEPv2 board
And run the program in your target device (serial console or ssh network terminal)
<pre># cd /home/root
# ./hello-world
Hello World !</pre>==== Example 2: Hello world (built with autotool+cross toolchain) ====
Using the SDK with autotool enabled packages is straightforward; just pass the appropriate host option to configure
<pre>$ ./configure --target=arm-none-linux-gnueabi --host=arm-none-linux-gnueabi</pre> Now, it shows how you can download the GNU Hello program and build for your device <br><br>See log example:<pre>$ wget http://ftp.gnu.org/gnu/hello/hello-2.4.tar.gz
$ tar xzvf hello-2.4.tar.gz
$ cd hello-2.4
src/hello: ELF 32-bit LSB executable, ARM, version 1 (SYSV), for GNU/Linux 2.
$ scp src/hello root@192.168.254.254:/home/root
</pre>=== Demos (version 20101124) ===
==== Rootfs demos using an NFS-TFTP environment for IGEP v2 ====
IGEP SDK Virtual Machine comes with 2 installed demos: * poky-image-sato (271M)* poky-image-minimal (137M) <br>
You could find these demo on TFTP (Linux kernel) and NFS (rootfs) exported directories.
* TFTP exported Linux kernels at "/srv/tftp/poky/poky-image-XXXXX/igep0020/uImage" files<pre>jdoe@ubuntu:~$ cat /etc/inetd.conf
tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp
</pre><br> * NFS exported rootfs at "/srv/nfs/poky/poky-image-XXXXX/igep0020/" directories
*NFS exported rootfs at "/srv/nfs/poky/poky-image-XXXXX/igep0020/" directories<pre>jdoe@ubuntu:~$ cat /etc/exports
# /etc/exports: the access control list for filesystems which may be exported
# to NFS clients. See exports(5).
/srv/nfs/poky/poky-image-sato/igep0020 *(rw,no_root_squash,no_subtree_check,sync)
/srv/nfs/poky/poky-image-minimal/igep0020 *(rw,no_root_squash,no_subtree_check,sync)
</pre>If you want use these demos, IGEPv2 should boot with network TFTP+NFS method. Let show it:
Texas Instruments X-Loader 1.4.4-0 (Oct 21 2010 - 21:21:22)
Net: smc911x-0
Hit any key to stop autoboot: 5
</pre>* 2) Now, you are inside U-Boot prompt. Configure U-Boot environment variables with:<pre>U-Boot # setenv project poky-image-sato
U-Boot # setenv machine igep0020
U-Boot # saveenv
OneNAND: Saved environment to 0x00200000
U-Boot #
</pre> All your environment variables should be similar to:<pre>U-Boot # printenv
bootdelay=5
baudrate=115200
mmc-bootargs=setenv bootargs ${bootargs-base} root=/dev/mmcblk0p2 rw rootwait
mmc-boot=mmc init 0; if fatload mmc 0 0x80000000 boot.ini; then source; else if fatload mmc 0 0x80000000 uImage; then run mmc-bootargs; bootm 0x80000000; fi; fi
onenand-bootargs=setenv bootargs ${bootargs-base} root=/dev/mtdblock4 rootfstype=jffs2 ; run addiponenand-boot=run onenand-bootargs; onenand read 0x80000000 0x280000 0x300000 ; bootm 0x80000000nfs-bootargs=setenv bootargs ${bootargs-base} root=/dev/nfs nfsroot=${serverip}:/srv/nfs/${distro}/${project}/${machine} ; run addip
nfs-boot=if ping ${serverip}; then run nfs-bootargs; tftp 0x80000000 ${distro}/${project}/${machine}/uImage; bootm 0x80000000; fi;
bootcmd=run mmc-boot; run nfs-boot; run onenand-boot
project=poky-image-sato
Environment size: 1248/524284 bytes
</pre> Now, we can boot with TFTP+NFS method<pre>U-Boot # run nfs-boot
smc911x: detected LAN9221 controller
smc911x: phy initialized
Verifying Checksum ... OK
Loading Kernel Image ...
</pre><br>
* 3) When you get system up, login and check your boot method
See "root=/dev/nfs" and "nfsroot=192.168.254.10:/srv/nfs/poky/poky-image-sato/igep0020" in boot Linux cmdline string parameter:
<pre>
OpenedHand Linux (Poky) 3.3.1 igep0020 ttyS2
console=ttyS2,115200n8 console=tty0 omapfb.mode=dvi:1024x768MR-16@60 root=/dev/nfs nfsroot=192.168.254.10:/srv/nfs/poky/poky-image-sato/igep0020 ip=192.168.254.254:192.168.254.10:192.168.254.10:255.255.255.0::eth0:
root@igep0020:~#
</pre>
----
=== HOWTOs ===
This section describes related manuals and HOWTOs.
==== The bootloader X-loader ==== [[The_bootloader_XThe bootloader X-loader|This HOWTO]] should be readed for advanced developers who wants hacking first stage bootloader. ==== The bootloader U-Boot ==== [[The_bootloader_UThe bootloader U-Boot|This HOWTO]] should be readed for developers who wants hacking second stage bootloader and change some board features (GPIO MUX configuration, rootfs location,...) ==== The Linux kernel ==== [[The_Linux_kernelThe Linux kernel|This HOWTO]] should be readed for developers who wants hacking IGEP Linux kernel and built-in drivers. People who knows hardware and ajusts Linux kernel feature. Also, developers who add more feature to Linux kernel like network protocol, new filesystems, patching buggy Linux kernel,... ==== How to upgrade and recover the factory firmware ====
<br>
----
=== OTHER REFERENCES === ==== Frequency Asked Questions (FAQ) ==== Useful webpage is "[[Frequently Asked Questions and Their Answers|Frequency Asked Questions]]" or [[Frequently Asked Questions and Their Answers|FAQ]] page. Users could find common questions about IGEPv2 board and very quick answers about IGEPv2 software and hardware issues. ==== FORUM ==== Free [[http://www.igep.es/forum/|IGEP Support Forum]] could be found a lot of knowledge. People who has some issue, they should read forum threads. Then, if you don't find anything about your issue, you should write new post.
----
<br> == Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine (version 20091222) == === Overview (version 20091222) === *Older IGEP SDK Virtual Machine (2009-December)
== Ubuntu 8.04 IGEP v2.0 SDK Virtual Machine (version 20091222) ===== Overview Demos (version 20091222) ===* Older IGEP SDK Virtual Machine (2009-December)
==== Rootfs demos using an NFS-TFTP environment for IGEP v2 ====
<pre>$ sudo /etc/init.d/nfs-kernel-server restart
</pre>
Now, you can power up your board, stop at u-boot, set the project variable point to poky-image-sato and boot via NFS
=== Virtual Machine Enhancements (version 20091222) ===
====Software updates====
*[http://git.igep.es/?p=pub/scm/poky.git;a=commit;h=949b440e52d637ef52eadb50c87e615eebd64ed4 Poky v3.2.1-0 (Fri, 19 Mar 2010)]