Class: Calypso::Kbuild
- Inherits:
-
Object
- Object
- Calypso::Kbuild
- Defined in:
- lib/calypso/kbuild.rb
Overview
Kbuild model.
Constant Summary collapse
- ETAOS_BUILD_TARGETS =
Build targets.
"all".freeze
- ETAOS_PREBUILD_TARGETS =
Prebuild targets.
"prepare".freeze
- ETAOS_CLEAN_TARGETS =
Clean targets.
"clean".freeze
- ETAOS_INSTALL_TARGETS =
Module install targets.
"modules_install".freeze
Instance Attribute Summary collapse
-
#conf ⇒ String
readonly
Absolute path to an ETA/OS configuration file.
Instance Method Summary collapse
-
#build ⇒ Object
Build ETA/OS.
- #build_all ⇒ Object deprecated Deprecated.
-
#build_test(targets) ⇒ Object
Build the test.
-
#clean ⇒ Object
Run the clean target on ETA/OS.
-
#initialize(conf, test_path) ⇒ Kbuild
constructor
Create a new Kconfig controller.
-
#install_modules(libdir) ⇒ Object
Install the ETA/OS modules.
-
#prepare ⇒ nil
Run the prebuild targets.
-
#save_config ⇒ nil
Save the configuration file back to the test directory.
Constructor Details
#initialize(conf, test_path) ⇒ Kbuild
Create a new Kconfig controller.
41 42 43 44 45 |
# File 'lib/calypso/kbuild.rb', line 41 def initialize(conf, test_path) @conf = conf @path = test_path FileUtils.copy(@conf, "#{Dir.pwd}/.config") end |
Instance Attribute Details
#conf ⇒ String (readonly)
Returns Absolute path to an ETA/OS configuration file.
26 27 28 |
# File 'lib/calypso/kbuild.rb', line 26 def conf @conf end |
Instance Method Details
#build ⇒ Object
Build ETA/OS.
67 68 69 70 |
# File 'lib/calypso/kbuild.rb', line 67 def build system("make #{ETAOS_PREBUILD_TARGETS}") system("make #{ETAOS_BUILD_TARGETS}") end |
#build_all ⇒ Object
Deprecated.
Build all targets.
88 89 90 91 92 93 94 |
# File 'lib/calypso/kbuild.rb', line 88 def build_all clean build install_modules build_app nil end |
#build_test(targets) ⇒ Object
Build the test.
82 83 84 |
# File 'lib/calypso/kbuild.rb', line 82 def build_test(targets) system("make -f scripts/Makefile.calypso TARGETS=\"#{targets}\" TEST=#{@path}") end |
#clean ⇒ Object
Run the clean target on ETA/OS.
62 63 64 |
# File 'lib/calypso/kbuild.rb', line 62 def clean system("make #{ETAOS_CLEAN_TARGETS}") end |
#install_modules(libdir) ⇒ Object
Install the ETA/OS modules.
75 76 77 |
# File 'lib/calypso/kbuild.rb', line 75 def install_modules(libdir) system("make #{ETAOS_INSTALL_TARGETS} INSTALL_MOD_PATH=#{libdir}") end |
#prepare ⇒ nil
Run the prebuild targets.
57 58 59 |
# File 'lib/calypso/kbuild.rb', line 57 def prepare system("make #{ETAOS_PREBUILD_TARGETS}") end |
#save_config ⇒ nil
Save the configuration file back to the test directory.
50 51 52 |
# File 'lib/calypso/kbuild.rb', line 50 def save_config FileUtils.copy("#{Dir.pwd}/.config", @conf) end |