OSDN Git Service

[update] : BUILD.md is completely English.
[alterlinux/alterlinux.git] / docs / en / BUILD.md
1 ## Build AlterLinux
2 There are two ways to build, one is to use the actual Arch Linux and the other is to build on Docker.  
3 Please refer to [This procedure] (DOCKER.md) for how to build with Docker.  
4   
5 When building on a real machine, the OS must be ArchLinux or AlterLinux.
6 The following explains how to build on a real machine.  
7   
8 The build can be done in two ways. You can either use the wizard or run it directly.  
9
10 ### Get the source code
11
12 ```bash
13 git clone https://github.com/SereneTeam/alterlinux.git
14 cd alterlinux
15 ```
16
17 ### Use the build wizard
18 When you build directly on the actual machine, you can easily build with your desired settings using wizard.sh.  
19 The following keys are added and dependencies are automatically installed.  
20 It is written in bash, so please execute it from the terminal.  
21 Answer "yes" or "no" questions with `y` or` n`. If you enter a numerical value, enter it in half-width characters.  
22
23 ```bash
24 ./wizard.sh
25 ```
26
27 ### Build with options manually
28
29 #### Add key
30 AlterLinux includes a script to easily add keys.  
31
32 ```bash
33 sudo ./keyring.sh --alter-add --arch32-add
34 ```
35
36 #### Install the dependencies
37 Install the packages required for building.  
38
39 ```bash
40 sudo pacman -S --needed git make arch-install-scripts squashfs-tools libisoburn dosfstools lynx archiso
41 ```
42
43 #### Start the build
44 Run `build.sh`.  
45
46 ```bash
47 sudo ./build.sh
48 ```
49
50 See below for how to use `build.sh`.  
51
52 ### build.sh
53
54 #### Basic
55
56 ```bash
57 ./build.sh <options> <channel>
58 ```
59
60 ##### Note
61 All options described after the channel name are ignored. Be sure to put the option before the channel name.  
62
63 #### option
64 Run `./build -h` for full options and usage.  
65
66  Purpose | Usage
67 --- | ---
68  Enable boot splash | -b
69  Change kernel | -k [kernel]
70  Change the username | -u [username]
71  Change the password | -p [password]
72  Japanese | -j
73  Change compression method | -c [comp type]
74  Set compression options | -t [comp option]
75  Specify output destination directory | -o [dir]
76  Specify working directory | -w [dir]
77
78
79 #### An example
80 Do this to build under the following conditions.
81
82 - Enable Plymouth
83 - The compression method is `gzip`
84 - The kernel is `linux-lqx`
85 - The password is `ilovearch`
86
87 ```bash
88 ./build.sh -b -c "gzip" -k "lqx" -p 'ilovearch' xfce
89 ```
90
91
92 #### About channel
93 Channels switch between packages to install and files to include.  
94 This mechanism makes it possible to build various versions of AlterLinux.  
95 The following channels are supported as of May 5, 2020:  
96
97 Name | Purpose
98 --- | ---
99 xfce | Default channel with Xfce4 for desktop environment and various software added
100 plasma | Currently developing channel with Plasma and Qt apps
101 lxde | The lightest channel except releng, which contains only LXDE and minimal applications
102 releng | A channel where you can build a pure Arch Linux live boot disk
103 rebuild | A special channel that rebuilds using the settings in the working directory
104
105
106 #### About the kernel
107 Both the `i686` architecture and the` x86_64` architecture support the official ArchLinux kernels `linux`,` linux-lts`, and `linux-zen`.  
108 In addition to the official kernel, `x86_64` also supports the following kernels.  
109 The description of the kernel is taken from the [ArchWiki](https://wiki.archlinux.jp/index.php/%E3%82%AB%E3%83%BC%E3%83%8D%E3%83%AB).
110
111 Name | Characteristic
112 --- | ---
113 ck | linux-ck contains patches to improve system responsiveness
114 lts | Long term support (LTS) Linux kernel and modules in the core repository
115 lqx | Distro kernel replacement built with Debian settings and ZEN kernel source for desktop multimedia games
116 rt | This patch will allow you to run almost all of your kernel in real time
117 zen-letsnote | A `linux-zen` kernel patched to prevent suspend issues with Let's Note (AlterLinux specific)
118
119 ##### Note
120 Be sure to put only the `foo` part of` linux-foo` in the `-k` option. For example, in the case of `linux-lts`,` lts` will be entered.  
121
122
123 #### About compression method
124 See the `mksquashfs` help for compression methods and more options.  
125 As of February 12, 2019, the methods and options supported by `mksquashfs` are as follows.  
126
127 ```
128 gzip
129     -Xcompression-level <compression-level>
130     <compression-level> should be 1 .. 9 (default 9)
131     -Xwindow-size <window-size>
132     <window-size> should be 8 .. 15 (default 15)
133     -Xstrategy strategy1,strategy2,...,strategyN
134     Compress using strategy1,strategy2,...,strategyN in turn
135     and choose the best compression.
136     Available strategies: default, filtered, huffman_only,
137     run_length_encoded and fixed
138 lzma (no options)
139 lzo
140     -Xalgorithm <algorithm>
141     Where <algorithm> is one of:
142         lzo1x_1
143         lzo1x_1_11
144         lzo1x_1_12
145         lzo1x_1_15
146         lzo1x_999 (default)
147     -Xcompression-level <compression-level>
148     <compression-level> should be 1 .. 9 (default 8)
149     Only applies to lzo1x_999 algorithm
150 lz4
151     -Xhc
152     Compress using LZ4 High Compression
153 xz
154     -Xbcj filter1,filter2,...,filterN
155     Compress using filter1,filter2,...,filterN in turn
156     (in addition to no filter), and choose the best compression.
157     Available filters: x86, arm, armthumb, powerpc, sparc, ia64
158     -Xdict-size <dict-size>
159     Use <dict-size> as the XZ dictionary size.  The dictionary size
160     can be specified as a percentage of the block size, or as an
161     absolute value.  The dictionary size must be less than or equal
162     to the block size and 8192 bytes or larger.  It must also be
163     storable in the xz header as either 2^n or as 2^n+2^(n+1).
164     Example dict-sizes are 75%, 50%, 37.5%, 25%, or 32K, 16K, 8K
165     etc.
166 zstd
167     -Xcompression-level <compression-level>
168     <compression-level> should be 1 .. 22 (default 15)
169 ```