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

02 System auto-start service

This document uses systemd to implement system startup scripts or programs

1 System auto-start service added to firmware

First, you need to mount the root directory system files. For detailed instructions, see "VI. Others → 01 Modification of the root directory file system"

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

# vim 创建或打开系统文件,编辑系统自启服务(以 rotate_screen.service 为例)
vim /etc/systemd/system/rotate_screen.service

# 编辑完成后,退出 vim,启用系统服务
systemctl enable rotate_screen.servic

# 取消挂载
sudo umount -l /mnt/GM_3568JHF_root

After completing the above operations, burn the image into the development board to realize the system self-start service

2 Manually configure system startup services

Power on the development board and execute the following command

# 在 /etc/systemd/system/ 目录下,创建服务配置文件
sudo vim /etc/systemd/system/rotate_screen.service

# 编辑完成后,重新加载系统服务
sudo systemctl daemon-reload

# 启用服务
sudo systemctl enable rotate_screen.service

#启动服务
sudo systemctl start rotate_screen.service

Check whether the development board has started the service. If it has started normally, restart the development board to check whether the service can be started normally.

Edit this page on GitHub
Last Updated:
Contributors: zwhuang
Prev
01 Modification of the root directory file system