SHA256
30 lines
744 B
Bash
Executable File
30 lines
744 B
Bash
Executable File
#!/bin/sh
|
|
|
|
target_arch=${TARGET_ARCH:-$(uname -m)}
|
|
|
|
cd $(dirname $0)
|
|
mkdir -p ./target
|
|
rm -rf ./target/${target_arch}
|
|
mkdir ./target/${target_arch}
|
|
cd ./target/${target_arch}
|
|
|
|
mkdir -p ./var/config/packie
|
|
cp -r /var/config/packie/repos.d/ ./var/config/packie/
|
|
mkdir tmp dev sys proc home etc
|
|
if [ -e "/etc/resolv.conf" ]; then
|
|
cp /etc/resolv.conf ./etc/resolv.conf
|
|
fi
|
|
if [ -e "/var/config/network/resolv.conf" ]; then
|
|
cp /var/config/network/resolv.conf.conf ./var/config/network/resolv.conf
|
|
fi
|
|
|
|
packie --chroot . update
|
|
packie --chroot . install -y \
|
|
mksh coreutils util-linux-mount \
|
|
util-linux-fsck util-linux-fs kmod \
|
|
libgcc-compat libunwind lxdeviced
|
|
packie --chroot . clean
|
|
|
|
cp ../../../init.sh ./init
|
|
chmod +x ./init
|