]> glassweightruler.freedombox.rocks Git - Ventoy.git/blob - DMSETUP/build.txt
Update build_libfuse.sh
[Ventoy.git] / DMSETUP / build.txt
1 Build a static linked, small dmsetup tool
2
3 ======== Source Code ========
4 use an old version of dmsetup
5 xxx/centos-vault/5.3/os/SRPMS/device-mapper-1.02.28-2.el5.src.rpm
6
7 ======== Build Envrioment ========
8 build for 32bit, static linked with dietlibc
9 1. install centos 6.10 i386 with CentOS-6.10-i386-bin-DVD1.iso
10 2. yum install gcc kernel-devel package
11 3. install dietc libc (just make && make install)
12 4. export PATH=$PATH:/opt/diet/bin
13
14 ======== Build Step ========
15 1. extract device mapper source code
16 2. CC="diet gcc" ./configure --disable-nls --disable-selinux --disable-shared
17 3. modify include/configure.h file
18 --- delete the line with "#define malloc rpl_malloc"
19 --- add 2 defines as follow:
20 #ifndef UINT32_MAX
21 #define UINT32_MAX (4294967295U)
22 #endif
23
24 #ifndef UINT64_C
25 #define UINT64_C(c) c ## ULL
26 #endif
27
28 4. make
29 5. strip dmsetup/dmsetup
30 5. get dmsetup/dmsetup as the binary file