]> xenbits.xensource.com Git - unikraft/unikraft.git/commitdiff
lib/ukboot: Fix `KConfig` styling of `Config.uk`
authorSergiu Moga <sergiu@unikraft.io>
Mon, 15 Jan 2024 13:20:44 +0000 (15:20 +0200)
committerUnikraft Bot <monkey@unikraft.io>
Thu, 6 Mar 2025 10:49:16 +0000 (10:49 +0000)
Maintain consistency among `KConfig` files and align `lib/ukboot`'s
`Config.uk` file's indentation with the others'.

Signed-off-by: Sergiu Moga <sergiu@unikraft.io>
Approved-by: Michalis Pappas <michalis@unikraft.io>
Reviewed-by: Michalis Pappas <michalis@unikraft.io>
GitHub-Closes: #1265

lib/ukboot/Config.uk

index fb6660fe660a4735592c2bfbab871a175c3ab3db..e25ca6c097fddebb28ff63525d77b3bedc999514 100644 (file)
@@ -9,205 +9,206 @@ menuconfig LIBUKBOOT
        # FIXME: binary buddy allocator is hard-coded for now
 
 if LIBUKBOOT
-       choice LIBUKBOOT_BANNER
+choice LIBUKBOOT_BANNER
        prompt "Unikraft banner"
        default LIBUKBOOT_BANNER_POWEREDBY
-               config LIBUKBOOT_BANNER_NONE
-               bool "None"
-
-               config LIBUKBOOT_BANNER_MINIMAL
-               bool "One liner"
-
-               config LIBUKBOOT_BANNER_CLASSIC
-               bool "Classic banner"
-
-               config LIBUKBOOT_BANNER_POWEREDBY
-               bool "Powered by Unikraft"
-
-               config LIBUKBOOT_BANNER_POWEREDBY_ANSI
-               bool "Powered by Unikraft (blue, ANSI)"
-               help
-                 Please make sure that your console display supports
-                 ANSI colors
-
-               config LIBUKBOOT_BANNER_POWEREDBY_ANSI2
-               bool "Powered by Unikraft (gray, ANSI)"
-               help
-                 Please make sure that your console display supports
-                 ANSI colors
-
-               config LIBUKBOOT_BANNER_POWEREDBY_EA
-               bool "Powered by Unikraft (ASCII)"
-               help
-                 Please make sure that your console display supports
-                 extended ASCII characters
-
-               config LIBUKBOOT_BANNER_POWEREDBY_EAANSI
-               bool "Powered by Unikraft (ASCII, blue, ANSI)"
-               help
-                 Please make sure that your console display supports
-                 extended ASCII characters and ANSI colors
-
-               config LIBUKBOOT_BANNER_POWEREDBY_EAANSI2
-               bool "Powered by Unikraft (ASCII, gray, ANSI)"
-               help
-                 Please make sure that your console display supports
-                 extended ASCII characters and ANSI colors
-
-               config LIBUKBOOT_BANNER_POWEREDBY_U8
-               bool "Powered by Unikraft (UTF-8)"
-               help
-                 Please make sure that your console display supports
-                 UTF-8
-
-               config LIBUKBOOT_BANNER_POWEREDBY_U8ANSI
-               bool "Powered by Unikraft (UTF-8, blue, ANSI)"
-               help
-                 Please make sure that your console display supports
-                 UTF-8 and ANSI colors
-
-               config LIBUKBOOT_BANNER_POWEREDBY_U8ANSI2
-               bool "Powered by Unikraft (UTF-8, gray, ANSI)"
-               help
-                 Please make sure that your console display supports
-                 UTF-8 and ANSI colors
-       endchoice
-
-       config LIBUKBOOT_CMDLINE_MAX_LEN
+
+config LIBUKBOOT_BANNER_NONE
+       bool "None"
+
+config LIBUKBOOT_BANNER_MINIMAL
+       bool "One liner"
+
+config LIBUKBOOT_BANNER_CLASSIC
+       bool "Classic banner"
+
+config LIBUKBOOT_BANNER_POWEREDBY
+       bool "Powered by Unikraft"
+
+config LIBUKBOOT_BANNER_POWEREDBY_ANSI
+       bool "Powered by Unikraft (blue, ANSI)"
+       help
+         Please make sure that your console display supports
+         ANSI colors
+
+config LIBUKBOOT_BANNER_POWEREDBY_ANSI2
+       bool "Powered by Unikraft (gray, ANSI)"
+       help
+         Please make sure that your console display supports
+         ANSI colors
+
+config LIBUKBOOT_BANNER_POWEREDBY_EA
+       bool "Powered by Unikraft (ASCII)"
+       help
+         Please make sure that your console display supports
+         extended ASCII characters
+
+config LIBUKBOOT_BANNER_POWEREDBY_EAANSI
+       bool "Powered by Unikraft (ASCII, blue, ANSI)"
+       help
+         Please make sure that your console display supports
+         extended ASCII characters and ANSI colors
+
+config LIBUKBOOT_BANNER_POWEREDBY_EAANSI2
+       bool "Powered by Unikraft (ASCII, gray, ANSI)"
+       help
+         Please make sure that your console display supports
+         extended ASCII characters and ANSI colors
+
+config LIBUKBOOT_BANNER_POWEREDBY_U8
+       bool "Powered by Unikraft (UTF-8)"
+       help
+         Please make sure that your console display supports
+         UTF-8
+
+config LIBUKBOOT_BANNER_POWEREDBY_U8ANSI
+       bool "Powered by Unikraft (UTF-8, blue, ANSI)"
+       help
+         Please make sure that your console display supports
+         UTF-8 and ANSI colors
+
+config LIBUKBOOT_BANNER_POWEREDBY_U8ANSI2
+       bool "Powered by Unikraft (UTF-8, gray, ANSI)"
+       help
+         Please make sure that your console display supports
+         UTF-8 and ANSI colors
+endchoice
+
+config LIBUKBOOT_CMDLINE_MAX_LEN
        int "Maxiumum command line length"
        default 4096
 
-       config LIBUKBOOT_MAXNBARGS
+config LIBUKBOOT_MAXNBARGS
        int "Maximum number of arguments (max. size of argv)"
        default 60
 
-       config LIBUKBOOT_DISABLE_WEAK_MAIN
+config LIBUKBOOT_DISABLE_WEAK_MAIN
        bool
        default n
 
-       # Hidden option that indicates that allocator is initialized
-       # We do this here in order to allow specifying dependecies to
-       # the allocator choice
-       config LIBUKBOOT_INITALLOC
+# Hidden option that indicates that allocator is initialized
+# We do this here in order to allow specifying dependecies to
+# the allocator choice
+config LIBUKBOOT_INITALLOC
        bool
        default y if !LIBUKBOOT_INITNOALLOC
 
-       choice
+choice
        prompt "Initialize memory allocator"
        default LIBUKBOOT_INITBBUDDY
 
-               config LIBUKBOOT_INITBBUDDY
-               bool "Binary buddy allocator"
-               select LIBUKALLOCBBUDDY
-
-               config LIBUKBOOT_INITREGION
-               bool "Region allocator"
-               select LIBUKALLOCREGION
-               help
-                 Satisfy allocation as fast as possible. No support for free().
-                 Refer to help in ukallocregion for more information.
-
-               config LIBUKBOOT_INITMIMALLOC
-               bool "Mimalloc"
-               depends on LIBMIMALLOC_INCLUDED
-               select LIBMIMALLOC
-
-               config LIBUKBOOT_INITTINYALLOC
-               bool "tinyalloc"
-               depends on LIBTINYALLOC_INCLUDED
-               select LIBTINYALLOC
-               help
-                 Minimalist allocator implementation, meant for use in systems
-                 with unmanaged linear memory such as WebAssembly or embedded
-                 systems. tinyalloc is highly configurable and offers high
-                 performance and reasonable memory usage when used and
-                 configured appropriately.
-
-               config LIBUKBOOT_INITTLSF
-               bool "TLSF"
-               depends on LIBTLSF_INCLUDED
-               select LIBTLSF
-
-               config LIBUKBOOT_INITNOALLOC
-               bool "None"
-
-       endchoice
-
-       config LIBUKBOOT_HEAP_BASE
+config LIBUKBOOT_INITBBUDDY
+       bool "Binary buddy allocator"
+       select LIBUKALLOCBBUDDY
+
+config LIBUKBOOT_INITREGION
+       bool "Region allocator"
+       select LIBUKALLOCREGION
+       help
+         Satisfy allocation as fast as possible. No support for free().
+         Refer to help in ukallocregion for more information.
+
+config LIBUKBOOT_INITMIMALLOC
+       bool "Mimalloc"
+       depends on LIBMIMALLOC_INCLUDED
+       select LIBMIMALLOC
+
+config LIBUKBOOT_INITTINYALLOC
+       bool "tinyalloc"
+       depends on LIBTINYALLOC_INCLUDED
+       select LIBTINYALLOC
+       help
+         Minimalist allocator implementation, meant for use in systems
+         with unmanaged linear memory such as WebAssembly or embedded
+         systems. tinyalloc is highly configurable and offers high
+         performance and reasonable memory usage when used and
+         configured appropriately.
+
+config LIBUKBOOT_INITTLSF
+       bool "TLSF"
+       depends on LIBTLSF_INCLUDED
+       select LIBTLSF
+
+config LIBUKBOOT_INITNOALLOC
+       bool "None"
+
+endchoice
+
+config LIBUKBOOT_HEAP_BASE
        hex "Heap base address"
        default 0x400000000
        depends on HAVE_PAGING
        depends on LIBUKBOOT_INITALLOC
 
-       # Hidden configuration option that specifies that scheduling should be
-       # initialized. The check for !LIBUKBOOT_INITNOSCHED is not sufficient, as
-       # the option is also not available if !LIBUKBOOT_INITALLOC is set. The
-       # reason is the dependency of the choice. This would incorrectly mean
-       # that a scheduler is being initialized.
-       config LIBUKBOOT_INITSCHED
+# Hidden configuration option that specifies that scheduling should be
+# initialized. The check for !LIBUKBOOT_INITNOSCHED is not sufficient, as
+# the option is also not available if !LIBUKBOOT_INITALLOC is set. The
+# reason is the dependency of the choice. This would incorrectly mean
+# that a scheduler is being initialized.
+config LIBUKBOOT_INITSCHED
        bool
        default y if LIBUKBOOT_INITALLOC && !LIBUKBOOT_INITNOSCHED
 
-       choice
+choice
        prompt "Initialize scheduler"
        default LIBUKBOOT_INITSCHEDCOOP
        depends on LIBUKBOOT_INITALLOC
 
-               config LIBUKBOOT_INITSCHEDCOOP
-               bool "Cooperative scheduler"
-               select LIBUKSCHEDCOOP
-               help
-                 Initialize ukschedcoop as cooperative scheduler on the boot CPU.
+config LIBUKBOOT_INITSCHEDCOOP
+       bool "Cooperative scheduler"
+       select LIBUKSCHEDCOOP
+       help
+         Initialize ukschedcoop as cooperative scheduler on the boot CPU.
 
-               config LIBUKBOOT_INITNOSCHED
-               bool "None"
+config LIBUKBOOT_INITNOSCHED
+       bool "None"
 
-       endchoice
+endchoice
 
-       config LIBUKBOOT_MAINTHREAD
+config LIBUKBOOT_MAINTHREAD
        bool "Run application main in own thread"
        depends on LIBUKBOOT_INITSCHED && LIBUKBOOT_INITALLOC
        select LIBUKLOCK
        select LIBUKLOCK_SEMAPHORE
        help
-               Instead of executing main() in the "init" context, a "main"
-               thread is created for executing the application code.
-               This enables proceeding with a system shutdown before the
-               application's main function returned.
+         Instead of executing main() in the "init" context, a "main"
+         thread is created for executing the application code.
+         This enables proceeding with a system shutdown before the
+         application's main function returned.
 
-       config LIBUKBOOT_MAINTHREAD_NOHALT
+config LIBUKBOOT_MAINTHREAD_NOHALT
        bool "Do not initiate a shutdown when application main returned"
        depends on LIBUKBOOT_MAINTHREAD
        help
-               This setting disables automatically shutting down whenever
-               the application main function returned or when the main thread
-               terminated. The system performs a shutdown only on explicit
-               requests.
+         This setting disables automatically shutting down whenever
+         the application main function returned or when the main thread
+         terminated. The system performs a shutdown only on explicit
+         requests.
 
-       config LIBUKBOOT_SHUTDOWNREQ_HANDLER
+config LIBUKBOOT_SHUTDOWNREQ_HANDLER
        bool "Register shutdown request handler"
        depends on LIBUKBOOT_MAINTHREAD
        help
-               This setting enables the init thread to initiate a shutdown
-               if it is requested by a driver on the shutdown_req event queue
-               (e.g., ACPI power button event).
+         This setting enables the init thread to initiate a shutdown
+         if it is requested by a driver on the shutdown_req event queue
+         (e.g., ACPI power button event).
 
-       config LIBUKBOOT_ALLOCSTACK
+config LIBUKBOOT_ALLOCSTACK
        bool
        default y if LIBUKBOOT_INITALLOC
        select LIBUKALLOCSTACK
        depends on LIBUKBOOT_INITALLOC
 
 if LIBUKBOOT_ALLOCSTACK
-               config LIBUKBOOT_ALLOCSTACK_PREMAP_ORDER
-               int "Minimal pre-mapped stack size"
-               default 1
-               depends on LIBUKVMEM
-               help
-                       Indirectly configures the stack allocator pre-mapped size by
-                       changing the stack size page order. Stack size is equal to
-                       2 ^ order * page size (e.g. 4KB). Note that the last page
-                       (or last page from top to bottom) will be the guard page.
-                       Only change this if you know what you're doing.
+config LIBUKBOOT_ALLOCSTACK_PREMAP_ORDER
+       int "Minimal pre-mapped stack size"
+       default 1
+       depends on LIBUKVMEM
+       help
+         Indirectly configures the stack allocator pre-mapped size by
+         changing the stack size page order. Stack size is equal to
+         2 ^ order * page size (e.g. 4KB). Note that the last page
+         (or last page from top to bottom) will be the guard page.
+         Only change this if you know what you're doing.
 endif  # LIBUKBOOT_ALLOCSTACK
-endif
+endif  # LIBUKBOOT