arch build system - Forest0923/memo GitHub Wiki
Install
sudo pacman -S asp
Usage (kernel build)
- Create directory for build kernel:
mkdir build
cd build
- Download PKGBUILD via asp:
asp update linux
asp export linux
cd linux
vim PKGBUILD
3c3
< pkgbase=linux
---
> pkgbase=linux-custom
64d63
< make htmldocs
191c190
< pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs")
---
> pkgname=("$pkgbase" "$pkgbase-headers")
makepkg -so
user@host linux % tree -C -L 2
.
├── archlinux-linux
│ ├── branches
│ ├── config
│ ├── description
│ ├── FETCH_HEAD
│ ├── HEAD
│ ├── hooks
│ ├── info
│ ├── objects
│ ├── packed-refs
│ └── refs
├── config
├── PKGBUILD
├── sphinx-workaround.patch
└── src
├── archlinux-linux <- Kernel source code here
├── config -> /home/mori/kernelbuild/linux/config
└── sphinx-workaround.patch -> /home/mori/kernelbuild/linux/sphinx-workaround.patch
- Build and install custom kernel:
makepkg -se # Additionally 'f' option needed when overwrite pkg
sudo pacman -U linux-custom-[version].arch1-1-x86_64.pkg.tar.zst linux-custom-headers-[version].arch1-1-x86_64.pkg.tar.zst
Kernel/Arch Build System