This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
usomiq-kernel-dts [2014/07/22 04:07] maxx [Install Debian to NAND] |
usomiq-kernel-dts [2015/11/20 09:08] (current) maxx [Install Kernel and Root File System] |
||
---|---|---|---|
Line 35: | Line 35: | ||
git clone git://git.denx.de/u-boot.git | git clone git://git.denx.de/u-boot.git | ||
cd u-boot/ | cd u-boot/ | ||
- | git checkout v2014.07-rc3 -b tmp | + | git checkout v2014.10 -b tmp |
</code> | </code> | ||
Line 41: | Line 41: | ||
<code> | <code> | ||
- | wget http://www.mentorel.com/downloads/usomiq/patches/u-boot-usomiq-v2014.07-rc3.patch | + | wget http://www.mentorel.com/downloads/usomiq/patches/u-boot-usomiq-v2014.10.patch |
- | patch -p1 < u-boot-usomiq-v2014.07-rc3.patch | + | patch -p1 < u-boot-usomiq-v2014.10.patch |
</code> | </code> | ||
Line 52: | Line 52: | ||
make ARCH=arm CROSS_COMPILE=${CC} | make ARCH=arm CROSS_COMPILE=${CC} | ||
</code> | </code> | ||
+ | If you bought modules with NAND flash 1GB and more then you need to compile a different version of u-boot, because this type of NAND has a different physical structure. The commands should be issued: | ||
+ | <code> | ||
+ | make ARCH=arm CROSS_COMPILE=${CC} distclean | ||
+ | make ARCH=arm CROSS_COMPILE=${CC} am335x_nand4k_defconfig | ||
+ | make ARCH=arm CROSS_COMPILE=${CC} | ||
+ | </code> | ||
===== Upgrade distro "device-tree-compiler" package ===== | ===== Upgrade distro "device-tree-compiler" package ===== | ||
<code> | <code> | ||
Line 73: | Line 78: | ||
Download a patch to enable uSomIQ support in kernel | Download a patch to enable uSomIQ support in kernel | ||
<code> | <code> | ||
- | wget http://www.mentorel.com/downloads/usomiq/patches/add-usomiq-v3.8.patch | + | wget http://www.mentorel.com/downloads/usomiq/patches/add-usomiq-rcn-v3.8.patch |
- | patch -p1 < add-usomiq-v3.8.patch | + | patch -p1 < add-usomiq-rcn-v3.8.patch |
</code> | </code> | ||
- | ==== v3.13.x branch (SGX) ==== | + | |
- | ..coming soon | + | ==== v3.18.x branch (SGX and better usb & ethernet) ==== |
- | ==== v3.15.x branch (better usb and ethernet) ==== | + | <code> |
- | ..coming soon | + | git checkout origin/am33x-v3.18 -b tmp |
+ | </code> | ||
+ | Download and apply a patch to add usomiq support in the kernel: | ||
+ | <code> | ||
+ | wget http://mentorel.com/downloads/usomiq/patches/add-usomiq-rcn-v3.18.patch | ||
+ | patch -p1 < add-usomiq-rcn-v3.18.patch | ||
+ | </code> | ||
+ | If you bought modules with NAND flash 1GB and more then you need to open the file patch.sh, look for this section: | ||
+ | <code> | ||
+ | usomiq () { | ||
+ | git apply "${DIR}/patches/usomiq/0001-add-usomiq-dts.patch" | ||
+ | #git apply "${DIR}/patches/usomiq/0002-add-usomiq-nand4k.patch" | ||
+ | } | ||
+ | </code> | ||
+ | and remove the '#' symbol before the second git command. | ||
Run Build Script: | Run Build Script: | ||
Line 90: | Line 110: | ||
====== Root File System ====== | ====== Root File System ====== | ||
- | ===== Debian 7.0.0 (Wheezy) Root File System ===== | + | ===== Debian 8.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. | 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. | ||
Line 101: | Line 121: | ||
<code> | <code> | ||
- | wget -c https://rcn-ee.net/deb/minfs/wheezy/debian-7.5-minimal-armhf-2014-07-07.tar.xz | + | wget -c https://rcn-ee.com/rootfs/eewiki/minfs/debian-8.2-minimal-armhf-2015-09-07.tar.xz |
</code> | </code> | ||
verify the image with: | verify the image with: | ||
<code> | <code> | ||
- | md5sum debian-7.5-minimal-armhf-2014-07-07.tar.xz | + | md5sum debian-8.2-minimal-armhf-2015-09-07.tar.xz |
- | cae9e0cfac14fd6aa19d4c17357aecc8 debian-7.5-minimal-armhf-2014-07-07.tar.xz | + | 406cd5193f4ba6c2694e053961103d1a debian-8.2-minimal-armhf-2015-09-07.tar.xz |
</code> | </code> | ||
Extract Image: | Extract Image: | ||
<code> | <code> | ||
- | tar xf debian-7.5-minimal-armhf-2014-07-07.tar.xz | + | tar xf debian-8.2-minimal-armhf-2015-09-07.tar.xz |
</code> | </code> | ||
Now you have a directory with the archived (tar) file system itself and a file with user names/passwords. | Now you have a directory with the archived (tar) file system itself and a file with user names/passwords. | ||
Line 120: | Line 140: | ||
<code> | <code> | ||
- | wget -c https://rcn-ee.net/deb/minfs/trusty/ubuntu-14.04-minimal-armhf-2014-07-07.tar.xz | + | wget -c https://rcn-ee.com/rootfs/eewiki/minfs/ubuntu-14.04.3-minimal-armhf-2015-09-07.tar.xz |
</code> | </code> | ||
verify the image with: | verify the image with: | ||
<code> | <code> | ||
- | md5sum ubuntu-14.04-minimal-armhf-2014-07-07.tar.xz | + | md5sum ubuntu-14.04.3-minimal-armhf-2015-09-07.tar.xz |
- | c30fb91012701cdbfa00bb6c86868d0a ubuntu-14.04-minimal-armhf-2014-07-07.tar.xz | + | b119ede365e7e7f6d380a5c16592f312 ubuntu-14.04.3-minimal-armhf-2015-09-07.tar.xz |
</code> | </code> | ||
Extract Image: | Extract Image: | ||
<code> | <code> | ||
- | tar xJf ubuntu-14.04-minimal-armhf-2014-07-07.tar.xz | + | tar xf ubuntu-14.04.3-minimal-armhf-2015-09-07.tar.xz |
</code> | </code> | ||
- | Now you have a directory with the archived (tar) file system itself and a file with user names/passwords. | + | Now you have a directory with the archived (tar) file system itself and a file with user names/passwords. |
===== Root File System for NAND ===== | ===== Root File System for NAND ===== | ||
Line 143: | Line 163: | ||
Download: | Download: | ||
<code> | <code> | ||
- | wget -c https://rcn-ee.net/deb/barefs/wheezy/debian-7.5-bare-armhf-2014-07-07.tar.xz | + | wget -c https://rcn-ee.com/rootfs/eewiki/barefs/debian-8.2-bare-armhf-2015-09-07.tar.xz |
</code> | </code> | ||
Verify: | Verify: | ||
<code> | <code> | ||
- | md5sum debian-7.5-bare-armhf-2014-07-07.tar.xz | + | md5sum debian-8.2-bare-armhf-2015-09-07.tar.xz |
- | a5f0e75e5ad16bb110d4291f54ed6cb9 debian-7.5-bare-armhf-2014-07-07.tar.xz | + | 033a436bcb13b8c98dd7fa4d3ec37503 debian-8.2-bare-armhf-2015-09-07.tar.xz |
</code> | </code> | ||
Extract: | Extract: | ||
<code> | <code> | ||
- | tar xJf debian-7.5-bare-armhf-2014-07-07.tar.xz | + | tar xf debian-8.2-bare-armhf-2015-09-07.tar.xz |
</code> | </code> | ||
====== Install Ubuntu/Debian ====== | ====== Install Ubuntu/Debian ====== | ||
Line 330: | Line 350: | ||
=== Enable Serial Login === | === 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:** | **Ubuntu:** | ||
Line 374: | Line 385: | ||
nand erase.chip | nand erase.chip | ||
mmc rescan | mmc rescan | ||
- | fatload mmc 0 0x81600000 MLO | + | load mmc 0 ${loadaddr} MLO |
- | nand write 0x81600000 0 20000 | + | nand write ${loadaddr} NAND.SPL |
- | nand write 0x81600000 20000 20000 | + | nand write ${loadaddr} NAND.SPL.backup1 |
- | nand write 0x81600000 40000 20000 | + | |
</code> | </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 | + | Load the u-boot image u-boot.img to NAND. |
<code> | <code> | ||
- | fatload mmc 0 0x81600000 u-boot.img | + | load mmc 0 ${loadaddr} u-boot.img |
- | nand write 0x81600000 80000 63354 # <- this is the actual size of the u-boot.img file in Hex | + | nand write ${loadaddr} NAND.u-boot |
</code> | </code> | ||
Load the device tree binary | Load the device tree binary | ||
Line 390: | Line 400: | ||
run findfdt | run findfdt | ||
run loadfdt | run loadfdt | ||
- | nand write ${fdtaddr} 100000 20000 | + | nand write ${fdtaddr} NAND.u-boot-spl-os |
</code> | </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 | + | Load the kernel image zImage to NAND. |
<code> | <code> | ||
- | run loaduimage | + | run loadimage |
- | nand write ${loadaddr} 280000 540F08 # <- this is the actual size of the zImage file in Hex. If your file has a different size then update this number | + | nand write ${loadaddr} NAND.kernel |
</code> | </code> | ||
Line 406: | Line 416: | ||
Preparing NAND partition for modules with 256MB | Preparing NAND partition for modules with 256MB | ||
<code> | <code> | ||
- | ubiformat /dev/mtd8 -s 2048 -O 2048 | + | ubiformat /dev/mtd9 -s 2048 -O 2048 |
- | ubiattach /dev/ubi_ctrl -m 8 -O 2048 | + | ubiattach /dev/ubi_ctrl -m 9 -O 2048 |
- | ubimkvol /dev/ubi0 -s 235MiB -N rootfs | + | ubimkvol /dev/ubi0 -s 230MiB -N rootfs |
mount -t ubifs ubi0:rootfs /mnt | mount -t ubifs ubi0:rootfs /mnt | ||
</code> | </code> | ||
Line 414: | Line 424: | ||
Preparing NAND partition for modules with 512MB | Preparing NAND partition for modules with 512MB | ||
<code> | <code> | ||
- | ubiformat /dev/mtd8 -s 2048 -O 2048 | + | ubiformat /dev/mtd9 -s 2048 -O 2048 |
- | ubiattach /dev/ubi_ctrl -m 8 -O 2048 | + | ubiattach /dev/ubi_ctrl -m 9 -O 2048 |
ubimkvol /dev/ubi0 -s 450MiB -N rootfs | ubimkvol /dev/ubi0 -s 450MiB -N rootfs | ||
+ | mount -t ubifs ubi0:rootfs /mnt | ||
+ | </code> | ||
+ | |||
+ | Preparing NAND partition for modules with 1024MB | ||
+ | <code> | ||
+ | ubiformat /dev/mtd9 -s 2048 -O 2048 | ||
+ | ubiattach /dev/ubi_ctrl -m 9 -O 2048 | ||
+ | ubimkvol /dev/ubi0 -s 950MiB -N rootfs | ||
mount -t ubifs ubi0:rootfs /mnt | mount -t ubifs ubi0:rootfs /mnt | ||
</code> | </code> |