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

📄 index.html

📁 针对德州仪器DM270开发板的bootloader,其实现了内核的下载以及文件系统的下载
💻 HTML
📖 第 1 页 / 共 5 页
字号:
   SDRAM over to flash. Alternatively, the "copy"   command as issued from the bootloader's command   line UI can be used to store content into flash.   In upcoming discussions, we'll refer to this as   the "ram based" case.  ..or..<LI>2...by performing a kernel or filesystem download via an   I/O port where the incoming image indicates load   addresses that are in the flash memory map area of   the system. For example, a kernel built to execute   in place (XIP) within the flash would be linked to   load at an address within the flash portion of the   memory map and hence an rrload download of that   image would route the file directly to flash.   We'll consider this a "flash based" image.</UL>In the "ram based" case the user can remain unaware ofthe flash addresses used to store a kernel andfilesystem.  The bootloader takes care of tagging thestored component with enough information to allow theuser to later pull this component back out of flash andinto its original SDRAM location prior to use. Forexample, the following steps will load in a ram basedimage and store it to flash:<pre>  rrload> copy -c kernel -s ether -d ram -f rrbin  rrload> eraseflash kernel  rrload> copy -c kernel -s ram -d flash -f na</pre>If the current SDRAM contents are lost (e.g. by a powercycle) the user can retrieve the kernel from flash andboot it with the following commands:<pre>  rrload> copy -c kernel -s flash -d ram -f na; boot</pre>Notice that at no time did the user need to be aware ofthe specific addresses used for storing the componentin either flash or SDRAM. This is true of all fourcomponent types.  Of course there's always got to bean exception, and in this case it is revealed duringthe "flash based" image case discussed next.<A NAME="xip"><h1>XIP Images are a Special Case</h1></A>As we mentioned earlier, the "flash based" case isunique in that an image is written directly to flash asa result of downloading a kernel or filesystem via anI/O port. This occurs when the image contains loadaddresses that fall within the flash area of thesystem's memory map. Those address were assigned at thetime the image was produced by a linker and thenprepared by mkimage into an rrbin image. This falls inthe realm of advanced usage and requires some specialattention as mistakes in this area can corrupt theboard's flash content to the point of not permitting aboot. In this case, the user would be forced to installa new copy of rrload using the JTAG connector. Thecritical area pertains to the selection of load addressassigned to the image. A user is not free to locatethe image any where he/she chooses since areas of theflash have already been set aside for the bootloader'suse. These areas are reserved. Instead the user islimited to a sub-range within the flash for placingXIP kernel images and another specific sub-range forplacing XIP filesystem images. Loads performed tothese specific ranges are managed by rrload by wayof tagging the loaded image with the normal recordkeeping info normally associated with kernels andfilesystems stored to flash -- just as when storingcomponents in the normal manner (copy from SDRAM toflash). This record keeping info is stored automaticallyby rrload during the download and contains enoughinformation that rrload knows this component is anXIP one. For example, the following command wouldnot result in a copy to SDRAM since rrload can seethat the stored kernel did not originate from SDRAMand instead was an XIP loaded one. The requested copyis ignored and the kernel is simply booted in place.<pre>  rrload> copy -c k -s f -d r -f na; boot</pre>The steps for performing an XIP download are prettystraight forward but it must be emphasized that itassumes the user had taken care to build the load imagewith a valid load address. If you send an image to thewrong area of flash you are most certainly corruptingdata reserved for the bootloader's use. As always, weerase the component's flash area first before placingnew content there. Here are the steps:<pre>  rrload> eraseflash -c kernel  rrload> copy -c k -s e -d r -f rrbin  rrload> eraseflash -c filesys  rrload> copy -c f -s e -d r -f rrbin</pre>Note: You may have expected the -d field to be "-dflash" instead of "-d ram"; it turns out that eitherone will work.<p>Important! These steps will only be successful if youbuild the XIP kernel and XIP filesystem so as to befully contained within the following special flashaddress ranges:<pre>  --C547x EVM--  XIP kernel:  Flash range 0x00040020 to 0x0011ffff (inclusive)  XIP Filesys: Flash range 0x00120020 to 0x003fffff (inclusive)  --DSC21 EVM--  XIP kernel:  Flash range 0x02020020 to 0x020bffff (inclusive)  XIP Filesys: Flash range 0x020C0020 to 0x021fffff (inclusive)  --DSC24 EVM--  XIP kernel:  Flash range 0x02020020 to 0x020bffff (inclusive)  XIP Filesys: Flash range 0x020C0020 to 0x021fffff (inclusive)  --OMAP1510 EVM (F160 Chips) --  XIP kernel:  Flash range 0x00020020 to 0x0021ffff (inclusive)  XIP Filesys: Flash range 0x00220020 to 0x0081ffff (inclusive)  --OMAP1510 EVM (F128 Chips) --  XIP kernel:  Flash range 0x00040020 to 0x0023ffff (inclusive)  XIP Filesys: Flash range 0x00240020 to 0x0083ffff (inclusive)  --OMAP710 EVM (F160 Chips) --  XIP kernel:  Flash range 0x00020020 to 0x0021ffff (inclusive)  XIP Filesys: Flash range 0x00220020 to 0x0081ffff (inclusive)  --OMAP710 EVM (F128 Chips) --  XIP kernel:  Flash range 0x00040020 to 0x0023ffff (inclusive)  XIP Filesys: Flash range 0x00240020 to 0x0083ffff (inclusive)  --TI925 EVM (F160 Chips)--  XIP kernel:  Flash range 0x00020020 to 0x000bffff (inclusive)  XIP Filesys: Flash range 0x000C0020 to 0x001fffff (inclusive)  --TI925 EVM (F128 Chips)--  XIP kernel:  Flash range 0x00040020 to 0x000dffff (inclusive)  XIP Filesys: Flash range 0x000e0020 to 0x001fffff (inclusive)</pre><p><hr WIDTH="100%"><A NAME="serialloads"><h1>A Special Note About Serial Downloads</h1></A>Note: Recall that the serial port is used by rrload forUI interaction and serves double duty when also usedduring an image download to the target platform.  Takethe following command for example:<pre>  rrload> copy -c kernel -s serial -d ram -f srec</pre>This command is issued to rrload by using a terminalsession running on a remote host connected over aserial port. Yet the command itself is requesting afile transfer over that same serial line. Doesn't theUI occurring over the serial line conflict with a filetransfer over the same line? No it doesn't. When usingthe UI to request a file download rrload drops into amode where it stops using the serial channel foranything except bringing in the file image. Only whenrrload has brought in the final byte will rrload againstart using the serial line for UI operations. Now itis also true that when rrload drops into "load" modethat the user must insure that only file image bytesnow be transfered over the serial line since any bytesreceived by the target device will be interpreted asfile bytes.  This is something the user will need to beaware of.  In the case of using `minicom` as a terminalwindow we find that we can issue the "copy" command andthen, without typing anything else in that terminalsession, go to a shell window and type:<pre>  $ cat linux.rr > /dev/ttyS0</pre>This streams the file to rrload. When rrload completesthe file transfer the user can move the cursor backover to the minicom window and resume interacting withthe rrload UI.<p><hr WIDTH="100%"><A NAME="etherloads"><h1>A Special Note About Ethernet Downloads</h1></A>If you are planning to use the ethernet port for yourdownloads then you will have to use the UI to establishparams settings that allow the internal TFTP logic towork with your remote server. Option 3 from the mainmenu will show a list of current user settings. Theseare the same settings that can viewed from command linemode by issuing the "set" command. Here are someexample settings:<pre>  ui mode [cmd|menu]  : menu  default boot cmd    : boot_auto  I/O load format     : rrbin  I/O load port       : ether  Server IP    (tftp) : 192.168.1.15  Server MAC   (tftp) : 55:3:00:c0:00:F0  Device IP    (tftp) : 192.168.1.50  Device MAC   (tftp) : 11:22:33:EA:cc:00  Kernel Path  (tftp) : linux.rr  FileSys Path (tftp) : romdisk.img.rr  Kernel cmdline      :</pre>Note: Since the network stack implemented within thebootloader does not yet support the Address ResolutionProtocol (ARP) it will be necessary to manually informthe remote server of your device IP/MAC mapping. Theserver would normally be able to use ARP at runtime tolearn this mapping. Until then, do this sort of commandon your server (may need to be root user):<pre>  $ arp -s 192.168.1.29 00:e0:81:10:36:cf</pre>Notice here that we are manually loading the server'sinternal ARP cache with the IP and MAC of our EVMdevice. It is also important that you have your systemadmisistrator enable TFTP on your remote server sincethis is often times disabled for security reasons. Onefinal note, as the example goes above, rrload willexpect to find a kernel file by the name of linux.rrwhich should be located on the remote server in thedefault TFTP directory of that machine -- in my casethat was /home/skranz.<p><hr WIDTH="100%"><A NAME="kernelargs"><h1>A Special Note About Passing A Command Line and Ethernet MAC to the Kernel</h1></A>The DSPlinux bootloader has the ability to pass a usersupplied Kernel Command Line string to the DSPLinuxkernel as control is being transferred to it. Once thekernel boot process is under way, special logic in theDSPLinux kernel picks up the Command Line previouslydeposited by rrload and replaces whatever originaldefault kernel command line was embedded within thekernel. The command line is then parsed in the normalway during the remaining steps of the kernel bootprocess.  To implement this, a special SDRAM memorylocation is agreed upon in advance which rrload and thekernel are both built to know about. Again, this allowsthe bootloader to deposit a command line string at thatspecific SDRAM memory location and when the DSPLinuxkernel is booted that string will be picked up at thesame location as in the manner just described.<p>Note: A NULL terminated magic pattern string equal to"kcmdline-->" actually proceeds the real kernel commandline string (if any) to let the kernel know that avalid string really exists (even if just a NULLstring). If the pattern is found then the kernel canassume that the command line string will immediatelyfollow the magic string. Both the magic string and thecommand line string (if they exist) butt up againsteach other, and again, are both null terminatedstrings. If the pattern is not found then the kernelwill assume that it had been invoked by some othermeans than the rrload bootloader and will avoidattempting to pick up an incoming command linestring. There's probably nothing valid there anyways.<p>In like manner, the Device MAC rrload param configuredby the user is also deposited in a special ram locationso that the Kernel can retrieve it and make use of itin ways necessary for Kernel ethernet initialization.This NULL terminated ethernet MAC string(e.g. "00:11:22:33:44:55") is deposited in the samemanner as described for the Kernel Command Line withthe NULL terminated magic pattern "etherMAC-->"immediately proceeding it. When the kernel boots itcan use these deposited strings in ways it sees fit.<p>Although a user wouldn't normally need to know theexact ram addresses used for depositing the KernelCommand Line and Device MAC, it may help those tryingto debug kernel boot issues. The specific ram addressesused for the kernel's incoming Command Line string andether MAC are:<pre>  Note: the quote ("..") characters are shown here for        clarity only and the NULL label represents the        byte value zero that terminates each string.  --C547x EVM--  Start Addr | Comment  -----------+--------------------------------------------  0xffc00020 | "kcmdline-->"NULL"Command Line string"NULL  0xffc00100 | "etherMAC-->"NULL"00:11:22:33:44:55"NULL  --DSC21 EVM--  Start Addr | Comment  -----------+--------------------------------------------  0x08000000 | "kcmdline-->"NULL"Command Line string"NULL  0x080000E0 | "etherMAC-->"NULL"00:11:22:33:44:55"NULL  --DSC24 EVM--  Start Addr | Comment  -----------+--------------------------------------------  0x00900000 | "kcmdline-->"NULL"Command Line string"NULL  0x009000E0 | "etherMAC-->"NULL"00:11:22:33:44:55"NULL  --OMAP1510 EVM--  Start Addr | Comment  -----------+--------------------------------------------  0x10000100 | "kcmdline-->"NULL"Command Line string"NULL  0x100001E0 | "etherMAC-->"NULL"00:11:22:33:44:55"NULL  --TI925 EVM--  Start Addr | Comment  -----------+--------------------------------------------  0x05e00000 | "kcmdline-->"NULL"Command Line string"NULL  0x05e000E0 | "etherMAC-->"NULL"00:11:22:33:44:55"NULL</pre>Note: The bootloader will manage these addresses foryou according to the settings you have established forthe <code>kcmdline</code> parameter and <code>devmac</code>parameter.  These parameters are settable using therrload menu mode interface (option 3 from main menu) orthe command line mode. An example follows:<pre>   rrload> set kcmdline root=/dev/rom0   rrload> set devmac 00:11:22:33:44:55</pre><p><hr WIDTH="100%"><A NAME="buiding"><h1>Building the rrload bootloader</h1></A>

⌨️ 快捷键说明

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