After the i.mx6 platform Qt system is booted, the desktop program fluidlauncher is started by default. If you want to change it to start other Qt applications by default, execute the following command in the HyperTerminal
(it is assumed that the application to be started is named new_app and is placed in /opt/qt4 Under the .8.5/apps path, please modify the file name and path according to the actual situation):
[email protected] /$ vi /etc/rc.d/apps.sh
Change to the following:
Save and restart to see that the application you just set is started by default. You can also modify the etc/rc.d/apps.sh file under the file system source code, the modification method is the same as above, and then recreate the file system image and burn it to the platform.
2. Make a self-starting script
(1) Make apps.sh
Generate an apps.sh file with the same content as above
(2) The binary file generated by the qt program made by yourself, assumed to be New App
(3) Make a script, temporarily named 1.sh
The content is as follows:
cp new_app /opt/qt4.8.5/apps
cp apps.sh /etc/rc.d/
Note: Before using the script, you need to give it permissions:
chmod u+x 1.sh
chmod u+x apps.sh
(4) Copy the above three files to the SD card and insert it into the i.mx6 development board
Execute the command in the terminal:
Then restart it
The above steps are only tested on the OKMX6Q-C development board of Forlinx Embedded. They have not been verified on other platforms, but the principles are the same. Please modify the file name and path according to the actual situation.
OKMX6Q-C development board data query:
FETMX6Q-C is a core board of i.MX6Q quad-core processor based on NXP (formerly Freescale) Cortex-A9 architecture, with a main frequency of up to 1.2GHz and a 12-layer PCB immersion gold process. The core board adopts four sets of high-quality imported 320PIN board-to-board connector design with a total height of only 2mm, and the overall board size is only 40mm*70mm, so that the product design is not limited to the mechanical structure. The core board leads out all the functional pins of the CPU, which is convenient for customers to use all the resources of the CPU to the greatest extent. The OKMX6Q-C baseboard is rich in resources. It not only carries mainstream interfaces such as Gigabit Ethernet, CAN-bus, parallel camera, WIFI & Bluetooth, but also brings out CPU-specific functions such as MIPI, MLB, and EMI BUS. Strict electromagnetic compatibility and temperature level testing ensure the stable operation of the core board in harsh environments.
OKMX6Q-C single board computer: