build: fix restoring /etc/opkg with PER_DEVICE_ROOTFS
[oweals/openwrt.git] / config / Config-images.in
1 # Copyright (C) 2006-2013 OpenWrt.org
2 #
3 # This is free software, licensed under the GNU General Public License v2.
4 # See /LICENSE for more information.
5 #
6
7 menu "Target Images"
8
9         menuconfig TARGET_ROOTFS_INITRAMFS
10                 bool "ramdisk"
11                 default y if USES_INITRAMFS
12                 help
13                   Embed the root filesystem into the kernel (initramfs).
14
15                 choice
16                         prompt "Compression"
17                         default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ar71xx
18                         default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
19                         default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_apm821xx
20                         default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
21                         default TARGET_INITRAMFS_COMPRESSION_NONE
22                         depends on TARGET_ROOTFS_INITRAMFS
23                         help
24                           Select ramdisk compression.
25
26                         config TARGET_INITRAMFS_COMPRESSION_NONE
27                                 bool "none"
28
29                         config TARGET_INITRAMFS_COMPRESSION_GZIP
30                                 bool "gzip"
31
32                         config TARGET_INITRAMFS_COMPRESSION_BZIP2
33                                 bool "bzip2"
34
35                         config TARGET_INITRAMFS_COMPRESSION_LZMA
36                                 bool "lzma"
37
38                         config TARGET_INITRAMFS_COMPRESSION_LZO
39                                 bool "lzo"
40
41                         config TARGET_INITRAMFS_COMPRESSION_LZ4
42                                 bool "lz4"
43
44                         config TARGET_INITRAMFS_COMPRESSION_XZ
45                                 bool "xz"
46                 endchoice
47
48                 config EXTERNAL_CPIO
49                         string
50                         prompt "Use external cpio" if TARGET_ROOTFS_INITRAMFS
51                         default ""
52                         help
53                           Kernel uses specified external cpio as INITRAMFS_SOURCE.
54
55         comment "Root filesystem archives"
56
57         config TARGET_ROOTFS_CPIOGZ
58                 bool "cpio.gz"
59                 default y if USES_CPIOGZ
60                 help
61                   Build a compressed cpio archive of the root filesystem.
62
63         config TARGET_ROOTFS_TARGZ
64                 bool "tar.gz"
65                 default y if USES_TARGZ
66                 help
67                   Build a compressed tar archive of the root filesystem.
68
69         comment "Root filesystem images"
70
71         menuconfig TARGET_ROOTFS_EXT4FS
72                 bool "ext4"
73                 default y if USES_EXT4
74                 help
75                   Build an ext4 root filesystem.
76
77                 config TARGET_EXT4_RESERVED_PCT
78                         int "Percentage of reserved blocks in root filesystem"
79                         depends on TARGET_ROOTFS_EXT4FS
80                         default 0
81                         help
82                           Select the percentage of reserved blocks in the root filesystem.
83
84                 choice
85                         prompt "Root filesystem block size"
86                         default TARGET_EXT4_BLOCKSIZE_4K
87                         depends on TARGET_ROOTFS_EXT4FS
88                         help
89                           Select the block size of the root filesystem.
90
91                         config TARGET_EXT4_BLOCKSIZE_4K
92                                 bool "4k"
93
94                         config TARGET_EXT4_BLOCKSIZE_2K
95                                 bool "2k"
96
97                         config TARGET_EXT4_BLOCKSIZE_1K
98                                 bool "1k"
99                 endchoice
100
101                 config TARGET_EXT4_BLOCKSIZE
102                         int
103                         default 4096 if TARGET_EXT4_BLOCKSIZE_4K
104                         default 2048 if TARGET_EXT4_BLOCKSIZE_2K
105                         default 1024 if TARGET_EXT4_BLOCKSIZE_1K
106                         depends on TARGET_ROOTFS_EXT4FS
107
108                 config TARGET_EXT4_JOURNAL
109                         bool "Create a journaling filesystem"
110                         depends on TARGET_ROOTFS_EXT4FS
111                         default n
112                         help
113                           Create an ext4 filesystem with a journal.
114
115         config TARGET_ROOTFS_ISO
116                 bool "iso"
117                 default n
118                 depends on TARGET_x86_generic
119                 help
120                   Create a bootable ISO image.
121
122         config TARGET_ROOTFS_JFFS2
123                 bool "jffs2"
124                 depends on USES_JFFS2
125                 help
126                   Build a JFFS2 root filesystem.
127
128         config TARGET_ROOTFS_JFFS2_NAND
129                 bool "jffs2 for NAND"
130                 default y if USES_JFFS2_NAND
131                 depends on USES_JFFS2_NAND
132                 help
133                   Build a JFFS2 root filesystem for NAND flash.
134
135         menuconfig TARGET_ROOTFS_SQUASHFS
136                 bool "squashfs"
137                 default y if USES_SQUASHFS
138                 help
139                   Build a squashfs-lzma root filesystem.
140
141                 config TARGET_SQUASHFS_BLOCK_SIZE
142                         int "Block size (in KiB)"
143                         depends on TARGET_ROOTFS_SQUASHFS
144                         default 64 if LOW_MEMORY_FOOTPRINT
145                         default 256
146
147         menuconfig TARGET_ROOTFS_UBIFS
148                 bool "ubifs"
149                 default y if USES_UBIFS
150                 depends on USES_UBIFS
151                 help
152                   Build a UBIFS root filesystem.
153
154                 choice
155                         prompt "compression"
156                         default TARGET_UBIFS_COMPRESSION_ZLIB
157                         depends on TARGET_ROOTFS_UBIFS
158                         help
159                           Select compression type
160
161                         config TARGET_UBIFS_COMPRESSION_NONE
162                                 bool "none"
163
164                         config TARGET_UBIFS_COMPRESSION_LZO
165                                 bool "lzo"
166
167                         config TARGET_UBIFS_COMPRESSION_ZLIB
168                                 bool "zlib"
169                 endchoice
170
171                 config TARGET_UBIFS_FREE_SPACE_FIXUP
172                         bool "free space fixup" if TARGET_ROOTFS_UBIFS
173                         default y
174                         help
175                           The filesystem free space has to be fixed up on first mount.
176
177                 config TARGET_UBIFS_JOURNAL_SIZE
178                         string
179                         prompt "journal size" if TARGET_ROOTFS_UBIFS
180                         default ""
181
182         config GRUB_IMAGES
183                 bool "Build GRUB images (Linux x86 or x86_64 host only)"
184                 depends on TARGET_x86
185                 depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_ISO || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
186                 select PACKAGE_grub2
187                 default y
188
189         config GRUB_CONSOLE
190                 bool "Use Console Terminal (in addition to Serial)"
191                 depends on GRUB_IMAGES
192                 default n if (TARGET_x86_generic_Soekris45xx || TARGET_x86_generic_Soekris48xx || TARGET_x86_net5501 || TARGET_x86_geos || TARGET_x86_alix2)
193                 default y
194
195         config GRUB_SERIAL
196                 string "Serial port device"
197                 depends on GRUB_IMAGES
198                 default "hvc0" if TARGET_x86_xen_domu
199                 default "ttyS0" if ! TARGET_x86_xen_domu
200
201         config GRUB_BAUDRATE
202                 int "Serial port baud rate"
203                 depends on GRUB_IMAGES
204                 default 38400 if TARGET_x86_generic
205                 default 115200
206
207         config GRUB_FLOWCONTROL
208                 bool "Use RTE/CTS on serial console"
209                 depends on GRUB_SERIAL != ""
210                 default n
211
212         config GRUB_BOOTOPTS
213                 string "Extra kernel boot options"
214                 depends on GRUB_IMAGES
215                 default "xencons=hvc" if TARGET_x86_xen_domu
216                 help
217                   If you don't know, just leave it blank.
218
219         config GRUB_TIMEOUT
220                 string "Seconds to wait before booting the default entry"
221                 depends on GRUB_IMAGES
222                 default "5"
223                 help
224                   If you don't know, 5 seconds is a reasonable default.
225
226         config VDI_IMAGES
227                 bool "Build VirtualBox image files (VDI)"
228                 depends on TARGET_x86 || TARGET_x86_64
229                 select GRUB_IMAGES
230                 select TARGET_IMAGES_PAD
231                 select PACKAGE_kmod-e1000
232
233         config VMDK_IMAGES
234                 bool "Build VMware image files (VMDK)"
235                 depends on TARGET_x86 || TARGET_x86_64
236                 select GRUB_IMAGES
237                 select TARGET_IMAGES_PAD
238                 select PACKAGE_kmod-e1000
239
240         config TARGET_IMAGES_PAD
241                 bool "Pad images to filesystem size (for JFFS2)"
242                 depends on GRUB_IMAGES
243
244         config TARGET_IMAGES_GZIP
245                 bool "GZip images"
246                 depends on TARGET_IMAGES_PAD || TARGET_ROOTFS_EXT4FS || TARGET_x86
247                 default y
248
249         comment "Image Options"
250
251         source "target/linux/*/image/Config.in"
252
253         config TARGET_KERNEL_PARTSIZE
254                 int "Kernel partition size (in MB)"
255                 depends on GRUB_IMAGES
256                 default 16
257
258         config TARGET_ROOTFS_PARTSIZE
259                 int "Root filesystem partition size (in MB)"
260                 depends on GRUB_IMAGES || TARGET_ROOTFS_EXT4FS || TARGET_rb532 || TARGET_mvebu || TARGET_uml
261                 default 256
262                 help
263                   Select the root filesystem partition size.
264
265         config TARGET_ROOTFS_PARTNAME
266                 string "Root partition on target device"
267                 depends on GRUB_IMAGES
268                 help
269                   Override the root partition on the final device. If left empty,
270                   it will be mounted by PARTUUID which makes the kernel find the
271                   appropriate disk automatically.
272
273 endmenu