class Calypso::Kbuild
Kbuild
model.
Constants
- ETAOS_BUILD_TARGETS
Build targets.
- ETAOS_CLEAN_TARGETS
Clean targets.
- ETAOS_INSTALL_TARGETS
Module install targets.
- ETAOS_PREBUILD_TARGETS
Prebuild targets.
Attributes
conf[R]
@return [String] Absolute path to an ETA/OS configuration file.
Public Class Methods
new(conf, test_path)
click to toggle source
Create a new Kconfig controller.
@param conf [String] ETA/OS configuration file. @param test_path [String] Unit test path.
# File lib/calypso/kbuild.rb, line 41 def initialize(conf, test_path) @conf = conf @path = test_path FileUtils.copy(@conf, "#{Dir.pwd}/.config") end
Public Instance Methods
build()
click to toggle source
Build ETA/OS.
# File lib/calypso/kbuild.rb, line 67 def build system("make #{ETAOS_PREBUILD_TARGETS}") system("make #{ETAOS_BUILD_TARGETS}") end
build_all()
click to toggle source
Build all targets. @deprecated
# File lib/calypso/kbuild.rb, line 88 def build_all clean build install_modules build_app nil end
build_test(targets)
click to toggle source
Build the test.
@param targets [String] Build targets.
# File lib/calypso/kbuild.rb, line 82 def build_test(targets) system("make -f scripts/Makefile.calypso TARGETS=\"#{targets}\" TEST=#{@path}") end
clean()
click to toggle source
Run the clean target on ETA/OS.
# File lib/calypso/kbuild.rb, line 62 def clean system("make #{ETAOS_CLEAN_TARGETS}") end
install_modules(libdir)
click to toggle source
Install the ETA/OS modules.
@param libdir [String] Library directory.
# File lib/calypso/kbuild.rb, line 75 def install_modules(libdir) system("make #{ETAOS_INSTALL_TARGETS} INSTALL_MOD_PATH=#{libdir}") end
prepare()
click to toggle source
Run the prebuild targets.
@return [nil]
# File lib/calypso/kbuild.rb, line 57 def prepare system("make #{ETAOS_PREBUILD_TARGETS}") end
save_config()
click to toggle source
Save the configuration file back to the test directory.
@return [nil]
# File lib/calypso/kbuild.rb, line 50 def save_config FileUtils.copy("#{Dir.pwd}/.config", @conf) end