-
Notifications
You must be signed in to change notification settings - Fork 13
/
mkrootfs-platform.sh
executable file
·50 lines (43 loc) · 1.09 KB
/
mkrootfs-platform.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh
#
# Convenience script for generating different kinds of platform tarballs
#
# all extra arguments are passed to mkrootfs.sh as is
#
# Copyright 2022 q66 <q66@chimera-linux.org>
#
# License: BSD-2-Clause
#
PLATFORM=
EXTRA_PKGS=
while getopts "P:p:" opt; do
case "$opt" in
P) PLATFORM="$OPTARG";;
p) EXTRA_PKGS="$OPTARG";;
*) ;;
esac
done
shift $((OPTIND - 1))
BASE_PKG="base-full"
PLAT_PKG=
KERNEL_PKG=
PLATFORMS="bootstrap full rpi pbp rockpro64 unmatched"
for pkg in ${PLATFORMS}; do
if [ "$pkg" = "$PLATFORM" ]; then
case "$PLATFORM" in
bootstrap) BASE_PKG="base-bootstrap" ;;
full) ;;
rpi) KERNEL_PKG="linux-rpi" ;;
*) KERNEL_PKG="linux-stable" ;;
esac
exec ./mkrootfs.sh -b "$BASE_PKG" \
-p "base-$PLATFORM $KERNEL_PKG $EXTRA_PKGS" \
-f "$PLATFORM" "$@"
fi
done
echo "unknown PLATFORM type: $PLATFORM"
echo
echo "supported platform types: full bootstrap"
echo " rpi pbp rockpro64"
echo " unmatched"
exit 1