diff --git a/repos/base/run/platform_drv.inc b/repos/base/run/platform_drv.inc index 3cf6870860..bcb62099bf 100644 --- a/repos/base/run/platform_drv.inc +++ b/repos/base/run/platform_drv.inc @@ -30,6 +30,16 @@ proc need_usb_hid { } { } +## +# Return name of the NIC driver binary +# +proc nic_drv_binary { } { + if {[have_spec linux]} { return linux_nic_drv } + if {[have_spec omap4] || [have_spec arndale] || [have_spec rpi]} { return usb_drv } + if {!([have_spec imx53] || [have_spec riscv] || [have_spec odroid_xu] || [have_spec wand_quad])} { return nic_drv } +} + + proc platform_drv_build_components {} { set drv_build_components "" lappend_if [have_platform_drv] drv_build_components drivers/platform diff --git a/repos/dde_linux/run/lxip_http_srv.run b/repos/dde_linux/run/lxip_http_srv.run index be5dbfa592..c13993d332 100644 --- a/repos/dde_linux/run/lxip_http_srv.run +++ b/repos/dde_linux/run/lxip_http_srv.run @@ -54,11 +54,10 @@ set config { - + - - - + + } @@ -84,6 +83,7 @@ append_platform_drv_config append_if $use_nic_driver config { + } @@ -106,7 +106,7 @@ set boot_modules { # platform-specific modules lappend_if $use_usb_driver boot_modules usb_drv -lappend_if $use_nic_driver boot_modules nic_drv +lappend_if $use_nic_driver boot_modules [nic_drv_binary] lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/dde_linux/run/lxip_udp_echo.run b/repos/dde_linux/run/lxip_udp_echo.run index ab5dd65161..93f54835a0 100644 --- a/repos/dde_linux/run/lxip_udp_echo.run +++ b/repos/dde_linux/run/lxip_udp_echo.run @@ -29,7 +29,7 @@ create_boot_directory # Generate config # -set config { +append config { @@ -52,21 +52,20 @@ set config { - + + - - + gateway="10.0.2.1" netmask="255.255.255.0"/> } -append_if [have_spec gpio] config " - +append_if [have_spec gpio] config { + - " + } append_if $use_usb_driver config { @@ -83,6 +82,7 @@ append_platform_drv_config append_if $use_nic_driver config { + } @@ -106,7 +106,7 @@ set boot_modules { # platform-specific modules lappend_if $use_usb_driver boot_modules usb_drv -lappend_if $use_nic_driver boot_modules nic_drv +lappend_if $use_nic_driver boot_modules [nic_drv_binary] lappend_if [have_spec gpio] boot_modules [gpio_drv] append_platform_drv_boot_modules diff --git a/repos/dde_linux/run/vfs_cfg.run b/repos/dde_linux/run/vfs_cfg.run index 090b9a56d1..fd64132182 100644 --- a/repos/dde_linux/run/vfs_cfg.run +++ b/repos/dde_linux/run/vfs_cfg.run @@ -14,7 +14,7 @@ build $build_components create_boot_directory -set config { +append config { @@ -35,7 +35,8 @@ set config { - + + @@ -82,8 +83,8 @@ append config { install_config $config -set boot_modules { - core init timer nic_drv vfs dynamic_rom +append boot_modules { + core init timer } [nic_drv_binary] { vfs dynamic_rom ld.lib.so vfs_lxip.lib.so lxip.lib.so } diff --git a/repos/dde_linux/run/vfs_lxip.run b/repos/dde_linux/run/vfs_lxip.run index 290f843615..4ed8dbadff 100644 --- a/repos/dde_linux/run/vfs_lxip.run +++ b/repos/dde_linux/run/vfs_lxip.run @@ -16,7 +16,7 @@ build $build_components create_boot_directory -set config { +append config { @@ -39,6 +39,7 @@ set config { + @@ -63,14 +64,13 @@ set config { - - - - - - - - + + + + + + +