Cubietruck制作可启动SD卡(只测试uboot)
2014-04-07 22:25
423 查看
手上有个128M的sd卡,所以就只测试uboot
#---------------------------------------------------------------------------------------------------------------------------------#
下载uboot代码https://github.com/linux-sunxi/u-boot-sunxi.git,版本号v2014.04-rc2
#---------------------------------------------------------------------------------------------------------------------------------#
编译uboot
laptop:~$make Cubietruck_config
laptop:~$make CROSS_COMPILE=arm-linux-gnueabi- -j4
注意:
1.Cubietruck首字母大写
2.make CROSS_COMPILE=arm-linux-gnueabi- -j4中-j4表示job4(四核)
#---------------------------------------------------------------------------------------------------------------------------------#
启动代码写入SD卡
uboot父目录创建shell脚本writesdcard
#! /bin/sh
export card=/dev/sdb
export p=""
#To be on safe side erase the first part of your SD Card.
dd if=/dev/zero of=${card} bs=1M count=1
#Bootloader
dd if=u-boot-sunxi/spl/sunxi-spl.bin of=${card} bs=1024 seek=8
dd if=u-boot-sunxi/u-boot.img of=${card} bs=1024 seek=40
保存之后添加权限并(sudo)执行脚本
注意:
1.
export card=/dev/sdb
export p=""
是对应于USB插入的读卡器,详细内容参见http://linux-sunxi.org/Bootable_SD_card
#---------------------------------------------------------------------------------------------------------------------------------#
测试
1
SD卡插入Cubietruck
正确连接usb-ttl数据线——(黑接GND)(绿接RX)(白接TX)
2
打开虚拟窗口
laptop:~screen /dev/ttyUSB0 115200
3
连接Cubietruck电源
U-Boot SPL 2014.04-rc2-10390-g96510e1 (Apr 07 2014 - 21:24:32)
Board: Cubietruck
DRAM: 2048 MiB
CPU: 960000000Hz, AXI/AHB/APB: 3/2/2
spl: not an uImage at 1600
U-Boot 2014.04-rc2-10390-g96510e1 (Apr 07 2014 - 21:24:32) Allwinner Technology
CPU: Allwinner A20 (SUN7I)
Board: Cubietruck
I2C: ready
DRAM: 2 GiB
MMC: SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: dwmac.1c50000
Warning: failed to set MAC address
Hit any key to stop autoboot: 0
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
sun7i#
测试命令led all toggle
sun7i#led all toggle
观察led
成功!
参考:
http://linux-sunxi.org/Bootable_SD_card http://linux-sunxi.org/Cubieboard/TTL http://linux-sunxi.org/Toolchain http://linux-sunxi.org/U-Boot#Compilation
#---------------------------------------------------------------------------------------------------------------------------------#
下载uboot代码https://github.com/linux-sunxi/u-boot-sunxi.git,版本号v2014.04-rc2
#---------------------------------------------------------------------------------------------------------------------------------#
编译uboot
laptop:~$make Cubietruck_config
laptop:~$make CROSS_COMPILE=arm-linux-gnueabi- -j4
注意:
1.Cubietruck首字母大写
2.make CROSS_COMPILE=arm-linux-gnueabi- -j4中-j4表示job4(四核)
#---------------------------------------------------------------------------------------------------------------------------------#
启动代码写入SD卡
uboot父目录创建shell脚本writesdcard
#! /bin/sh
export card=/dev/sdb
export p=""
#To be on safe side erase the first part of your SD Card.
dd if=/dev/zero of=${card} bs=1M count=1
#Bootloader
dd if=u-boot-sunxi/spl/sunxi-spl.bin of=${card} bs=1024 seek=8
dd if=u-boot-sunxi/u-boot.img of=${card} bs=1024 seek=40
保存之后添加权限并(sudo)执行脚本
注意:
1.
export card=/dev/sdb
export p=""
是对应于USB插入的读卡器,详细内容参见http://linux-sunxi.org/Bootable_SD_card
#---------------------------------------------------------------------------------------------------------------------------------#
测试
1
SD卡插入Cubietruck
正确连接usb-ttl数据线——(黑接GND)(绿接RX)(白接TX)
2
打开虚拟窗口
laptop:~screen /dev/ttyUSB0 115200
3
连接Cubietruck电源
U-Boot SPL 2014.04-rc2-10390-g96510e1 (Apr 07 2014 - 21:24:32)
Board: Cubietruck
DRAM: 2048 MiB
CPU: 960000000Hz, AXI/AHB/APB: 3/2/2
spl: not an uImage at 1600
U-Boot 2014.04-rc2-10390-g96510e1 (Apr 07 2014 - 21:24:32) Allwinner Technology
CPU: Allwinner A20 (SUN7I)
Board: Cubietruck
I2C: ready
DRAM: 2 GiB
MMC: SUNXI SD/MMC: 0
*** Warning - bad CRC, using default environment
In: serial
Out: serial
Err: serial
Net: dwmac.1c50000
Warning: failed to set MAC address
Hit any key to stop autoboot: 0
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
** No partition table - mmc 0 **
sun7i#
测试命令led all toggle
sun7i#led all toggle
观察led
成功!
参考:
http://linux-sunxi.org/Bootable_SD_card http://linux-sunxi.org/Cubieboard/TTL http://linux-sunxi.org/Toolchain http://linux-sunxi.org/U-Boot#Compilation
相关文章推荐
- 从零开始教你制作友善之壁TINY4412----SD卡uboot启动卡
- android系统移植emmc记录(1) --制作SD卡启动u-boot
- android系统移植emmc记录(1) --制作SD卡启动u-boot .
- 制作SD卡启动自己编译的uboot.bin
- android系统移植emmc记录(1) --制作SD卡启动u-boot
- 固件升级 android启动 uboot启动 rom制作
- ZYNQ的Linux Linaro系统镜像制作SD卡启动
- 在linux下烧写exynos4412 SD卡启动的Supperboot(1)
- imx533 配置 制作SD卡启动文件系统
- beagelboard-xm上dvsdk移植4:sd卡启动脚本以及NFS文件系统的制作和配置
- Tiny4412标准版,编译u-boot并烧录到SD卡,从SD卡启动后只打印‘OK’两个字符
- Cubieboard开发环境、Uboot的SD启动卡制作、U-boot初步分析
- Linux下制作能Boot的SD卡
- S3C6410的SD卡UBOOT启动的实现过程
- 在linux下烧写exynos4412 SD卡启动的Supperboot(2)
- tiny6410裸机实验第0章--------------开发环境的搭建(制作用来SD启动的SD卡)
- zedboard Boot from Flash(FLASH和SD卡启动)
- 修改u-boot - mini6410 - 20101106.tar.gz使之支持tiny6410从SD卡启动
- SpringBoot系列三:SpringBoot基本概念(统一父 pom 管理、SpringBoot 代码测试、启动注解分析、配置访问路径、使用内置对象、项目打包发布)
- Linaro Ubuntu for Arndale Octa Broad Exynos 5420开发板,启动系统sd卡的制作。