2012-07-16 13:13:35 +00:00
|
|
|
#
|
|
|
|
# Build
|
|
|
|
#
|
|
|
|
if {[have_spec omap4] == 0} {
|
|
|
|
puts "Runs on OMAP4 only"
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
|
|
|
set build_components {
|
2019-01-03 17:01:49 +00:00
|
|
|
core init timer
|
|
|
|
drivers/gpio
|
2012-07-16 13:13:35 +00:00
|
|
|
test/gpio_drv
|
|
|
|
}
|
|
|
|
|
|
|
|
build $build_components
|
|
|
|
|
|
|
|
create_boot_directory
|
|
|
|
|
|
|
|
#
|
|
|
|
# Generate config
|
|
|
|
#
|
|
|
|
|
|
|
|
append config {
|
|
|
|
<config>
|
|
|
|
<parent-provides>
|
|
|
|
<service name="ROM"/>
|
|
|
|
<service name="IRQ"/>
|
|
|
|
<service name="IO_MEM"/>
|
|
|
|
<service name="IO_PORT"/>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="RM"/>
|
|
|
|
<service name="CPU"/>
|
|
|
|
<service name="LOG"/>
|
|
|
|
</parent-provides>
|
|
|
|
<default-route>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</default-route>
|
|
|
|
<start name="timer">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Timer"/></provides>
|
2017-02-08 12:28:11 +00:00
|
|
|
</start>}
|
|
|
|
|
|
|
|
append config "
|
|
|
|
<start name=\"[gpio_drv]\">"
|
|
|
|
|
|
|
|
append config {
|
2012-07-16 13:13:35 +00:00
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Gpio"/></provides>
|
|
|
|
<config>
|
|
|
|
<gpio num="121" mode="I"/>
|
|
|
|
<gpio num="7" mode="O" value="0"/>
|
|
|
|
<gpio num="8" mode="O" value="0"/>
|
|
|
|
</config>
|
|
|
|
</start>
|
2012-11-28 19:36:39 +00:00
|
|
|
<start name="test-omap4_gpio_drv">
|
2012-07-16 13:13:35 +00:00
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
</start>
|
|
|
|
</config>}
|
|
|
|
|
|
|
|
install_config $config
|
|
|
|
|
|
|
|
#
|
|
|
|
# Boot modules
|
|
|
|
#
|
|
|
|
|
|
|
|
# generic modules
|
|
|
|
set boot_modules {
|
2016-12-01 18:00:11 +00:00
|
|
|
core ld.lib.so init
|
2012-07-16 13:13:35 +00:00
|
|
|
timer
|
|
|
|
test-omap4_gpio_drv
|
|
|
|
}
|
|
|
|
|
2017-02-08 12:28:11 +00:00
|
|
|
append boot_modules [gpio_drv]
|
|
|
|
|
2012-07-16 13:13:35 +00:00
|
|
|
build_boot_image $boot_modules
|
|
|
|
|
2017-02-08 12:28:11 +00:00
|
|
|
run_genode_until forever
|