Skip to content

Commit

Permalink
Revert "Quote success"
Browse files Browse the repository at this point in the history
This reverts commit c6fdf9c.
  • Loading branch information
ClashTheBunny committed Apr 11, 2021
1 parent c6fdf9c commit a2b3123
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 22 deletions.
29 changes: 18 additions & 11 deletions .github/workflows/upload_release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,16 @@ jobs:
strategy:
fail-fast: false
matrix:
debian-release: [bullseye, buster, sid]
revision: ["4/3"]
debian-release: [testing, stable, sid]
revision: ["3or4"]
board: [pi]
include:
- board: jetson-nano
revision: 300
experimental: true
- debian-release: buster
- debian-release: stable
experimental: false
- debian-release: bullseye
- debian-release: testing
experimental: true
- debian-release: sid
experimental: true
Expand All @@ -57,18 +57,25 @@ jobs:
GRAPHICAL: false
run: |
sudo apt update
sudo apt install qemu gparted debootstrap qemu-user-static qemu-utils schroot
sudo apt install qemu gparted debootstrap qemu-user-static qemu-utils schroot debian-keyring debian-archive-keyring
bash -x ./build.sh
zip debian-${{ matrix.board }}-${{ matrix.revision }}-${{ matrix.debian-release }}.zip debian-${{ matrix.board }}.img
- name: Start SSH session
uses: luchihoratiu/debug-via-ssh@main
with:
NGROK_AUTH_TOKEN: ${{ secrets.NGROK_AUTH_TOKEN }}
SSH_PASS: ${{ secrets.USER_PASS }}
- name: Start SSH via Ngrok
id: ngrok
if: ${{ failure() }}
run: curl -sL https://gist.githubusercontent.com/ClashTheBunny/ac7ca189e1f8ab9eb5686662412a4cce/raw/7099b9db76729dc5761da72aa8525f632d8875c9/debug-github-actions.sh | bash
env:
# After sign up on the https://ngrok.com/
# You can find this token here: https://dashboard.ngrok.com/get-started/setup
NGROK_TOKEN: ${{ secrets.NGROK_TOKEN }}

# This password you will use when authorizing via SSH
USER_PASS: ${{ secrets.USER_PASS }}
- name: Sleep 1 hour
if: ${{ failure() }}
run: sleep 1h
- name: Upload Release Asset
id: upload-release-asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
31 changes: 20 additions & 11 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ set -euf -o pipefail

MOUNTPOINT="${MOUNTPOINT:-/mnt}"
GRAPHICAL="${GRAPHICAL:-true}"
RELEASE="${RELEASE:-buster}"
RELEASE="${RELEASE:-stable}"
BOARD="${BOARD:-pi}"
REVISION="${REVISION:-4}"
SIZE="${3:-3G}"
Expand Down Expand Up @@ -63,7 +63,6 @@ keyboard-configuration keyboard-configuration/optionscode string" | $SUDO

$SUDO chroot "${MOUNTPOINT}" apt update
$SUDO chroot "${MOUNTPOINT}" apt install locales -y
$SUDO chroot "${MOUNTPOINT}" apt upgrade -y
$SUDO chroot "${MOUNTPOINT}" apt install console-setup keyboard-configuration sudo ssh curl wget dbus usbutils ca-certificates crda less fbset debconf-utils avahi-daemon fake-hwclock nfs-common apt-utils man-db pciutils ntfs-3g apt-listchanges -y
$SUDO chroot "${MOUNTPOINT}" apt install wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree firmware-realtek dhcpcd5 net-tools cloud-init -y
$SUDO chroot "${MOUNTPOINT}" apt install device-tree-compiler fontconfig fontconfig-config fonts-dejavu-core libcairo2 libdatrie1 libfontconfig1 libfreetype6 libfribidi0 libgles2 libglib2.0-0 libglib2.0-data libgraphite2-3 libharfbuzz0b libpango-1.0-0 libpangoft2-1.0-0 libpixman-1-0 libpng16-16 libthai-data libthai0 libxcb-render0 libxcb-shm0 libxrender1 shared-mime-info xdg-user-dirs libdrm-common libdrm2 libegl-mesa0 libegl1 libgbm1 libglapi-mesa libglvnd0 libwayland-client0 libwayland-server0 libx11-xcb1 libxcb-dri2-0 libxcb-dri3-0 libxcb-present0 libxcb-sync1 libxcb-xfixes0 libxshmfence1 -y
Expand All @@ -81,7 +80,7 @@ function finalize_image_jetson-nano() {
(
cd /tmp/jetson_driver_package/Linux_for_Tegra/ || exit

sudo cp "${MOUNTPOINT}/../nv_tegra/l4t_deb_packages/nvidia-l4t-init_32.4.2-20200408182156_arm64.deb" "${MOUNTPOINT}"
sudo cp "nv_tegra/l4t_deb_packages/nvidia-l4t-init_32.4.2-20200408182156_arm64.deb" "${MOUNTPOINT}"
$SUDO chroot "${MOUNTPOINT}" dpkg -i --force-confnew --force-depends --force-overwrite /nvidia-l4t-init_32.4.2-20200408182156_arm64.deb
$SUDO rm "${MOUNTPOINT}/nvidia-l4t-init_32.4.2-20200408182156_arm64.deb"

Expand Down Expand Up @@ -139,6 +138,10 @@ function finalize_image_pi() {

$SUDO chroot "${MOUNTPOINT}" apt install -t buster raspberrypi-kernel raspberrypi-kernel-headers raspberrypi-bootloader -y

$SUDO mv "${MOUNTPOINT}/etc/apt/sources.list.d/rpi.list" "${MOUNTPOINT}/etc/apt/sources.list.d/rpi.list.ignore"

$SUDO chroot "${MOUNTPOINT}" apt update

# Install Pi-compatible WiFi drivers to image

mkdir -p wifi-firmware
Expand Down Expand Up @@ -166,7 +169,9 @@ function finalize_image_pi() {

function base_bootstrap() {

$SUDO qemu-debootstrap --arch=arm64 "${RELEASE}" "${MOUNTPOINT}"
SNAPSHOT_DATE="20210103T144403Z"

$SUDO qemu-debootstrap --components=main,contrib,non-free --arch=arm64 "${RELEASE}" "${MOUNTPOINT}" "https://snapshot.debian.org/archive/debian/${SNAPSHOT_DATE}/"

# Make internet available from within the chroot, and setup fstab, hostname, and sources.list

Expand All @@ -181,16 +186,20 @@ function base_bootstrap() {
echo "debian-rpi64" | $SUDO tee "${MOUNTPOINT}/etc/hostname"

echo "deb http://deb.debian.org/debian/ ${RELEASE} main contrib non-free
#deb-src http://deb.debian.org/debian/ ${RELEASE} main contrib non-free
#deb-src http://deb.debian.org/debian/ ${RELEASE} main contrib non-free " | $SUDO tee -a "${MOUNTPOINT}/etc/apt/sources.list"

if [[ ${RELEASE} == "stable" ]]; then

echo "deb http://deb.debian.org/debian/ ${RELEASE}-updates main contrib non-free
#deb-src http://deb.debian.org/debian/ ${RELEASE}-updates main contrib non-free
deb http://deb.debian.org/debian/ ${RELEASE}-updates main contrib non-free
#deb-src http://deb.debian.org/debian/ ${RELEASE}-updates main contrib non-free
deb http://deb.debian.org/debian-security ${RELEASE}/updates main contrib non-free
#deb-src http://deb.debian.org/debian-security ${RELEASE}/updates main contrib non-free
deb http://deb.debian.org/debian-security ${RELEASE}/updates main contrib non-free
#deb-src http://deb.debian.org/debian-security ${RELEASE}/updates main contrib non-free
deb http://ftp.debian.org/debian ${RELEASE}-backports main
#deb-src http://ftp.debian.org/debian ${RELEASE}-backports main" | $SUDO tee -a "${MOUNTPOINT}/etc/apt/sources.list"

deb http://ftp.debian.org/debian ${RELEASE}-backports main
#deb-src http://ftp.debian.org/debian ${RELEASE}-backports main" | $SUDO tee -a "${MOUNTPOINT}/etc/apt/sources.list"
fi

echo "
allow-hotplug wlan0
Expand Down

0 comments on commit a2b3123

Please sign in to comment.