⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 persistent-state-flash.html

📁 ecos 文档
💻 HTML
📖 第 1 页 / 共 2 页
字号:
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>RedBoot&#62; <TT
CLASS="USERINPUT"
><B
>fco -d bootp</B
></TT
>
bootp: false ? <TT
CLASS="USERINPUT"
><B
>true</B
></TT
>
Update RedBoot non-volatile configuration - continue (y/n)? y
... Unlock from ...
RedBoot&#62; &#0095;</PRE
></TD
></TR
></TABLE
></P
><P
>One item which is always present in the configuration data is the ability
to execute a script at boot time. A sequence of RedBoot commands can be entered
which will be executed when the system starts up. Optionally, a time-out period
can be provided which allows the user to abort the startup script and proceed
with normal command processing from the console.     </P
><P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>RedBoot&#62; <TT
CLASS="USERINPUT"
><B
>fconfig -l</B
></TT
>
Run script at boot: false
Use BOOTP for network configuration: false
Local IP address: 192.168.1.29
Default server IP address: 192.168.1.101
DNS server IP address: 192.168.1.1
GDB connection port: 9000
Network debug at boot time: false</PRE
></TD
></TR
></TABLE
></P
><P
>The following example sets a boot script and then shows it running.
    </P
><P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>RedBoot&#62; <TT
CLASS="USERINPUT"
><B
>fconfig</B
></TT
>
Run script at boot: false <TT
CLASS="USERINPUT"
><B
>t</B
></TT
>
      Boot script:
Enter script, terminate with empty line
&#62;&#62; <TT
CLASS="USERINPUT"
><B
>fi li</B
></TT
>
    Boot script timeout: 0 <TT
CLASS="USERINPUT"
><B
>10</B
></TT
>
Use BOOTP for network configuration: false .
Update RedBoot non-volatile configuration - continue (y/n)? <TT
CLASS="USERINPUT"
><B
>y</B
></TT
>
... Erase from 0xa0fc0000-0xa0fe0000: .
... Program from 0x8c021f60-0x8c022360 at 0xa0fc0000: .
RedBoot&#62;
RedBoot(tm) debug environment - built 08:22:24, Aug 23 2000
Copyright (C) 2000, Red Hat, Inc.


RAM: 0x8c000000-0x8c800000
flash: 0xa0000000 - 0xa1000000, 128 blocks of 0x00020000 bytes ea.
Socket Communications, Inc: Low Power Ethernet CF Revision C \
5V/3.3V 08/27/98 IP: 192.168.1.29, Default server: 192.168.1.101 \
== Executing boot script in 10 seconds - enter ^C to abort
RedBoot&#62; <TT
CLASS="USERINPUT"
><B
>fi li</B
></TT
>
Name              flash addr   Mem addr    Length    Entry point
RedBoot          0xA0000000   0xA0000000  0x020000  0x80000000
RedBoot config   0xA0FC0000   0xA0FC0000  0x020000  0x00000000
FIS directory    0xA0FE0000   0xA0FE0000  0x020000  0x00000000
RedBoot&#62;</PRE
></TD
></TR
></TABLE
></P
><DIV
CLASS="NOTE"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>NOTE: </B
>The bold characters above indicate where something was entered on the
console. As you can see, the <B
CLASS="COMMAND"
>fi li</B
> command
at the end came from the script,
not the console. Once the script is executed, command processing reverts to
the console. </P
></BLOCKQUOTE
></DIV
><P
><DIV
CLASS="NOTE"
><BLOCKQUOTE
CLASS="NOTE"
><P
><B
>NOTE: </B
>RedBoot supports the notion of a boot script timeout, i.e. a period of
time that RedBoot waits before executing the boot time script.  This period
is primarily to allow the possibility of canceling the script.  Since
a timeout value of zero (0) seconds would never allow the script to
be aborted or canceled, this value is not allowed.  If the timeout
value is zero, then RedBoot will abort the script execution immediately.</P
></BLOCKQUOTE
></DIV
>
On many targets, RedBoot may be configured to run from ROM or it may be
configured to run from RAM. Other configurations are also possible. All
RedBoot configurations will execute the boot script, but in certain cases
it may be desirable to limit the execution of certain script commands to
one RedBoot configuration or the other. This can be accomplished by
prepending <TT
CLASS="COMPUTEROUTPUT"
>{&lt;startup type&#62;}</TT
> to the
commands which should be executed only by the RedBoot configured for the
specified startup type. The following boot script illustrates this concept
by having the ROM based RedBoot load and run the RAM based RedBoot. The RAM
based RedBoot will then list flash images.</P
><P
><TABLE
BORDER="5"
BGCOLOR="#E0E0F0"
WIDTH="70%"
><TR
><TD
><PRE
CLASS="SCREEN"
>RedBoot&#62; <TT
CLASS="USERINPUT"
><B
>fco</B
></TT
>
Run script at boot: false <TT
CLASS="USERINPUT"
><B
>t</B
></TT
>
Boot script:
Enter script, terminate with empty line
&#62;&#62; <TT
CLASS="USERINPUT"
><B
>{ROM}fis load RedBoot[RAM]</B
></TT
>
&#62;&#62; <TT
CLASS="USERINPUT"
><B
>{ROM}go</B
></TT
>
&#62;&#62; <TT
CLASS="USERINPUT"
><B
>{RAM}fis li</B
></TT
>
&#62;&#62;
Boot script timeout (1000ms resolution): <TT
CLASS="USERINPUT"
><B
>2</B
></TT
>
Use BOOTP for network configuration: <TT
CLASS="USERINPUT"
><B
>false</B
></TT
>
 ...
Update RedBoot non-volatile configuration - continue (y/n)? <TT
CLASS="USERINPUT"
><B
>y</B
></TT
>
... Unlock from 0x007c0000-0x007e0000: .
... Erase from 0x007c0000-0x007e0000: .
... Program from 0xa0015030-0xa0016030 at 0x007df000: .
... Lock from 0x007c0000-0x007e0000: .
RedBoot&#62; <TT
CLASS="USERINPUT"
><B
>reset</B
></TT
>
... Resetting.
+Ethernet eth0: MAC address 00:80:4d:46:01:05
IP: 192.168.1.153, Default server: 192.168.1.10

RedBoot(tm) bootstrap and debug environment [ROM]
Red Hat certified release, version R1.xx - built 17:37:36, Aug 14 2001

Platform: IQ80310 (XScale)
Copyright (C) 2000, 2001, Red Hat, Inc.

RAM: 0xa0000000-0xa2000000, 0xa001b088-0xa1fdf000 available
FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each.
== Executing boot script in 2.000 seconds - enter ^C to abort
RedBoot&#62; <TT
CLASS="USERINPUT"
><B
>fis load RedBoot[RAM]</B
></TT
>
RedBoot&#62; <TT
CLASS="USERINPUT"
><B
>go</B
></TT
>
+Ethernet eth0: MAC address 00:80:4d:46:01:05
IP: 192.168.1.153, Default server: 192.168.1.10

RedBoot(tm) bootstrap and debug environment [RAM]
Red Hat certified release, version R1.xx - built 13:03:47, Aug 14 2001

Platform: IQ80310 (XScale)
Copyright (C) 2000, 2001, Red Hat, Inc.

RAM: 0xa0000000-0xa2000000, 0xa0057fe8-0xa1fdf000 available
FLASH: 0x00000000 - 0x00800000, 64 blocks of 0x00020000 bytes each.
== Executing boot script in 2.000 seconds - enter ^C to abort
RedBoot&#62; <TT
CLASS="USERINPUT"
><B
>fis li</B
></TT
>
Name              FLASH addr  Mem addr    Length      Entry point
RedBoot           0x00000000  0x00000000  0x00040000  0x00002000
RedBoot config    0x007DF000  0x007DF000  0x00001000  0x00000000
FIS directory     0x007E0000  0x007E0000  0x00020000  0x00000000
RedBoot&#62;</PRE
></TD
></TR
></TABLE
></P
></DIV
><DIV
CLASS="NAVFOOTER"
><HR
ALIGN="LEFT"
WIDTH="100%"><TABLE
SUMMARY="Footer navigation table"
WIDTH="100%"
BORDER="0"
CELLPADDING="0"
CELLSPACING="0"
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
><A
HREF="fis-write-command.html"
ACCESSKEY="P"
>Prev</A
></TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="ecos-ref.html"
ACCESSKEY="H"
>Home</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
><A
HREF="executing-programs.html"
ACCESSKEY="N"
>Next</A
></TD
></TR
><TR
><TD
WIDTH="33%"
ALIGN="left"
VALIGN="top"
>fis write</TD
><TD
WIDTH="34%"
ALIGN="center"
VALIGN="top"
><A
HREF="redboot-commands-and-examples.html"
ACCESSKEY="U"
>Up</A
></TD
><TD
WIDTH="33%"
ALIGN="right"
VALIGN="top"
>Executing Programs from RedBoot</TD
></TR
></TABLE
></DIV
></BODY
></HTML
>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -