Precautions in uClinux

xiaoxiao2021-03-06  104

1. How you write a Makefile separately to compile a single file to the XG2000 running.

(1). Compile a driver to see /XGLJ/EXAMPLE/Driver/drivertest.c. This program is a simple driver that can test some kernel information. Help understand the kernel structure and kernel parameters. Makefile is compiled. Final All files Copy to / KLS directory are all in which only the files / kLS directory Mount to XG2000 can be operated in the / kLS directory.

(2). Compilation of an app / XGLJ / EXAMPLE / Driver / Make

The calling method is ./make memory can compile this file into the / kLS directory.

2. Places to modify when modifying partitions.

(1). SRC / Software / Firmware / Uclinux / etc / ap_rockhopper.h in the partition start location and end position

(2). SRC / Software / Firmware / UClinux / etc / router_rockhopper.h in the partition start position and end position

(3). SRC / SOFTWARE / FIRMware / UCLINUX / include / flash_Layout.H The structure and partition of the partition in the partition.

(4). ETC / RC.D / RCS and ETC / Init.D / defaults file in SRC / Software / Firmware / Uclinux / Romfs.tgz

Do not modify the files in the ROMFS directory after extracting. Modify the file after the decompression is compiled with make image build = formal brand = NB after / src / soft / firmware / APFW directory. If you use makeimages.sh in / src directory It is useless to compile, this compilation method will decompress the romfs.tgz. File.

3. Modify the version number.

(1). Directly modify the SRC / Software / Firmware / APFW / INCLUDE / VERSION_INFO.MAK file. Instructed version of the MVC version

4. Automatically start the file when the system starts.

(1). Modify the corresponding startup file under src / soft / firmup.list.xx. The program is automatically started automatically when the system starts.

5. Default DNS is started.

(1). Modify SRC / Software / Firmware / Uclinux / etc / dns.list.xx. The data inside is the DNS of the system default.

6. If the web partition does not have a mount success. The system will empty the contents of the Web partition. Clear command is

ERASE_FLASH / DEV / MTD $ JFFS_MTD_NUM 0 100

This may appear after updating the new FW, the system will have a web file loss.

The solution is to put the previously compiled web files in the / etc directory. Place the Web IMG file in the / usr / etc directory after empty.

7. Many of the systems are compiled in BusyBox. If you want to increase the program inside busybox, you can modify /src/software/firmware/uclinux/appbuild/busybox/config.h.

8. The meaning of the ROMFS / DEV / * file DEV Console, C, 5, 1 means the character device, the main device number is 5, the secondary device number is 1.

If you add a device driver, you should pay attention to add this format.

9. DataStore is the core of the system

(1). The process of getOid in the web, web-> si-> datastore-> get ()

(2). The process of SETOID in Web, Web-> setObject-> Datastore-> set ()

(3). SSI, SETOBJECT, and DATASTORE communication process is 1122 through the UDP's Socket port number.

If the debug OID or filter OID can be made in SSI. The system interface function is called.

(4). DATSTORE / interfaces / iface_snmp.c / parse_command function is a DataStore's acceptance function in an OID. It is the unique channel on the upper layer and the lower layer. (5), each OID has an ExpiRetime property, if the system When the time is started, the value of this OID may not be able to get the value of this OID on the next Web, which is the value before this OID. Therefore, attention, if the system time is from large to small, there may be problems .

转载请注明原文地址:https://www.9cbs.com/read-126349.html

New Post(0)