User Tools

Site Tools


Sidebar

* [[start]] * [[som|System on module]] * [[usomiq-beaglebone|Mentorel Beaglebone uSomIQ]] * [[usomiq|uSomIQ AM335x]] * [[somiq|SomIQ family]] * [[blueshark|BlueShark family]] * [[devkit|DevKits]] * [[usomiq-bone-cape|uSomIQ Bone Cape]] * [[somiqboard|Somiqboard]] * [[atoll|Atoll]] * [[expansion|Expansion boards]] * [[somiq-wlan|SomIQ-WLAN]] * [[os|OS support]] * [[ubuntu|Ubuntu Linux]] * [[sw-hints|SW hints]] * [[tslib|Tslib]] * [[qt-embedded|Qt embedded]] Follow us * [[http://twitter.com/mentorel|Twitter]] * [[http://www.linkedin.com/company/mentorel|LinkedIn]] * [[https://www.facebook.com/mentorel.company|Facebook]] * [[https://plus.google.com/105868322858146792212/posts|Google+]] * [[http://www.mentorel.com|MENTOREL home page]]

usomiq-ubuntu

This is an old revision of the document!


A PCRE internal error occured. This might be caused by a faulty plugin

====== uSomIQ Ubuntu and Debian ====== This page describes to how deploy the Ubuntu OS and Debian on a uSomIQ COM. These instructions were adapted from the ones provided by Robert Nelson available here:\\ [[http://www.eewiki.net/display/linuxonarm/BeagleBone]] ===== Basic Requirements ===== * ARM Cross Compiler * Linaro: [https://launchpad.net/linaro-toolchain-binaries] * Bootloader * Das U-Boot -- the Universal Boot Loader [http://www.denx.de/wiki/U-Boot] * Source -- [http://git.denx.de/?p=u-boot.git;a=summary] * Linux Kernel * Linus's Mainline tree: [http://git.kernel.org/?p=linux/kernel/git/torvalds/linux.git;a=summary] * Linux omap tree: [http://git.kernel.org/?p=linux/kernel/git/tmlind/linux-omap.git] * Arago Project TI Staging tree: [http://arago-project.org/git/projects/?p=linux-am33x.git;a=shortlog;h=refs/heads/v3.2-staging] * ARM based rootfs * Debian Squeeze: [http://www.debian.org/] ===== GCC Toolchain ===== <code> wget -c https://launchpad.net/linaro-toolchain-binaries/trunk/2013.07/+download/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux.tar.xz tar xJf gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux.tar.xz export CC=`pwd`/gcc-linaro-arm-linux-gnueabihf-4.8-2013.07-1_linux/bin/arm-linux-gnueabihf- </code> ===== Bootloader ===== Das U-Boot -- the Universal Boot Loader [http://www.denx.de/wiki/U-Boot] ==== U-Boot Download ==== Download U-Boot via git: <code> git clone git://git.denx.de/u-boot.git cd u-boot/ git checkout v2013.07 -b tmp </code> ==== U-Boot Patches ==== <code> wget http://www.mentorel.com/downloads/usomiq/patches/u-boot-2013.07-usomiq.patch patch -p1 < u-boot-2013.07-usomiq.patch </code> ==== U-Boot Configure and Build ==== <code> make ARCH=arm CROSS_COMPILE=${CC} distclean make ARCH=arm CROSS_COMPILE=${CC} am335x_evm_config make ARCH=arm CROSS_COMPILE=${CC} </code> ===== Linux Kernel ===== <code> git clone git://github.com/RobertCNelson/linux-dev.git cd linux-dev/ git checkout origin/am33x-v3.2 -b tmp </code> Download a patch to enable uSomIQ support in kernel <code> wget http://www.mentorel.com/downloads/usomiq/patches/add-usomiq-to-nelson-scripts.patch patch -p1 < add-usomiq-to-nelson-scripts.patch </code> Run Build Script: <code> ./build_kernel.sh </code> The kernel zImage and modules will be under the deploy directory. ===== Prebuilt binaries ===== You can find the prebuilt binaries here: [[http://www.mentorel.com/downloads/usomiq/boot/beaglebone-compatible/]] ====== Root File System ====== ===== Debian 7.0.0 (Wheezy) Root File System ===== This file system is very small and can be installed to the NAND flash on uSomIQ. It is not that small like Angstrom minimal distribution (~20M), but will require around 75M on the flash. However it is a real Debian system with apt-get utility installed. Default User: debian\\ Password: temppwd Root User: root\\ Root Password: root <code> wget -c https://rcn-ee.net/deb/minfs/wheezy/debian-7.5-minimal-armhf-2014-07-07.tar.xz </code> verify the image with: <code> md5sum debian-7.5-minimal-armhf-2014-07-07.tar.xz cae9e0cfac14fd6aa19d4c17357aecc8 debian-7.5-minimal-armhf-2014-07-07.tar.xz </code> Extract Image: <code> tar xf debian-7.5-minimal-armhf-2014-07-07.tar.xz </code> Now you have a directory with the archived (tar) file system itself and a file with user names/passwords. ===== Ubuntu 13.04 (Raring) Root File System ===== Default User: ubuntu\\ Password: temppwd <code> wget -c https://rcn-ee.net/deb/minfs/trusty/ubuntu-14.04-minimal-armhf-2014-07-07.tar.xz </code> verify the image with: <code> md5sum ubuntu-14.04-minimal-armhf-2014-07-07.tar.xz c30fb91012701cdbfa00bb6c86868d0a ubuntu-14.04-minimal-armhf-2014-07-07.tar.xz </code> Extract Image: <code> tar xJf ubuntu-14.04-minimal-armhf-2014-07-07.tar.xz </code> Now you have a directory with the archived (tar) file system itself and a file with user names/passwords. ===== Root File System for NAND ===== A Root File System around 64Mb in size, for flash applications. **Debian 7 (small flash)** ^ User ^ Password ^ | debian | temppwd | | root | root | Download: <code> wget -c https://rcn-ee.net/deb/barefs/wheezy/debian-7.5-bare-armhf-2014-07-07.tar.xz </code> Verify: <code> md5sum debian-7.5-bare-armhf-2014-07-07.tar.xz a5f0e75e5ad16bb110d4291f54ed6cb9 debian-7.5-bare-armhf-2014-07-07.tar.xz </code> Extract: <code> tar xJf debian-7.5-bare-armhf-2014-07-07.tar.xz </code> ====== Install Ubuntu/Debian ====== ===== SD card ===== ==== Setup microSD card ==== For these instruction, we are assuming: DISK=/dev/mmcblk0, "sudo fdisk \-l" is useful for determining the device id.. <code> export DISK=/dev/mmcblk0 </code> Erase microSD card: <code> sudo dd if=/dev/zero of=${DISK} bs=1024 count=1024 sudo parted --script ${DISK} mklabel msdos </code> Setup Boot Partition: <code> sudo fdisk ${DISK} << __EOF__ n p 1 +64M t e p w __EOF__ </code> Set Boot Flag <code> sudo parted --script ${DISK} set 1 boot on </code> Format Boot Partition as vfat: <code> DISK=/dev/mmcblk0 sudo mkfs.vfat -F 16 ${DISK}p1 -n boot (or) DISK=/dev/sdX sudo mkfs.vfat -F 16 ${DISK}1 -n boot </code> Setup Root File System Partition: <code> sudo fdisk ${DISK} << __EOF__ n p 2 w __EOF__ </code> Format rootfs as ext4: <code> DISK=/dev/mmcblk0 sudo mkfs.ext4 ${DISK}p2 -L rootfs (or) DISK=/dev/sdX sudo mkfs.ext4 ${DISK}2 -L rootfs </code> ==== Mount Partitions ==== *Note: On most systems these partitions will be auto-mounted...* <code> sudo mkdir -p /media/boot/ sudo mkdir -p /media/rootfs/ DISK=/dev/mmcblk0 sudo mount ${DISK}p1 /media/boot/ sudo mount ${DISK}p2 /media/rootfs/ (or) DISK=/dev/sdX sudo mount ${DISK}1 /media/boot/ sudo mount ${DISK}2 /media/rootfs/ </code> ==== Install Bootloaders ==== Copy MLO/u-boot.img to the boot partition <code> sudo cp -v ./u-boot/MLO /media/boot/ sudo cp -v ./u-boot/u-boot.img /media/boot/ </code> ==== uEnv.txt based bootscript ==== Requires: u-boot v2013.04 Create "uEnv.txt" boot script: (nano uEnv.txt) <code> #optargs= mmcroot=/dev/mmcblk0p2 ro mmcrootfstype=ext4 rootwait fixrtc #To boot old v3.2.x based kernel enable: (BeagleBone/uSomIQ only) uenvcmd=run loaduimage; run mmc_classic_boot #To boot new v3.8.x based device tree: #uenvcmd=run loaduimage; run loadfdt; run mmcargs; bootz ${loadaddr} - ${fdtaddr} </code> Copy uEnv.txt to the boot partition: <code> sudo cp -v ./uEnv.txt /media/boot/ </code> ==== Install Kernel and Root File System ==== To help new users, since the kernel version can change on a daily basis. The kernel building scripts in this git repo will now give you a hint of what kernel version was built. <code> ----------------------------- Script Complete eewiki.net: [user@localhost:~$ export kernel_version=3.X.Y-Z] ----------------------------- </code> Copy and Paste that "export kernel_version=3.X.Y-Z" exactly as shown in your own build/desktop environment: <code> export kernel_version=3.X.Y-Z </code> Copy Kernel zImage: <code> sudo cp -v ./linux-dev/deploy/${kernel_version}.zImage /media/boot/zImage </code> Copy Root File System: <code> sudo tar xfvp ./*-*-minimal-arm*-*/arm*-rootfs-*.tar -C /media/rootfs/ </code> Copy Kernel modules: <code> sudo tar xfv ./linux-dev/deploy/${kernel_version}-modules.tar.gz -C /media/rootfs/ </code> Setup /etc/fstab: <code> sudo nano /media/rootfs/etc/fstab </code> Add: <code> /dev/mmcblk0p2 / auto errors=remount-ro 0 1 /dev/mmcblk0p1 /boot/uboot auto defaults 0 0 </code> === Enable Networking === <code> sudo nano /media/rootfs/etc/network/interfaces </code> Add: <code> auto lo iface lo inet loopback auto eth0 iface eth0 inet dhcp </code> === Enable Serial Login === **Debian:** <code> sudo nano /media/rootfs/etc/inittab </code> Add at end of file: <code> T0:23:respawn:/sbin/getty -L ttyO0 115200 vt102 </code> **Ubuntu:** <code> sudo nano /media/rootfs/etc/init/serial.conf </code> Add: <code> start on stopped rc RUNLEVEL=[2345] stop on runlevel [!2345] respawn exec /sbin/getty 115200 ttyO0 </code> Remove microSD card: <code> sync sudo umount /media/boot sudo umount /media/rootfs </code> ===== Install Debian to NAND ===== Here you will learn how install Debian to a UBIFS partition on a uSomIQ system on module. 1) Install Ubuntu or Debian to a SD card as described in the previous step 2) Download and extract a small Debian file system as described [[#root_file_system_for_nand]] You will have an archive debian-7.1-bare-armhf-2013-08-25.tar after extracting. Place this archive to the SD card with OS installed in the previous step. 3) Boot the board with the SD card to u-boot and issue the following commands: <code> nand erase.chip mmc rescan fatload mmc 0 0x81600000 MLO nand write 0x81600000 0 20000 nand write 0x81600000 20000 20000 nand write 0x81600000 40000 20000 </code> Load the u-boot image u-boot.img to NAND. Note that we use the actual size of the u-boot.img file in Hex. If your file has a different size then update this number <code> fatload mmc 0 0x81600000 u-boot.img nand write 0x81600000 80000 57d74 # <- this is the actual size of the u-boot.img file in Hex </code> Load the kernel image zImage to NAND. Note that we use the actual size of the zImage file in Hex. If your file has a different size then update this number <code> run loaduimage nand write ${loadaddr} 280000 2B08f8 # <- this is the actual size of the zImage file in Hex </code> 4) Boot farther to OS 5) Prepare a UBIFS partition For more information visit: [[http://processors.wiki.ti.com/index.php/UBIFS_Support]] Preparing NAND partition for modules with 256MB <code> ubiformat /dev/mtd7 -s 2048 -O 2048 ubiattach /dev/ubi_ctrl -m 7 -O 2048 ubimkvol /dev/ubi0 -s 235MiB -N rootfs mount -t ubifs ubi0:rootfs /mnt </code> Preparing NAND partition for modules with 512MB <code> ubiformat /dev/mtd7 -s 2048 -O 2048 ubiattach /dev/ubi_ctrl -m 7 -O 2048 ubimkvol /dev/ubi0 -s 450MiB -N rootfs mount -t ubifs ubi0:rootfs /mnt </code> 6) Install the file system to the UBIFS-partiotion <code> cd /mnt tar xf <path to image>/debian-7.1-bare-armhf-2013-08-25.tar sync </code> 7) Enable the Serial login Edit the file /mnt/etc/inittab as described for the SD card installation. 8) Enable Network Edit the file /mnt/etc/network/interfaces as described for the SD card installation. 9) Remove the SD card and reboot the board ====== FAQ ====== ===== CircuitCo LCD3 Backlight ===== Turn on Backlight: <code> i2cset -f -y 1 0x24 0x07 0x09 i2cset -f -y 1 0x24 0x08 0x60 </code> ===== CircuitCo LCD3/LCD7 TouchScreen ===== Add to /etc/modules: <code> fbcon ti_tscadc </code>

usomiq-ubuntu.1425539348.txt.gz · Last modified: 2015/03/05 02:09 by maxx