Simplify specifying packages to build/install
The Portage packages that need to be built and/or installed are now specified in the `build.packages` and `install.packages` files, respectively. Similarly, packages to be installed on the host system are specified in `host-tools.packages`. Finally, the `installonly.packages` file contains a list of packages that are installed in the destination root, but not built in the sysroot beforehand. This allows `make` to better track when the package sets change. It will also make it easier to maintain different sets for different variants in the future.
This commit is contained in:
18
Makefile
18
Makefile
@@ -19,6 +19,7 @@ prepare: $(O)/.prepared
|
||||
|
||||
$(O)/.host-tools: \
|
||||
build-host-tools.sh \
|
||||
host-tools.packages \
|
||||
$(O)/.prepared
|
||||
./build-host-tools.sh
|
||||
touch $(O)/.host-tools
|
||||
@@ -27,18 +28,27 @@ host-tools: $(O)/.host-tools
|
||||
|
||||
$(O)/.built: \
|
||||
build.sh \
|
||||
build-rootfs.sh \
|
||||
$(O)/linux/arch/arm64/boot/Image.gz \
|
||||
build.packages \
|
||||
install.packages \
|
||||
$(O)/.host-tools \
|
||||
$(O)/.prepared
|
||||
./build.sh
|
||||
./build-rootfs.sh
|
||||
touch $(O)/.built
|
||||
|
||||
$(O)/.ready: \
|
||||
build-rootfs.sh \
|
||||
install.packages \
|
||||
installonly.packages \
|
||||
$(O)/linux/arch/arm64/boot/Image.gz \
|
||||
$(O)/.host-tools \
|
||||
$(O)/.built
|
||||
./build-rootfs.sh
|
||||
touch $(O)/.ready
|
||||
|
||||
$(IMAGESDIR)/rootfs.squashfs: \
|
||||
build-squashfs.sh \
|
||||
squashfs.exclude \
|
||||
$(O)/.built
|
||||
$(O)/.ready
|
||||
./build-squashfs.sh "$(IMAGESDIR)"
|
||||
|
||||
squashfs: $(IMAGESDIR)/rootfs.squashfs
|
||||
|
||||
@@ -1,12 +1,5 @@
|
||||
#!/bin/sh
|
||||
# vim: set sw=4 ts=4 sts=4 et :
|
||||
|
||||
emerge -vnUj \
|
||||
sys-apps/systemd \
|
||||
sys-boot/grub \
|
||||
sys-fs/btrfs-progs \
|
||||
sys-fs/dosfstools \
|
||||
sys-fs/genimage \
|
||||
sys-fs/mtools \
|
||||
sys-fs/squashfs-tools \
|
||||
|| exit
|
||||
< host-tools.packages xargs -ro \
|
||||
emerge -vnUj
|
||||
|
||||
@@ -24,19 +24,13 @@ cp -r portage/. /mnt/gentoo/etc/portage/
|
||||
|
||||
ROOT=/mnt/gentoo \
|
||||
PORTAGE_CONFIGROOT=/mnt/gentoo \
|
||||
${target}-emerge -Kvnj \
|
||||
sys-apps/busybox \
|
||||
sys-apps/systemd \
|
||||
net-misc/openssh \
|
||||
net-misc/wget \
|
||||
sys-fs/btrfs-progs \
|
||||
--
|
||||
< install.packages xargs -ro \
|
||||
${target}-emerge -Kvnj
|
||||
|
||||
ROOT=/mnt/gentoo \
|
||||
PORTAGE_CONFIGROOT=/mnt/gentoo \
|
||||
${target}-emerge -vnj \
|
||||
net-wireless/wireless-regdb \
|
||||
sys-kernel/linux-firmware \
|
||||
--
|
||||
< installonly.packages xargs -ro \
|
||||
${target}-emerge -vnj
|
||||
|
||||
ROOT=/mnt/gentoo \
|
||||
locale-gen
|
||||
|
||||
2
build.packages
Normal file
2
build.packages
Normal file
@@ -0,0 +1,2 @@
|
||||
sys-boot/grub
|
||||
sys-boot/raspberrypi-firmware
|
||||
14
build.sh
14
build.sh
@@ -9,13 +9,9 @@ unset MAKEFLAGS MAKEOVERRIDES MAKELEVEL
|
||||
|
||||
${target}-emerge -vuUDj sys-apps/util-linux
|
||||
|
||||
${target}-emerge -vnuUDj \
|
||||
net-misc/openssh \
|
||||
net-misc/wget \
|
||||
sys-apps/busybox \
|
||||
sys-apps/systemd \
|
||||
sys-boot/grub \
|
||||
sys-boot/raspberrypi-firmware \
|
||||
sys-fs/btrfs-progs \
|
||||
--
|
||||
cat \
|
||||
build.packages \
|
||||
install.packages \
|
||||
| xargs -ro \
|
||||
${target}-emerge -vnuUDj
|
||||
${target}-emerge -v @preserved-rebuild
|
||||
|
||||
7
host-tools.packages
Normal file
7
host-tools.packages
Normal file
@@ -0,0 +1,7 @@
|
||||
sys-apps/systemd
|
||||
sys-boot/grub
|
||||
sys-fs/btrfs-progs
|
||||
sys-fs/dosfstools
|
||||
sys-fs/genimage
|
||||
sys-fs/mtools
|
||||
sys-fs/squashfs-tools
|
||||
5
install.packages
Normal file
5
install.packages
Normal file
@@ -0,0 +1,5 @@
|
||||
net-misc/openssh
|
||||
net-misc/wget
|
||||
sys-apps/busybox
|
||||
sys-apps/systemd
|
||||
sys-fs/btrfs-progs
|
||||
2
installonly.packages
Normal file
2
installonly.packages
Normal file
@@ -0,0 +1,2 @@
|
||||
net-wireless/wireless-regdb
|
||||
sys-kernel/linux-firmware
|
||||
Reference in New Issue
Block a user