VBOX File / Preferences... / Network ------------------------------------ Add Host-Only Ethernet Adapter, static IP 192.168.57.10, disable DHCP server This adapter is for making SSH connections from host to guest and vice versa. VBOX developement machine ------------------------- VBOX VM AMD64 Debian VBOX, 32GB disk, 2GB RAM, Automatic partitioning, one partition for all files network adapter 1 - NAT, DHCP assigned IP 10.0.2.15 network adapter 2 - bridged to Realtek, static IP 192.168.56.30 network adapter 3 - host-only, static IP 192.168.57.30 - for SSH from guest to host and vice versa root - pstk5 arpadb - pstk9 Create c:\vboxshare on host Add shared folder c:\vboxshare as vboxshare (make permanent) to the virtual machine's list of shared folders Windows - Realtek adapter - IP 192.168.56.10 PuTTY (Windows) - COM3, 115200, 8, 1, no parity, no flow control Developement machine install ---------------------------- Install: dselect ncurses-dev gawk bison flex gettext dialog g++ zlib1g-dev dhcp3-server / isc-dhcp-server tftp tftpd joe strace libqt4-dev qt4-dev-tools qt4-doc /etc/network/interfaces - if we define eth1, it is no longer managed by Network Manager (since squeeze) # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 #NetworkManager#iface eth0 inet dhcp auto eth1 iface eth1 inet static address 192.168.56.20 netmask 255.255.255.0 auto eth2 iface eth2 inet static address 192.168.57.30 netmask 255.255.255.0 /etc/group and /etc/gshadow Add arpadb to sudo (under sudo arpadb will have the same powers as root) /etc/dhcp/dhcpd.conf # The ddns-updates-style parameter controls whether or not the server will # attempt to do a DNS update when a lease is confirmed. We default to the # behavior of the version 2 packages ('none', since DHCP v2 didn't # have support for DDNS.) ddns-update-style none; # option definitions common to all supported networks... option domain-name "fe.uni-lj.si uni-lj.si si"; option domain-name-servers 212.235.181.2, 212.235.188.18; default-lease-time 600; max-lease-time 7200; # If this DHCP server is the official DHCP server for the local # network, the authoritative directive should be uncommented. #authoritative; # Use this to send dhcp log messages to a different log file (you also # have to hack syslog.conf to complete the redirection). log-facility local7; # No service will be given on this subnet, but declaring it helps the # DHCP server to understand the network topology. subnet 10.0.2.0 netmask 255.255.255.0 { } # This is a very basic subnet declaration. subnet 192.168.56.0 netmask 255.255.255.0 { range 192.168.56.30 192.168.56.40; server-name "192.168.56.20"; next-server 192.168.56.20; } /etc/init.d/isc-dhcp-server stop rm /var/lib/dhcp/dhcpd.leases touch /var/lib/dhcp/dhcpd.leases /etc/init.d/isc-dhcp-server start /etc/inetd.conf tftp dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd /srv/tftp create /srv/tftp chown root.arpadb /srv/tftp chmod g+w /srv/tftp ~/.bashrc update ls alias alias ls='ls --color=auto --human-readable --indicator-style=classify' add /usr/local/bin to PATH export PATH=$PATH:/usr/local/bin:/opt/OSELAS.Toolchain-1.99.3/arm-v5te-linux-gnueabi/gcc-4.3.2-glibc-2.8-binutils-2.18-kernel-2.6.27-sanitized/bin:/opt/eclipse /etc/ssh/ssh_config - avoid warnings when host key changes StrictHostKeyChecking no Create folder /vboxshare on guest Mount with mount -t vboxsf vboxshare /vboxshare /etc/fstab - add line vboxshare /vboxshare vboxsf rw 0 0 Copy-paste to and from guest To copy from guest use explicit copy option in application menu. To paste to guest, use middle mouse button or explicit paste option in application menu. Target build and setup (imx27) ------------------------------ Get ToolChain from http://www.ptxdist.de/oselas/toolchain/index_de.html OSELAS.Toolchain-2011.02.0.tar.bz2 from http://www.ptxdist.de/software/ptxdist/download/ ptxdist-2011.02.0.tar.bz2 Build ToolChain unpack ptxdist-2011.02.0.tar.bz2 become root ./configure make make install become normal user unpack OSELAS.Toolchain-2011.02.0.tar.bz2 ptxdist menu select software platform folder ptxconfigs, select arm-v5te-linux-gnueabi_gcc... exit ptxdist go Get BSP from ftp://ftp.phytec.de/pub/Products/phyCORE-iMX27/Linux/PD11.1.1/ OSELAS.BSP-Phytec-phyCORE-i.MX27-PD11.1.1.tar.gz ReleaseNotes.txt from http://www.ptxdist.de/software/ptxdist/download/ ptxdist-2010.11.1.tar.bz2 Build BSP unpack ptxdist-2010.11.1.tar.bz2 become root ./configure make make install become normal user Configuration ptxdist menu menuconfig / base configuration / debug tools / gdb - make gdb server * debug tools / strace - make * scripting languages / php5 - make * networking tools / openssh - make sftp * editors - make nano, hexedit * graphics and multimedia / make mplayer * graphics and multimedia / sound - make setmixer, rawrec/rawplay * graphics and multimedia / gstreamer - enable everything except gdk_pixbuf disk and file utilities / e2fsprogs / binaries - enable mkfs.ext2, mkfs.ext3 ptxdist kernelconfig do not put console on framebuffer (or you get a screensaver that cannot be turned off) change ext2 and ext3 support from M to * copy missing sources to src/ ptxdist go Updating the bootloader in NAND FLASH cp platform-phyCORE-i.MX27/images/barebox-image /srv/tftp Boot board, press space dhcp tftp barebox-image erase /dev/nand0.barebox.bb cp barebox-image /dev/nand0.barebox.bb Switch positions for booting from NOR/NAND FLASH 1 2 3 4 5 6 7 8 NOR: 0 0 0 0 0 0 0 0 NAND: 0 0 0 1 0 1 0 0 Editing the config file in barebox prompt edit env/config CTRL+D ... save CTRL+C ... exit without save save ... to save the environment to FLASH Barebox /env/config (parts) # use 'dhcp' to do dhcp in barebox and in kernel # use 'none' if you want to skip kernel ip autoconfiguration ip=dhcp # or set your networking parameters here eth0.ethaddr=00:50:c2:5e:00:9a #eth0.ipaddr=192.168.3.11 #eth0.netmask=255.255.255.0 #eth0.gateway=192.168.3.10 #eth0.serverip=192.168.3.10 #display=TX090 # new board display=Sharp-LQ035Q7 # old board rootfs_mmc=/dev/mmcblk0p1 Barebox /env/bin/boot ... if [ x$1 = xnand ]; then rootfs_loc=nand kernel_loc=nand elif [ x$1 = xnor ]; then rootfs_loc=nor kernel_loc=nor elif [ x$1 = xnet ]; then rootfs_loc=net kernel_loc=net elif [ x$1 = xnandmmc ]; then rootfs_loc=mmc rootfs_type=ext3 kernel_loc=nand fi ... if [ x$rootfs_type = xubifs ]; then if [ -z $ubiroot ]; then ubiroot="root" fi bootargs="$bootargs root=ubi0:$ubiroot ubi.mtd=$rootfs_mtdblock else if [ x$rootfs_loc = xmmc ]; then bootargs="$bootargs root=$rootfs_mmc" else bootargs="$bootargs root=/dev/mtdblock$rootfs_mtdblock" fi fi ... default boot - kernel in NAND FLASH, root fs in SD card, partition 1 boot nandmmc boot from NAND FLASH boot nand Barebox /env/bin/boot ... boot nandmmc SD card root fs on partition 1 (1GB), ext3 fat32 partition 2 (512MB) Dumping flash contents cat /dev/mtdblockx > file x=0..4 - NOR FLASH (barebox, env, splash, kernel, root) x=5..8 - NAND FLASH (barebox, env, splash, kernel, root) The contents can be programmed using the 'update' command in barebox prompt (loaded from tftp). Old board preparation 1 2 3 4 5 6 7 8 ATK: 0 0 1 0 1 0 1 0 ATK, erase 0xc0000000 (length 0x60000 - bootloader and environment) ATK, program 0xc0000000 - bootloader+environment image for old board 1 2 3 4 5 6 7 8 NOR: 0 0 0 0 0 0 0 0 Boot from NOR FLASH. update -t barebox -d nand -m tftp -f barebox-image update -t splash -d nand -m tftp -f splash-pstk.bmp update -t kernel -d nand -m tftp -f linuximage update -t rootfs -d nand -m tftp -f root.jffs2 update -t bareboxenv -d nand -m tftp -f barebox-env-old 1 2 3 4 5 6 7 8 NAND: 0 0 0 1 0 1 0 0 New board preparation - same as old board, except that a different barebox environment is used update -t bareboxenv -d nand -m tftp -f barebox-env-old The only difference is the setting 'display=TX090' instead of 'display=Sharp-LQ035Q7' is /env/config. PSTK Vaje VM, differences from Developement VM ---------------------------------------------- VBOX VM 20GB disk network adapter 3 - host-only, static IP 192.168.57.20 - for SSH from guest to host and vice versa Hostname vajevm Logins root - pstk pstk - pstk /etc/network/interfaces # The loopback network interface auto lo iface lo inet loopback # The primary network interface allow-hotplug eth0 #NetworkManager#iface eth0 inet dhcp auto eth1 iface eth1 inet static address 192.168.56.20 netmask 255.255.255.0 auto eth2 iface eth2 inet static address 192.168.57.20 netmask 255.255.255.0 /etc/group and /etc/gshadow Add pstk to sudo (under sudo pstk will have the same powers as root) PSTK Vaje, creating a developement environment for Qt et. al. ------------------------------------------------------------- On developement VM pack /home/arpadb/build/OSELAS.BSP-Phytec-phyCORE-i.MX27-PD11.1.1-full/platform-phyCORE-i.MX27/sysroot-* Unpack in Vaje VM to the same location Add to PATH (prefix) - Qt cross-compile utilities /home/arpadb/build/OSELAS.BSP-Phytec-phyCORE-i.MX27-PD11.1.1/platform-phyCORE-i.MX27/sysroot-cross/bin Add to PATH (postfix) - toolchain /opt/OSELAS.Toolchain-2011.02.0/arm-v5te-linux-gnueabi/gcc-4.5.2-glibc-2.13-binutils-2.21-kernel-2.6.36-sanitized/bin Touchscreen calibration ts_calibrate Start runme in Qt example calculator.tgz Tutorial in qt-demo.tar.gz Compile scripts for Qt projects (in qt-demo.tar.gz and /home/pstk) runarm runpc Qt4 help assistant-qt4