Cross-compilation process of the embedded LINUX partition tool (parted)
Http://fjfhccfkuk.blog.163.com/blog/static/3665929920120532710413/
Compiling environment:
OS: Ubuntu 11.10
PC: i386
CP: Arm-Linux-GCC version 3.4.3 (Release)
Compiling Directory:/home/Han/project /?
Dependent Library: libuuid
==================================
1 unzip e2fsprogs-1.38.tar.gz // # tar-XF e2fsprogs-1.38.tar.gz
2 into the directory e2fsprogs-1.38 // # cd e2fsprogs-1.38
3. Create the directory arch build // # mkdir arch build
4. Go to the directory build // # cd build
5. Configure, cross-compile, and install e2fsprogs. Parameter -- prefix specifies the installation directory and CC is used to specify the Compiler
// # Cc = arm-Linux-GCC ../configure -- prefix =/home/Han/project/e2fsprogs-1.38/Arch -- Host = arm-Linux
// # Make
// # Make install-libs
/* The dependency library libuuid of the parted tool is compiled and installed to the directory/home/Han/project/e2fsprogs-1.38/arch. At this time, the directory such as include lib will appear */
6 unzip the parted-2.2.tar.gz // # tar-XF parted-2.2.tar.gz
7. Enter the directory parted-2.2 // # cd parted-2.2
8. Create the directory arch build // # cd mkdir arch build
9. Go to build // # cd build
10. Configure, cross-compile, and install parted. The macro cflags and ldflags are used to specify the header file and directory of the library of the dependent library libuuid.
// # Cflags =-I/home/Han/project/e2fsprogs-1.38/ARCH/include/ldflags =-L/home/Han/project/e2fsprogs-1.38/ARCH/lib cc = arm- linux-GCC .. /configure -- prefix =/Han/project/parted-2.2/Arch -- Host = arm-Linux -- disable-device-mapper
-- Without-Readline
// # Make
// # Make install
/* Now, parted cross-compilation is complete and installed in the/home/Han/project/parted-2.2/ARCH/sbin directory */