Day1: 正原电子mini-linux 开发板 开机测试
参考文档
01【正点原子】I.MX6U用户快速体验V2.6.pdf
硬件原理图: 02、开发板原理图/IMX6ULL_MINI_V1.7(Mini底板原理图).pdf
测试
debug 串口
见底板原理图,
需要安装驱动,“03、软件\CH340驱动(USB串口驱动)_XP_WIN7共用”
固化系统
skipped 参见,“01【正点原子】I.MX6U用户快速体验V2.6.pdf”
对于方案2.2.2.2,分为如下两个步骤
- 通过SD卡启动linux (此步也可以通过uboot下,ftp的方式下载image,启动Linux)
- 通过shell,使用脚本 imx6mkemmcboot.sh 烧写emmc
脚本参见 https://atk-imx6ull.coding.net/public/imx6ull/05_Tools/git/files/master/04%E3%80%81%E6%AD%A3%E7%82%B9%E5%8E%9F%E5%AD%90MFG_TOOL%E5%87%BA%E5%8E%82%E5%9B%BA%E4%BB%B6%E7%83%A7%E5%BD%95%E5%B7%A5%E5%85%B7/mfgtool/Profiles/Linux/OS%20Firmware/files/imx6mksdboot.sh
-
执行格式化 execute "dd if=/dev/zero of=$device bs=1024 count=1024" -
分区 fdisk -H 255 -S 63 $device -
格式化分区文件系统格式 mkfs.vfat -F 32 -n "boot" ${PARTITION1} mkfs.ext3 -F -L "rootfs" ${PARTITION2} -
烧写uboot echo "正在烧写${Uboot}到${device}" execute "dd if=$sdkdir/boot/$Uboot of=$device bs=1024 seek=1 conv=fsync" -
复制设备树和内核
- 挂载“设备树和内核镜像”分区
- 复制.dtb和zImage文件到分区
execute "mount ${device}1 /tmp/sdk/$$"
execute "cp -r $sdkdir/boot/*${flash}*.dtb /tmp/sdk/$$/"
execute "cp -r $sdkdir/boot/zImage /tmp/sdk/$$/"
#挂载文件系统分区
execute "mount ${device}2 /tmp/sdk/$$"
#解压文件系统到文件系统分区
rootfs=`ls -1 filesystem/*.tar.*`
execute "tar jxfm $rootfs -C /tmp/sdk/$$"
电路板硬件功能测试
查看 CPU 主频
root@ATK-IMX6U:~# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, please.
analyzing CPU 0:
driver: imx6q-cpufreq
CPUs which run at the same hardware frequency: 0
CPUs which need to have their frequency coordinated by software: 0
maximum transition latency: 91.0 us.
hardware limits: 198 MHz - 792 MHz
available frequency steps: 198 MHz, 396 MHz, 528 MHz, 792 MHz
available cpufreq governors: interactive, conservative, userspace, powersave, performance
current policy: frequency should be within 198 MHz and 792 MHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency is 792 MHz (asserted by call to hardware).
cpufreq stats: 198 MHz:0.00%, 396 MHz:0.00%, 528 MHz:0.00%, 792 MHz:100.00% (1)
root@ATK-IMX6U:~#
LED
echo none > /sys/class/leds/sys-led/trigger // 改变 LED 的触发模式
echo 1 > /sys/class/leds/sys-led/brightness // 点亮 LED
echo 0 > /sys/class/leds/sys-led/brightness // 熄灭 LED
|