mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
remove ? from _module
This commit is contained in:
parent
855ea85243
commit
8ec107e165
5 changed files with 80 additions and 16 deletions
|
@ -95,9 +95,6 @@ _module() {
|
||||||
# discovered and added.
|
# discovered and added.
|
||||||
# $1: module name
|
# $1: module name
|
||||||
_CHECK="" _MOD="" _SOFT=() _DEPS=() _FIELD="" _VALUE="" _FW=()
|
_CHECK="" _MOD="" _SOFT=() _DEPS=() _FIELD="" _VALUE="" _FW=()
|
||||||
if [[ "${1}" == *\? ]]; then
|
|
||||||
set -- "${1%?}"
|
|
||||||
fi
|
|
||||||
_CHECK="${1%.ko*}" _CHECK="${_CHECK//-/_}"
|
_CHECK="${1%.ko*}" _CHECK="${_CHECK//-/_}"
|
||||||
# skip expensive stuff if this module has already been added
|
# skip expensive stuff if this module has already been added
|
||||||
(( _INCLUDED_MODS["${_CHECK}"] == 1 )) && return
|
(( _INCLUDED_MODS["${_CHECK}"] == 1 )) && return
|
||||||
|
|
|
@ -7,7 +7,7 @@ _run ()
|
||||||
### add pcspkr
|
### add pcspkr
|
||||||
_module pcspkr
|
_module pcspkr
|
||||||
### add init modules
|
### add init modules
|
||||||
_map _module zram? btrfs? zstd? libcrc32c?
|
_map _module zram btrfs zstd libcrc32c
|
||||||
### keyboard modules
|
### keyboard modules
|
||||||
_all_modules -f '_cs|ssb-hcd' '/usb/host'
|
_all_modules -f '_cs|ssb-hcd' '/usb/host'
|
||||||
_all_modules '/hid/hid-(alps|apple|asus|belkin|cherry|chicony|corsair|elan|hyperv|kensignton|lenovo|logitech|magicmouse|microsoft|razer|redragon|roccat|samsung|sony|speedlink|steelseries)'
|
_all_modules '/hid/hid-(alps|apple|asus|belkin|cherry|chicony|corsair|elan|hyperv|kensignton|lenovo|logitech|magicmouse|microsoft|razer|redragon|roccat|samsung|sony|speedlink|steelseries)'
|
||||||
|
|
|
@ -6,7 +6,7 @@ _run ()
|
||||||
{
|
{
|
||||||
_all_modules '/fs/(btrfs|cifs|exfat|ext4|f2fs|fat|hfs|hfsplus|isofs|jfs|nfs|nfsd|nilfs2|nls|ntfs3|udf|xfs|vboxsf)'
|
_all_modules '/fs/(btrfs|cifs|exfat|ext4|f2fs|fat|hfs|hfsplus|isofs|jfs|nfs|nfsd|nilfs2|nls|ntfs3|udf|xfs|vboxsf)'
|
||||||
_all_modules '/(lib/|kernel|arch/*)/crypto'
|
_all_modules '/(lib/|kernel|arch/*)/crypto'
|
||||||
_map _module crypto-crc32c? crypto-crc32? libcrc32c? configfs? nls_cp437? nls_ascii?
|
_map _module crypto-crc32c crypto-crc32 libcrc32c configfs nls_cp437 nls_ascii
|
||||||
_map _binary mkswap badblocks blkid debugfs dumpe2fs e2fsck \
|
_map _binary mkswap badblocks blkid debugfs dumpe2fs e2fsck \
|
||||||
e2image e2undo findfs fsck logsave mkfs.ext2 resize2fs chattr lsattr e2freefrag filefrag \
|
e2image e2undo findfs fsck logsave mkfs.ext2 resize2fs chattr lsattr e2freefrag filefrag \
|
||||||
jfs_debugfs jfs_fsck jfs_fscklog jfs_logdump jfs_mkfs jfs_tune mkfs.xfs xfs_copy xfs_db xfs_estimate xfs_fsr xfs_io \
|
jfs_debugfs jfs_fsck jfs_fscklog jfs_logdump jfs_mkfs jfs_tune mkfs.xfs xfs_copy xfs_db xfs_estimate xfs_fsr xfs_io \
|
||||||
|
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
_run() {
|
_run() {
|
||||||
### init modules
|
### init modules
|
||||||
_map _module vfat? iso9660? nls_cp437? nls_ascii? cdrom? exfat?
|
_map _module vfat iso9660 nls_cp437 nls_ascii cdrom exfat
|
||||||
_map _binary bash sh blkid mount mountpoint switch_root bsdcpio mkfs.btrfs setfont \
|
_map _binary bash sh blkid mount mountpoint switch_root bsdcpio mkfs.btrfs setfont \
|
||||||
/usr/lib/systemd/systemd-udevd udevadm systemd-tmpfiles kmod insmod modprobe \
|
/usr/lib/systemd/systemd-udevd udevadm systemd-tmpfiles kmod insmod modprobe \
|
||||||
gzip uname cat cp dmesg grep ln ls mv rm umount lsblk rmmod cut sed find mkdir dialog
|
gzip uname cat cp dmesg grep ln ls mv rm umount lsblk rmmod cut sed find mkdir dialog
|
||||||
|
|
|
@ -1061,17 +1061,84 @@ There are the following configuration files for ISO creation:
|
||||||
</ul>
|
</ul>
|
||||||
<h4 data-number="7.2.3.3" id="archboot-cpio.sh"><span class="header-section-number">7.2.3.3</span> <strong>archboot-cpio.sh</strong></h4>
|
<h4 data-number="7.2.3.3" id="archboot-cpio.sh"><span class="header-section-number">7.2.3.3</span> <strong>archboot-cpio.sh</strong></h4>
|
||||||
<ul>
|
<ul>
|
||||||
<li>The archboot initrd toolchain uses its own cpio generator.</li>
|
<li>The archboot initrd toolchain uses its <strong>own</strong> cpio generator.</li>
|
||||||
<li>objdump is used for library detecton. It's faster than ldd!</li>
|
<li><strong>objdump</strong> is used for library detection. It's faster than ldd!</li>
|
||||||
<li>libraries for binaries outside of bin/ are not detected!</li>
|
<li>libraries for binaries outside of bin/ are <strong>not</strong> detected!</li>
|
||||||
<li>libraries outside of lib/ are not checked!</li>
|
<li>libraries outside of lib/ are <strong>not</strong> checked!</li>
|
||||||
<li>tar is used for creating/moving files and directories. It's faster than mkdir, install and cp!</li>
|
<li><strong>tar</strong> is used for copying/moving files and directories. It's faster than mkdir, install and cp!</li>
|
||||||
<p></p>
|
|
||||||
<li> <strong>Only</strong> options supported in <strong>config</strong> files:<br>
|
|
||||||
<strong>_KERNEL, _HOOKS, _COMP, COMP_OPTS</strong></li>
|
|
||||||
<li> <strong>Only</strong> functions supported in <strong>HOOK</strong> files:<br>
|
|
||||||
<strong>_map, _dir, _full_dir, _binary, _file, _file_rename, _symlink, _module, _all_modules</strong></li>
|
|
||||||
</ul>
|
</ul>
|
||||||
|
Options supported in <strong>/etc/archboot/<yourconfig>.conf</strong> files:<br>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr class="header">
|
||||||
|
<th>Option</th>
|
||||||
|
<th>Usage</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>_KERNEL=""</td>
|
||||||
|
<td>defines used kernel</td>
|
||||||
|
<tr class="even">
|
||||||
|
<td>_HOOKS=()</td>
|
||||||
|
<td>Array that defines the used hooks</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>_COMP=""</td>
|
||||||
|
<td>defines used compression method</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td>_COMP_OPTS=()</td>
|
||||||
|
<td>defines compression method options</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
Functions supported in <strong>/usr/lib/archboot/cpio/hooks/<hook></strong> files:<br>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr class="header">
|
||||||
|
<th>Function</th>
|
||||||
|
<th>Usage</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>_map <function> <args></td>
|
||||||
|
<td>redo <function> on <args></td>
|
||||||
|
<tr class="even">
|
||||||
|
<td>_dir <directory></td>
|
||||||
|
<td>Only creates <directory> on <rootfs></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>_full_dir <directory></td>
|
||||||
|
<td>Copies the <full directory> as is to <rootfs></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td>_binary <binary></td>
|
||||||
|
<td>Adds <binary> to rootfs, PATH is added,<br>libraries are detected</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>_file <file></td>
|
||||||
|
<td>Adds <file> as is to rootfs</td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td>_file_rename <file> <file_rootfs></td>
|
||||||
|
<td>Adds <file> as is to rootfs <file_rootfs></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>_symlink <linkname> <linkedfile></td>
|
||||||
|
<td>Adds symlink <linkname> to <linkedfile> on <rootfs></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="even">
|
||||||
|
<td>_module <module></td>
|
||||||
|
<td>Adds kernel <module> to <rootfs></td>
|
||||||
|
</tr>
|
||||||
|
<tr class="odd">
|
||||||
|
<td>_all_modules -f <exlude_pattern> <pattern></td>
|
||||||
|
<td>Adds all kernel modules <pattern> to <rootfs>,<br>use -f flag to exclude modules</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
<h4 data-number="7.2.3.4" id="archboot-x86_64-iso.sh"><span class="header-section-number">7.2.3.4</span> <strong>archboot-x86_64-iso.sh</strong></h4>
|
<h4 data-number="7.2.3.4" id="archboot-x86_64-iso.sh"><span class="header-section-number">7.2.3.4</span> <strong>archboot-x86_64-iso.sh</strong></h4>
|
||||||
<p>Script for image creation from running system or for use in archboot container.</p>
|
<p>Script for image creation from running system or for use in archboot container.</p>
|
||||||
<table>
|
<table>
|
||||||
|
|
Loading…
Reference in a new issue