mirror of
https://gitlab.archlinux.org/tpowa/archboot.git
synced 2024-09-20 03:50:37 +02:00
fix HWKVER
This commit is contained in:
parent
30cfa4ab69
commit
addd54b48e
1 changed files with 2 additions and 2 deletions
|
@ -13,11 +13,11 @@ _BIN="/usr/bin"
|
||||||
_ETC="/etc/archboot"
|
_ETC="/etc/archboot"
|
||||||
_LIB="/usr/lib/archboot"
|
_LIB="/usr/lib/archboot"
|
||||||
_INST="/${_LIB}/installer"
|
_INST="/${_LIB}/installer"
|
||||||
|
[[ "${_RUNNING_ARCH}" == "x86_64" ]] && VMLINUZ="vmlinuz-linux"
|
||||||
|
[[ "${_RUNNING_ARCH}" == "aarch64" ]] && VMLINUZ="Image"
|
||||||
|
|
||||||
kver() {
|
kver() {
|
||||||
# get kernel version from installed kernel
|
# get kernel version from installed kernel
|
||||||
[[ "${_RUNNING_ARCH}" == "x86_64" ]] && VMLINUZ="vmlinuz-linux"
|
|
||||||
[[ "${_RUNNING_ARCH}" == "aarch64" ]] && VMLINUZ="Image"
|
|
||||||
if [[ -f "/${VMLINUZ}" ]]; then
|
if [[ -f "/${VMLINUZ}" ]]; then
|
||||||
offset=$(hexdump -s 526 -n 2 -e '"%0d"' "/${VMLINUZ}")
|
offset=$(hexdump -s 526 -n 2 -e '"%0d"' "/${VMLINUZ}")
|
||||||
read -r _HWKVER _ < <(dd if="/${VMLINUZ}" bs=1 count=127 skip=$(( offset + 0x200 )) 2>/dev/null)
|
read -r _HWKVER _ < <(dd if="/${VMLINUZ}" bs=1 count=127 skip=$(( offset + 0x200 )) 2>/dev/null)
|
||||||
|
|
Loading…
Reference in a new issue