Created
December 3, 2024 16:28
-
-
Save carterprince/3a10be1c2465a7a502f6cdfcd6abb7b9 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| set -eux | |
| set -o pipefail | |
| rm -rfv *.dts *.dtsi *.patch | |
| wget -q -O undo-reversion.patch https://git.launchpad.net/~ubuntu-concept/ubuntu/+source/linux/+git/oracular/patch/?id=dce657f91da932d9b2f4069b1c866c80cbd7503b | |
| wget -q --content-disposition https://git.launchpad.net/~ubuntu-concept/ubuntu/+source/linux/+git/oracular/plain/arch/arm64/boot/dts/qcom/x1e78100-lenovo-thinkpad-t14s.dts?h=qcom-x1e-6.12 | |
| wget -q --content-disposition https://git.launchpad.net/~ubuntu-concept/ubuntu/+source/linux/+git/oracular/plain/arch/arm64/boot/dts/qcom/x1e80100.dtsi?h=qcom-x1e-6.12 | |
| wget -q --content-disposition https://git.launchpad.net/~ubuntu-concept/ubuntu/+source/linux/+git/oracular/plain/arch/arm64/boot/dts/qcom/x1e80100-pmics.dtsi?h=qcom-x1e-6.12 | |
| # patches | |
| patch -R < undo-reversion.patch | |
| LATEST_HEADERS=$(ls -1rt /usr/src | tail -1) | |
| echo ${LATEST_HEADERS} | |
| cpp -nostdinc -I/usr/src/${LATEST_HEADERS}/include -I/usr/src/${LATEST_HEADERS}/arch/arm64/boot/dts -I/usr/src/${LATEST_HEADERS}/arch/arm64/boot/dts/qcom -undef -D__DTS__ -x assembler-with-cpp ./x1e78100-lenovo-thinkpad-t14s.dts | sudo dtc -I dts -O dtb -o ./x1e78100-lenovo-thinkpad-t14s.dtb | |
| LATEST_BOOT=$(ls -1rt /boot/dtbs | tail -1) | |
| echo ${LATEST_HEADERS} | |
| sudo cp ./x1e78100-lenovo-thinkpad-t14s.dtb /boot/dtbs/${LATEST_BOOT}/qcom/x1e78100-lenovo-thinkpad-t14s.dtb |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment