8363|2

5979

帖子

8

TA的资源

版主

楼主
 

【学习Sitara™ AM335x】- Beaglebone环境的搭建方法 [复制链接]

Basic Requirements

ARM Cross Compiler
  1. Ubuntu (11.04 (Natty Narwhal) minimum): sudo apt-get install gcc-arm-linux-gnueabi
    Linaro: https://launchpad.net/linaro-toolchain-binaries
复制代码
Bootloader
  1. 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
  1. 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
  1. 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:
  1. git clone git://git.denx.de/u-boot.git
    cd u-boot/
    git checkout v2012.10 -b tmp
复制代码
U-Boot Patches:
  1. 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:
  1. 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)
  1. git checkout origin/am33x-v3.6 -b am33x-v3.6
复制代码
Run Build Script:
  1. ./build_kernel.sh
复制代码
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
  1. wget -c http://rcn-ee.net/deb/minfs/squeeze/debian-6.0.6-minimal-armel-2012-10-22.tar.xz
复制代码
verify the image with:
  1. 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:
  1. 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
  1. wget -c http://rcn-ee.net/deb/minfs/wheezy/debian-wheezy-minimal-armhf-2012-10-22.tar.xz
复制代码
verify the image with:
  1. md5sum debian-wheezy-minimal-armhf-2012-10-22.tar.xz
    ff409aa856b4b2ab86a6c8126a349926  debian-wheezy-minimal-armhf-2012-10-22.tar.xz
复制代码
Extract Image:
  1. 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
  1. wget -c http://rcn-ee.net/deb/minfs/quantal/ubuntu-12.10-minimal-armhf-2012-10-22.tar.xz
复制代码
verify the image with:
  1. md5sum ubuntu-12.10-minimal-armhf-2012-10-22.tar.xz
    442c3a26af8e80ecf44ea470f5dcacd5  ubuntu-12.10-minimal-armhf-2012-10-22.tar.xz
复制代码
Extract Image:
  1. 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..
  1. export DISK=/dev/mmcblk0
复制代码
Erase microSD card:
  1. sudo parted --script ${DISK} mklabel msdos
复制代码
Setup Boot Partition:
  1. sudo fdisk ${DISK} << __EOF__
    n
    p
    1
    +64M
    t
    e
    p
    w
    __EOF__
复制代码
Set Boot Flag
  1. sudo parted --script ${DISK} set 1 boot on
复制代码
Format Boot Partition as vfat:
  1. 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:
  1. sudo fdisk ${DISK} << __EOF__
    n
    p
    2
    w
    __EOF__
复制代码
Format rootfs as ext4:
  1. 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
  1. sudo cp -v ./u-boot/MLO /media/boot/
复制代码
Copy u-boot.img to the boot partition
  1. 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)
  1. 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)
  1. 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:
  1. 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:
  1. sudo cp -v ./linux-dev/deploy/3.2.33-psp26.zImage /media/boot/zImage
复制代码
Copy Kernel dtbs (Device Tree v3.6.x):
  1. 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:
  1. sudo tar xfvp ./*-*-minimal-arm*-*/armel-rootfs-*.tar -C /media/rootfs/
复制代码
Copy Kernel modules:
  1. 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:
  1. sudo nano /media/rootfs/etc/fstab
复制代码
Edit:
  1. /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.
  1. sudo nano /media/rootfs/etc/network/interfaces
复制代码
From: (uncomment)
  1. /etc/network/interfaces
    #auto eth0
    #iface eth0 inet dhcp
复制代码
To:
  1. /etc/network/interfaces
    auto eth0
    iface eth0 inet dhcp
    Enable Serial Login:
复制代码
Debian:
  1. sudo nano /media/rootfs/etc/inittab
复制代码
edit last line:
  1. /etc/inittab
    from: T2:23:respawn:/sbin/getty -L  115200 vt102
    to: T2:23:respawn:/sbin/getty -L ttyO0 115200 vt102
复制代码
Ubuntu:
  1. sudo nano /media/rootfs/etc/init/serial.conf
复制代码
Add:
  1. /etc/init/serial.conf
    start on stopped rc RUNLEVEL=[2345]
    stop on runlevel [!2345]
    respawn
    exec /sbin/getty 115200 ttyO0
复制代码
Remove microSD card:
  1. sync
    sudo umount /media/boot
    sudo umount /media/rootfs
复制代码
FAQ

CircuitCo LCD3 Backlight:
Turn on Backlight:
  1. i2cset -f -y 1 0x24 0x07 0x09
    i2cset -f -y 1 0x24 0x08 0x60
复制代码
CircuitCo LCD3/LCD7 TouchScreen:
Add to /etc/modules:
  1. /etc/modules
    fbcon
    ti_tscadc
复制代码

[ 本帖最后由 chenzhufly 于 2012-11-14 19:07 编辑 ]

最新回复

正在学习中。。。。。。。。  详情 回复 发表于 2014-7-7 12:11
点赞 关注(2)
个人签名生活就是油盐酱醋再加一点糖,快活就是一天到晚乐呵呵的忙
===================================
做一个简单的人,踏实而务实,不沉溺幻想,不庸人自扰
 

回复
举报

19

帖子

0

TA的资源

一粒金砂(中级)

沙发
 
感谢楼主,很好的东西。
 
 

回复

40

帖子

0

TA的资源

一粒金砂(中级)

板凳
 
正在学习中。。。。。。。。
 
 
 

回复
您需要登录后才可以回帖 登录 | 注册

随便看看
查找数据手册?

EEWorld Datasheet 技术支持

相关文章 更多>>
关闭
站长推荐上一条 1/9 下一条

 
EEWorld订阅号

 
EEWorld服务号

 
汽车开发圈

About Us 关于我们 客户服务 联系方式 器件索引 网站地图 最新更新 手机版

站点相关: 国产芯 安防电子 汽车电子 手机便携 工业控制 家用电子 医疗电子 测试测量 网络通信 物联网

北京市海淀区中关村大街18号B座15层1530室 电话:(010)82350740 邮编:100190

电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号 Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved
快速回复 返回顶部 返回列表