Coder Social home page Coder Social logo

t2-debian-kernel's People

Contributors

adityagarg8 avatar andersfugmann avatar github-actions[bot] avatar marcosfad avatar mmft24 avatar redecorating avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

volvo0824

t2-debian-kernel's Issues

Error: out of memory from GRUB

As the title says. I can supply more info as needed, but it's been a problem since at least 6.6.1

EDIT: Also, my WiFi card is unreliable, the keyboard backlight doesn't work, and the machine when in "sleep" mode has the battery die within 7 hours

Kernel update script for Debian kernels

Hi
Could you test whether running this script is updating the kernel on Debian.
If yes, I could add it to the apt repo for Ubuntu/Debian

#!/bin/bash
#upgrading script apple linux T2 Kernel

if [ $USER != root ]
then
sudo chmod 755 $0
sudo $0 $1
exit 0
fi

set -e

cd /tmp

latest=$(curl -sL https://github.com/andersfugmann/T2-Debian-Kernel/releases/latest/ | grep "<title>Release" | awk -F " " '{print $2}' )

if [[ ${#latest} = 7 ]]
then
latestkver=$(echo $latest | cut -d "v" -f 2 | cut -d "-" -f 1 | awk '{print $1".0-1"}')
latestk=$(echo $latest | cut -c 2- | cut -d "-" -f 1 | awk '{print $1".0-t2"}')
else
latestkver=$(echo $latest | cut -d "v" -f 2)
latestk=$(echo $latest | cut -c 2- | cut -d "-" -f 1 | awk '{print $1"-t2"}')
fi

currentk=$(uname -r)
existingK=($(dpkg --list | grep linux-image- | grep 't2\|mbp' | cut -d ' ' -f 2-3 ))
if [ \( $latestk != $currentk \) ]; then
	
	echo "Downloading new kernel $latest"
	curl -L https://github.com/andersfugmann/T2-Debian-Kernel/releases/download/${latest}/linux-headers-${latestk}_${latestkver}_amd64.deb > headers.deb
	curl -L https://github.com/andersfugmann/T2-Debian-Kernel/releases/download/${latest}/linux-image-${latestk}_${latestkver}_amd64.deb > image.deb

	if [ -f headers.deb -a -f image.deb ]; then
		#install
		echo "Installing new kernel $latest"
		apt install ./headers.deb
		apt install ./image.deb
		#shutdown -r 02:00 "reboot scheduled for the next 2am to update runnning kernel"
		rm -f headers.deb image.deb

		#uninstall old t2 kernels but preserve current version as a backup
		for kernel in "${existingK[@]}"
		do
			if [ \( $kernel != linux-image-$currentk \) ]; then
				echo "$kernel needs to be removed"
				version=${kernel/#linux-image-}
				#purge old t2 kernel
				dpkg -P linux-headers-$version
				dpkg -P linux-image-$version
			fi
		done
		if [[ ($1 = --remove-current) ]]; then
			echo "Current kernel linux-image-$currentk shall also be removed"

			dpkg -P linux-headers-$currentk
			dpkg -P linux-image-$currentk
		fi
	fi
else
echo "Kernel is up to date"
fi

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.