Last active
November 8, 2024 19:39
-
-
Save ggiamarchi/31e3c687a71e7dae1f301cac30608d18 to your computer and use it in GitHub Desktop.
Dump AMI BIOS on a system running Ubuntu 16.04
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 -ex | |
if [ "$(whoami)" != "root" ] ; then | |
echo "Error : You must be root" | |
exit 1 | |
fi | |
apt update | |
apt install -y git linux-headers-$(uname -r) build-essential | |
filename=${1} | |
if [ -z "${filename}" ] ; then | |
filename=bios.bin | |
fi | |
pushd /tmp | |
rm -rf afulnx | |
mkdir afulnx | |
cd afulnx | |
wget -O afulnx_64 'https://drive.google.com/uc?export=download&id=0B8iRENdOLYZzdXN5RGc3Z1Y5ZGM' | |
chmod +x afulnx_64 | |
git clone https://github.com/RomanHargrave/amifldrv.git | |
cd amifldrv | |
make -C /lib/modules/$(uname -r)/build/ SUBDIRS=/tmp/afulnx/amifldrv/ modules | |
cp amifldrv_mod.ko ../amifldrv_mod | |
cp amifldrv_mod.ko ../amifldrv_mod.o | |
cd .. | |
./afulnx_64 ${filename} /O | |
popd | |
mv /tmp/afulnx/$filename . |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
no need! I patche afulnx. This works on ubuntu too: https://github.com/Zibri/afulnx