27 lines
847 B
Bash
Executable File
27 lines
847 B
Bash
Executable File
#!/bin/sh
|
|
|
|
TARGET=$1
|
|
KERNEL_VERSION=$2
|
|
KERNEL_REPO=$3
|
|
LANG=C
|
|
|
|
FIRMWARES1="firmware-linux-free"
|
|
FIRMWARES2="firmware-bnx2 firmware-bnx2x firmware-cavium \
|
|
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
|
|
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}
|
|
chroot ${TARGET} umount /proc
|