## Makefile for linux.# If you don't have '-mstring-insns' in your gcc (and nobody but me has :-)# remove them from the CFLAGS defines.#
# #8086Assembler compiler and linker. -0 generates 8086 target program; -a generates code compatible with gas and gld parts #AS86 =as -0 -a CC86 =cc -0LD86 =ld -0
##GNUAssembly Compiler and Connector#AS =gasLD =gld
##GNU Connector gld runtime option #-s omits all symbol information in the output file #-x Delete all Local Symbol #-M Prints a link map on a standard output device (display). #Connection Image: A memory address map generated by the linker that lists the program loaded into memory. The location information has the following information: #Target file and symbol information mapped to the location in memory #How to place the public symbol #All the file members included in the connection and the symbols they reference #LDFLAGS =-s -x -M
##gcc is the GNU C program compiler. For UNIX-like scripts, #refer to the defined identifier, precede it with a $ sign and enclose the identifier in parentheses #CC = Gcc
##GCC Options.#-Wall Print all warning messages#-O Optimize code#-fstrength-reduce Optimization loop statement #CFLAGS =-Wall -O -fstrength-reduce -fomit- Frame-pointer -fcombine-regs
##CPP is a preprocessor for gcc#-nostdinc -Iinclude Do not search for files in the standard header file directory, instead use the directory specified by the -I option or Search the header file in the current directory #CPP =gcc -E -nostdinc -Iinclude
# # kernel directory, mm directory, object code file generated by the fs directory. # For ease of reference, use them here to represent ARCHIVES (archive file) identifier #ARCHIVES=kernel/kernel.o mm/mm.o fs/fs.o
## Generated from lib/directory General library file #LIBS =lib/lib.a
## make implicit suffix rule# Instructs make to compile all .c files with the following command to generate .s assembler # ':' indicates the following Is the command of the rule # Rule: refers to gcc to use the option specified by the previous CFLAGS and only use the header file in the include/directory, # stop (-S) without proper assembly after compilation, thus generating and inputting each The C file corresponds to the code file in assembly language form. # By default, the assembler file generated is the original C file name minus .c followed by the .s suffix. # -o indicates the form of the output file. # where $*.s (or $@) is the automatic target variable, and $< represents the first prerequisite, here is the file that meets the condition *.c. #.c.s:$(CC) $(CFLAGS) \\-nostdinc -Iinclude -S -o $*.s $<
## Compile all .s assembler files into .o object files. The next one is the specific command to achieve this operation # Use the gas compiler to compile the assembler into a .o object file. -c means compile or assemble only, but does not connect operation #.so:$(AS) -c -o $*.o $<
## Use gcc to compile c language into object file but Not connected #.co:$(CC) $(CFLAGS) \\-nostdinc -Iinclude -c -o $*.o $<
## all means to create the topmost target known to the Makefile. Here is the image file #all: Image
## First line description: The target file (Image file) is generated by the 3 elements after the semicolon. The following two lines are executed commands # First line Indicates that the boot, system files are assembled into a kernel image file using the build utility in the tools directory. Image# The second line of the sysn synchronization command forces the buffer block data to immediately write to the disk and update the superblock #Image: boot/boot tools/system Tools/buildtools/build boot/boot tools/system > Imagesync
#chmem -- Modify system memory data tools/build: tools/build.c$(CC) $(CFLAGS) \\-o tools/Build tools/build.cchmem +65000 tools/build
## Generate head.o files using the .so rules above #boot/head.o: boot/head.s
## The last >System.map indicates that gld needs to redirect the connection image in the System.map file #tools/system: boot/head.o init/main.o \\$(ARCHIVES) $(LIBS)$(LD $(LDFLAGS) boot/head.o init/main.o \\$(ARCHIVES) \\$(LIBS) \\-o tools/system > System.map
## Kernel target module kernel.o #kernel/kernel.o:(cd kernel; make)
## Kernel Management Module mm.o#mm/mm.o:(cd mm; make)
## File System Target Module fs.o#fs/fs.o:(cd fs; make)
## Library function lib.a#lib/lib.a:(cd lib; make)
## Add a line in the boot.s program opening for the system file length information # First generated with "SYSSIZE = The actual length of the file " a line of information in the tmp.s file, and then add the boot.s file after it. # Get the length of the system: # Use the ls command to display a long list of system files # Use the grep command to get the file byte number field information on the list, and save it in the tmp.s temporary file #cut command for cutting The string #tr is used to remove the carriage return # at the end of the line (actual length + 15)/16 to get the length information represented by 'section', 1 section = 16 bytes # with 8086 assembly and connector pair setup.s The file is compiled to generate the setup file # -s indicates that the symbol information in the target file is to be fetched #boot/boot: boot/boot.s tools/system(echo -n "SYSSIZE = (";ls -l tools/system
Installing VMware in Linux System Due to the project needs, you need to virtuali
1 Start vSphere Client2 Start Virtual Machine [Right-click on VM, select Power —>Open] and
First install CentOS6 to install rp-pppoe this software, the previous version of centos is installed
In the existing embedded LINUX system development process, all engineers are tired
Manage xen save, stop, and pause using the character tool xm
After linux2.6.38, the kernel version calls open
Linux query memory real utilization
TCP server and client implementation under Linux tutorial
One of the Linux operating systems --------- command detailed analysis
Solve the system problem accurately Linux log management
Linux shell script preparation tutorial
Using XFS file system in Linux environment
Data transfer on the link layer of the linux protocol stack -sk
Linux can not identify the u disk solution
Piracy windows system can upgrade win10 for free?
Remote connection VPN server application in Win2003
How to solve the problem of Win7 broadband connection error 711?
Win10 start menu shows 3D dynamic tile effect
The strategy for preventing hackers from infringing Windows XP (2)
Windows 2008 system IE secrets
Right click menu to show/hide system files, extension
How to make win2003 automatically log in after remote operation