Make more project config files optional

`build.packages`, `installonly.packages`, and `busybox.symlinks` are now
optional in the `$CONFIGDIR`.  If they do exist, they are combined with
the same files in the Aimee OS source.
gentoo
Dustin 2024-12-05 20:06:42 -06:00
parent 26b422ed74
commit d117207bd2
3 changed files with 77 additions and 10 deletions

View File

@ -20,7 +20,7 @@ $(O)/.built: \
build.sh \
build.packages \
install.packages \
$(CONFIGDIR)/build.packages \
$(wildcard $(CONFIGDIR)/build.packages) \
$(CONFIGDIR)/install.packages \
$(shell find $(CONFIGDIR)/portage/target -type f) \
$(O)/.prepared
@ -38,8 +38,8 @@ $(O)/.ready: \
build-rootfs.sh \
install.packages \
$(CONFIGDIR)/install.packages \
$(CONFIGDIR)/installonly.packages \
$(CONFIGDIR)/busybox.symlinks \
$(wildcard $(CONFIGDIR)/installonly.packages) \
$(wildcard $(CONFIGDIR)/busybox.symlinks) \
$(O)/linux/arch/arm64/boot/Image.gz \
$(O)/semanage.mods \
$(shell find overlay -type f) \

View File

@ -33,11 +33,13 @@ ${target}-emerge \
-KvnuUDj \
--rebuilt-binaries=y
if [ -f "${CONFIGDIR}"/installonly.packages ]; then
< "${CONFIGDIR}"/installonly.packages xargs -ro \
${target}-emerge \
--root=/mnt/gentoo \
--config-root="${CONFIGDIR}"/portage/target \
-vnuUDj
fi
ROOT=/mnt/gentoo \
locale-gen
@ -52,13 +54,16 @@ mkdir -p \
: > /mnt/gentoo/etc/machine-id
while read name; do
cat \
"${CONFIGDIR}"/busybox.symlinks \
busybox.symlinks \
| while read name; do
if [ ! -h /mnt/gentoo/bin/"${name}" ]; then
printf "'/bin/%s' -> 'busybox'\n" "${name}"
ln -snf busybox /mnt/gentoo/bin/"${name}" \
|| printf 'Failed to create busybox symlink for %s\n' "${name}"
fi
done < "${CONFIGDIR}"/busybox.symlinks
done
rsync -rltpDO overlay/ /mnt/gentoo/
if [ -d "${CONFIGDIR}"/overlay ]; then

62
busybox.symlinks Normal file
View File

@ -0,0 +1,62 @@
basename
cat
chcon
cp
dd
df
du
echo
env
false
free
fsync
fuser
grep
groups
head
id
install
ip
kill
less
link
ln
ls
lsof
mkdir
mkfifo
mktemp
mv
nice
nproc
pgrep
ping
ping6
pkill
ppidof
printf
ps
readahead
readlink
realpath
rm
rmdir
sed
seq
sh
sha1sum
sha256sum
sha3sum
sha512sum
sort
stat
stty
sync
tac
tail
tar
tee
truncate
tty
uname
uptime