Based on Allwinner Technology T3 - Basic Commands and Instructions of Ubuntu System
This article mainly demonstrates the replacement and testing method of the Ubuntu root file system image based on the domestic platform - Allwinner Technology T3.
Please install the relevant documents according to the debugging tool installation and Linux development environment, install the SecureCRT serial port debugging terminal, VMware virtual machine and other related software, and decompress and install the LinuxSDK development package to Ubuntu according to the Linux system manual. Unless otherwise specified, the USB TO UART0 is used as the debug serial port by default, the Linux system boot card (Micro SD mode) is used to start the system, and the network is connected to the PC through the router.
Applicable development environment:
Windows development environment: Windows 7 64bit, Windows 10 64bit
Linux development environment: Ubuntu18.04.4 64bit
Virtual machine: VMware15.1.0
U-Boot:U-Boot-2014.07
Kernel:Linux-3.10.65
Ubuntu: Ubuntu16.04 root file system (about 1.5GByte)
LinuxSDK: LinuxSDK_AA_BB_CC_DD (based on T3_LinuxSDK_V1.3_20190122)
This test board is based on Chuanglong Technology TLT3-EVM is a 4-core ARM Cortex-A7 high-performance and low-power domestic evaluation board based on Allwinner's T3 processor design. board and evaluation backplane.
Allwinner T3 core board adopts 100% domestic component solution, and has been verified by professional PCB Layout and high and low temperature test, which is stable and reliable, and can meet various industrial application environments. The evaluation board is rich in interface resources, leading out dual network ports, dual CAN, dual USB, dual RS485 and other communication interfaces, onboard Bluetooth, WIFI, 4G (optional) modules, and also leads out MIPI LCD, LVDS LCD, TFT LCD , CVBS OUT, CAMERA, LINE IN, H/P OUT and other audio and video multimedia interfaces, support dual-screen different display, 1080P@45fps H.264 video hardware codec, and support SATA mass storage interface.
The LinuxSDK_AA_BB_CC_DD.tar.gz development package can be provided, which comes with the official Ubuntu16.04 root file system image of Allwinner Technology, which is located in the "buildroot-201611/target/ubuntu_16.04/" directory of the LinuxSDK development package (as shown in the figure below). Instead of using the Ubuntu root filesystem, let's get started.
figure 1
Ubuntu root filesystem replacement
Replace to Linux system boot card
Insert the Linux system boot card into the PC USB port through the Micro SD card reader, and mount it to the Ubuntu system. Execute the following command to confirm that the Linux system boot card is in the device node name of the Ubuntu system. You can see that the Linux system boot card device node is "/dev/sdb", and there are seven partitions, of which "/dev/sdb7" is the file system. the partition where it is located.
Note: The name of the device node is variable. Generally, sdc or sdd may be displayed after multiple insertions or insertions or using different cards.
Host# sudo fdisk -l
figure 2
image 3
In the installation directory of the lichee source code of LinuxSDK, run the following command to enter the directory where the Ubuntu root file system image is located, and solidify it to the file system partition of the Linux system boot card.
Host# cdbuildroot-201611/target/ubuntu_16.04/
Host# sudo dd if=ubuntu of=/dev/sdb7 bs=1024 && sync
Figure 4
The curing process is expected to take about 5 minutes, please wait patiently, and print the "records in, records out" message to indicate that the curing is complete.
Replacing to eMMC
Insert the U disk into the USB port of the PC and mount it to the Ubuntu system. In the directory where the Ubuntu root file system image of the LinuxSDK development package is located, copy it to the U disk.
Figure 5
After the copy is completed, insert the U disk into the USB1 HOST or USB2 HOST interface of the evaluation board, start the system from the Linux system boot card, and execute the following command to check the device node name of the U disk in the file system.
Target# df -h
Image 6
Run the following command to solidify the Ubuntu root file system image of the USB flash drive to the eMMC file system partition (mmcblk0p7). It is estimated that it will take about 4 minutes, and the serial terminal will print "records in, records out" information to indicate that the curing is complete.
Target# time dd if=/mnt/usb/sda/ubuntu of=/dev/mmcblk0p7 bs=1024 && sync
Figure 7
Ubuntu system test
Insert the Linux system boot card into the Micro SD card slot of the evaluation board, and turn the DIP switch to 0 according to the silkscreen of the evaluation board. This gear will give priority to booting the system from the Linux system boot card. Power on the evaluation board, enter the user account: root, password: 123 after the system starts, and the serial port terminal will print the following information after logging in to the system successfully.
Figure 8
The Ubuntu system officially provided by Allwinner supports most peripheral interfaces except for a few interfaces of CVBS OUT, TVIN, CAMERA0, and CAMETA1. The Ubuntu system does not currently support the GUI operation interface, and does not currently support online installation of tools through the apt-get command. Therefore, some peripheral interface tests need to copy and install the corresponding tools.
The following chapters take LEDs and buttons as examples to demonstrate the test method of the Ubuntu system. For other peripheral interface tests, please refer to the evaluation board test manual.
LED test
The corresponding relationship between LED1, LED2 and GPIO pins of the evaluation board is shown in the following table, and it is lit by default after the system is started.
Table 1
LED1
LED2
PB4
PB10
Enter the evaluation board file system, and execute the following commands to turn off and turn on the LEDs one by one.
Target# echo 0 > /sys/class/leds/user-led0/brightness //Control LED1 off
Target# echo 1 > /sys/class/leds/user-led0/brightness //Control LED1 to light
Target# echo 0 > /sys/class/leds/user-led1/brightness //Control LED2 off
Target# echo 1 > /sys/class/leds/user-led1/brightness //Control LED2 to light
Figure 9
key test
The evaluation backplane contains 3 user buttons: KEY3, KEY4, KEY5. Enter the evaluation board file system and execute the following command to view the event number corresponding to the user key.
Target# cat /proc/bus/input/devices
Figure 10
As can be seen from the above figure, the key event number corresponding to KEY3 and KEY4 is event1, and the key event number corresponding to KEY5 is event5.
Execute the following commands, press KEY3 and KEY4 respectively to test the keys, you can see the following print information, where "0094" means KEY3, "0095" means KEY4, press "Ctrl + C" to terminate the test command.
Target# od -x /dev/input/event1
Figure 11
Execute the following command, press KEY5 to perform key test, you can see the following print information, "00ca" means KEY5, press "Ctrl + C" to terminate the test command.
Target# od -x /dev/input/event5
Figure 12
For more case descriptions, as well as detailed information such as Allwinner T3 industrial core board/development board specifications, you can leave a message in the comment area.
Ubuntu相關問答