support for custom .deb packages

This commit is contained in:
parazyd 2016-04-20 14:54:17 +02:00
parent 19f090ea92
commit 5f4519e488
No known key found for this signature in database
GPG Key ID: BB5E2E35B92E373E
3 changed files with 21 additions and 1 deletions

View File

@ -6,6 +6,10 @@
**ARM64**: `https://pub.parazyd.cf/mirror/gcc-linaro-aarch64-linux-gnu-4.9.txz`
SHA256sums are available by downloading $filename.sha
## Custom packages
In `extra/pkginclude` you can place any .deb packages and they will get pulled
by the script. Remember to use the correct architecture
## qemu-wrapper
For certain devices, you will want to pass arguments to qemu, such as the cpu
model. To enable this, you will have to modify and compile qemu-wrapper.c with:

View File

@ -0,0 +1,6 @@
# pkginclude
This is a directory where you can place any extra .deb packages that are not
included in the official repositories.
Remember to use the correct architecture.

View File

@ -127,7 +127,8 @@ EOF
write-sources-list() {
fn write-sources-list
cat <<EOF | sudo tee ${writebase}/$1etc/apt/sources.list
# cat <<EOF | sudo tee ${writebase}/$1etc/apt/sources.list
cat <<EOF | sudo tee ${writebase}/etc/apt/sources.list
deb ${mirror} ${release} ${section}
deb-src ${mirror} ${release} ${section}
EOF
@ -137,6 +138,9 @@ EOF
write-third-stage() {
fn write-third-stage
mkdir ${writebase}/pkginclude
cp $R/arm/extra/pkginclude/*.deb ${writebase}/pkginclude/
cat <<EOF | sudo tee ${writebase}/third-stage
#!/bin/bash
dpkg-divert --add --local --divert /usr/sbin/invoke-rc.d.chroot --rename /usr/sbin/invoke-rc.d
@ -162,6 +166,11 @@ apt-get --yes --force-yes install ${system_packages}
apt-get --yes --force-yes install ${extra_packages}
apt-get --yes --force-yes dist-upgrade
for package in `find /pkginclude`; do
dpkg -i $package
done
apt-get --yes --force-yes autoremove
echo "Allowing SSH root login"
@ -172,6 +181,7 @@ rm -fv /usr/sbin/policy-rc.d
rm -fv /usr/sbin/invoke-rc.d
dpkg-divert --remove --rename /usr/sbin/invoke-rc.d
rm -rfv /pkginclude/
rm -fv /third-stage
EOF
sudo chmod +x $writebase/third-stage