web-legacy/milkymist-wiki/wiki/index.php?title=Flashing_the_Milkymist_One.html

402 lines
31 KiB
HTML
Raw Normal View History

2014-09-19 12:52:20 +08:00
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta http-equiv="Content-Style-Type" content="text/css" />
<meta name="generator" content="MediaWiki 1.14.0" />
<meta name="keywords" content="Flashing the Milkymist One,Wallpaper" />
<link rel="alternate" type="application/x-wiki" title="Edit" href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit" />
<link rel="edit" title="Edit" href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit" />
<link rel="shortcut icon" href="../favicon.ico" />
<link rel="search" type="application/opensearchdescription+xml" href="opensearch_desc.php" title="Milkymist Wiki (en)" />
<link title="Creative Commons" type="application/rdf+xml" href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=creativecommons" rel="meta" />
<link rel="copyright" href="http://www.milkymist.org/wiki/index.php?title=Copyright" />
<link rel="alternate" type="application/rss+xml" title="Milkymist Wiki RSS Feed" href="http://milkymist.org/wiki/index.php?title=Special:RecentChanges&amp;feed=rss" />
<link rel="alternate" type="application/atom+xml" title="Milkymist Wiki Atom Feed" href="http://milkymist.org/wiki/index.php?title=Special:RecentChanges&amp;feed=atom" />
<title>Flashing the Milkymist One - Milkymist Wiki</title>
<link rel="stylesheet" href="skins/common/shared.css%3F195.css" type="text/css" media="screen" />
<link rel="stylesheet" href="skins/common/commonPrint.css%3F195.css" type="text/css" media="print" />
<link rel="stylesheet" href="skins/monobook/main.css%3F195.css" type="text/css" media="screen" />
<!--[if lt IE 5.5000]><link rel="stylesheet" href="/wiki/skins/monobook/IE50Fixes.css?195" type="text/css" media="screen" /><![endif]-->
<!--[if IE 5.5000]><link rel="stylesheet" href="/wiki/skins/monobook/IE55Fixes.css?195" type="text/css" media="screen" /><![endif]-->
<!--[if IE 6]><link rel="stylesheet" href="/wiki/skins/monobook/IE60Fixes.css?195" type="text/css" media="screen" /><![endif]-->
<!--[if IE 7]><link rel="stylesheet" href="/wiki/skins/monobook/IE70Fixes.css?195" type="text/css" media="screen" /><![endif]-->
<link rel="stylesheet" href="http://milkymist.org/wiki/index.php?title=MediaWiki:Common.css&amp;usemsgcache=yes&amp;ctype=text%2Fcss&amp;smaxage=18000&amp;action=raw&amp;maxage=18000" type="text/css" />
<link rel="stylesheet" href="http://milkymist.org/wiki/index.php?title=MediaWiki:Print.css&amp;usemsgcache=yes&amp;ctype=text%2Fcss&amp;smaxage=18000&amp;action=raw&amp;maxage=18000" type="text/css" media="print" />
<link rel="stylesheet" href="http://milkymist.org/wiki/index.php?title=MediaWiki:Monobook.css&amp;usemsgcache=yes&amp;ctype=text%2Fcss&amp;smaxage=18000&amp;action=raw&amp;maxage=18000" type="text/css" />
<link rel="stylesheet" href="http://milkymist.org/wiki/index.php?title=-&amp;action=raw&amp;maxage=18000&amp;gen=css" type="text/css" />
<!--[if lt IE 7]><script type="text/javascript" src="/wiki/skins/common/IEFixes.js?195"></script>
<meta http-equiv="imagetoolbar" content="no" /><![endif]-->
<script type= "text/javascript">/*<![CDATA[*/
var skin = "monobook";
var stylepath = "/wiki/skins";
var wgArticlePath = "/wiki/index.php?title=$1";
var wgScriptPath = "/wiki";
var wgScript = "/wiki/index.php";
var wgVariantArticlePath = false;
var wgActionPaths = {};
var wgServer = "http://milkymist.org";
var wgCanonicalNamespace = "";
var wgCanonicalSpecialPageName = false;
var wgNamespaceNumber = 0;
var wgPageName = "Flashing_the_Milkymist_One";
var wgTitle = "Flashing the Milkymist One";
var wgAction = "view";
var wgArticleId = "81";
var wgIsArticle = true;
var wgUserName = null;
var wgUserGroups = null;
var wgUserLanguage = "en";
var wgContentLanguage = "en";
var wgBreakFrames = false;
var wgCurRevisionId = "1834";
var wgVersion = "1.14.0";
var wgEnableAPI = true;
var wgEnableWriteAPI = true;
var wgSeparatorTransformTable = ["", ""];
var wgDigitTransformTable = ["", ""];
var wgRestrictionEdit = [];
var wgRestrictionMove = [];
/*]]>*/</script>
<script type="text/javascript" src="skins/common/wikibits.js%3F195"><!-- wikibits js --></script>
<!-- Head Scripts -->
<script type="text/javascript" src="skins/common/ajax.js%3F195"></script>
<script type="text/javascript" src="http://milkymist.org/wiki/index.php?title=-&amp;action=raw&amp;gen=js&amp;useskin=monobook"><!-- site js --></script>
</head>
<body class="mediawiki ltr ns-0 ns-subject page-Flashing_the_Milkymist_One skin-monobook">
<div id="globalWrapper">
<div id="column-content">
<div id="content">
<a name="top" id="top"></a>
<h1 id="firstHeading" class="firstHeading">Flashing the Milkymist One</h1>
<div id="bodyContent">
<h3 id="siteSub">From Milkymist Wiki</h3>
<div id="contentSub"></div>
<div id="jump-to-nav">Jump to: <a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#column-one">navigation</a>, <a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#searchInput">search</a></div> <!-- start content -->
<table cellspacing="0" cellpadding="0" style="clear: right; margin-bottom: .5em; float: right; padding: .5em 0 .8em 1.4em; background: none; width: auto;">
<tr>
<td> <table id="toc" class="toc" summary="Contents"><tr><td><div id="toctitle"><h2>Contents</h2></div>
<ul>
<li class="toclevel-1"><a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#Web_update_.28recommended.29"><span class="tocnumber">1</span> <span class="toctext">Web update (recommended)</span></a></li>
<li class="toclevel-1"><a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#Automated_JTAG_method_.28for_developers.29"><span class="tocnumber">2</span> <span class="toctext">Automated JTAG method (for developers)</span></a>
<ul>
<li class="toclevel-2"><a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#Reflash_all"><span class="tocnumber">2.1</span> <span class="toctext">Reflash all</span></a></li>
<li class="toclevel-2"><a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#Flash_BIOS_with_mac_address"><span class="tocnumber">2.2</span> <span class="toctext">Flash BIOS with mac address</span></a></li>
</ul>
</li>
<li class="toclevel-1"><a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#Full_JTAG_reflash_.28for_developers_or_badly_bricked_boards.29"><span class="tocnumber">3</span> <span class="toctext">Full JTAG reflash (for developers or badly bricked boards)</span></a>
<ul>
<li class="toclevel-2"><a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#Flash_Memory_Distribution"><span class="tocnumber">3.1</span> <span class="toctext">Flash Memory Distribution</span></a></li>
<li class="toclevel-2"><a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#Using_UrJTAG"><span class="tocnumber">3.2</span> <span class="toctext">Using UrJTAG</span></a>
<ul>
<li class="toclevel-3"><a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#pre-compile_images"><span class="tocnumber">3.2.1</span> <span class="toctext">pre-compile images</span></a></li>
<li class="toclevel-3"><a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#compile_urjtag"><span class="tocnumber">3.2.2</span> <span class="toctext">compile urjtag</span></a></li>
<li class="toclevel-3"><a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#download_fjmem"><span class="tocnumber">3.2.3</span> <span class="toctext">download fjmem</span></a></li>
<li class="toclevel-3"><a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#flash_system"><span class="tocnumber">3.2.4</span> <span class="toctext">flash system</span></a></li>
<li class="toclevel-3"><a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#flash_data_partition"><span class="tocnumber">3.2.5</span> <span class="toctext">flash data partition</span></a></li>
<li class="toclevel-3"><a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#info"><span class="tocnumber">3.2.6</span> <span class="toctext">info</span></a></li>
</ul>
</li>
<li class="toclevel-2"><a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#Using_the_Xilinx_tools"><span class="tocnumber">3.3</span> <span class="toctext">Using the Xilinx tools</span></a>
<ul>
<li class="toclevel-3"><a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html#Impact_batch_commands"><span class="tocnumber">3.3.1</span> <span class="toctext">Impact batch commands</span></a></li>
</ul>
</li>
</ul>
</li>
</ul>
</td></tr></table><script type="text/javascript"> if (window.showTocToggle) { var tocShowText = "show"; var tocHideText = "hide"; showTocToggle(); } </script>
</td></tr></table>
<p>There are several ways to flash your Milkymist One. Our goal is to make it as easy as possible.
</p>
<a name="Web_update_.28recommended.29" id="Web_update_.28recommended.29"></a><h1><span class="editsection">[<a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit&amp;section=1" title="Edit section: Web update (recommended)">edit</a>]</span> <span class="mw-headline"> Web update (recommended) </span></h1>
<p><b>This is the preferred method for all users.</b>
</p>
<ul><li> Connect the M1 to the internet. DHCP is default, for manual network setup open the "System Settings" dialog.
</li><li> Click "Web Update" in the control panel.
<ul><li> Update from web
<dl><dd>In "Update" window, click on "Update from Web"
</dd></dl>
</li><li> Update from files
<ul><li> Download flickernoise.fbi, bios.bin and soc.fpg from <a href="http://www.milkymist.org/updates/current" class="external free" title="http://www.milkymist.org/updates/current" rel="nofollow">http://www.milkymist.org/updates/current</a>
</li><li> cd to the downlaoded files location
</li><li> Transfer files from local machine to M1 via FTP
<dl><dd> On local machine:
</dd><dd> $ ftp M1_IP_Address
</dd><dd> When prompt enter login name and password
</dd><dd> ftp&gt; cd ssd
</dd><dd> ftp&gt; put flickernoise.fbi
</dd><dd> ftp&gt; put bios.bin
</dd><dd> ftp&gt; put soc.fpg
</dd></dl>
</li><li> Click "Update from files"
</li><li> In "Update from files" window, browse to each file then click on "Flash" button.
</li></ul>
</li></ul>
</li></ul>
<a name="Automated_JTAG_method_.28for_developers.29" id="Automated_JTAG_method_.28for_developers.29"></a><h1><span class="editsection">[<a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit&amp;section=2" title="Edit section: Automated JTAG method (for developers)">edit</a>]</span> <span class="mw-headline"> Automated JTAG method (for developers) </span></h1>
<p>this method needs recently <a href="http://www.milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One#compile_urjtag" class="external text" title="http://www.milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One#compile_urjtag" rel="nofollow">UrJtag</a> installed in your system, first connect your computer to <a href="http://en.qi-hardware.com/wiki/Milkymist_JTAG-serial_daughterboard" class="external text" title="http://en.qi-hardware.com/wiki/Milkymist_JTAG-serial_daughterboard" rel="nofollow">Jtag-serial-daughterboard</a>.
</p>
<a name="Reflash_all" id="Reflash_all"></a><h2><span class="editsection">[<a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit&amp;section=3" title="Edit section: Reflash all">edit</a>]</span> <span class="mw-headline"> Reflash all </span></h2>
<pre> $ wget <a href="https://raw.github.com/milkymist/scripts/master/scripts/reflash_m1.sh" class="external free" title="https://raw.github.com/milkymist/scripts/master/scripts/reflash_m1.sh" rel="nofollow">https://raw.github.com/milkymist/scripts/master/scripts/reflash_m1.sh</a>
$ chmod +x reflash_m1.sh
$ sudo ./reflash_m1.sh --qi
</pre>
<a name="Flash_BIOS_with_mac_address" id="Flash_BIOS_with_mac_address"></a><h2><span class="editsection">[<a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit&amp;section=4" title="Edit section: Flash BIOS with mac address">edit</a>]</span> <span class="mw-headline"> Flash BIOS with mac address </span></h2>
<pre> $ sudo ./reflash_m1.sh --bios-mac <b>00</b> <b>17</b> # $1 $2 is the last two mac address with Hexadecimal
</pre>
<a name="Full_JTAG_reflash_.28for_developers_or_badly_bricked_boards.29" id="Full_JTAG_reflash_.28for_developers_or_badly_bricked_boards.29"></a><h1><span class="editsection">[<a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit&amp;section=5" title="Edit section: Full JTAG reflash (for developers or badly bricked boards)">edit</a>]</span> <span class="mw-headline"> Full JTAG reflash (for developers or badly bricked boards) </span></h1>
<a name="Flash_Memory_Distribution" id="Flash_Memory_Distribution"></a><h2><span class="editsection">[<a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit&amp;section=6" title="Edit section: Flash Memory Distribution">edit</a>]</span> <span class="mw-headline"> Flash Memory Distribution </span></h2>
<p>You should be aware of this assignment before try write/erase the flash:
</p>
<pre>STANDBY BITSTREAM (0x00000000) /* 640k */
RESCUE BITSTREAM (0x000A0000) /* 1536k */
RESCUE BIOS (0x00220000) /* 128k */
MAC ADDRESS (0x002200E0) /* <a href="https://github.com/lekernel/milkymist/blob/master/software/bios/crt0.S#L70" class="external text" title="https://github.com/lekernel/milkymist/blob/master/software/bios/crt0.S#L70" rel="nofollow">MAC</a> within rescue BIOS */
RESCUE SPLASH (0x00240000) /* 640k */
RESCUE APP (0x002E0000) /* 4096k */
REGULAR BITSTREAM (0x006E0000) /* 1536k */
REGULAR BIOS (0x00860000) /* 128k */
REGULAR SPLASH (0x00880000) /* 640k */
REGULAR APP (0x00920000) /* remaining space (23424k) */
</pre>
<p>(from flash.h)
</p>
<hr />
<pre>#define FLASH_SECTOR_SIZE (128*1024)
#define FLASH_PARTITION_COUNT (5)
#define FLASH_PARTITIONS { \
{ .start_address = 0x806E0000, .length = 0x0180000 }, \ <b>Regular BitStream</b>
{ .start_address = 0x80860000, .length = 0x0020000 }, \ <b>Regular BIOS</b>
{ .start_address = 0x80880000, .length = 0x00A0000 }, \ <b>Regular Splash</b>
{ .start_address = 0x80920000, .length = 0x0400000 }, \ <b>Regular APP(Flickernoise)</b>
{ .start_address = 0x80D20000, .length = 0x12E0000 }, \ <b>Data partition</b>
}
</pre>
<p>from c/libbsp/lm32/milkymist/include/system_conf.h
</p>
<a name="Using_UrJTAG" id="Using_UrJTAG"></a><h2><span class="editsection">[<a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit&amp;section=7" title="Edit section: Using UrJTAG">edit</a>]</span> <span class="mw-headline"> Using <a href="http://urjtag.git.sourceforge.net/git/gitweb.cgi?p=urjtag/urjtag;a=summary" class="external text" title="http://urjtag.git.sourceforge.net/git/gitweb.cgi?p=urjtag/urjtag;a=summary" rel="nofollow">UrJTAG</a> </span></h2>
<p>This method uses just Free Software and the jtag-serial pod that came with your M1, This is the preferred procedure: works with the Milkymist JTAG pod, faster, and no heavy proprietary software.
</p>
<a name="pre-compile_images" id="pre-compile_images"></a><h3><span class="editsection">[<a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit&amp;section=8" title="Edit section: pre-compile images">edit</a>]</span> <span class="mw-headline">pre-compile images</span></h3>
<ol><li> <b>Try re-using files from <a href="../updates/index.html" class="external free" title="http://milkymist.org/updates/" rel="nofollow">http://milkymist.org/updates/</a> for flashing your board</b>
</li><li> <b>Develop Snapshots <a href="http://fidelio.qi-hardware.com/~xiangfu/build-milkymist/" class="external free" title="http://fidelio.qi-hardware.com/~xiangfu/build-milkymist/" rel="nofollow">http://fidelio.qi-hardware.com/~xiangfu/build-milkymist/</a></b>
</li></ol>
<a name="compile_urjtag" id="compile_urjtag"></a><h3><span class="editsection">[<a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit&amp;section=9" title="Edit section: compile urjtag">edit</a>]</span> <span class="mw-headline">compile urjtag</span></h3>
<p>you may need install those libs in debian
</p>
<pre>$ <b>sudo apt-get install libftdi-dev libusb-1.0-0-dev bison flex python-dev dh-autoreconf</b>
$ <b>git clone git://urjtag.git.sourceforge.net/gitroot/urjtag/urjtag</b>
$ <b>cd urjtag/urjtag</b>
$ <b>./autogen.sh --with-libusb --with-libftdi --without-ftd2xx --disable-svf --disable-bsdl</b>
</pre>
<pre>......
jtag is now configured for
<b>Detected libusb &nbsp;: 1.0</b>
<b>Detected libftdi &nbsp;: yes (no async mode)</b>
Detected libftd2xx &nbsp;: no
Detected inpout32 &nbsp;: no
Build SVF player &nbsp;: no
Build BSDL subsystem&nbsp;: no
Bus drivers &nbsp;: arm9tdmi au1500 avr32 bcm1250 blackfin bscoach ejtag ejtag_dma fjmem ixp425 ixp435 ixp465 jopcyc h7202 lh7a400 mpc5200 mpc824x mpc837x ppc405ep
ppc440gx_ebc8 prototype pxa2x0 pxa27x s3c4510 sa1110 sh7727 sh7750r sh7751r sharc_21065L sharc_21369_ezkit slsup3 tx4925 zefant_xs3
Cable drivers &nbsp;: arcom byteblaster dlc5 ea253 ei012 ft2232 gpio ice100 igloo jlink keithkoep lattice mpcbdm triton usbblaster vsllink wiggler xpc
Lowlevel drivers &nbsp;: direct ftdi ppdev
</pre>
<pre>$ <b>make &amp;&amp; sudo make install</b>
</pre>
<p>if you hit the error below during install:
</p>
<pre><b>make[1]: Entering directory '/home/user/urjtag/urjtag/po'</b>
<b>/bin/sh @MKINSTALLDIRS@ /usr/local/share</b>
<b>/bin/sh: Can't open @MKINSTALLDIRS@</b>
<b>make[1]: *** [install-data-yes] Error 127</b>
</pre>
<p>then run
</p>
<pre>$ <b>echo install: &gt; po/Makefile</b>
</pre>
<p>then run command 'make sudo install' again
</p>
<pre>$ <b>ldconfig</b> #make jtag find the liburjtag.so.0
$ <b>sudo ldconfig</b> #you may also needs this for update root ldconfig
</pre>
<ul><li> lockflash/unlockflash commands
</li></ul>
<pre>apply those two <a href="http://sourceforge.net/mailarchive/forum.php?thread_name=1313377534-23614-2-git-send-email-xiangfu%40openmobilefree.net&amp;forum_name=urjtag-development" class="external text" title="http://sourceforge.net/mailarchive/forum.php?thread_name=1313377534-23614-2-git-send-email-xiangfu%40openmobilefree.net&amp;forum_name=urjtag-development" rel="nofollow">patches</a> for get lockflash/unlockflash commands, usage just like "eraseflash", those patches is base on <a href="https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1979" class="external text" title="https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@1979" rel="nofollow">r1979</a>
</pre>
<a name="download_fjmem" id="download_fjmem"></a><h3><span class="editsection">[<a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit&amp;section=10" title="Edit section: download fjmem">edit</a>]</span> <span class="mw-headline">download fjmem</span></h3>
<p>Get the <a href="http://git.serverraum.org/?p=mw/fjmem-mm1.git;a=summary" class="external text" title="http://git.serverraum.org/?p=mw/fjmem-mm1.git;a=summary" rel="nofollow">FJMEM</a> core for Milkymist and synthesize it (you'll need ISE Webpack)
Alternatively, a pre-synthesized bitstream is available <a href="../updates/fjmem.bit.bz2" class="external text" title="http://milkymist.org/updates/fjmem.bit.bz2" rel="nofollow">fjmem.bit.bz2</a>
</p>
<a name="flash_system" id="flash_system"></a><h3><span class="editsection">[<a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit&amp;section=11" title="Edit section: flash system">edit</a>]</span> <span class="mw-headline">flash system</span></h3>
<ul><li> save these commands to a batchfile, see <a href="http://lists.milkymist.org/pipermail/devel-milkymist.org/2011-March/001348.html" class="external text" title="http://lists.milkymist.org/pipermail/devel-milkymist.org/2011-March/001348.html" rel="nofollow">here</a> for more.
</li></ul>
<pre>cable milkymist
detect
instruction CFG_OUT 000100 BYPASS
instruction CFG_IN 000101 BYPASS
pld load fjmem.bit # LED D2 flashs
initbus fjmem opcode=000010 # Tells UrJTAG that a FJMEM core is present and how to address it.
frequency 6000000
detectflash 0
endian big
flashmem 0 standby.fpg noverify # during flash, D3 flashs
flashmem 0x6E0000 soc.fpg noverify
flashmem 0x860000 bios.bin noverify
flashmem 0x220000 bios-rescue.bin noverify
flashmem 0x880000 splash.raw noverify
flashmem 0x920000 flickernoise.fbi noverify
</pre>
<ul><li> run UrJTAG
</li></ul>
<pre>$ <b>jtag batchfile</b>
</pre>
<ul><li> Power cycle the board. It should boot!
</li></ul>
<a name="flash_data_partition" id="flash_data_partition"></a><h3><span class="editsection">[<a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit&amp;section=12" title="Edit section: flash data partition">edit</a>]</span> <span class="mw-headline">flash data partition</span></h3>
<ul><li> download <b>data.flash5.bin</b>, this file include <a href="https://github.com/lekernel/flickernoise/tree/master/patches" class="external text" title="https://github.com/lekernel/flickernoise/tree/master/patches" rel="nofollow">patches</a> and one <a href="index.php%3Ftitle=Wallpaper.html" title="Wallpaper">wallpaper</a>.
</li></ul>
<pre>$ <b>wget <a href="http://fidelio.qi-hardware.com/~xiangfu/build-milkymist/milkymist-firmware-07062011-0000/data.flash5.bin" class="external free" title="http://fidelio.qi-hardware.com/~xiangfu/build-milkymist/milkymist-firmware-07062011-0000/data.flash5.bin" rel="nofollow">http://fidelio.qi-hardware.com/~xiangfu/build-milkymist/milkymist-firmware-07062011-0000/data.flash5.bin</a></b>
</pre>
<ul><li>this step will <b>DELETE</b> all files under <b>/flash</b>, backup first. then save those command to a patch file named flash.data
</li></ul>
<pre>$ <b>more flash.data</b>
cable milkymist
detect
instruction CFG_OUT 000100 BYPASS
instruction CFG_IN 000101 BYPASS
pld load fjmem.bit
initbus fjmem opcode=000010
frequency 6000000
detectflash 0
endian big
eraseflash 0xD20000 151
flashmem 0xD20000 data.flash5.bin noverify
</pre>
<ul><li>run UrJTAG
</li></ul>
<pre>$ <b>jtag flash.data</b>
</pre>
<a name="info" id="info"></a><h3><span class="editsection">[<a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit&amp;section=13" title="Edit section: info">edit</a>]</span> <span class="mw-headline">info</span></h3>
<ul><li> You can use "pld load" for loading customs bit-streams directly.
</li></ul>
<ul><li> Consider flashing <b>bios-rescue.bin</b> in case you need update/fix your <b>MAC Address</b> (set at <a href="https://github.com/lekernel/milkymist/blob/master/software/bios/crt0.S" class="external text" title="https://github.com/lekernel/milkymist/blob/master/software/bios/crt0.S" rel="nofollow">crt0.S</a>)
</li></ul>
<ul><li> If you get permission problems, this udev rule might be useful:
</li></ul>
<pre> SUBSYSTEM=="usb", ATTRS{idVendor}=="20b7", ATTRS{idProduct}=="0713", MODE="0666"
</pre>
<a name="Using_the_Xilinx_tools" id="Using_the_Xilinx_tools"></a><h2><span class="editsection">[<a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit&amp;section=14" title="Edit section: Using the Xilinx tools">edit</a>]</span> <span class="mw-headline"> Using the Xilinx tools </span></h2>
<p><b> Do you really want to do it this way?</b>
</p><p><b>This method uses both non-Free and Bloated Software plus an expensive Xilinx cable</b>
</p>
<ul><li> You need a JTAG cable supported by the Xilinx tools. The Milkymist JTAG pod is not compatible.
</li><li> Run impact -batch and enter the commands below. <b>Flashing takes several minutes.</b>
</li><li> Power cycle the board. It should boot!
</li></ul>
<a name="Impact_batch_commands" id="Impact_batch_commands"></a><h3><span class="editsection">[<a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit&amp;section=15" title="Edit section: Impact batch commands">edit</a>]</span> <span class="mw-headline"> Impact batch commands </span></h3>
<pre>setMode -bscan
setCable -p auto
identify -inferir
identifyMPM
attachflash -position 1 -bpi "28F256J3F"
assignfiletoattachedflash -position 1 -file "bitstream.mcs"
program -p 1 -dataWidth 16 -rs1 NONE -rs0 NONE -bpionly -e
(repeat the two lines above for every other .mcs file you need)
quit
</pre>
<!--
NewPP limit report
Preprocessor node count: 22/1000000
Post-expand include size: 164/2097152 bytes
Template argument size: 0/2097152 bytes
Expensive parser function count: 0/100
-->
<!-- Saved in parser cache with key sbsql1-mw_:pcache:idhash:81-0!1!0!!en!2 and timestamp 20140823124207 -->
<div class="printfooter">
Retrieved from "<a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html">http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One</a>"</div>
<!-- end content -->
<div class="visualClear"></div>
</div>
</div>
</div>
<div id="column-one">
<div id="p-cactions" class="portlet">
<h5>Views</h5>
<div class="pBody">
<ul>
<li id="ca-nstab-main" class="selected"><a href="index.php%3Ftitle=Flashing_the_Milkymist_One.html" title="View the content page [c]" accesskey="c">Page</a></li>
<li id="ca-talk" class="new"><a href="http://milkymist.org/wiki/index.php?title=Talk:Flashing_the_Milkymist_One&amp;action=edit&amp;redlink=1" title="Discussion about the content page [t]" accesskey="t">Discussion</a></li>
<li id="ca-edit"><a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=edit" title="You can edit this page.&#10;Please use the preview button before saving [e]" accesskey="e">Edit</a></li>
<li id="ca-history"><a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;action=history" title="Past versions of this page [h]" accesskey="h">History</a></li> </ul>
</div>
</div>
<div class="portlet" id="p-personal">
<h5>Personal tools</h5>
<div class="pBody">
<ul>
<li id="pt-login"><a href="http://milkymist.org/wiki/index.php?title=Special:UserLogin&amp;returnto=Flashing_the_Milkymist_One" title="You are encouraged to log in; however, it is not mandatory [o]" accesskey="o">Log in / create account</a></li>
</ul>
</div>
</div>
<div class="portlet" id="p-logo">
<a style="background-image: url(http://www.milkymist.org/wikilogo.png);" href="../wiki.html" title="Visit the main page [z]" accesskey="z"></a>
</div>
<script type="text/javascript"> if (window.isMSIE55) fixalpha(); </script>
<div class='generated-sidebar portlet' id='p-navigation'>
<h5>Navigation</h5>
<div class='pBody'>
<ul>
<li id="n-mainpage-description"><a href="../wiki.html">Main Page</a></li>
<li id="n-portal"><a href="http://milkymist.org/wiki/index.php?title=Milkymist_Wiki:Community_Portal" title="About the project, what you can do, where to find things">Community portal</a></li>
<li id="n-currentevents"><a href="http://milkymist.org/wiki/index.php?title=Milkymist_Wiki:Current_events" title="Find background information on current events">Current events</a></li>
<li id="n-recentchanges"><a href="http://milkymist.org/wiki/index.php?title=Special:RecentChanges" title="The list of recent changes in the wiki [r]" accesskey="r">Recent changes</a></li>
<li id="n-randompage"><a href="http://milkymist.org/wiki/index.php?title=Special:Random" title="Load a random page [x]" accesskey="x">Random page</a></li>
<li id="n-help"><a href="http://milkymist.org/wiki/index.php?title=Help:Contents" title="The place to find out">Help</a></li>
</ul>
</div>
</div>
<div id="p-search" class="portlet">
<h5><label for="searchInput">Search</label></h5>
<div id="searchBody" class="pBody">
<form action="http://milkymist.org/wiki/index.php?title=Special:Search" id="searchform"><div>
<input id="searchInput" name="search" type="text" title="Search Milkymist Wiki [f]" accesskey="f" value="" />
<input type='submit' name="go" class="searchButton" id="searchGoButton" value="Go" title="Go to a page with this exact name if exists" />&nbsp;
<input type='submit' name="fulltext" class="searchButton" id="mw-searchButton" value="Search" title="Search the pages for this text" />
</div></form>
</div>
</div>
<div class="portlet" id="p-tb">
<h5>Toolbox</h5>
<div class="pBody">
<ul>
<li id="t-whatlinkshere"><a href="http://milkymist.org/wiki/index.php?title=Special:WhatLinksHere/Flashing_the_Milkymist_One" title="List of all wiki pages that link here [j]" accesskey="j">What links here</a></li>
<li id="t-recentchangeslinked"><a href="http://milkymist.org/wiki/index.php?title=Special:RecentChangesLinked/Flashing_the_Milkymist_One" title="Recent changes in pages linked from this page [k]" accesskey="k">Related changes</a></li>
<li id="t-specialpages"><a href="http://milkymist.org/wiki/index.php?title=Special:SpecialPages" title="List of all special pages [q]" accesskey="q">Special pages</a></li>
<li id="t-print"><a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;printable=yes" title="Printable version of this page [p]" accesskey="p">Printable version</a></li> <li id="t-permalink"><a href="http://milkymist.org/wiki/index.php?title=Flashing_the_Milkymist_One&amp;oldid=1834" title="Permanent link to this version of the page">Permanent link</a></li> </ul>
</div>
</div>
</div><!-- end of the left (by default at least) column -->
<div class="visualClear"></div>
<div id="footer">
<div id="f-poweredbyico"><a href="http://www.mediawiki.org/"><img src="skins/common/images/poweredby_mediawiki_88x31.png" alt="Powered by MediaWiki" /></a></div>
<div id="f-copyrightico"><a href="http://www.milkymist.org/wiki/index.php?title=Copyright"><img src="skins/common/images/gnu-fdl.png" alt='GNU Free Documentation License 1.3 and CC-BY-SA 3.0 Unported' /></a></div>
<ul id="f-list">
<li id="lastmod"> This page was last modified on 22 April 2012, at 23:03.</li>
<li id="viewcount">This page has been accessed 34,739 times.</li>
<li id="copyright">Content is available under <a href="http://www.milkymist.org/wiki/index.php?title=Copyright" class="external " title="http://www.milkymist.org/wiki/index.php?title=Copyright">GNU Free Documentation License 1.3 and CC-BY-SA 3.0 Unported</a>.</li>
<li id="privacy"><a href="http://milkymist.org/wiki/index.php?title=Milkymist_Wiki:Privacy_policy" title="Milkymist Wiki:Privacy policy">Privacy policy</a></li>
<li id="about"><a href="http://milkymist.org/wiki/index.php?title=Milkymist_Wiki:About" title="Milkymist Wiki:About">About Milkymist Wiki</a></li>
<li id="disclaimer"><a href="http://milkymist.org/wiki/index.php?title=Milkymist_Wiki:General_disclaimer" title="Milkymist Wiki:General disclaimer">Disclaimers</a></li>
</ul>
</div>
</div>
<script type="text/javascript">if (window.runOnloadHook) runOnloadHook();</script>
<!-- Served in 0.186 secs. --></body></html>