2019-08-07 17:32:25 +02:00
|
|
|
#!/bin/sh
|
|
|
|
|
|
|
|
TARGET=$1
|
|
|
|
KERNEL_VERSION=$2
|
2021-07-29 12:42:53 +02:00
|
|
|
KERNEL_REPO=$3
|
2019-08-07 17:32:25 +02:00
|
|
|
LANG=C
|
|
|
|
|
2021-07-29 12:42:53 +02:00
|
|
|
FIRMWARES1="firmware-linux-free"
|
|
|
|
FIRMWARES2="firmware-bnx2 firmware-bnx2x firmware-cavium \
|
2019-08-07 17:32:25 +02:00
|
|
|
firmware-misc-nonfree firmware-myricom firmware-netxen firmware-qlogic \
|
|
|
|
firmware-realtek"
|
|
|
|
|
|
|
|
cat << EOF > $TARGET/usr/sbin/policy-rc.d
|
|
|
|
#!/bin/sh
|
|
|
|
echo "All runlevel operations denied by policy" >&2
|
|
|
|
exit 101
|
|
|
|
EOF
|
|
|
|
chmod a+x $TARGET/usr/sbin/policy-rc.d
|
|
|
|
|
|
|
|
chroot ${TARGET} mount -t proc proc /proc
|
2021-07-29 12:42:53 +02:00
|
|
|
chroot ${TARGET} apt-get --yes install busybox-static
|
|
|
|
chroot ${TARGET} apt-get --yes install -t ${KERNEL_REPO} linux-image-${KERNEL_VERSION} linux-headers-${KERNEL_VERSION}
|
|
|
|
chroot ${TARGET} apt-get --yes install -t ${KERNEL_REPO} zfs-dkms
|
|
|
|
chroot ${TARGET} apt-get --yes install ${FIRMWARES1}
|
|
|
|
chroot ${TARGET} apt-get --yes install -t ${KERNEL_REPO} ${FIRMWARES2}
|
2019-08-07 17:32:25 +02:00
|
|
|
chroot ${TARGET} umount /proc
|