mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-06 23:43:20 +02:00
yang: add feature flags for wifi and gps in infix-hardware
This commit is contained in:
@@ -46,6 +46,10 @@ AC_ARG_ENABLE(wifi,
|
||||
AS_HELP_STRING([--enable-wifi], [Enable support for Wi-Fi]),,[
|
||||
enable_wifi=no])
|
||||
|
||||
AC_ARG_ENABLE(gps,
|
||||
AS_HELP_STRING([--enable-gps], [Enable support for GPS receivers]),,[
|
||||
enable_gps=no])
|
||||
|
||||
AC_ARG_WITH(login-shell,
|
||||
AS_HELP_STRING([--with-login-shell=shell], [Login shell for new users, default: /bin/false]),
|
||||
[login_shell=$withval], [login_shell=yes])
|
||||
@@ -60,6 +64,9 @@ AS_IF([test "x$enable_containers" = "xyes"], [
|
||||
AS_IF([test "x$enable_wifi" = "xyes"], [
|
||||
AC_DEFINE(HAVE_WIFI, 1, [Built with Wi-Fi support])])
|
||||
|
||||
AS_IF([test "x$enable_gps" = "xyes"], [
|
||||
AC_DEFINE(HAVE_GPS, 1, [Built with GPS receiver support])])
|
||||
|
||||
AS_IF([test "x$with_login_shell" != "xno"], [
|
||||
AS_IF([test "x$login_shell" = "xyes"], [login_shell=/bin/false])
|
||||
AC_DEFINE_UNQUOTED(LOGIN_SHELL, "$login_shell", [Default: /bin/false])],[
|
||||
@@ -131,6 +138,7 @@ cat <<EOF
|
||||
Optional features:
|
||||
Container support ....: $enable_containers
|
||||
Wi-Fi support ........: $enable_wifi
|
||||
GPS support ..........: $enable_gps
|
||||
Login shell ..........: $login_shell
|
||||
Default crypt algo ...: $crypt
|
||||
|
||||
|
||||
@@ -45,6 +45,13 @@ module infix-hardware {
|
||||
description "Initial";
|
||||
reference "internal";
|
||||
}
|
||||
feature wifi {
|
||||
description "WiFi support is an optional build-time feature in Infix.";
|
||||
}
|
||||
|
||||
feature gps {
|
||||
description "GPS support is an optional build-time feature in Infix.";
|
||||
}
|
||||
|
||||
typedef country-code {
|
||||
type string {
|
||||
@@ -104,11 +111,13 @@ module infix-hardware {
|
||||
description "This identity is used to a VPD memory on the device.";
|
||||
}
|
||||
identity wifi {
|
||||
if-feature wifi;
|
||||
base iahw:hardware-class;
|
||||
description "This identity is used to describe a WiFi radio/PHY";
|
||||
}
|
||||
|
||||
identity gps {
|
||||
if-feature gps;
|
||||
base iahw:hardware-class;
|
||||
description "GPS/GNSS receiver for time synchronization";
|
||||
}
|
||||
@@ -211,6 +220,7 @@ module infix-hardware {
|
||||
*/
|
||||
|
||||
container wifi-radio {
|
||||
if-feature wifi;
|
||||
when "derived-from-or-self(../iehw:class, 'ih:wifi')";
|
||||
presence "WiFi radio configuration";
|
||||
description
|
||||
@@ -534,6 +544,7 @@ module infix-hardware {
|
||||
*/
|
||||
|
||||
container gps-receiver {
|
||||
if-feature gps;
|
||||
when "derived-from-or-self(../iehw:class, 'ih:gps')";
|
||||
presence "GPS receiver configuration";
|
||||
description
|
||||
|
||||
@@ -0,0 +1,3 @@
|
||||
MODULES=(
|
||||
"infix-hardware -e gps"
|
||||
)
|
||||
@@ -1,4 +1,5 @@
|
||||
MODULES=(
|
||||
"infix-interfaces -e wifi"
|
||||
"infix-hardware -e wifi"
|
||||
"infix-if-type -e wifi"
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user