From: Michal Sojka Date: Wed, 10 Sep 2014 11:30:25 +0000 (+0200) Subject: Add support for uboot keyword in novaboot scripts X-Git-Tag: 20140910~4 X-Git-Url: https://rtime.felk.cvut.cz/gitweb/novaboot.git/commitdiff_plain/4c83e95a15610dbfe0544c8909eda1c7c549f917 Add support for uboot keyword in novaboot scripts --- diff --git a/README.md b/README.md index 0ef9e89..a09d5f5 100644 --- a/README.md +++ b/README.md @@ -448,6 +448,8 @@ can currently be accomplished by the following options: **--amt**, If the command contains string _$NB\_MYIP_ then this string is replaced by IPv4 address of eth0 interface. + See also `uboot` keyword in ["NOVABOOT SCRIPT SYNTAX"](#novaboot-script-syntax)). + - --uboot-addr _name_=_address_ Load address of U-Boot's `tftpboot` command for loading _name_, @@ -546,6 +548,11 @@ for `load` keyboard except that the command's output is not redirected to a file. The ordering of commands is the same as they appear in the novaboot script. +Lines starting with `uboot` represent U-Boot commands that are sent +to the target if **--uboot** option is given. Having a U-Boot line in +the novaboot script is the same as passing an equivalent +**--uboot-init** option to novaboot. + Example (Linux): #!/usr/bin/env novaboot diff --git a/contrib/novaboot-mode.el b/contrib/novaboot-mode.el index 1be10a0..fd068b0 100644 --- a/contrib/novaboot-mode.el +++ b/contrib/novaboot-mode.el @@ -49,7 +49,7 @@ (2 font-lock-function-name-face)) ("^load\\>.*?< \\(.*\\)" (1 font-lock-string-face)) - ("^run\\>" . font-lock-keyword-face) + ("^\\(run\\|uboot\\)\\>" . font-lock-keyword-face) ("^\\([A-Z_]+\\)=" (1 font-lock-variable-name-face)) )) diff --git a/novaboot b/novaboot index ec60ffe..c28b7e2 100755 --- a/novaboot +++ b/novaboot @@ -319,6 +319,12 @@ while (!$skip_reading && ($_ = <>)) { push @$generated, {command => $1}; next; } + if (/^uboot (.*)/) { # uboot line + # TODO: If U-Boot supports some interactive menud, it might + # make sense to store uboot lines per novaboot script. + push @uboot_init, $1; + next; + } die("novaboot: Cannot parse script '$last_fn' line $.. Didn't you forget 'load' keyword?\n"); } @@ -1584,6 +1590,8 @@ commands from each option novaboot waits for U-Boot I. If the command contains string I<$NB_MYIP> then this string is replaced by IPv4 address of eth0 interface. +See also C keyword in L). + =item --uboot-addr I=I
Load address of U-Boot's C command for loading I, @@ -1688,6 +1696,11 @@ for C keyboard except that the command's output is not redirected to a file. The ordering of commands is the same as they appear in the novaboot script. +Lines starting with C represent U-Boot commands that are sent +to the target if B<--uboot> option is given. Having a U-Boot line in +the novaboot script is the same as passing an equivalent +B<--uboot-init> option to novaboot. + Example (Linux): #!/usr/bin/env novaboot