Basic Requirements
ARM Cross CompilerUbuntu (11.04 (Natty Narwhal) minimum): sudo apt-get install gcc-arm-linux-gnueabi
Linaro: https://launchpad.net/linaro-toolchain-binaries
BootloaderDas 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 KernelLinus'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/
Bootloader
Das U-Boot – the Universal Boot Loader http://www.denx.de/wiki/U-Boot
U-Boot Download:
Download U-Boot via git:git clone git://git.denx.de/u-boot.git
cd u-boot/
git checkout v2012.10 -b tmp
U-Boot Patches:wget https://raw.github.com/RobertCNelson/Bootloader-Builder/master/patches/v2012.10/0001-enable-bootz-support.patch
wget https://raw.github.com/RobertCNelson/Bootloader-Builder/master/patches/v2012.10/0002-am33xx-Enable-DDR3-for-DDR3-version-of-beaglebone.patch
patch -p1 < 0001-enable-bootz-support.patch
patch -p1 < 0002-am33xx-Enable-DDR3-for-DDR3-version-of-beaglebone.patch
U-Boot Configure and Build:
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- distclean
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- am335x_evm_config
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
Linux Kernel
Linux Build Script:git clone git://github.com/RobertCNelson/linux-dev.git
cd linux-dev/
git checkout origin/am33x-v3.2 -b am33x-v3.2
For Mainline v3.6.x (in development, limited cape support)- git checkout origin/am33x-v3.6 -b am33x-v3.6
Run Build Script:The kernel zImage and modules will be under the deploy directory.
Debian Squeeze 6.0.6 (armel based) Root File System
Default User: debian
Password: temppwd
Root User: root
Root Password: root- wget -c http://rcn-ee.net/deb/minfs/squeeze/debian-6.0.6-minimal-armel-2012-10-22.tar.xz
verify the image with:md5sum debian-6.0.6-minimal-armel-2012-10-22.tar.xz
97a4717d95c72d3c9d931a39a3aa58c6 debian-6.0.6-minimal-armel-2012-10-22.tar.xz
Extract Image:- tar xJf debian-6.0.6-minimal-armel-2012-10-22.tar.xz
Debian Wheezy (snapshot) (armhf based) Root File System
Default User: debian
Password: temppwd
Root User: root
Root Password: root- wget -c http://rcn-ee.net/deb/minfs/wheezy/debian-wheezy-minimal-armhf-2012-10-22.tar.xz
verify the image with:md5sum debian-wheezy-minimal-armhf-2012-10-22.tar.xz
ff409aa856b4b2ab86a6c8126a349926 debian-wheezy-minimal-armhf-2012-10-22.tar.xz
Extract Image:- tar xJf debian-wheezy-minimal-armhf-2012-10-22.tar.xz
Ubuntu 12.10 (Quantal) (armhf based) Root File System
Default User: ubuntu
Password: temppwd- wget -c http://rcn-ee.net/deb/minfs/quantal/ubuntu-12.10-minimal-armhf-2012-10-22.tar.xz
verify the image with:md5sum ubuntu-12.10-minimal-armhf-2012-10-22.tar.xz
442c3a26af8e80ecf44ea470f5dcacd5 ubuntu-12.10-minimal-armhf-2012-10-22.tar.xz
Extract Image:- tar xJf ubuntu-12.10-minimal-armhf-2012-10-22.tar.xz
Setup microSD card
For these instruction, we are assuming: DISK=/dev/mmcblk0, "sudo fdisk -l" is useful for determining the device id..Erase microSD card:- sudo parted --script ${DISK} mklabel msdos
Setup Boot Partition:sudo fdisk ${DISK} << __EOF__
n
p
1
+64M
t
e
p
w
__EOF__
Set Boot Flag- sudo parted --script ${DISK} set 1 boot on
Format Boot Partition as vfat: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
Setup Root File System Partition:sudo fdisk ${DISK} << __EOF__
n
p
2
w
__EOF__
Format rootfs as ext4:DISK=/dev/mmcblk0
sudo mkfs.ext4 ${DISK}p2 -L rootfs
(or)
DISK=/dev/sdX
sudo mkfs.ext4 ${DISK}2 -L rootfs
Mount the Boot & Root File System Partitions:
Install Bootloaders:
Copy MLO to the boot partition- sudo cp -v ./u-boot/MLO /media/boot/
Copy u-boot.img to the boot partition- sudo cp -v ./u-boot/u-boot.img /media/boot/
uEnv.txt v3.2.x based bootscript
Create U-Boot v3.2.x "uEnv.txt" boot script: (nano uEnv.txt)uEnv.txt
console=ttyO0,115200n8
mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext4 rootwait fixrtc
mmc_load_image=fatload mmc 0:1 0x80300000 zImage
mmc_load_initrd=fatload mmc 0:1 0x81600000 initrd.img; setenv initrd_size ${filesize}
mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype}
#Just: zImage
xyz_mmcboot=run mmc_load_image; echo Booting from mmc ...
loaduimage=run xyz_mmcboot; run mmcargs; bootz 0x80300000
#zImage and initrd
#xyz_mmcboot=run mmc_load_image; run mmc_load_initrd; echo Booting from mmc ...
#loaduimage=run xyz_mmcboot; run mmcargs; bootz 0x80300000 0x81600000:${initrd_size}
uEnv.txt v3.6.x device tree based bootscript
Create Device Tree v3.6.x "uEnv.txt" boot script: (nano uEnv.txt)uEnv.txt
initrd_high=0xffffffff
fdt_high=0xffffffff
dtb_file=am335x-bone.dtb
console=ttyO0,115200n8
mmcroot=/dev/mmcblk0p2 ro
mmcrootfstype=ext4 rootwait fixrtc
mmc_load_image=fatload mmc 0:1 0x80300000 zImage
mmc_load_initrd=fatload mmc 0:1 0x81600000 initrd.img; setenv initrd_size ${filesize}
mmc_load_dtb=fatload mmc 0:1 0x815f0000 /dtbs/${dtb_file}
mmcargs=setenv bootargs console=${console} root=${mmcroot} rootfstype=${mmcrootfstype}
#Just: zImage
xyz_mmcboot=run mmc_load_image; run mmc_load_dtb; echo Booting from mmc ...
loaduimage=run xyz_mmcboot; run mmcargs; bootz 0x80300000 - 0x815f0000
#zImage and initrd
#xyz_mmcboot=run mmc_load_image; run mmc_load_initrd; run mmc_load_dtb; echo Booting from mmc ...
#loaduimage=run xyz_mmcboot; run mmcargs; bootz 0x80300000 0x81600000:${initrd_size} 0x815f0000
Copy uEnv.txt to the boot partition:- sudo cp -v ./uEnv.txt /media/boot/
Note: This repo tree is under active development, so the Kernel version can change on a daily basis...
Copy Kernel zImage:- sudo cp -v ./linux-dev/deploy/3.2.33-psp26.zImage /media/boot/zImage
Copy Kernel dtbs (Device Tree v3.6.x):sudo mkdir -p /media/boot/dtbs/
sudo tar xfv ./linux-dev/deploy/3.6.0-bone0-dtbs.tar.gz -C /media/boot/dtbs/
Copy Root File System:- sudo tar xfvp ./*-*-minimal-arm*-*/armel-rootfs-*.tar -C /media/rootfs/
Copy Kernel modules:- sudo tar xfv ./linux-dev/deploy/3.2.33-psp26-modules.tar.gz -C /media/rootfs/
Tweak "/etc/fstab", the defaults should work for most boards:- sudo nano /media/rootfs/etc/fstab
Edit:/etc/fstab
/dev/mmcblk0p2 / auto errors=remount-ro 0 1
/dev/mmcblk0p1 /boot/uboot auto defaults 0 0
Enable Networking on Bootup:
Note: Boards without ethernet interfaces will have delays on bootup.- sudo nano /media/rootfs/etc/network/interfaces
From: (uncomment)/etc/network/interfaces
#auto eth0
#iface eth0 inet dhcp
To:/etc/network/interfaces
auto eth0
iface eth0 inet dhcp
Enable Serial Login:
Debian:- sudo nano /media/rootfs/etc/inittab
edit last line:/etc/inittab
from: T2:23:respawn:/sbin/getty -L 115200 vt102
to: T2:23:respawn:/sbin/getty -L ttyO0 115200 vt102
Ubuntu:- sudo nano /media/rootfs/etc/init/serial.conf
Add:/etc/init/serial.conf
start on stopped rc RUNLEVEL=[2345]
stop on runlevel [!2345]
respawn
exec /sbin/getty 115200 ttyO0
Remove microSD card:sync
sudo umount /media/boot
sudo umount /media/rootfs
FAQ
CircuitCo LCD3 Backlight:
Turn on Backlight:i2cset -f -y 1 0x24 0x07 0x09
i2cset -f -y 1 0x24 0x08 0x60
CircuitCo LCD3/LCD7 TouchScreen:
Add to /etc/modules:/etc/modules
fbcon
ti_tscadc
[
本帖最后由 chenzhufly 于 2012-11-14 19:07 编辑 ]
生活就是油盐酱醋再加一点糖,快活就是一天到晚乐呵呵的忙
===================================
做一个简单的人,踏实而务实,不沉溺幻想,不庸人自扰