HOME
  • GM-3568JHF
  • M4-R1
  • M5-R1
  • SC-3568HA
  • M-K1HSE
  • CF-NRS1
  • CF-CRA2
  • 1684XB-32T
  • 1684X-416T
  • C-3568BQ
  • C-3588LQ
  • GC-3568JBAF
  • C-K1BA
Shop
  • English
  • 简体中文
HOME
  • GM-3568JHF
  • M4-R1
  • M5-R1
  • SC-3568HA
  • M-K1HSE
  • CF-NRS1
  • CF-CRA2
  • 1684XB-32T
  • 1684X-416T
  • C-3568BQ
  • C-3588LQ
  • GC-3568JBAF
  • C-K1BA
Shop
  • English
  • 简体中文
  • GM-3568JHF

    • 1. Introduction

      • GM-3568JHF Introduction
    • 2. Quick Start

      • 01 Environment Construction
      • 02 Compilation Instructions
      • 03 Burning Guide
      • 04 Debugging Tools
      • 05 Software Update
      • 06 View information
      • 07 Test Command
      • 08 Application Compilation
      • 09 Source code acquisition
    • 3. Peripherals and Interfaces

      • USB
      • Display and touch
      • Ethernet
      • WIFI
      • Bluetooth
      • TF-Card
      • Audio
      • Serial Port
      • CAN
      • RTC
    • 4. Application Development

      • 01 UART read and write case
      • 02 Key detection case
      • 03 LED light flashing case
      • 04 MIPI screen detection case
      • 05 Read USB device information example
      • 06 FAN Detection Case
      • 07 FPGA FSPI Communication Case
      • 08 FPGA DMA read and write case
      • 09 GPS debugging case
      • 10 Ethernet Test Cases
      • 11 RS485 reading and writing examples
      • 12 FPGA IIC read and write examples
      • 13 PN532 NFC card reader case
      • 14 TF card reading and writing case
    • 5. QT Development

      • 01 ARM64 cross compiler environment construction
      • 02 QT program added automatic startup service
    • 6. Others

      • 01 Modification of the root directory file system
      • 02 System auto-start service

01 Modification of the root directory file system

The method provided in this document is to modify the root directory file system by mounting img. The detailed operation tutorial is as follows

Take modifying linaro-rootfs.img as an example

1 Mount the root directory file system image

# 创建挂载文件夹
mkdir /mnt/GM_3568JHF_root

# 挂载
sudo mount -o loop /home/ubuntu/SDK/debain/linaro-rootfs.img /mnt/GM_3568JHF_root
# /home/ubuntu/SDK/debain/linaro-rootfs.img:是 linaro-rootfs.img 所在路径

# 进入挂载目录
sudo chroot /mnt/GM_3568JHF_root /bin/bash

After executing the above command, you will enter the mounted root directory interface, as shown in the figure

rootfile1

You can then download the required installation package

2 Add files

2.1 Add files to the root directory

To add files to the root directory, you first need to mount the root directory file system image, and then copy the files to the mounted directory. Then enter the mounted directory to see the added files. Users can modify files in the mounted directory, such as modifying file permissions.

# 在根目录下添加文件
sudo mv /home/ubuntu/test.txt /mnt/GM_3568JHF_root

# 进入挂载目录
sudo chroot /mnt/GM_3568JHF_root /bin/bash

# 在挂载目录下对文件进行修改
chmod 777 ./test.txt

2.2 Add files in non-root directories

To add files to a non-root directory (such as the desktop directory), follow these steps:

# 创建需要添加文件的目录
sudo mkdir -p /mnt/GM_3568JHF_root/home
sudo mkdir -p /mnt/GM_3568JHF_root/home/linaro
sudo mkdir -p /mnt/GM_3568JHF_root/home/linaro/Desktop

# 移动文件到挂载的指定目录
sudo mv /home/ubuntu/test.txt /mnt/GM_3568JHF_root/home/linaro/Desktop

# 进入挂载目录
sudo chroot /mnt/GM_3568JHF_root /bin/bash

# 在挂载目录下对文件进行修改
cd /home/linaro/Desktop
chmod 777 ./test.txt

3. Cancel the mount after modification is completed

After the modification is completed, execute the following command to cancel the mount operation

# 取消挂载
sudo umount -l /mnt/GM_3568JHF_root
Edit this page on GitHub
Last Updated:
Contributors: zwhuang
Next
02 System auto-start service