OdroidXu4开发环境搭建

                                    OdroidXu4开发环境搭建


一、 烧录镜像

1、 SD卡烧录

首先准备一张至少16G的sd卡。

镜像可以在官网:

http://odroid.com/dokuwiki/doku.php?id=en:odroid-xu4#software_os_release 下的Software(OS) Release 中下载

Windows下用win32diskimager-odroid -v1.3软件进行SD卡的烧录http://forum.odroid.com/viewtopic.php?f=53&t=947 该网址有详细的介绍和下载地址。

 

2、 eMMC烧录

      eMMC的烧录是通过sd卡启动之后,在sd卡系统下运行命令烧录到eMMC的过程,首先准备一张烧录好系统的的sd卡和空的eMMC,接上开发板,通过sd卡模式启动。步骤如下:

Needed tools:
eMMC card
SDCard
A Computer running Linux

1. Write the eMMC Android Installer to a SDCARD.
2. Setup ODROID-X board to boot of SD (Jumper).
3. Make sure that the eMMC installer SDCARD and eMMC are connected. 
4. Turn on the board. Wait at least 15mins for the fully flash.
5. After waiting 15 minutes, power off the board, remove the sdcard set the jumper to eMMC boot!
6. Check if booted onto Android, if yes. Continue, otherwise double check the first five steps!
7. Write the Ubuntu image to the SDCARD! 
8. Change the jumper to SD boot and boot up with your new SDCARD with Ubuntu on it.
9. Check if Ubuntu booted! If so, continue, otherwise double check steps above.
10. Power off the board, reconnect the SDCard to your PC and copy the Ubuntu image (with .xz extension, the compressed one to your sdcard rootfs partition)
11. Connect the eMMC with Android as well the SdCard with Ubuntu, set the jumper to SDCard boot.
12. Boot on your Ubuntu, Open a Terminal and navigate to where you saved your Ubuntu img.xz
13. Now figure out wheres your eMMC. Type
ls /dev/mmcblk*
Your eMMC will be the device with with boot0/boot1 on it as well p1/p2/p3/p4 as well. We'll assume that is mmcblk0! YOU MUST CHECK!

14. On the folder that your Ubuntu img.xz is type:

 xzcat odroidx_20130128-linaro-ubuntu-desktop_SD_with_HDMI.img.xz | dd of=/dev/mmcblk0 bs=4M

15. Type sync
16. poweroff
17. Remove SDcard and set the jumper to eMMC boot.

18. Enjoy.

   按上述步骤完成后拨码开关拨到eMMC模式,就可以从eMMC启动了!

二、u-boot编译与固件升级

1、交叉编译环境

在官网:http://odroid.com/dokuwiki/doku.php?id=en:xu3_building_u-boot 有交叉编译器的下载与安装方法,说的很详细,大家可以看官网参考。

注意:该uboot的交叉编译器貌似只能在Linux32位系统下才能运行,所以大家最好可以装一个32位的Ubuntu虚拟机。或者最好在Ubuntu64位下下载一个32位的库:

apt-get install ia32-libs 

这样最方便,因为后面kernel的编译又需要64位的操作系统编译。

 

2、u-boot的编译

   u-boot的下载与编译可以按官网上所讲

  

3、u-boot的升级

(1) Sd卡升级

Sd卡升级可以按照官网的方法:

 

注意:当你的更新过的uboot的大小大于328k,需要使用sd_fuse目录下的hardkernel_1mb_uboot文件里的东西,在u-boot目录下可以运行如下:

$ cd sd_fuse/hardkernel_1mb_uboot

$./sd_fusing.1M.sh  /dev/sdb

    其中/dev/sdb是我自己SD卡设备的路径。

(2) eMMC升级u-boot

     官网里有通过USB以及u-boot下命令fastboot方式去升级,方法简单,但因为工作条件本人没有去试,有兴趣的的同事可以去试一下。

     本人用的方法是通过sd卡下uboot命令去操作。

准备一张已经烧录好uboot的sd卡,并将sd_fuse/ hardkernel目录下的bl1.bin.HardKernel, bl2.bin.HardKernel, tzsw.bin.HardKernel以及你已经编译好的u-boot.bin拷贝到sd卡中重命名为bl1.bin,bl2.bin,tzsw.bin.(注:如果uboot.bin大于328k需要拷贝sd_fuse/hardkernel_1mb_uboot目录下的)

插上sd卡和eMMC,让开发板通过SD卡模式启动,进入uboot命令下,键入如下的命令:

#------------------------------------------------------------------------------------------------------

# BL1 write to eMMC

#------------------------------------------------------------------------------------------------------

fatload mmc 0:1 40008000 bl1.bin

emmc open 1

movi w z f 1 40008000

emmc close 1

#------------------------------------------------------------------------------------------------------

# BL2 write to eMMC

#------------------------------------------------------------------------------------------------------

fatload mmc 0:1 40008000 bl2.bin

emmc open 1

movi w z b 1 40008000

emmc close 1

#------------------------------------------------------------------------------------------------------

# Bootloader write to eMMC

#------------------------------------------------------------------------------------------------------

fatload mmc 0:1 40008000 u-boot.bin

emmc open 1

movi w z u 1 40008000

emmc close 1

#------------------------------------------------------------------------------------------------------

# Turst Zone Soft Ware write to eMMC

#------------------------------------------------------------------------------------------------------

fatload mmc 0:1 40008000 tzsw.bin

emmc open 1

movi w z t 1 40008000

emmc close 1

#------------------------------------------------------------------------------------------------------

# UBOOT ENV Erase

#------------------------------------------------------------------------------------------------------

mmc write 1 40008000 0x4CF 0x20

#------------------------------------------------------------------------------------------------------

详细信息可参考http://odroid.com/dokuwiki/doku.php?id=en:xu3_building_android 下方的说明

三、 kernel编译与固件升级

1、 交叉编译环境

官网http://odroid.com/dokuwiki/doku.php?id=en:xu3_building_kernel 中有交叉编译器的的下载地址和详细的步骤,在这不做过多的说明。注意:此交叉编译器需要64位的Linux操作系统。

2、 Kernel的编译与更新

Kernel的编译与更新官网上也做了详细的步骤说明,且SD卡和eMMC都可适用。需要注意的是:

(1) 如官网所说,需要对卡进行分区如下

 

本人做法是先去烧录一个官方提供的完整的Linux系统镜像,按前面所讲。然后再去进行kernel的更新。

(2) Kernel 源码的下载最好通过Ubuntu下键入命令:

(3) git clone --depth 1 https://github.com/hardkernel/linux.git -b odroidxu3-3.10.y odroidxu3-3.10.y

去下载。如果只能在Windows下载则在下面的github网址里下载:

https://github.com/hardkernel/linux/tree/odroidxu3-3.10.y 

但是,在编译的时候通不过,有些文件可能被损坏,你需要在这个网址里找出对应的文件,将其替换掉.



  • 1
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值