-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathbuild.sh
54 lines (48 loc) · 1.18 KB
/
build.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
51
52
53
54
#!/bin/sh
APORTDIR="./aports/scripts"
PROFILENAME=$1
KERNEL_FLAVOR=$2
MODLOOP_EXTRA=$3
APKS=$4
BUILD_DIR=$5
ARCH=$6
PENYU_OVL=$7
PENYU_TYPE=$8
if [ -f "./script.$PROFILENAME.sh" ]
then
cat ./script.$PROFILENAME.sh >> $APORTDIR/mkimg.$PROFILENAME.sh
fi
cp $PWD/$PENYU_OVL $APORTDIR
chmod +x $APORTDIR/$PENYU_OVL
cd $APORTDIR
cat << EOF >> mkimg.$PROFILENAME.sh
profile_$PROFILENAME() {
profile_standard
kernel_flavors="$KERNEL_FLAVOR"
kernel_cmdline="unionfs_size=512M console=tty0 console=ttyS0,115200"
syslinux_serial="0 115200"
kernel_addons="$MODLOOP_EXTRA"
apks="\$apks $APKS"
local _k _a
for _k in \$kernel_flavors; do
apks="\$apks linux-\$_k"
for _a in $kernel_addons; do
apks="\$apks \$_a-\$_k"
done
done
apks="\$apks linux-firmware"
if [ -f "$PENYU_OVL" ]
then
apkovl="$PENYU_OVL"
fi
hostname="penyu"
}
EOF
sed -i -e 's|image_name="alpine-${PROFILE}"|image_name="penyu"|g' mkimage.sh
chmod +x mkimg.$PROFILENAME.sh
sh mkimage.sh --tag $PENYU_TYPE \
--outdir $BUILD_DIR/iso \
--arch $ARCH \
--repository http://dl-cdn.alpinelinux.org/alpine/latest-stable/main \
--extra-repository http://dl-cdn.alpinelinux.org/alpine/latest-stable/community \
--profile $PROFILENAME