1
0
mirror of https://github.com/home-assistant/operating-system.git synced 2026-05-08 17:49:46 +01:00

Make machine-id persist (#649)

* Make machine-id persist

* update

* Adjustments

* cleanup

* fix cleanups

* small cleanup
This commit is contained in:
Pascal Vizeli
2020-05-04 15:11:43 +02:00
committed by GitHub
parent 15a80bb405
commit db184bf5d3
29 changed files with 87 additions and 71 deletions
+2 -2
View File
@@ -269,7 +269,7 @@ function _fix_disk_hyprid() {
local hdd_img="$(hassos_image_name img)"
sgdisk -t 1:"E3C9E316-0B5C-4DB8-817D-F92DF00215AE" "${hdd_img}"
dd if="${BR2_EXTERNAL_HASSOS_PATH}/misc/mbr.img" of="${hdd_img}" conv=notrunc bs=512 count=1
dd if="${BR2_EXTERNAL_HASSOS_PATH}/bootloader/mbr.img" of="${hdd_img}" conv=notrunc bs=512 count=1
}
@@ -278,7 +278,7 @@ function _fix_disk_spl_gpt() {
local spl_img="$(path_spl_img)"
sgdisk -t 1:"E3C9E316-0B5C-4DB8-817D-F92DF00215AE" "${hdd_img}"
dd if="${BR2_EXTERNAL_HASSOS_PATH}/misc/mbr-spl.img" of="${hdd_img}" conv=notrunc bs=512 count=1
dd if="${BR2_EXTERNAL_HASSOS_PATH}/bootloader/mbr-spl.img" of="${hdd_img}" conv=notrunc bs=512 count=1
dd if="${spl_img}" of="${hdd_img}" conv=notrunc bs=512 seek=2 skip=2
}
+2 -2
View File
@@ -81,12 +81,12 @@ function install_bootloader_config() {
# shellcheck disable=SC1117
echo -e "/dev/disk/by-partlabel/hassos-bootstate\t0x0000\t${BOOT_ENV_SIZE}" > "${TARGET_DIR}/etc/fw_env.config"
else
cp -f "${BR2_EXTERNAL_HASSOS_PATH}/misc/barebox-state-efi.dtb" "${TARGET_DIR}/etc/barebox-state.dtb"
cp -f "${BR2_EXTERNAL_HASSOS_PATH}/bootloader/barebox-state-efi.dtb" "${TARGET_DIR}/etc/barebox-state.dtb"
fi
# Fix MBR
if [ "${BOOT_SYS}" == "mbr" ]; then
mkdir -p "${TARGET_DIR}/usr/lib/udev/rules.d"
cp -f "${BR2_EXTERNAL_HASSOS_PATH}/misc/mbr-part.rules" "${TARGET_DIR}/usr/lib/udev/rules.d/"
cp -f "${BR2_EXTERNAL_HASSOS_PATH}/bootloader/mbr-part.rules" "${TARGET_DIR}/usr/lib/udev/rules.d/"
fi
}