Skip to content

Commit

Permalink
feat: add device-mapper package
Browse files Browse the repository at this point in the history
Add kernel modules for device-mapper

Signed-off-by: ndbrew <[email protected]>
  • Loading branch information
ndbrew committed Aug 17, 2023
1 parent 2e1c0b9 commit c8cfa47
Show file tree
Hide file tree
Showing 3 changed files with 32 additions and 0 deletions.
1 change: 1 addition & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ TARGETS = \
TARGETS += \
kernel \
btrfs-pkg \
device-mapper-pkg \
drbd-pkg \
gasket-driver-pkg \
nvidia-open-gpu-kernel-modules-pkg \
Expand Down
2 changes: 2 additions & 0 deletions device-mapper/device-mapper.config
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CONFIG_DM_THIN_PROVISIONING=m

29 changes: 29 additions & 0 deletions device-mapper/pkg.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: device-mapper-pkg
variant: scratch
shell: /toolchain/bin/bash
dependencies:
- stage: kernel-build
steps:
- env:
ARCH: '{{ if eq .ARCH "aarch64"}}arm64{{ else if eq .ARCH "x86_64" }}x86_64{{ else }}unsupported{{ end }}'
prepare:
- |
cd /src
cat /pkg/device-mapper.config >> .config
build:
- |
cd /src
make olddefconfig
make scripts prepare modules_prepare
make SUBDIRS=drivers/md modules
install:
- |
cd /src
make -j $(nproc) -C /src M=drivers/md modules_install DESTDIR=/rootfs INSTALL_MOD_PATH=/rootfs INSTALL_MOD_STRIP=1 CONFIG_MODULE_SIG_ALL=y
test:
- |
# https://www.kernel.org/doc/html/v4.15/admin-guide/module-signing.html#signed-modules-and-stripping
find /rootfs/lib/modules -name '*.ko' -exec grep -FL '~Module signature appended~' {} \+
finalize:
- from: /rootfs
to: /

0 comments on commit c8cfa47

Please sign in to comment.