X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/b1644f824d7f4989a94b8a752aadee26cae25069..d15268ba6eadf89a38087995ff407f50418485fb:/lunaix-os/hal/LConfig diff --git a/lunaix-os/hal/LConfig b/lunaix-os/hal/LConfig index 9a70d02..26f53b8 100644 --- a/lunaix-os/hal/LConfig +++ b/lunaix-os/hal/LConfig @@ -1,13 +1,11 @@ -include("char") -include("bus") -include("ahci") +from . import char, bus, ahci -@Collection("Devices & Peripherials") +@"Devices & Peripherials" def hal(): """ Lunaix hardware asbtraction layer """ - @Term("Devicetree for hardware discovery") - def use_devicetree(): + @"Devicetree for hardware discovery" + def use_devicetree() -> bool: """ Decide whether to use Devicetree for platform resource topology sensing. @@ -19,17 +17,14 @@ def hal(): way. """ - type(bool) - default(not v(arch).startswith("x86")) + return arch.val not in ["x86_64", "i386"] - @ReadOnly - @Term("Maximum size of device tree blob (in KiB)") - def dtb_maxsize(): + @"Maximum size of device tree blob (in KiB)" + @readonly + def dtb_maxsize() -> int: """ Maximum size for a firmware provided device tree blob """ + require(use_devicetree) - type(int) - default(256) - - return v(use_devicetree) \ No newline at end of file + return 256 \ No newline at end of file