-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmkrootfs.1
85 lines (85 loc) · 2.78 KB
/
mkrootfs.1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.46.4.
.TH MKROOTFS.SH "1" "April 2017" "mkrootfs.sh 1.0.1" "User Commands"
.SH NAME
mkrootfs.sh \- manual page for mkrootfs.sh 1.0.1
.SH SYNOPSIS
.B mkrootfs.sh
[\fI\,OPTIONS\/\fR]
.SH DESCRIPTION
mkrootfs.sh is a bash script for compile and create a rootfs for embedded systems.
.PP
It can compile and install busybox (see '\-b' option);
if a file called 'busybox.config' is found in the current directory it will be
used, otherwise a default configuration will be generated.
.PP
A GNU cross\-compile toolchain (gcc + binutils + libc) can be set with the '\-c'
option (see the examples below).
.PP
Any tarball, directory or file can be extracted/copied in the rootfs directly
with the '\-i' option.
.PP
If a directory is specified with the option '\-p', this script will try to
compile the project inside running 'make install', assuming that the
PREFIX parameter is accepted;
a 'make clean' command is performed next, if '\-k' isn't enable.
.PP
With the '\-l' option you can indicate a directory (or a tarball archive)
in which there's a library directory tree (the sysroot folder of your
(cross\-)compiler). This directory tree will be filtered and only the libraries
required by the executables will be copied in the rootfs.
This operation is performed by the auxiliary bash script ldd.sh
(it must be in the current working directory).
Warning: this *experimental* solution is not reliable and can not work
automagically for all the executables.
.PP
Default tmp directory is '/tmp/build_mkrootfs'; use option '\-t' for set another path.
.PP
If you want to stop the script while running, Ctrl+C (SigInt) should be enough.
.PP
WARNING:
This script should NOT be run with root privileges; it can require a large
amount of space (depending of what you want install).
.SH OPTIONS
.TP
\fB\-b\fR FILE
FILE is the tarball that contains busybox
.TP
\fB\-c\fR CROSS
use CROSS as a standard GNU cross\-compile toolchain
.TP
\fB\-\-help\fR
show this help and exit
.TP
\fB\-i\fR PATH
PATH can be a tarball, a directory or a file to be install
.TP
\fB\-k\fR
do not delete temporary files
.TP
\fB\-l\fR PATH
filter and install the library in PATH
.TP
\fB\-p\fR PATH
PATH can be a directory to a project to be compiled
.TP
\fB\-t\fR PATH
set 'PATH/build_mkrootfs' as the tmp directory
.TP
\fB\-\-version\fR
output version information and exit
.SH EXAMPLES
.TP
mkrootfs.sh \-b busybox\-1.25.1.tar.bz2 \-i packet.tar.xz
common usage
.TP
mkrootfs.sh \-c arm\-unknown\-linux\-uclibc\-
specify the toolchain
.SH AUTHOR
Written by MParolari <[email protected]>
.SH COPYRIGHT
Copyright \(co 2016\-17 MParolari.
.PP
This program comes with ABSOLUTELY NO WARRANTY.
.br
This is free software, and you are welcome to redistribute it
under certain conditions. See README or LICENSE files for details.