chroot installer: pin origin, deal with jessie changes to kpartx
This commit is contained in:
parent
486c9be6d0
commit
da1641a7ad
1 changed files with 7 additions and 4 deletions
|
|
@ -54,15 +54,18 @@ target_mnt="/media/raspbian-target"
|
||||||
echo "Mounting $target_image on $target_mnt"
|
echo "Mounting $target_image on $target_mnt"
|
||||||
kpartx -av $target_image
|
kpartx -av $target_image
|
||||||
mkdir -p $target_mnt
|
mkdir -p $target_mnt
|
||||||
mount /dev/mapper/loop0p2 $target_mnt
|
mount /dev/dm-1 $target_mnt
|
||||||
mount /dev/mapper/loop0p1 $target_mnt/boot
|
mount /dev/dm-0 $target_mnt/boot
|
||||||
|
|
||||||
echo "Dropping you into Bash"
|
echo "Dropping you into Bash before install"
|
||||||
chroot $target_mnt sudo /bin/bash
|
chroot $target_mnt sudo /bin/bash
|
||||||
|
|
||||||
echo "Adding apt.adafruit.com to sources.list"
|
echo "Adding apt.adafruit.com to sources.list"
|
||||||
curl -SLs https://apt.adafruit.com/add | chroot $target_mnt /bin/bash
|
curl -SLs https://apt.adafruit.com/add | chroot $target_mnt /bin/bash
|
||||||
|
|
||||||
|
# pin apt.adafruit.com origin for anything installed there:
|
||||||
|
echo -e "Package: *\nPin: origin \"apt.adafruit.com\"\nPin-Priority: 1001" | chroot $target_mnt bash -c "cat > /etc/apt/preferences.d/adafruit"
|
||||||
|
|
||||||
echo "Installing kernel and adafruit-pitft-helper"
|
echo "Installing kernel and adafruit-pitft-helper"
|
||||||
chroot $target_mnt sudo apt-get install -y raspberrypi-bootloader
|
chroot $target_mnt sudo apt-get install -y raspberrypi-bootloader
|
||||||
chroot $target_mnt sudo apt-get install -y adafruit-pitft-helper
|
chroot $target_mnt sudo apt-get install -y adafruit-pitft-helper
|
||||||
|
|
@ -70,7 +73,7 @@ chroot $target_mnt sudo apt-get install -y adafruit-pitft-helper
|
||||||
echo "Running adafruit-pitft-helper"
|
echo "Running adafruit-pitft-helper"
|
||||||
chroot $target_mnt sudo adafruit-pitft-helper -t $pitfttype
|
chroot $target_mnt sudo adafruit-pitft-helper -t $pitfttype
|
||||||
|
|
||||||
echo "Dropping you into Bash"
|
echo "Dropping you into Bash after install"
|
||||||
chroot $target_mnt sudo /bin/bash
|
chroot $target_mnt sudo /bin/bash
|
||||||
|
|
||||||
echo "Unmounting $target_image"
|
echo "Unmounting $target_image"
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue