Use state

This commit is contained in:
Pascal Vizeli 2018-03-23 18:31:53 +01:00
parent 88a7618620
commit d040c1e704
7 changed files with 12 additions and 13 deletions

View File

@ -0,0 +1 @@
state.bootstate

View File

@ -1,18 +1,19 @@
/dts-v1/;
/ {
#address-cells = <1>;
#size-cells = <1>;
aliases {
state = &state;
};
state: state {
magic = <0xef784236>;
#address-cells = <1>;
#size-cells = <1>;
magic = <0xef98423f>;
compatible = "barebox,state";
backend-type = "raw";
backend = <&backend_state>;
backend-stridesize = <4096>;
backend-type = "raw";
backend-stridesize = <1024>;
backend-storage-type = "direct";
bootstate {
#address-cells = <1>;
@ -29,7 +30,7 @@
priority@4 {
reg = <0x4 0x4>;
type = "uint32";
default = <10>;
default = <20>;
};
};
system1 {
@ -43,7 +44,7 @@
priority@c {
reg = <0xc 0x4>;
type = "uint32";
default = <20>;
default = <10>;
};
};
last_chosen@10 {
@ -59,9 +60,10 @@
compatible = "fixed-partitions";
backend_state: state {
partuuid = "19652333-327f-ff4d-8002-3390b62c309d";
partuuid = "33236519-7f32-4dff-8002-3390b62c309d";
};
};
};

View File

@ -37,8 +37,6 @@ CONFIG_DRIVER_SERIAL_EFI=y
CONFIG_DRIVER_SERIAL_EFI_STDIO=y
# CONFIG_SPI is not set
CONFIG_DISK=y
CONFIG_DISK_ATA=y
CONFIG_USB_HOST=y
CONFIG_VIDEO=y
CONFIG_DRIVER_VIDEO_EFI_GOP=y
CONFIG_CLOCKSOURCE_EFI=y

View File

@ -71,7 +71,7 @@ function hassio_hdd_image() {
echo "System1 formating done"
# BootState
sgdisk -n 4:0:$bootstate_size -c 4:"hassio-bootstate" -t 4:"0FC63DAF-8483-4772-8E79-3D69D8477DE4" -u 4:$BOOTSTATE_UUID "$hdd_img"
sgdisk -n 4:0:$bootstate_size -c 4:"hassio-bootstate" -u 4:$BOOTSTATE_UUID "$hdd_img"
echo "BootState formating done"
# Overlay