Development board brush system

Since learning Linux, this is the second time I have taken out a development board. Sure enough, the learning of embedded Linux is longer and more complicated than the learning of single-chip microcomputer. I don’t know how I will end up. Today is the first day of the new year. Before writing notes, write a small wish
by the way: 2020, come on Wuhan! Go China! May people overcome the disease as soon as possible and usher in a beautiful spring.
I also wish my parents: good health, happy and happy every day
baby: 2020 is also a year to love you, I wish this pistachio more and more beautiful and greasy, thank me for meeting the right person .
Myself: Linux Xiaobai grows up well!

Let’s start to get into the main topic,
still refer to the PPT and notes of Mr. Zhu

1. What is the brush system

Flashing the system is to use the flashing tool to burn the pre-compiled system image into the development board to make it run on the development board.

2. The meaning of serial port output (as a system console)

The serial port is a kind of hardware communication port. Many years ago, the serial port was the main interface for communication between CPUs. But now because the speed of serial communication is very low, the serial port is now mainly used for program output monitoring and debugging.
Desktop computers can open a virtual console, and embedded systems generally use serial ports as consoles. Generally, a serial cable is used to connect the serial port of the development board and the serial port of our laptop, and then open a serial port monitor on the computer, so that the serial output content of the development board can be seen on the computer. You can also input some control commands to the development board through the monitoring terminal to be executed by the development board. Commonly used serial port monitoring software includes: HyperTerminal, SecureCRT, minicom

3. Install the driver of USB to serial cable

Originally, computers all had serial ports (DM9 interface), but now everyone uses laptops without serial ports, so this kind of serial cable is not available. The way is to use a USB to serial cable. After this cable is passed into the computer, a driver needs to be installed. After the driver is installed, a serial port (called usb to serial port) will be formed on the computer, which is equivalent to your computer having a serial port, which can be passed through Serial port to monitor the serial port output of the development board.
Note 1: The management of USB devices in windows is related to the USB port. Each time you plug the USB-to-serial cable into one port, the COM port number obtained in this way is unchanged, which is convenient for us to use later. If you change the socket randomly every time, the COM port you may get will change.
Note 2: The COM port number can be changed, and the COM number that displays "used" can also be forced to occupy . Generally, it is enough to change to COM4.

1. Install the USB to serial port driver

You can look at the content in the purchase details page of a certain treasure. Generally, there will be an introduction of what chip is used. Mine is PL2303. There are many on the Internet. Just download one.

2. Steps to change the COM port number

1. This computer -> right click -> properties -> device manager -> port -> right click -> properties -> port settings ->com port number (P):Just change the port to COM4 or less (SecureCRT support is limited)

Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here

Fourth, use SecureCRT

This is just a direct reference to the blogger’s blog, thank you, there is a download link of Baidu Netdisk in it.
Link: SecureCRT green cracked version (decompression can be used, no points required) . After
opening SecureCRT.exe, create one Serial connection starts to monitor the serial port. Please refer to the figure below for settings, and note that the flow control must be removed.
Insert picture description here

5. Destroy the bootloader in iNand to boot from SD2

busybox dd if=/dev/zero of=/dev/block/mmcblk0 bs=512 seek=1 count=1 conv=sync
sync
Explanation: This sentence means to use the first sector of the onboard iNand Filling with all 0s is actually erasing it, so the first sector of the bootloader of our onboard iNand is destroyed. In the future, iROM will read the first 16KB from iNand and then calculate the checksum. At this time, because one sector was erased, the checksum failed, so the boot failed (the 2nd boot will be executed from SD2).
Note: After destroying the bootloader of the onboard iNand, without inserting the external SD card, the serial port will get:
Insert picture description here

6. Make a boot SD card (actually burn uboot to the SD card)

So far, we have destroyed the uboot in iNand. At this time, because the checksum of BL1 is not normal, S5PV210 will try to start a second time, that is, the channel 2 of the SD card is started. This was previously in S5PV210's detailed start Has been explained.
If you forget, you can check the
link: S5PV210 start-up detailed 2 .

Two programming methods:
one is to use the swiping tool to make a boot SD card in windows; the
other is to use the dd command in linux.
Here is the first one (relatively simple). The card swiping tool is on the CD: Disk A\tools\x210_Fusing_Tool.rarAfter
making the SD, insert the SD card into the SD2 channel of the development board (note that it is not SD3), and then boot to enter the uboot interface. Quickly press the enter key of the computer within 5 seconds to automatically start uboot to interrupt the automatic start. (Otherwise it will automatically start android in iNand)
Note:

  1. Run as administrator
  2. Turn off SD card write protection

Insert picture description here
Insert picture description here

After writing, the following interface will pop up:
Insert picture description here

At this point, we insert the SD card into the SD2 channel, and then long press the POWER button to view the serial port information in secureCRT, and do not press the enter key of the computer within 5 seconds to start the uboot automatically to start the iNand Android
Insert picture description here

Seven, fastboot

1. Introduction to fastboot

fastboot is a command used to quickly download mirror images in uboot, and fastboot is also a software on windows.
When downloading fastboot, pay attention to 1: fastboot uses a USB cable for data transmission, so before fastboot executionFirst connect the usb line between the development board and the host.
Pay attention to 2 when downloading fastboot:Need to install driver

2. Fastboot driver installation

(X210 Android driver) Installation
Drive location: Drive A\tools\USB drive\x210_android_driver There was
a problem when installing the driver. After clicking install driver in the device manager, the installation failed, indicating that the file hash value is not in the specified directory file in. . .
Of course, this problem was solved in the end. If you have the same problem as me, you can check this blog. Thanks to this blogger, "The hash value of the file is not in the specified directory file..."? -Turn off the mandatory signature of the driver .

3. Common commands for fastboot:

(1)fastboot devicesThe command is used to view the currently connected device. (What we see on the development board is: SMDKC110-01)
(2) fastbootflashThe xxx command is used to burn:
Burn uboot:
fastboot flash bootloader android4.0/uboot.bin
Burn linux kernel:
fastboot flash kernel android4.0/zImage-android
Burn android rom:
fastboot flash system android4.0/x210.img

(3)fastboot reboot Command is used to restart the system

8. Develop the brush system

1. Burn linux+QT

fastboot flash bootloader linuxQT/uboot_inand.bin burn uboot
fastboot flash kernel linuxQT/zImage-qt burn linux kernel
fastboot flash system linuxQT/rootfs_qt4.ext3 burn rootfs
uboot parameters do not need to be specifically set (because we flashed uboot customized for linux+QT , It is estimated that all the startup parameters have been prefabricated in uboot)

2. Burn android2.3

fastboot flash bootloader android2.3/uboot.bin burn uboot
fastboot flash kernel android2.3/zImage burn linux kernel
fastboot flash system android2.3/x210.img burn android rom
Note: The serial port 0 is used in android2.3, so after booting Plug the serial port into serial port 0, otherwise the serial port will not have any startup information. The logo on the screen in android2.3 is in the upper left corner (also a sign of successful flashing)

3. Burn android4.0.4

fastboot flash bootloader android4.0.4/uboot.bin 烧uboot
fastboot flash kernel android4.0.4/zImage-android 烧linux kernel
fastboot flash system android4.0.4/x210.img 烧android rom

step1:

Connect usb OTG and usb to serial port, open secureCRT, and start cmd under win10

step2:

Long press the power button, and then quickly press the enter key of the computer within 5 seconds to automatically start uboot to interrupt the automatic start.

step3:

Enter fastboot in secureCRT and press Enter
Insert picture description here

step4:

Enter the folder where the system image is stored in cmd.
Note: In cmd,
dir means the folder in the current directory. The
cd folder name means entering the folder
Insert picture description here

step5

Type the burning command in cmd and observe the information of the serial port callback

Burn bootloader
Insert picture description here
Insert picture description here

Burn Linux kernel and
Insert picture description here
Insert picture description here
burn android4.0.4 ROM

The screen is gradually covered by green, indicating that the programming is in progress,
and then a blue screen, indicating that the programming is complete
Insert picture description here
Insert picture description here

Finally restart it
Insert picture description here
Insert picture description here

The above are some of the pits I have stepped on, I hope to help everyone

Guess you like

Origin blog.csdn.net/qq_28816873/article/details/104084991