I am having a question regarding Uboot. I am looking forward to make a ARM based Board. Now i want to to burn Uboot to NAND flash attached to my controller. How can i perform this operation ?
我有一个关于Uboot的问题。我期待着做一个基于ARM的董事会。现在我想要把Uboot烧成NAND闪存连接到我的控制器。我如何执行这个操作?
http://www.stlinux.com/u-boot/target-install What i got from this link is that -- STx7111 Mboard - have some serial port which is capable to communicate with GDB. And from GDB we use to burn following file u-boot. Is this file burned in RAM or NAND flash by gdb ?
我从这个链接得到的是——STx7111 Mboard——有一些串行端口,可以与GDB通信。从GDB中,我们可以使用u-boot文件。这个文件是在RAM中被烧毁还是由gdb的NAND闪存?
Then execution moves to this u-boot program "u-boot". Now this program "u-boot" will burn the actual u-boot.bin onto the NAND flash.
然后执行到这个u-boot程序“u-boot”。现在这个程序“u-boot”将会烧毁u-boot。把箱子放到NAND闪存上。
Do every controller have some serial port which is capable to communicate with GDB ? Do every controller follow this approach to burn uboot bootloader into its NAND flash ?
每个控制器是否有一些能够与GDB通信的串行端口?每个控制器都遵循这种方法来将uboot引导加载程序放入它的NAND闪存中吗?
Please suggest.
请建议。
2 个解决方案
#1
4
What i got from this link is that -- STx7111 Mboard - have some serial port which is capable to communicate with GDB. And from GDB we use to burn following file u-boot. Is this file burned in RAM or NAND flash by gdb ?
我从这个链接得到的是——STx7111 Mboard——有一些串行端口,可以与GDB通信。从GDB中,我们可以使用u-boot文件。这个文件是在RAM中被烧毁还是由gdb的NAND闪存?
No, you did not read that article accurately.
GDB is merely used as the interface to the JTAG.
This first step is to load an executable (a copy of U-Boot) into RAM.
不,你没有准确地阅读那篇文章。GDB仅仅用作JTAG的接口。第一步是将可执行文件(U-Boot副本)加载到RAM中。
Do every controller have some serial port which is capable to communicate with GDB ?
Do every controller follow this approach to burn uboot bootloader into its NAND flash ?每个控制器是否有一些能够与GDB通信的串行端口?每个控制器都遵循这种方法来将uboot引导加载程序放入它的NAND闪存中吗?
You should avoid making (or trying to make) sweeping generalizations (in this and your other postings).
The features and capabilities of microcontrollers, microprocessors and SoCs ("controllers" is something else) is so broad that very few generalization can be made. Rarely is there only "one way" to perform these procedures.
你应该避免(或试图做出)笼统的概括(在这个和你的其他帖子中)。微控制器、微处理器和SoCs(“控制器”是另一种东西)的特性和功能非常广泛,几乎不可能进行泛化。很少有“一种方法”来执行这些程序。
In order the write a copy of U-Boot (or any file image) to NAND flash, there are two steps:
为了将U-Boot(或任何文件图像)的副本写入NAND闪存,有两个步骤:
-
transfer the image file from the host PC (or some storage device) into local memory;
将映像文件从主机PC(或一些存储设备)传输到本地内存中;
-
erase the NAND flash blocks, and then write the image file to NAND flash with ECC if required and cognizant of bad blocks.
擦除NAND闪存块,并在必要时将图像文件写入NAND闪存,并识别坏块。
These are not trivial steps, so a capable utility is needed. There are at least three approaches:
这些都不是简单的步骤,因此需要一个有能力的实用程序。至少有三种方法:
-
The microcontroller can be configured (via input pins) to a "receive and write an image file" mode on power-up. A hardcoded program in ROM will load the image and write it to the integrated flash.
微控制器可以配置(通过输入引脚)到一个“接收和写一个图像文件”模式的电源。ROM中的硬编码程序将加载图像并将其写入集成的flash中。
-
The SoC ROM has a bootloader that has capabilities to communicate with a host PC over RS232 or USB, and can perform as the client side of a proprietary utility program. On the host PC you would run the server side of this utility program. This scheme would allow transferring files and reading & writing the target's memories. Atmel's SAM-BA utility fits into this category.
SoC ROM有一个引导装载器,它可以通过RS232或USB与主机通信,并且可以作为一个专有实用程序的客户端执行。在主机PC上,您将运行该实用程序的服务器端。这个方案将允许传输文件和阅读和写入目标的记忆。Atmel的SAM-BA实用工具属于这一类。
-
Use an open-source utility, such as U-Boot, that is configurable and extensible to support the external NAND flash and any other memory types on your board, and also has file transfer capabilities. The console for U-Boot is typically a UART/USART serial port, but can be configured to use a USB-to-RS232 adapter.
使用一个开源工具,比如U-Boot,它是可配置和可扩展的,可以支持外部的NAND闪存和任何其他的内存类型,并且还有文件传输功能。U-Boot的控制台通常是UART/USART串行端口,但可以配置为使用usbto - rs232适配器。
In the case of using a program like U-Boot to install programs in NAND, a chicken versus egg situation arises: how to get this program loaded in the first place? The two common approaches are:
在使用像U-Boot这样的程序在NAND中安装程序的情况下,一个鸡与鸡蛋的情况出现了:如何首先加载这个程序?这两种常见的方法是:
a. Install the utility (i.e. U-Boot) on a SDcard with any required bootloader, and then boot the SoC from the SDcard. This assumes that the SoC has this booting capability, but this scheme requires the least operator skill.
a.在SDcard上安装任何需要的引导加载程序(即U-Boot),然后从SDcard启动SoC。这假设SoC有这个引导能力,但是这个方案需要最少的操作技巧。
b. Load the utility (i.e. U-Boot) using JTAG, such as Segger J-Link, which will allow you to transfer the image file to RAM (assuming that RAM has been properly initialized if necessary) and then start its execution. The J-Link can be interfaced using its own JLINK program or GDB.
b.使用JTAG(例如Segger J-Link)加载实用程序(即U-Boot),它允许您将映像文件传输到RAM(假设RAM在必要时已被正确初始化),然后开始执行。J-Link可以使用它自己的JLINK程序或GDB接口。
Once U-Boot is resident and executing, you have all of its capabilities available. U-Boot cannot write itself to NAND flash, so you have to load another copy of U-Boot in order to write it to NAND (or any other type of) flash.
一旦U-Boot驻留并执行,您就拥有了它的所有功能。U-Boot不能将自己写入NAND闪存,所以你必须加载另一个U-Boot副本,以便将其写入NAND(或任何其他类型的)flash中。
#2
0
If you load something using GDB, then it must be loaded in RAM.. Using gdb you will run that binary (u-boot), and the binary will give you the u-boot prompt, which you use to burn another image (it can be u-boot.img (configured for running from FLASH), linux kernel image, or any other image) into the flash (it can be NOR or NAND)..
如果您使用GDB加载某个东西,那么它必须在RAM中加载。使用gdb,你将运行那个二进制文件(u-boot),而二进制文件将给你u-boot提示符,你可以使用它来燃烧另一个图像(它可以是u-boot)。img(配置为从FLASH中运行)、linux内核映像或任何其他图像)到FLASH中(它可以是NOR或NAND)。
#1
4
What i got from this link is that -- STx7111 Mboard - have some serial port which is capable to communicate with GDB. And from GDB we use to burn following file u-boot. Is this file burned in RAM or NAND flash by gdb ?
我从这个链接得到的是——STx7111 Mboard——有一些串行端口,可以与GDB通信。从GDB中,我们可以使用u-boot文件。这个文件是在RAM中被烧毁还是由gdb的NAND闪存?
No, you did not read that article accurately.
GDB is merely used as the interface to the JTAG.
This first step is to load an executable (a copy of U-Boot) into RAM.
不,你没有准确地阅读那篇文章。GDB仅仅用作JTAG的接口。第一步是将可执行文件(U-Boot副本)加载到RAM中。
Do every controller have some serial port which is capable to communicate with GDB ?
Do every controller follow this approach to burn uboot bootloader into its NAND flash ?每个控制器是否有一些能够与GDB通信的串行端口?每个控制器都遵循这种方法来将uboot引导加载程序放入它的NAND闪存中吗?
You should avoid making (or trying to make) sweeping generalizations (in this and your other postings).
The features and capabilities of microcontrollers, microprocessors and SoCs ("controllers" is something else) is so broad that very few generalization can be made. Rarely is there only "one way" to perform these procedures.
你应该避免(或试图做出)笼统的概括(在这个和你的其他帖子中)。微控制器、微处理器和SoCs(“控制器”是另一种东西)的特性和功能非常广泛,几乎不可能进行泛化。很少有“一种方法”来执行这些程序。
In order the write a copy of U-Boot (or any file image) to NAND flash, there are two steps:
为了将U-Boot(或任何文件图像)的副本写入NAND闪存,有两个步骤:
-
transfer the image file from the host PC (or some storage device) into local memory;
将映像文件从主机PC(或一些存储设备)传输到本地内存中;
-
erase the NAND flash blocks, and then write the image file to NAND flash with ECC if required and cognizant of bad blocks.
擦除NAND闪存块,并在必要时将图像文件写入NAND闪存,并识别坏块。
These are not trivial steps, so a capable utility is needed. There are at least three approaches:
这些都不是简单的步骤,因此需要一个有能力的实用程序。至少有三种方法:
-
The microcontroller can be configured (via input pins) to a "receive and write an image file" mode on power-up. A hardcoded program in ROM will load the image and write it to the integrated flash.
微控制器可以配置(通过输入引脚)到一个“接收和写一个图像文件”模式的电源。ROM中的硬编码程序将加载图像并将其写入集成的flash中。
-
The SoC ROM has a bootloader that has capabilities to communicate with a host PC over RS232 or USB, and can perform as the client side of a proprietary utility program. On the host PC you would run the server side of this utility program. This scheme would allow transferring files and reading & writing the target's memories. Atmel's SAM-BA utility fits into this category.
SoC ROM有一个引导装载器,它可以通过RS232或USB与主机通信,并且可以作为一个专有实用程序的客户端执行。在主机PC上,您将运行该实用程序的服务器端。这个方案将允许传输文件和阅读和写入目标的记忆。Atmel的SAM-BA实用工具属于这一类。
-
Use an open-source utility, such as U-Boot, that is configurable and extensible to support the external NAND flash and any other memory types on your board, and also has file transfer capabilities. The console for U-Boot is typically a UART/USART serial port, but can be configured to use a USB-to-RS232 adapter.
使用一个开源工具,比如U-Boot,它是可配置和可扩展的,可以支持外部的NAND闪存和任何其他的内存类型,并且还有文件传输功能。U-Boot的控制台通常是UART/USART串行端口,但可以配置为使用usbto - rs232适配器。
In the case of using a program like U-Boot to install programs in NAND, a chicken versus egg situation arises: how to get this program loaded in the first place? The two common approaches are:
在使用像U-Boot这样的程序在NAND中安装程序的情况下,一个鸡与鸡蛋的情况出现了:如何首先加载这个程序?这两种常见的方法是:
a. Install the utility (i.e. U-Boot) on a SDcard with any required bootloader, and then boot the SoC from the SDcard. This assumes that the SoC has this booting capability, but this scheme requires the least operator skill.
a.在SDcard上安装任何需要的引导加载程序(即U-Boot),然后从SDcard启动SoC。这假设SoC有这个引导能力,但是这个方案需要最少的操作技巧。
b. Load the utility (i.e. U-Boot) using JTAG, such as Segger J-Link, which will allow you to transfer the image file to RAM (assuming that RAM has been properly initialized if necessary) and then start its execution. The J-Link can be interfaced using its own JLINK program or GDB.
b.使用JTAG(例如Segger J-Link)加载实用程序(即U-Boot),它允许您将映像文件传输到RAM(假设RAM在必要时已被正确初始化),然后开始执行。J-Link可以使用它自己的JLINK程序或GDB接口。
Once U-Boot is resident and executing, you have all of its capabilities available. U-Boot cannot write itself to NAND flash, so you have to load another copy of U-Boot in order to write it to NAND (or any other type of) flash.
一旦U-Boot驻留并执行,您就拥有了它的所有功能。U-Boot不能将自己写入NAND闪存,所以你必须加载另一个U-Boot副本,以便将其写入NAND(或任何其他类型的)flash中。
#2
0
If you load something using GDB, then it must be loaded in RAM.. Using gdb you will run that binary (u-boot), and the binary will give you the u-boot prompt, which you use to burn another image (it can be u-boot.img (configured for running from FLASH), linux kernel image, or any other image) into the flash (it can be NOR or NAND)..
如果您使用GDB加载某个东西,那么它必须在RAM中加载。使用gdb,你将运行那个二进制文件(u-boot),而二进制文件将给你u-boot提示符,你可以使用它来燃烧另一个图像(它可以是u-boot)。img(配置为从FLASH中运行)、linux内核映像或任何其他图像)到FLASH中(它可以是NOR或NAND)。