[Rockchip] 2. linuxSDK development: kernel dts modification of development board firmware + compilation and packaging + firmware programming - take the personal modification process as an example

Continued from the previous article: [Rockchip] 1. Decompression and deployment of Rockchip Linux SDK software package

overview

The project needs to customize and modify the hardware resources of the rv1109/rv1126 development board, modify the software device tree dts file synchronously, compile and package to generate new firmware, and burn the new firmware into the development board to use the required Hardware resource implementation requirements.
insert image description here

Note: Since the low voltage is replaced by high voltage, it is necessary to burn the kernel file first, and then manually modify the hardware power supply circuit, otherwise the chip will be damaged

Personal requirements: The communication between the radar hardware and the 1109 development board, including issuing radar commands and receiving radar data, requires at least two UART serial ports, but the development board does not directly open the serial ports. Therefore, it is necessary to change a CIF camera interface to a serial port, and the voltage of the development board and the radar IO port needs to be adapted.

Kernel file modification

Serial port modification

Its purpose is to shield the original cfi camera that is enabled by default, and then enable the multiplexing of the serial port.
That is, the port on the development board was originally connected to the camera, but now it is changed to connect to the serial port.
insert image description here
Specific operations:

  • Shielding: For the rv1109_SDK\rv1109_new\kernel\arch\arm\boot\dts\rv1126-evb-v10.dtsi file, comment out the part of the camera:

insert image description here

  • Add uart3, uart4 open
    Add the following content in the dts file
&uart3 {
	status = "okay";
};
&uart4 {
	status = "okay";
};

insert image description here

Because corresponding to the uart.cc of the embedded demo, ttySn is the serial port terminal, ttyS4 sends radar configuration and control signals, and ttyS3 is responsible for receiving radar signals

power modification

According to "RV1126_RV1109_IO_Power Domain Configuration Guide.pdf": Vccio6 is
insert image description here
still changed from 1v8 to 3v3 in rv1109_SDK\rv1109_new\kernel\arch\arm\boot\dts\rv1126-evb-v10.dtsi

insert image description here

The kernel file is compiled and generated

Copy and replace the modified rv1126-evb-v10.dtsi to the corresponding location in linux
insert image description here
and then according to "Rockchip_RV1126_RV1109_Quick_Start_Linux_CN.pdf"
insert image description here

Return to the root directory of the SDK and execute it on the terminal./build.sh kernel
insert image description here

(If there is a bug in the build, please make sure to install [Rockchip] 1. Decompression of the Rockchip Linux SDK software package and all dependent libraries in the deployment)
Appears after a few minutes:
insert image description here
It means that it has been compiled
and needs to be packaged before generating the boot .img
./mkfirmware.sh
insert image description here
and in the rockdev folder, the firmware will appear!
insert image description here

Burn the kernel file to the development board

Get the boot.img and tools in the SDK to Windows through the shared folder, open the Rockchip development tool/RKDevTool.exe,
open the parameter.txt generated in the above picture, and enter the corresponding address and name in the tool
insert image description here

(For convenience, you can right-click to export the configuration after entering it once, and you can directly right-click to import the configuration next time you burn the same firmware)
Import the configuration corresponding to the development board
insert image description here
insert image description here
Note that the path behind is the absolute path of the boot file relative to the exe.
For example, if I put the firmware to be burned in
insert image description here
, then I change the boot path
insert image description here
to this side. After the work is done, there are two burning modes, two methods, and one of them can be burned in.

Loader programming mode

After the development board is connected to the 2.7.1 version of the tool, (note that the switch must be turned on first, and then plugged into the usb port after a while) it will be displayed that an ADB device has been found. At this time, click the switch button, and after about 2 minutes: the display switch is successful and then import the
insert image description here
configuration
and After setting the firmware path correctly, click Execute
insert image description here
to burn it in

Maskrom programming mode

After the development board is connected to the 2.7.1 version of the tool, (note that the switch must be turned on first, and then plugged into the usb port after a while), it will be displayed that an ADB device has been found. At this time, press the reset button while pressing the update button on the development board. Click, and then release all the buttons, the software will change to display: Found a MASKROM device
Configure as above, note that the maskrom mode programming must add loader , also select the default loader file and the corresponding path, and then click execute, you can burning.

When doing this part, the steps are very messy. The official firmware programming tool version is different, and the steps described in the manual are also different. I use the 2.7.1 version of the programming tool and it works, but 2.8.4 often doesn’t work. It still needs to be combined. The actual development board information, try it yourself.
The following is for reference

"Rockchip_RV1126_RV1109_EVB_User_Guide_V1.0_CN.pdf"
insert image description here
"Android Development Tool Manual_v1.2.pdf"
insert image description here

Hardware power supply circuit modification

Just change the position of the resistor on the back of the 1109 development board.
insert image description here
insert image description here
After the software firmware and hardware circuit are modified, you can try to write a linux-side demo, and compile and run it on the development board! see next
end

Guess you like

Origin blog.csdn.net/z5z5z5z56/article/details/125738950