Compare commits

...

3 Commits

Author SHA1 Message Date
Stéphane Lesimple a6c943d38f release v0.45 2022-03-27 12:41:17 +02:00
Stéphane Lesimple dd162301ff chore: update fwdb to v222+i20220208 2022-03-27 12:38:44 +02:00
Stéphane Lesimple 5f6471d9a4 feat: set default TMPDIR for Android (#415) 2022-03-27 12:31:05 +02:00
1 changed files with 22 additions and 14 deletions

View File

@ -12,7 +12,7 @@
#
# Stephane Lesimple
#
VERSION='0.44+'
VERSION='0.45'
trap 'exit_cleanup' EXIT
trap '_warn "interrupted, cleaning up..."; exit_cleanup; exit 1' INT
@ -850,7 +850,7 @@ update_fwdb()
fi
# first, download the MCE.db from the excellent platomav's MCExtractor project
mcedb_tmp="$(mktemp /tmp/mcedb-XXXXXX)"
mcedb_tmp="$(mktemp -t smc-mcedb-XXXXXX)"
mcedb_url='https://github.com/platomav/MCExtractor/raw/master/MCE.db'
_info_nol "Fetching MCE.db from the MCExtractor project... "
if command -v wget >/dev/null 2>&1; then
@ -870,7 +870,7 @@ update_fwdb()
echo DONE
# second, get the Intel firmwares from GitHub
intel_tmp="$(mktemp -d /tmp/intelfw-XXXXXX)"
intel_tmp="$(mktemp -d -t smc-intelfw-XXXXXX)"
intel_url="https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/archive/main.zip"
_info_nol "Fetching Intel firmwares... "
## https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files.git
@ -970,7 +970,7 @@ update_fwdb()
echo DONE "(version $dbversion)"
if [ "$1" = builtin ]; then
newfile=$(mktemp /tmp/smc-XXXXXX)
newfile=$(mktemp -t smc-builtin-XXXXXX)
awk '/^# %%% MCEDB / { exit }; { print }' "$0" > "$newfile"
awk '{ if (NR>1) { print } }' "$mcedb_cache" >> "$newfile"
cat "$newfile" > "$0"
@ -1377,7 +1377,7 @@ try_decompress()
return 0
elif [ "$3" != "cat" ]; then
_debug "try_decompress: decompression with $3 worked but result is not a kernel, trying with an offset"
[ -z "$kerneltmp2" ] && kerneltmp2=$(mktemp /tmp/kernel-XXXXXX)
[ -z "$kerneltmp2" ] && kerneltmp2=$(mktemp -t smc-kernel-XXXXXX)
cat "$kerneltmp" > "$kerneltmp2"
try_decompress '\177ELF' xxy 'cat' '' cat "$kerneltmp2" && return 0
else
@ -1391,7 +1391,7 @@ extract_kernel()
{
[ -n "${1:-}" ] || return 1
# Prepare temp files:
kerneltmp="$(mktemp /tmp/kernel-XXXXXX)"
kerneltmp="$(mktemp -t smc-kernel-XXXXXX)"
# Initial attempt for uncompressed images or objects:
if check_kernel "$1"; then
@ -2179,6 +2179,12 @@ mockme=''
mocked=0
specex_knob_dir=/dev/no_valid_path
# if /tmp doesn't exist and TMPDIR is not set, try to set it to a sane default for Android
if [ -z "${TMPDIR:-}" ] && ! [ -d "/tmp" ] && [ -d "/data/local/tmp" ]; then
TMPDIR=/data/local/tmp
export TMPDIR
fi
parse_cpu_details
get_cmdline
@ -2277,7 +2283,7 @@ if [ "$opt_live" = 1 ]; then
# specified by user on cmdline, with --live, don't override
:
elif [ -e "$procfs/config.gz" ] ; then
dumped_config="$(mktemp /tmp/config-XXXXXX)"
dumped_config="$(mktemp -t smc-config-XXXXXX)"
gunzip -c "$procfs/config.gz" > "$dumped_config"
# dumped_config will be deleted at the end of the script
opt_config="$dumped_config"
@ -5830,7 +5836,7 @@ exit 0 # ok
# The builtin version follows, but the user can download an up-to-date copy (to be stored in his $HOME) by using --update-fwdb
# To update the builtin version itself (by *modifying* this very file), use --update-builtin-fwdb
# %%% MCEDB v221+i20220208
# %%% MCEDB v222+i20220208
# I,0x00000611,0x00000B27,19961218
# I,0x00000612,0x000000C6,19961210
# I,0x00000616,0x000000C6,19961210
@ -6085,7 +6091,7 @@ exit 0 # ok
# I,0x000506E0,0x00000018,20141119
# I,0x000506E1,0x0000002A,20150602
# I,0x000506E2,0x0000002E,20150815
# I,0x000506E3,0x000000EC,20210429
# I,0x000506E3,0x000000F0,20211112
# I,0x000506E8,0x00000034,20160710
# I,0x000506F0,0x00000010,20160607
# I,0x000506F1,0x00000036,20210510
@ -6126,16 +6132,16 @@ exit 0 # ok
# I,0x00090661,0x00000015,20210921
# I,0x00090670,0x00000019,20201111
# I,0x00090671,0x0000001C,20210614
# I,0x00090672,0x0000001A,20220103
# I,0x00090672,0x0000001F,20220303
# I,0x00090674,0x00000219,20210425
# I,0x00090675,0x0000001A,20220103
# I,0x00090675,0x0000001F,20220303
# I,0x000906A0,0x0000001C,20210614
# I,0x000906A1,0x0000011F,20211104
# I,0x000906A2,0x00000315,20220102
# I,0x000906A3,0x00000419,20220220
# I,0x000906A4,0x00000419,20220220
# I,0x000906A3,0x0000041B,20220308
# I,0x000906A4,0x0000041B,20220308
# I,0x000906C0,0x2400001F,20210809
# I,0x000906E9,0x000000EC,20210429
# I,0x000906E9,0x000000F0,20211112
# I,0x000906EA,0x000000EC,20210428
# I,0x000906EB,0x000000EC,20210428
# I,0x000906EC,0x000000EC,20210428
@ -6152,6 +6158,8 @@ exit 0 # ok
# I,0x000A0671,0x00000050,20210829
# I,0x000A0680,0x80000002,20200121
# I,0x000B0670,0x00000009,20211115
# I,0x000B06F2,0x0000001F,20220303
# I,0x000B06F5,0x0000001F,20220303
# A,0x00000F00,0x02000008,20070614
# A,0x00000F01,0x0000001C,20021031
# A,0x00000F10,0x00000003,20020325