{"id":7889,"date":"2015-06-22T15:14:53","date_gmt":"2015-06-22T20:14:53","guid":{"rendered":"http:\/\/www.multitech.net\/developer\/?page_id=7889"},"modified":"2025-11-21T10:31:12","modified_gmt":"2025-11-21T16:31:12","slug":"flashing-mlinux-firmware-for-conduit","status":"publish","type":"page","link":"https:\/\/www.multitech.net\/developer\/software\/mlinux\/using-mlinux\/flashing-mlinux-firmware-for-conduit\/","title":{"rendered":"Flashing mLinux Firmware"},"content":{"rendered":"<div class=\"note\">\n<p><span style=\"font-family: arial, helvetica, sans-serif;\"><span style=\"color: #555555; font-size: small;\"><b>NOTE:<\/b><\/span><span style=\"color: #555555; font-size: small;\"> This section describes upgrading\u00a0mLinux<sup>\u2122\u00a0<\/sup>locally on your device and is intended for experts with the appropriate technical knowledge.\u00a0 (Otherwise, use the alternative method <\/span><a href=\"https:\/\/www.multitech.net\/developer\/software\/mlinux\/upgrading-mlinux\/\" target=\"_blank\" rel=\"noopener\"><span style=\"font-size: small;\">Upgrading mLInux<\/span><\/a><span style=\"color: #555555; font-size: small;\"><b>.)<\/b><\/span><\/span><\/p>\n<p>Refer to the\u00a0<a href=\"https:\/\/www.multitech.net\/developer\/downloads\/\">Downloads<\/a>\u00a0page for applicable pre-built images.<span style=\"color: #1f497d; font-size: small;\"><i>\u00a0<\/i><\/span><\/p>\n<p>The following procedure generally only applies to the MTCDT-xx-210L model but can be used to convert a MTCDT-xx-210A model to MTCDT-xx-210L.<\/p>\n<p>For devices with the Supercap Feature,\u00a0the device will not flash firmware if the power is out, and delay flashing the firmware if supercap is not sufficiently charged. (See <a href=\"https:\/\/www.multitech.net\/developer\/software\/mlinux\/using-mlinux\/supercap-feature\/\">Supercap Feature<\/a> for more details.)<\/p>\n<\/div>\n<p><strong>All downloads are available from the <a href='https:\/\/www.multitech.net\/developer\/downloads\/' title='Downloads'>Downloads page<\/a>.<\/strong><\/p>\n<h3>View the Current Firmware Version<\/h3>\n<pre class=\"brush:shell\">$ cat \/etc\/mlinux-version<\/pre>\n<p>&nbsp;<\/p>\n<h3>Using Auto-Flash During Reboot (Recommended)<\/h3>\n<p>During the boot process, the device checks for a file named <code>\/var\/volatile\/do_flash_upgrade<\/code> which indicates if it should attempt to flash itself. (<strong>NOTE:<\/strong>\u00a0This file must be owned by root.\u00a0 If <code>\/var\/volatile\/do_flash_upgrade<\/code> exists, it will look for the upgrade files in two locations: <code>\/var\/volatile\/flash-upgrade<\/code> and <code>\/media\/card\/flash-upgrade<\/code> and then flash itself.<\/p>\n<h4>Summary<\/h4>\n<ul>\n<li>Copy kernel and rootfs to the newly created directory \/var\/volatile\/flash-upgrade:<br \/>\n<code>mkdir \/var\/volatile\/flash-upgrade<\/code><br \/>\n<code>cp &lt;uImage path here&gt; \/var\/volatile\/flash-upgrade\/uImage.bin<\/code><br \/>\n<code><code>cp &lt;rootfs path here&gt; \/var\/volatile\/flash-upgrade\/rootfs.jffs2<\/code><\/code>OR ensure the sd card is formatted as follows:<br \/>\n<code>\/media\/card\/flash-upgrade\/uImage.bin<\/code><br \/>\n<code><code><code>\/media\/card\/flash-upgrade\/rootfs.jffs2<\/code><\/code><\/code><\/li>\n<li>For <strong>mLinux 3.x<\/strong>, do the following commands:\n<ul>\n<li>Run <code>touch \/var\/volatile\/do_flash_upgrade<\/code><\/li>\n<li>Run <code>reboot<\/code><\/li>\n<\/ul>\n<\/li>\n<li>For\u00a0<strong>mLinux 4 or higher<\/strong>, do the following command:\n<ul>\n<li>Run\u00a0<code>sudo touch \/var\/volatile\/do_flash_upgrade<\/code><\/li>\n<li>Run\u00a0<code>sudo reboot<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<p>The file names must match above exactly and are case-sensitive.<\/p>\n<h4>Detailed Steps<\/h4>\n<ol>\n<li>Obtain the required update files from the <a href=\"https:\/\/www.multitech.net\/developer\/downloads\/\">downloads page<\/a>. (You can also find these files in your current build of mLinux in the built\/tmp\/deploy\/images directory.) Refer to the Conduit: mLinux Mode, Other Downloads, and click on Pre-Built Images. Select your hardware (currently MTCAP or MTCDT).<\/li>\n<li><code><span style=\"font-family: Georgia, 'Times New Roman', 'Bitstream Charter', Times, serif;\"><span style=\"color: #333333;\">Select the version you want to use.<\/span><\/span><\/code><\/li>\n<li>Then download the\u00a0jffs2 file desired (base or factory image) and uImage file. For example:<br \/>\n<code>mlinux-factory-image-mtcdt-20150527081222.rootfs.jffs2<\/code><br \/>\n<code><code><code>uImage--3.12.27-r11.2-mtcdt-20150527052826.bin<\/code><\/code><\/code><\/li>\n<li>On your PC, rename the new firmware files like this:<br \/>\n<code>mlinux-factory-image-mtcdt-20150527081222.rootfs.jffs2<\/code> \u2192 <code>rootfs.jffs2<\/code><br \/>\n<code>uImage--3.12.27-r11.2-mtcdt-20150527052826.bin<\/code> \u2192 <code><code><code>uImage.bin<\/code><\/code><\/code><\/li>\n<li>Connect the Conduit to your PC via an ethernet cable and ssh into it.<\/li>\n<li>On the Conduit, first create the destination directory:<br \/>\n<code><code><code>mkdir \/var\/volatile\/flash-upgrade<\/code><\/code><\/code><\/li>\n<li>Copy the files to the device. If using Windows, you&#8217;ll need a tool like WinSCP or SCP in Cygwin.<br \/>\nUsing SCP on your PC:<br \/>\n<code>scp uImage.bin root@192.168.2.1:\/var\/volatile\/flash-upgrade\/uImage.bin<\/code><br \/>\n<code><code><code>scp rootfs.jffs2 root@192.168.2.1:\/var\/volatile\/flash-upgrade\/rootfs.jffs2<\/code><\/code><\/code><\/li>\n<li>After transferring the files, on the Conduit run:\n<ul>\n<li>For <strong>mLinux 3.x<\/strong>:\n<ul>\n<li>Run <code>touch \/var\/volatile\/do_flash_upgrade<\/code><\/li>\n<li>Run <code>reboot<\/code><\/li>\n<\/ul>\n<\/li>\n<li>For <strong>mLinux 4 or higher<\/strong>:\n<ul>\n<li>Run <code>sudo touch \/var\/volatile\/do_flash_upgrade<\/code><\/li>\n<li>Run <code>sudo reboot<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>During flashing, programmable LEDs will blink in a progression pattern.<\/p>\n<p><strong>Note:<\/strong> If you want to copy uImage.bin and rootfs.jffs2 into the tmpfs mounted at \/var\/volatile, first verify that there is enough space to fit the images in memory. If you flash a larger image and have an SD card inserted, copy the images into \/media\/card instead.<\/p>\n<h3>Using Auto-Flash During Reboot with image upgrade.bin<\/h3>\n<p>The Auto-Flash During Reboot can also be performed with an upgrade file. This process allows a system to be converted from\u00a0mPower<sup>\u2122\u00a0<\/sup>to mLinux or vice versa.<\/p>\n<h4>Summary<\/h4>\n<ul>\n<li>Besure to download an image compatible with the hardware type MTCDT and MTCAP have different image files<\/li>\n<li>For mLinux download the factory or base image for MTCDT or MTCAP<\/li>\n<li>Download an mlinux-*-upgrade.bin or conduit_AEP-X.X.X_upgrade.bin file from <a title=\"Downloads Page\" href=\"https:\/\/www.multitech.net\/developer\/downloads\/\">Downloads<\/a><\/li>\n<li>Create a directory on the Conduit to receive the file<br \/>\n<code>mkdir \/var\/volatile\/flash-upgrade<\/code><\/li>\n<li>Copy the upgrade file, renaming as <strong>upgrade.bin<\/strong>, to the newly created directory \/var\/volatile\/flash-upgrade:<br \/>\n<code>cp &lt;uImage path here&gt; \/var\/volatile\/flash-upgrade\/upgrade.bin<\/code><\/li>\n<li>After transferring the files, on the Conduit run:\n<ul>\n<li>For <strong>mLinux 3.x<\/strong>:\n<ul>\n<li>Run <code>touch \/var\/volatile\/do_flash_upgrade<\/code><\/li>\n<li>Run <code>reboot<\/code><\/li>\n<\/ul>\n<\/li>\n<li>For <strong>mLinux 4 or higher<\/strong>:\n<ul>\n<li>Run <code>sudo touch \/var\/volatile\/do_flash_upgrade<\/code><\/li>\n<li>Run <code>sudo reboot<\/code><\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h3>Convert to mPower<\/h3>\n<ol>\n<li>Download mPower firmware from https:\/\/www.multitech.net\/developer\/downloads\/<\/li>\n<li>Extract the conduit_aep_upgrade.bin or mtcap_aep_upgrade.bin file from the zip file.<\/li>\n<li>Follow the Auto-Flash instructions above using the aep_upgrade.bin file<\/li>\n<li>Factory reset the device after flashing to mPower<\/li>\n<\/ol>\n<p>&nbsp;<\/p>\n<h3>Using U-boot &amp; TFTP<\/h3>\n<p>Access U-Boot at boot time from the DEBUG serial port behind the front panel. See the <a href=\"https:\/\/www.multitech.net\/developer\/wp-content\/uploads\/2018\/10\/S000690.pdf\">Conduit Hardware Guide<\/a> for debug information<\/p>\n<h4>Setting up your U-Boot environment<\/h4>\n<p><strong>Linux:<\/strong> Install and configure a TFTP server. For example using in.tftpd and xinetd the following configuration will listen on port 69 and set <code>\/tftpboot<\/code> as the tftp root dir.<\/p>\n<p><code>\/etc\/xinetd.d\/tftp:<\/code><\/p>\n<pre class=\"brush:text\">service tftp\r\n{\r\nprotocol        = udp\r\nport            = 69\r\nsocket_type     = dgram\r\nwait            = yes\r\nuser            = nobody\r\nserver          = \/usr\/sbin\/in.tftpd\r\nserver_args     = -s \/tftpboot\r\ndisable         = no\r\n}<\/pre>\n<p><strong>Windows:<\/strong> Download, install and configure Tftpd32, available at <a href=\"http:\/\/www.softpedia.com\/get\/Internet\/Servers\/FTP-Servers\/Tftpd32.shtml\">http:\/\/www.softpedia.com\/get\/Internet\/Servers\/FTP-Servers\/Tftpd32.shtml<\/a>.<\/p>\n<p>&nbsp;<\/p>\n<p>On your PC, extract out the the <code>.rootfs.jffs2<\/code> and <code>.bin<\/code> files and place them in the tftpboot directory . Then rename them like this:<\/p>\n<p style=\"padding-left: 30px;\"><code>mlinux-factory-image-mtcdt-20150527081222.rootfs.jffs2<\/code> \u2192 <code>oe_rootfs.jffs2<\/code><br \/>\n<code>uImage--3.12.27-r11.2-mtcdt-20150527052826.bin<\/code> \u2192 <code><code><code>oe_uImage.bin<\/code><\/code><\/code><\/p>\n<p>&nbsp;<\/p>\n<p>Power on the device after connecting the debug cable. You need to interrupt U-Boot from booting the system; look for the Hit any key to stop autoboot.<\/p>\n<pre class=\"brush:text\">U-Boot 2012.10-mtcdt-r6 (May 07 2015 - 13:37:07)\r\n\r\nCPU: AT91SAM9G25\r\nCrystal frequency: 12 MHz\r\nCPU clock : 400 MHz\r\nMaster clock : 133.333 MHz\r\n[...]\r\nHit any key to stop autoboot: 0\r\nU-Boot&gt;<\/pre>\n<p>&nbsp;<\/p>\n<p>Some units come already configured with a U-Boot environment that makes flashing the device simple. To check the contents of the U-Boot environment, run <code>printenv<\/code> and check for variables named <code>krb<\/code>, <code>tftp_kernel<\/code> and <code>tftp_rootfs<\/code>, etc.<\/p>\n<p>If these variables <strong>do<\/strong> exist, then modify the <code>serverip<\/code>, <code>ipaddr<\/code>, and <code>netmask<\/code> variables to match your network and save the settings. Then skip to the &#8220;Flash from U-Boot&#8221; section below.<\/p>\n<pre class=\"brush:text\">U-Boot&gt; setenv ipaddr 192.168.2.1\r\nU-Boot&gt; setenv serverip 192.168.2.99\r\nU-Boot&gt; setenv netmask 255.255.255.0\r\nSaving Environment to NAND...\r\nErasing redundant NAND...\r\nErasing at 0x160000 -- 100% complete.\r\nWriting to redundant NAND... done\r\nU-Boot&gt;<\/pre>\n<p>If these variables <strong>don&#8217;t<\/strong> exist, follow these instructions to configure the U-Boot environment for flashing:<\/p>\n<p>Download the <code>uboot-setenv-mtcdt<\/code> minicom script from the mLinux git repository to your development PC:<\/p>\n<p><a href=\"https:\/\/git.multitech.net\/cgit\/meta-multitech-atmel.git\/tree\/contrib\/uboot-setenv-mtcdt.minicom\">https:\/\/git.multitech.net\/cgit\/meta-multitech-atmel.git\/tree\/contrib\/uboot-setenv-mtcdt.minicom<\/a><\/p>\n<p>Copy that\u00a0<code>uboot-setenv-mtcdt<\/code> script to a location with a shorter path. The full path needs to be short enough to fit in the Minicom run script menu.<\/p>\n<pre class=\"brush:shell\">$ cp uboot-setenv-mtcdt.minicom $HOME\/uboot-setenv.minicom<\/pre>\n<p>Edit <code>${HOME}\/uboot-setenv<\/code> to match your network and device.<\/p>\n<pre class=\"brush:text\">send setenv serverip              192.168.2.2\r\nsend setenv ipaddr                192.168.2.1\r\nsend setenv netmask               255.255.255.0<\/pre>\n<p>Run the U-Boot environment setup script. At minicom type <code>CTRL-A G<\/code> and enter <code>${HOME}\/uboot-setenv<\/code> as the name of the script to run. When the script finishes it should save and print out the environment. Make sure you expand ${HOME} to your actual home dir when entering the script name.<\/p>\n<h4>Flash from U-Boot<\/h4>\n<p>Make sure <code>oe_uImage.bin<\/code> and <code>oe_rootfs.jffs2<\/code> are in your tftpboot directory, then run the krb command. U-boot will copy the firmware files from your PC, flash the device, and reboot.<\/p>\n<pre class=\"brush:text\" style=\"padding-left: 30px;\">U-Boot&gt; run krb<\/pre>\n<p>&nbsp;<\/p>\n<h3>NAND Flash Layout<\/h3>\n<table border=\"1\" cellpadding=\"2\">\n<tbody>\n<tr>\n<th><strong>Name<\/strong><\/th>\n<th><strong>Offset<\/strong><\/th>\n<th><strong>Size<\/strong><\/th>\n<th><strong>Usage<\/strong><\/th>\n<\/tr>\n<tr>\n<td>NANDFlash<\/td>\n<td><span style=\"color: #000000;\"><code>0x00000000<\/code><\/span><\/td>\n<td><span style=\"color: #000000;\"><code>0x10000000<\/code><\/span><\/td>\n<td>Whole NAND<\/td>\n<\/tr>\n<tr>\n<td>at91bootstrap<\/td>\n<td><span style=\"color: #000000;\"><code>0x00000000<\/code><\/span><\/td>\n<td><span style=\"color: #000000;\"><code>0x00040000 (256KB)<\/code><\/span><\/td>\n<td>Bootstrap [bootstrap.bin]<\/td>\n<\/tr>\n<tr>\n<td>u-Boot<\/td>\n<td><span style=\"color: #000000;\"><code>0x00040000<\/code><\/span><\/td>\n<td><span style=\"color: #000000;\"><code>0x00080000 (512KB)<\/code><\/span><\/td>\n<td>U-Boot [u-boot.bin]<\/td>\n<\/tr>\n<tr>\n<td>u-Boot Config<\/td>\n<td><span style=\"color: #000000;\"><code>0x000C0000<\/code><\/span><\/td>\n<td><span style=\"color: #000000;\"><code>0x000A0000 (640KB)<\/code><\/span><\/td>\n<td>U-Boot environment<\/td>\n<\/tr>\n<tr>\n<td>u-Boot Redundant Config<\/td>\n<td><span style=\"color: #000000;\"><code>0x00160000<\/code><\/span><\/td>\n<td><span style=\"color: #000000;\"><code>0x000A0000 (640KB)<\/code><\/span><\/td>\n<td>U-Boot redundant environment<\/td>\n<\/tr>\n<tr>\n<td>uImage<\/td>\n<td><span style=\"color: #000000;\"><code>0x00200000<\/code><\/span><\/td>\n<td><span style=\"color: #000000;\"><code>0x00600000 (6MB)<\/code><\/span><\/td>\n<td>Linux Kernel [uImage.bin]<\/td>\n<\/tr>\n<tr>\n<td>Config<\/td>\n<td><span style=\"color: #000000;\"><code>0x00800000<\/code><\/span><\/td>\n<td><span style=\"color: #000000;\"><code>0x00800000 (8MB)<\/code><\/span><\/td>\n<td>Configuration [\/var\/config]<\/td>\n<\/tr>\n<tr>\n<td>OEM Config<\/td>\n<td><span style=\"color: #000000;\"><code>0x01000000<\/code><\/span><\/td>\n<td><span style=\"color: #000000;\"><code>0x00800000 (8MB)<\/code><\/span><\/td>\n<td>OEM Specific configuration [not used by default]<\/td>\n<\/tr>\n<tr>\n<td>Rootfs<\/td>\n<td><span style=\"color: #000000;\"><code>0x01800000<\/code><\/span><\/td>\n<td><span style=\"color: #000000;\"><code>0x0E800000 (232MB)<\/code><\/span><\/td>\n<td>root filesystem [rootfs.jffs]<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>Total Size: 256 MB<\/p>\n<p>Block\/Sector Size: 128 KB<\/p>\n","protected":false},"excerpt":{"rendered":"<p>NOTE: This section describes upgrading\u00a0mLinux\u2122\u00a0locally on your device and is intended for experts with the appropriate technical knowledge.\u00a0 (Otherwise, use the alternative method Upgrading mLInux.) Refer to the\u00a0Downloads\u00a0page for applicable pre-built images.\u00a0 The following procedure generally only applies to the MTCDT-xx-210L model but can be used to convert a MTCDT-xx-210A model to MTCDT-xx-210L. For devices [&hellip;]<\/p>\n","protected":false},"author":537,"featured_media":0,"parent":9184,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-7889","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/7889","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/users\/537"}],"replies":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/comments?post=7889"}],"version-history":[{"count":70,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/7889\/revisions"}],"predecessor-version":[{"id":33981,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/7889\/revisions\/33981"}],"up":[{"embeddable":true,"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/pages\/9184"}],"wp:attachment":[{"href":"https:\/\/www.multitech.net\/developer\/wp-json\/wp\/v2\/media?parent=7889"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}