Skip to content
Snippets Groups Projects
Commit 8990fdc7 authored by Adam Wujek's avatar Adam Wujek
Browse files

[FEATURE: #305] rootfs/wr/sbin/startup-mb.sh: use wrs_status_led to set status LED color at boot


There is a tool wrs_status_led to set status LED, so use it (at boot time).

Signed-off-by: default avatarAdam Wujek <dev_public@wujek.eu>
parent cb49fbfd
Branches
Tags
No related merge requests found
......@@ -28,8 +28,15 @@ if [ -f "$MONIT_RR_FLASH" ]; then
mv -f "$MONIT_RR_FLASH" "$MONIT_RR_TMP"
fi
# Turn on yellow LED
# When the linux has boot the status led
# is unpowered so set it to yellow
# until the HAL start (LED is orange) and finally
# WR is setup (LED is green)
$WR_HOME/bin/wrs_status_led -y
# Obtain the type of FPGA (LX130XT or LX240XT)
tfpga=$($WR_HOME/bin/wrs_version -F)
tfpga=$($WR_HOME/bin/wrs_version -f)
if [ "$tfpga" = "UNKNOWN" ]; then
tfpga="LX240T"
fi
......
......@@ -53,7 +53,6 @@ void help(const char* pgrname)
" -b backplane hardware version (also '-p' for WWW)\n"
" -s scb hardware version (without dot in version number)\n"
" -f FPGA type\n"
" -F FPGA type and init status LED\n"
" -g Gateware version\n"
" -c Compiling time\n"
" -v version (git)\n"
......@@ -233,18 +232,6 @@ int main(int argc, char **argv)
switch(func)
{
case 'F':
/* When the linux has boot the status led
* is unpowered so we set it to yellow
* until the HAL start (LED is orange) and finally
* WR is setup (LED is green) */
if(shw_io_read(shw_io_led_state_g)==0)
{
shw_io_write(shw_io_led_state_o,1);
shw_io_write(shw_io_led_state_g,1);
}
func='f';
/* fall through */
case 'f': /* Warning: this -p and -f is used by the web interface */
printf("%s\n", get_fpga());
break;
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment