初见licheepi-zero
- 前言:我对linux是持有恐惧的态度,原因是我关于linux的知识储备不高,不能像单片机一样掌握过程,所以这次绝对开个坑去好好学习linux。
测试Zero
时间关系,我从网上找了别人已经编译好的Uboot、Kernel、DTS、rootfs烧录进TF卡,来测试我的板子能不能用。
1.创建TF卡分区
1.1烧录软件----GParted
输入命令下载软件:
sudo apt-get install gparted
下载后,插入你的TF卡。
打开软件gparted
sudo gparted
1.1.1 一定要先选中你的TF卡,不然搞错了就出大问题。
1.1.2 如果里面有分区就先卸载和删除了
1.1.3 创建第一个分区
1.1.4 创建第二个分区
1.1.5完成
创建之后输入命令
sudo fdisk -l
查看分区
2.烧录Uboot
首先准备好已经编译好的uboot,然后输入命令:
sudo dd if=u-boot-sunxi-with-spl.bin of=/dev/sdb bs=1024 seek=8
注意 of=/dev / tf的盘符
3.烧录kernel和Dts到第一分区
准备好已经编译的zImage和dts
先挂载第一分区,挂载到mnt目录:
sudo mount /dev/sdb1 /mnt
然后把准备好的zImage和dts拷贝到/mnt目录
cp zImage /mnt
cp sun8i-v3s-licheepi-zero-dock.dtb /mnt
最后记得取消挂载:
sudo umount /dev/sdb1
4.烧录rootfs到第二分区
首先挂载第二分区到mnt目录
sudo mount /dev/sdb2 /mnt
解压准备好的rootfs.tar 到mnt目录
sudo tar xvf rootfs.tar -C /mnt
5.将TF卡插入荔枝派zero,连接好串口
[ 1.306451] simple-framebuffer 43e89000.framebuffer: fb0: simplefb registered!
[ 1.315031] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.326538] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.332306] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 1.341455] hub 3-0:1.0: USB hub found
[ 1.345322] hub 3-0:1.0: 1 port detected
[ 1.350655] using random self ethernet address
[ 1.355146] using random host ethernet address
[ 1.361742] usb0: HOST MAC d6:3e:76:ba:fa:a0
[ 1.366057] usb0: MAC ee:19:12:56:83:a0
[ 1.370064] g_cdc gadget: CDC Composite Gadget, version: King Kamehameha Day 2008
[ 1.377590] g_cdc gadget: g_cdc ready
[ 1.383933] sun4i-codec 1c22c00.codec: Codec <-> 1c22c00.codec mapping ok
[ 1.392450] sun6i-rtc 1c20400.rtc: setting system clock to 1970-01-01 00:00:10 UTC (10)
[ 1.400781] vcc5v0: disabling
[ 1.403757] ALSA device list:
[ 1.406777] #0: V3s Audio Codec
[ 1.413782] EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
[ 1.424867] EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
[ 1.496885] EXT4-fs (mmcblk0p2): recovery complete
[ 1.504752] EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
[ 1.512978] VFS: Mounted root (ext4 filesystem) on device 179:2.
[ 1.522640] devtmpfs: mounted
[ 1.526969] Freeing unused kernel memory: 1024K
[ 1.631475] EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Initializing random number generator... done.
Starting network: OK
Welcome to Buildroot
buildroot login: root
#
启动成功!