1. cross-compilation environment:
1)
in cross-compilation (E. g: Arm-Linux-GCC) contains. h. When connecting to the app that generates the target board, it will also look for libc. so this library;
the directory tree of the Cross-compiling environment should be distinguished from the host. Its own directory tree is usually located,
/usr/local/ARM-Linux/bin/* cross-compilation tool */
/usr/local/ARM-Linux/include/* header file path */
/usr/local/ARM-Linux/lib/* library location */
2)
Path = $ path:/usr/local/ARM-Linux/bin;
generally, we do not need to specify the location of the header file and function library.
During uClinux development, you must specify-I-l!
2. analysis of the classic process of starting the Embedded Target machine from boot to Linux:
-after the processor restarts, run the ROM startup Code
-Rom startup code to initialize the CPU, memory controller, and on-chip devices,
Configure the memory map ). ROM boot code and then execute the boot loader.
-The Boot Loader unpacks the Linux kernel from the flash memory or TFTP server to ram, and then redirects to the First Command of the kernel for execution.
-the kernel first configures the registers and memory of the microprocessor, and then calls the start_kernel function, which is the start point of the processor-independent part.
-the kernel initializes its cache and various hardware devices.
-the kernel mounts the root file system from the storage media or through NFS.
-the kernel executes the init Program of the root file system (the root file system is a system-level library and application ).
-The INIT program loads the shared library during runtime.
-init reads its configuration file/etc/inittab and performs the operation defined in it.
In general, init runs a system startup script/etc/rc. d/RCs, which configures and starts the network and other system services.
-init enters a running level. At this level, you can execute system tasks, log on to the process, and finally enter the user session stage.
3. NFS (Network File System)
-/Etc/init. d/nfs start
-Vi/etc/exports/* modify the NFS configuration file */
Add an export entry. Each entry includes a shared directory, an IP address, and access permission.
Example:/armwork/rootfs * (RW, no_root_squash)
Note:
-/Armwork/rootfs/* directory of the root file system to be exported by the Development host */
-*/* Unlimited access IP addresses */
-RW/* readable and writable permission to mount the file system */
-No_root_squash/* mount the file system as root on the client */
-Choose "NFS file system support" and "root file system on NFS" When configuring the kernel"
-When a general bootloader starts the kernel, it locates the file system by passing parameters (kernel passing parameters)
Root =/dev/nfs
-Nfsroot = {<server-IP >:}< root-Dir >{, <nfs-Options>}
/* Generally, as long as the root DIR is provided (the directory on the NFS server needs to be mounted as the root file system )*/
-IP = <client-IP >:< server-IP >:< GW-IP >:< netmask >:< hostname >:< device >:< Autoconf>
4. Arm-Linux-GCC helloworld. C
arm-Linux-strings a. Out