< >
Home » TX1入门教程硬件篇 » TX1入门教程硬件篇-外接可启动SD卡

TX1入门教程硬件篇-外接可启动SD卡

TX1入门教程硬件篇-外接可启动SD卡

说明:

  • 介绍如何在TX1上外接SD卡,并可实现启动

准备:

  • SD卡,64GB Flash Memory High Speed SDXC Class 10 UHS-I
  • ubuntu电脑

方法1:

  • SD卡插入TX1,查看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/ubuntu/SD
sudo mount /dev/mmcblk1p1 /media/ubuntu/SD
  • 复制根目录内容到SD卡
$ sudo cp -ax / /media/ubuntu/SD
  • 进入SD卡
$ cd /media/ubuntu/SD
  • 备份并修改extlinux.conf文件
$ cd boot/extlinux
$ sudo cp extlinux.conf extlinux.conf.original
$ sudo vim  extlinux.conf
  • 修改相关内容:
    • 复制粘贴LABEL到文件末的所有内容
    • 修改root=/dev/mmcblk0p1root=/dev/mmcblk1p1
    • 修改粘贴后的LABEL ,MENU LABEL。原来可改可不改
    • 修改DEFAULT primaryDEFAULT sdcard
  • 修改为如图:
TIMEOUT 30
DEFAULT sdcard

MENU TITLE p2371-2180 eMMC boot options

LABEL sdcard
MENU LABEL SD Card
LINUX /boot/Image
INITRD /boot/initrd
FDT /boot/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb
APPEND fbcon=map:0 console=tty0 console=ttyS0,115200n8 androidboot.modem=none androidboot.serialno=P2180A00P00940c003fd androidboot.security=non-secure tegraid=21.1.2.0.0 ddr_die=2048M@2048M ddr_die=2048M@4096M section=256M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 debug_uartport=lsport,0 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=${lp0_vec} nvdumper_reserved=${nvdumper_reserved} core_edp_mv=1125 core_edp_ma=4000 gpt android.kerneltype=normal androidboot.touch_vendor_id=0 androidboot.touch_panel_id=63 androidboot.touch_feature=0 androidboot.bootreason=pmc:software_reset,pmic:0x0 net.ifnames=0 root=/dev/mmcblk1p1 rw rootwait

LABEL internalemmc
MENU LABEL Internal EMMC
LINUX /boot/Image
INITRD /boot/initrd
FDT /boot/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb
APPEND fbcon=map:0 console=tty0 console=ttyS0,115200n8 androidboot.modem=none androidboot.serialno=P2180A00P00940c003fd androidboot.security=non-secure tegraid=21.1.2.0.0 ddr_die=2048M@2048M ddr_die=2048M@4096M section=256M memtype=0 vpr_resize usb_port_owner_info=0 lane_owner_info=0 emc_max_dvfs=0 touch_id=0@63 video=tegrafb no_console_suspend=1 debug_uartport=lsport,0 earlyprintk=uart8250-32bit,0x70006000 maxcpus=4 usbcore.old_scheme_first=1 lp0_vec=${lp0_vec} nvdumper_reserved=${nvdumper_reserved} core_edp_mv=1125 core_edp_ma=4000 gpt android.kerneltype=normal androidboot.touch_vendor_id=0 androidboot.touch_panel_id=63 androidboot.touch_feature=0 androidboot.bootreason=pmc:software_reset,pmic:0x0 net.ifnames=0 root=/dev/mmcblk0p1 rw rootwait
  • 重启TX1即可使用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 已经作为主分区启动了。

方法2:

问题:

  • 问题1:不能上网,/etc/resov.conf指向的文件没有生成
  • 临时解决:
vim /var/run/NetworkManager/resolv.conf
  • 生成resolv.conf,并写入DNS信息如下:
nameserver 223.5.5.5
nameserver 223.6.6.6
  • 此方法重启后要重新配置
  • 验证:
ping badu.com

参考:

  • 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

纠错,疑问,交流: 请进入讨论区点击加入Q群

获取最新文章: 扫一扫右上角的二维码加入“创客智造”公众号


标签: tx1入门教程硬件篇