Mike Banon has uploaded this change for review.

View Change

G505S dGPU support: scripts for applying the unofficial (not-merged-yet) patches

These scripts will help you to securely and conveniently apply two changes
CB:31448 and CB:31450 to add the discrete GPU support for AMD Lenovo G505S.
Save to ./coreboot/ then run ./get_dgpu_patches.sh , ./check... and ./apply...

https://review.coreboot.org/c/coreboot/+/31448
src/device/pci: Add support for discrete VGA initialization and OpROM loading

https://review.coreboot.org/c/coreboot/+/31450
lenovo/g505s: Add the discrete VGA support for AMD Lenovo G505S laptop

Signed-off-by: Mike Banon <mikebdp2@gmail.com>
Change-Id: I2452a75d425f8f647e81314111c462d1195d595d
---
A apply_dgpu_patches.sh
A check_dgpu_patches.sh
A get_dgpu_patches.sh
A sha256sums_dgpu_correct.txt
4 files changed, 43 insertions(+), 0 deletions(-)

git pull ssh://review.coreboot.org:29418/coreboot refs/changes/74/33874/1
diff --git a/apply_dgpu_patches.sh b/apply_dgpu_patches.sh
new file mode 100755
index 0000000..aca4adb
--- /dev/null
+++ b/apply_dgpu_patches.sh
@@ -0,0 +1,12 @@
+#!/bin/sh
+###
+### https://review.coreboot.org/c/coreboot/+/31448
+### src/device/pci: Add support for discrete VGA initialization and OpROM loading
+###
+patch -p1 < "./8e35cfe.diff"
+###
+### https://review.coreboot.org/c/coreboot/+/31450
+### lenovo/g505s: Add the discrete VGA support for AMD Lenovo G505S laptop
+###
+patch -p1 < "./b7d4266.diff"
+###
diff --git a/check_dgpu_patches.sh b/check_dgpu_patches.sh
new file mode 100755
index 0000000..6137cc4
--- /dev/null
+++ b/check_dgpu_patches.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+rm -f "./sha256sums_dgpu_my.txt"
+sha256sum "./8e35cfe.diff" > "./sha256sums_dgpu_my.txt"
+sha256sum "./b7d4266.diff" >> "./sha256sums_dgpu_my.txt"
+if cmp -s "./sha256sums_dgpu_my.txt" "./sha256sums_dgpu_correct.txt"
+then
+ echo "SHA256 checksums are correct, please run ./apply_dgpu_patches.sh"
+ exit 0
+else
+ echo "! MISMATCH ! See ./sha256sums_dgpu_my.txt and ./sha256sums_dgpu_correct.txt"
+ exit 1
+fi
+#
diff --git a/get_dgpu_patches.sh b/get_dgpu_patches.sh
new file mode 100755
index 0000000..e0d4a2a
--- /dev/null
+++ b/get_dgpu_patches.sh
@@ -0,0 +1,16 @@
+#!/bin/sh
+###
+### https://review.coreboot.org/c/coreboot/+/31448
+### src/device/pci: Add support for discrete VGA initialization and OpROM loading
+###
+rm -f "./8e35cfe.diff"
+wget "https://review.coreboot.org/changes/31448/revisions/17/patch?zip"
+unzip "./patch?zip" && rm -f "./patch?zip" # && patch -p1 < "./8e35cfe.diff"
+###
+### https://review.coreboot.org/c/coreboot/+/31450
+### lenovo/g505s: Add the discrete VGA support for AMD Lenovo G505S laptop
+###
+rm -f "./b7d4266.diff"
+wget "https://review.coreboot.org/changes/31450/revisions/12/patch?zip"
+unzip "./patch?zip" && rm -f "./patch?zip" # && patch -p1 < "./b7d4266.diff"
+###
diff --git a/sha256sums_dgpu_correct.txt b/sha256sums_dgpu_correct.txt
new file mode 100644
index 0000000..b607b61
--- /dev/null
+++ b/sha256sums_dgpu_correct.txt
@@ -0,0 +1,2 @@
+284cb0908c498c730dd8ed994c65ffd186d1dd34b4bc3432c9e7ccf7f40313e2 ./8e35cfe.diff
+0edfa4f1bb2310220f0d6be2228f0be15d2ab0256e63fa1ed6fecc1650e1f938 ./b7d4266.diff

To view, visit change 33874. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I2452a75d425f8f647e81314111c462d1195d595d
Gerrit-Change-Number: 33874
Gerrit-PatchSet: 1
Gerrit-Owner: Mike Banon <mikebdp2@gmail.com>
Gerrit-MessageType: newchange