arm-linux-gnu-ld -EL -p --no-undefined -X -o vmlinux -T arch/arm/kernel/vmlinux.lds
|
arch/arm/kernel/head.o
arch/arm/kernel/init_task.o
init/built-in.o
--start-group
usr/built-in.o
arch/arm/kernel/built-in.o
arch/ arm/mm/built-in.o
arch/arm/common/built-in.o
arch/arm/mach-s3c2410/built-in.o
arch/arm/nwfpe/built-in.o
kernel/built-in. o
mm/built-in.o
fs/built-in.o
ipc/built-in.o
security/built-in.o
crypto/built-in.o
lib/lib.a
arch/arm/lib/lib.a
lib/built-in.o
arch/arm/lib/built-in.o
drivers/built-in.o
sound/built-in.o
net/built-in.o
--end-group .tmp_kallsyms2.o
2. Remove debugging information, comments, symbol table and other contents from the vmlinux above to generate arch/arm/boot/Image, which is the Linux kernel without redundant information. The size of the Image is about 3.2MB;
command: arm-linux-gnu-objcopy -O binary -R .note -R .comment -S vmlinux arch/arm/boot/Image
3. Compress arch/arm/boot/Image with gzip -9 to generate arch/arm/boot/compressed/piggy.gz with a size of about 1.5MB;
command: gzip -f -9 < arch/arm/boot/compressed/../Image > arch/arm/boot/compressed/piggy.gz
4. Compile arch/arm/boot/compressed/piggy.S to generate arch/arm/boot/compressed/piggy.o with a size of about 1.5MB. Here, piggy.gz is actually compiled into the piggy.o file through piggy.S. The piggy.S file has only 6 lines, which just includes the file piggy.gz;
command: arm-linux-gnu-gcc -Wp,-MD,arch/arm/boot/compressed/.piggy.od -nostdinc -isystem /home/justin/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux-gnu/lib/gcc/arm-linux-gnu/3.4.5/include -D__KERNEL__ -Iinclude -mlittle-endian -D__ASSEMBLY__ -Wa,-L -gdwarf-2 -mapcs-32 -mno-thumb-interwork -D__LINUX_ARM_ARCH__=4 -march=armv4 -mtune=arm9tdmi -msoft-float -c -o arch/arm/boot/compressed/piggy.o arch/arm/boot/compressed/piggy.S
5. According to arch/arm/boot/compressed/vmlinux.lds, link the files head.o, piggy.o and misc.o in the arch/arm/boot/compressed/directory to generate arch/arm/boot/compressed/vmlinux. This vmlinux is a compressed kernel with self-extracting code, with a size of about 1.5MB;
command: arm-linux-gnu-ld -EL --defsym zreladdr=0x30008000 --defsym params_phys=0x30000100 -p --no-undefined -X /home/justin/crosstool/gcc-3.4.5-glibc-2.3.6/arm-linux-gnu/lib/gcc/arm-linux-gnu/3.4.5/libgcc.a -T arch/arm/boot/compressed/vmlinux.lds arch/arm/boot/compressed/head.o arch/arm/boot/compressed/piggy.o arch/arm/boot/compressed/misc.o -o arch/arm/boot/compressed/vmlinux
6. Remove debugging information, comments, symbol tables, etc. from arch/arm/boot/compressed/vmlinux to generate arch/arm/boot/zImage with a size of about 1.5MB; this is already a usable Linux kernel image file;
command: arm-linux-gnu-objcopy -O binary -R .note -R .comment -S arch/arm/boot/compressed/vmlinux arch/arm/boot/zImage
7. Add 64Bytes of related information to arch/arm/boot/zImage and package it into arch/arm/boot/uImage with a size of about 1.5MB;
command: /bin/sh /home/farsight/Resources/kernel/linux-2.6.14/scripts/mkuboot.sh -A arm -O linux -T kernel -C none -a 0x30008000 -e 0x30008000 -n 'Linux-2.6.14' -d arch/arm/boot/zImage arch/arm/boot/uImage
Previous article:ARM MACHINE_TYPE_XXXX issue
Next article:ARM MPCore -- (2)
Recommended ReadingLatest update time:2024-11-16 19:30
Professor at Beihang University, dedicated to promoting microcontrollers and embedded systems for over 20 years.
- Innolux's intelligent steer-by-wire solution makes cars smarter and safer
- 8051 MCU - Parity Check
- How to efficiently balance the sensitivity of tactile sensing interfaces
- What should I do if the servo motor shakes? What causes the servo motor to shake quickly?
- 【Brushless Motor】Analysis of three-phase BLDC motor and sharing of two popular development boards
- Midea Industrial Technology's subsidiaries Clou Electronics and Hekang New Energy jointly appeared at the Munich Battery Energy Storage Exhibition and Solar Energy Exhibition
- Guoxin Sichen | Application of ferroelectric memory PB85RS2MC in power battery management, with a capacity of 2M
- Analysis of common faults of frequency converter
- In a head-on competition with Qualcomm, what kind of cockpit products has Intel come up with?
- Dalian Rongke's all-vanadium liquid flow battery energy storage equipment industrialization project has entered the sprint stage before production
- Allegro MicroSystems Introduces Advanced Magnetic and Inductive Position Sensing Solutions at Electronica 2024
- Car key in the left hand, liveness detection radar in the right hand, UWB is imperative for cars!
- After a decade of rapid development, domestic CIS has entered the market
- Aegis Dagger Battery + Thor EM-i Super Hybrid, Geely New Energy has thrown out two "king bombs"
- A brief discussion on functional safety - fault, error, and failure
- In the smart car 2.0 cycle, these core industry chains are facing major opportunities!
- The United States and Japan are developing new batteries. CATL faces challenges? How should China's new energy battery industry respond?
- Murata launches high-precision 6-axis inertial sensor for automobiles
- Ford patents pre-charge alarm to help save costs and respond to emergencies
- New real-time microcontroller system from Texas Instruments enables smarter processing in automotive and industrial applications
- TI blog post How GaN FETs with integrated drivers and self-protection enable next-generation industrial power designs
- [MM32 eMiniBoard Review] Part 5: ADC acquisition and host computer oscilloscope display
- [National Technology N32G430] 1. Unboxing
- CircuitPython 5.0.0 Beta 0 released
- MicroPython Newsletter Issue 8
- Contact information of forum administrator during the May Day holiday in 2021!
- Decoding infrared forehead thermometer: technical principles, disassembly analysis, design solutions, circuit solutions and other technical solutions
- 0R resistors, beads and inductors
- GPIO register group in C6455
- I have never learned programming. Can I learn Python?