- Summary
- Can't use override-func in board file
; Owner: Tim
; Reporter: Tim
; Status: open
; Priority: high
; Version: 1.5.10
; Subsystem: ftc and core
; Tags: overlay, ovgen
|
; Summary: Can't use override-func in board file
; Owner: Tim
; Reporter: Tim
; Status: open
; Priority: high
; Version: 1.5.10
; Subsystem: ftc and core
; Tags: overlay, ovgen
|
|
= Description =
ftc query-board can parse an override-func from a board file, but ovgen.py
cannot.
|
You get the following:
|
You get the following:
|
Add the following to bbb.board:
{{{
override_func ov_rootfs_sync() {
cmd "sync" || abort_job "Unable to flush buffers on target"
cmd "date $(date +%m%d%H%M%Y.%S)"
}
}}}
|
Add the following to bbb.board:
{{{
override_func ov_rootfs_sync() {
cmd "sync" || abort_job "Unable to flush buffers on target"
cmd "date $(date +%m%d%H%M%Y.%S)"
}
}}}
|
And ovgen generates the following error:
(adjust OF_DEBUG_ARGS in scripts/overlay.sh)
|
And ovgen generates the following error:
(adjust OF_DEBUG_ARGS in scripts/overlay.sh)
|
|
{{{#!YellowBox
...
log: discarding string function ov_rootfs_sync() {
|
log: parsed function ov_rootfs_sync
log: body: function ov_rootfs_sync() {
cmd "sync" || abort_job "Unable to flush buffers on target"
}
log: function found
log: discarding string
...
base-board funcs:
... [ a dictionary that includes ov_rootfs_sync() ] ...
|
log: parsed function ov_rootfs_sync
log: body: function ov_rootfs_sync() {
cmd "sync" || abort_job "Unable to flush buffers on target"
}
log: function found
log: discarding string
...
base-board funcs:
... [ a dictionary that includes ov_rootfs_sync() ] ...
|
....
log: discarding string override-func ov_rootfs_sync() {
log: overriding func: ov_rootfs_sync
...
base-board funcs:
... [ a dictionary that does not include ov_rootfs_sync() ] ...
|
....
log: discarding string override-func ov_rootfs_sync() {
log: overriding func: ov_rootfs_sync
...
base-board funcs:
... [ a dictionary that does not include ov_rootfs_sync() ] ...
|
...
Traceback (most recent call last):
File "/fuego-core/scripts/ovgen.py", line 528, in <module>
run()
File "/fuego-core/scripts/ovgen.py", line 519, in run
classes = classes + parseOverrideFile(ovf, layers, ofcls)
File "/fuego-core/scripts/ovgen.py", line 361, in parseOverrideFile
elif parseLayerFuncOverride(line, layer, inheritClass, f):
File "/fuego-core/scripts/ovgen.py", line 269, in parseLayerFuncOverride
raise OFVarNotFoundException("function %s is not found in %s class" % (name, inhclass.name))
__main__.OFVarNotFoundException: 'function ov_rootfs_sync is not found in base-board class'
|
...
Traceback (most recent call last):
File "/fuego-core/scripts/ovgen.py", line 528, in <module>
run()
File "/fuego-core/scripts/ovgen.py", line 519, in run
classes = classes + parseOverrideFile(ovf, layers, ofcls)
File "/fuego-core/scripts/ovgen.py", line 361, in parseOverrideFile
elif parseLayerFuncOverride(line, layer, inheritClass, f):
File "/fuego-core/scripts/ovgen.py", line 269, in parseLayerFuncOverride
raise OFVarNotFoundException("function %s is not found in %s class" % (name, inhclass.name))
__main__.OFVarNotFoundException: 'function ov_rootfs_sync is not found in base-board class'
|
*** ABORTED (during phase) ***
|
*** ABORTED (during phase) ***
|
Fuego error reason: Error generating prolog.sh file
}}}
|
Fuego error reason: Error generating prolog.sh file
}}}
|
|
= Notes =
The implementation of ovgen.py is needlessly complicated. Maybe
an ovgen2.py could be written which does the same thing, using code
from ftc (that was written for query-board).
|
See ftc functions: get_board_vars() and parse_shell_file()
|
See ftc functions: get_board_vars() and parse_shell_file()
|
Note that these function don't do test variables, just board
variables with overrides.
|
Note that these function don't do test variables, just board
variables with overrides.
|
- backlink
Fuego Issues List
|
; backlink: [[Fuego Issues List]]
|