TK1入门教程硬件篇-外接可启动SD卡
TK1入门教程硬件篇-外接可启动SD卡
说明:
- 介绍如何在TK1实现外接SD卡并实现利用SD卡启动
准备:
- SD卡,64GB Flash Memory High Speed SDXC Class 10 UHS-I
- ubuntu电脑
步骤:
- SD卡插入TK1,查看SD卡:
sudo fdisk -l
- 可找到如下内容:
Disk /dev/mmcblk1: 29.6 GiB, 31724666880 bytes, 61962240 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 8192 61962239 61954048 29.6G c W95 FAT32 (LBA)
- 先umount,再格式化SD卡为ext4格式:
umount /dev/mmcblk1p1
sudo mkfs.ext4 /dev/mmcblk1p1
- 再mount SD卡到指定分区
mkdir /media/sdtk
sudo mount /dev/mmcblk1p1 /media/sdtk
- 复制根目录内容到SD卡
$ sudo cp -ax / /media/sdtk
- 进入SD卡
$ cd /media/sdtk
- 在extlinux目录下已经有可sdcard启动的配置,我们使用即可
$ cd boot/extlinux
$ ls
extlinux.conf jetson-tk1_extlinux.conf.emmc jetson-tk1_extlinux.conf.nfs jetson-tk1_extlinux.conf.sdcard jetson-tk1_extlinux.conf.usb
$ sudo mv extlinux.conf extlinux.conf.bk
$ sudo cp jetson-tk1_extlinux.conf.sdcard extlinux.conf
重启TK1即可使用SD卡启动系统
验证是否成功
ubuntu@tegra-ubuntu:~$ df
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/mmcblk1p1 30359496 12850768 15943496 45% /
none 2033500 0 2033500 0% /dev
tmpfs 2045300 124 2045176 1% /dev/shm
tmpfs 2045300 17644 2027656 1% /run
tmpfs 5120 4 5116 1% /run/lock
tmpfs 2045300 0 2045300 0% /sys/fs/cgroup
tmpfs 409064 48 409016 1% /run/user/1000
/dev/mmcblk0p1 14318640 12846576 721680 95% /media/ubuntu/f2ff9ece-c45c-4fa2-bfaf-7444c5292b61
- 可以看到/dev/mmcblk1p1 已经作为主分区启动了。
参考:
- http://www.jetsonhacks.com/2017/01/26/run-jetson-tx1-sd-card/
- https://jkjung-avt.github.io/sd-rootfs-on-tx1/
- https://gist.github.com/tstellanova/fe50855df91002db528f
- http://demotomohiro.github.io/hardware/jetson_tk1/setup/sdcard.html
获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号