Skip to content
This repository has been archived by the owner on Apr 17, 2024. It is now read-only.

Commit

Permalink
Merge pull request #188 from hede5562/debianversion
Browse files Browse the repository at this point in the history
improvements for building debian
  • Loading branch information
MilkyDeveloper authored May 31, 2022
2 parents d741d5f + 14438fe commit 51407af
Show file tree
Hide file tree
Showing 5 changed files with 23 additions and 19 deletions.
14 changes: 6 additions & 8 deletions setup.sh
Original file line number Diff line number Diff line change
@@ -1,13 +1,5 @@
#!/bin/bash

# Before we do anything, check if the user is on Crostini,
# since /mnt will already be filled
if [[ $FEATURES == *"CROSTINI"* ]]; then

sudo mkdir /mnt/breath

fi

# Import
source utils/functions.sh # Functions
source utils/bootstrap.sh # Bootstrap Function
Expand Down Expand Up @@ -87,6 +79,10 @@ if [[ $FEATURES == *"ISO"* ]]; then
sleep 10
fallocate -l 12G breath.img
export USB=$(sudo losetup -f --show breath.img)
if [[ -z "$USB" ]]; then
echo "ERROR: no loop device"
exit 1
fi
export USB1="${USB}p1"
export USB2="${USB}p2"

Expand Down Expand Up @@ -177,6 +173,8 @@ sudo umount $MNT
set +u
printq "Done!"
if [[ $FEATURES == *"ISO"* ]]; then

losetup -d $USB

echo "IMG built at ~/linux-build/breath.img"
echo "You can flash this raw image using Etcher, Rufus, DD, or other ISO flash tools."
Expand Down
10 changes: 6 additions & 4 deletions updatekernel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,13 @@ if [[ -n "$DIR" ]]; then
cp ${DIR}/bzImage .
cp ${DIR}/modules.tar.xz .
elif [[ $VERSION == "ALT" ]]; then
wget https://github.com/cb-linux/breath/releases/latest/download/bzImage.alt -O bzImage -q --show-progress
wget https://github.com/cb-linux/breath/releases/latest/download/modules.alt.tar.xz -O modules.tar.xz -q --show-progress
wget https://github.com/cb-linux/breath/releases/latest/download/bzImage.alt -N -q --show-progress
ln -s bzImage.alt bzImage
wget https://github.com/cb-linux/breath/releases/latest/download/modules.alt.tar.xz -N -q --show-progress
ln -s modules.alt.tar.xz modules.tar.xz
else
wget https://github.com/cb-linux/breath/releases/latest/download/bzImage -O bzImage -q --show-progress
wget https://github.com/cb-linux/breath/releases/latest/download/modules.tar.xz -O modules.tar.xz -q --show-progress
wget https://github.com/cb-linux/breath/releases/latest/download/bzImage -N -q --show-progress
wget https://github.com/cb-linux/breath/releases/latest/download/modules.tar.xz -N -q --show-progress
fi

# Sign the kernel
Expand Down
8 changes: 4 additions & 4 deletions utils/bootstrap.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ function bootstrapFiles {

# If the ChromeOS firmware utility doesn't exist, install it and other packages
printq "Installing Dependencies"
installDependencies vboot-kernel-utils arch-install-scripts git wget cgpt $FW_PACKAGE
installDependencies sudo vboot-kernel-utils arch-install-scripts git parted wget cgpt $FW_PACKAGE

if [[ $FEATURES == *"LOCAL_KERNEL"* ]]; then
cp $ORIGINAL_DIR/kernel/bzImage .
Expand All @@ -26,9 +26,9 @@ else
printq "Downloading kernel files from cb-lines/breath"
# Download the kernel bzImage and the kernel modules (wget)
{
wget https://github.com/cb-linux/breath/releases/latest/download/bzImage -O bzImage -q --show-progress
wget https://github.com/cb-linux/breath/releases/latest/download/modules.tar.xz -O modules.tar.xz -q --show-progress
wget https://raw.githubusercontent.com/cb-linux/kernel/main/kernel.flags -O kernel.flags -q --show-progress
wget https://github.com/cb-linux/breath/releases/latest/download/bzImage -N -q --show-progress
wget https://github.com/cb-linux/breath/releases/latest/download/modules.tar.xz -N -q --show-progress
wget https://raw.githubusercontent.com/cb-linux/kernel/main/kernel.flags -N -q --show-progress
} || true # Wget has the wrong exit status with no clobber
fi

Expand Down
5 changes: 4 additions & 1 deletion utils/distros/debian.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function postinstall {
sudo cp --remove-destination /etc/resolv.conf ${MNT}/etc/resolv.conf

# We're installing the below packages for a cli environment and all desktops
BASECMD="apt install -y network-manager tasksel software-properties-common adduser sudo firmware-linux-free firmware-linux-nonfree"
BASECMD="apt install -y network-manager tasksel software-properties-common adduser sudo firmware-linux-free firmware-linux-nonfree firmware-iwlwifi iw"

# We need to load the iwlmvm module at startup for WiFi
sudo tee -a ${MNT}/etc/modules-load.d/modules.conf > /dev/null <<EOT
Expand All @@ -17,6 +17,9 @@ function postinstall {
vfat
EOT

# we have to add the non-free repository for non-free firmware
sed -i -e 's/ main/ main contrib non-free/g' ${MNT}/etc/apt/sources.list

# Download the desktop that the user has selected
case $DESKTOP in

Expand Down
5 changes: 3 additions & 2 deletions utils/extract.sh
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ function extractRootfs {
;;

debian)
# Debootstrap Debian Unstable
sudo debootstrap unstable $MNT http://deb.debian.org/debian/
# Debootstrap Debian
[[ -n $DISTRO_VERSION ]] || { printerr "No Debian version specified, using unstable"; export DISTRO_VERSION=unstable; }
sudo debootstrap $DISTRO_VERSION $MNT http://deb.debian.org/debian/
;;

*)
Expand Down

0 comments on commit 51407af

Please sign in to comment.