【TX1学习与开发系列】交换空间与磁盘容量增加(二)

来源:互联网 发布:黑帽seo劫持博客违法吗 编辑:程序博客网 时间:2024/06/05 00:41

大家好,如何你在使用Jetson tx1 发现编译的时候发现内存一下子就消耗完,然后系统崩溃了呢? 出现类似c++: internal compiler error: Killed (program cc1plus)的错误。想了想是否可以通过交换空间来解决。

我们打开系统监视器,发现swap是不可用的。 所幸的tx1 的系统内核是支持的。

好的,我们开始把。

首先准备一个U盘,当然最好用SSD(USB3.0)。


插在tx1上。

然后,将其设置成ext4 

进入disk 进行修改就好了。

接下呢,我们准备开始分配一个swap。

首先在https://github.com/jetsonhacks/postFlashTX1.git

在shell终端下,输入

sudo ./creatSwapfile -d /media/ubuntu/xxxx -s 4 -a

(xxx表示你的U盘名字),其实默认情况下树8G ,这里我用4G

然后需要进入disk 中,编辑你打挂载选项,选择UUID模式,记得把挂载点改为你现在的路径。

OK××××××

重启下,是不是发现SWAP 变成了4G。

------------------------------------------------------------------------------------------------------------------------------------------

接下来我们讲下磁盘容量如何增加,tx1 原本为16G。

我们可以用张SD card 64G (当然你可以用更大的)

首先我们要将系统的东西全部复制到这张SD卡中,终端输入:

sudo cp -ax / ‘/media/ubuntu/SD Root’

然后进入到sd card的目录下:

cd ‘/media/ubuntu/SD Root’

编辑下extlinx.conf

$ cd /boot/extlinux$ sudo cp extlinux.conf extlinux.conf.original$ sudo gedit /boot/extlinux/extlinux.conf

查看下disk 看下sd card root=/dev/mmcblk1p1 

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


好了,现在我们重启下。

0 0
原创粉丝点击