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

Binary file not shown.

View File

@@ -0,0 +1,76 @@
/dts-v1/;
/ {
aliases {
state = &state;
};
state: state {
#address-cells = <1>;
#size-cells = <1>;
magic = <0xef98423f>;
compatible = "barebox,state";
backend = <&backend_state>;
backend-type = "raw";
backend-stridesize = <4048>;
bootstate {
#address-cells = <1>;
#size-cells = <1>;
A {
#address-cells = <1>;
#size-cells = <1>;
remaining_attempts@0 {
reg = <0x0 0x4>;
type = "uint32";
default = <3>;
};
priority@4 {
reg = <0x4 0x4>;
type = "uint32";
default = <20>;
};
};
B {
#address-cells = <1>;
#size-cells = <1>;
remaining_attempts@8 {
reg = <0x8 0x4>;
type = "uint32";
default = <0>;
};
priority@c {
reg = <0xc 0x4>;
type = "uint32";
default = <10>;
};
};
last_chosen@10 {
reg = <0x10 0x4>;
type = "uint32";
};
};
machine_id@14 {
reg = <0x14 0x24>;
type = "string";
default = "";
};
};
partitions {
#address-cells = <1>;
#size-cells = <1>;
compatible = "fixed-partitions";
backend_state: state {
partuuid = "33236519-7f32-4dff-8002-3390b62c309d";
};
};
};

View File

@@ -3,3 +3,4 @@
global linux.bootargs.zram="zram.enabled=1 zram.num_devices=3"
global linux.bootargs.apparmor="apparmor=1 security=apparmor"
global linux.bootargs.misc="rootwait"
global linux.bootargs.systemd="systemd.machine_id=${state.machine_id}"

View File

@@ -0,0 +1,6 @@
ENV{ID_PART_ENTRY_UUID}=="48617373-01", SYMLINK+="disk/by-partlabel/hassos-boot"
ENV{ID_PART_ENTRY_UUID}=="48617373-05", SYMLINK+="disk/by-partlabel/hassos-kernel0"
ENV{ID_PART_ENTRY_UUID}=="48617373-06", SYMLINK+="disk/by-partlabel/hassos-system0"
ENV{ID_PART_ENTRY_UUID}=="48617373-07", SYMLINK+="disk/by-partlabel/hassos-kernel1"
ENV{ID_PART_ENTRY_UUID}=="48617373-08", SYMLINK+="disk/by-partlabel/hassos-system1"
ENV{ID_PART_ENTRY_UUID}=="48617373-09", SYMLINK+="disk/by-partlabel/hassos-bootstate"

Binary file not shown.

Binary file not shown.