4
Create recovery sdcard for Amlogic M3 devices To prepare SD recovery card you need Linux machine and Windows/Linux software as HEX editor which can access pysical sdcard. I'm using Linux to do partitioning stuff and WinHex to do the rest of job under Windows. Here is the procedure: Insert sdcard into Linux machine Knowing your sdcard is probably FAT32 formatted and knowing size of your SDCARD, type this command: fdisk –l to view where your sdcard is mounted. It should look like this: In my case, sdcard is mounted to /dev/sdb and FAT32 partition is mounted to /dev/sdb1. Now we're going to delete old partition and create new one following these steps: sudo fdisk /dev/sdb Input p command to view all partitions on sdcard Input d command to delete all existing partitions Input n command and after that p command and after that enter 1 when prompted to create first primary partition on your sdcard When asked for „First Cylinder“, enter 3 (this is actually where difference between regular sdcard and recovery one starts) When asked for „Last Cylinder“, just press Enter to use default value. Input t command to define type of created partition and when prompted enter b command to specify FAT32 as partition type After that you can input p command to see if all went well and to see if /dev/sdb1 is FAT32... Input w command to apply changes to sdcard and to exit fdisk Apply new partitioning to system by command sudo partprobe Unmount first partition of sdcard with command sudo umount /dev/sdb1

Create recovery sdcard for Amlogic M3 · PDF file · 2012-12-13Microsoft Word - Create recovery sdcard for Amlogic M3 devices.docx Author: Stane Created Date: 9/8/2012 7:03:28 PM

Embed Size (px)

Citation preview

Page 1: Create recovery sdcard for Amlogic M3 · PDF file · 2012-12-13Microsoft Word - Create recovery sdcard for Amlogic M3 devices.docx Author: Stane Created Date: 9/8/2012 7:03:28 PM

CreaterecoverysdcardforAmlogicM3devicesTo prepare SD recovery card you need Linux machine and Windows/Linux software as HEX editor 

which can access pysical sdcard. I'm using Linux to do partitioning stuff and WinHex to do the rest of 

job under Windows. 

Here is the procedure: 

‐ Insert sdcard into Linux machine 

‐ Knowing your sdcard is probably FAT32 formatted and knowing size of your SDCARD, type 

this command: fdisk –l to view where your sdcard is mounted. It should look like this: 

 ‐ In my case, sdcard is mounted to /dev/sdb and FAT32 partition is mounted to /dev/sdb1. 

‐ Now we're going to delete old partition and create new one following these steps: 

sudo fdisk /dev/sdb 

Input p command to view all partitions on sdcard 

Input d command to delete all existing partitions 

Input n command and after that p command and after that enter 1 when prompted to create 

first primary partition on your sdcard 

When asked for „First Cylinder“, enter 3 (this is actually where difference between regular 

sdcard and recovery one starts) 

When asked for „Last Cylinder“, just press Enter to use default value. 

Input t command to define type of created partition and when prompted enter b command 

to specify FAT32 as partition type 

After that you can input p command to see if all went well and to see if /dev/sdb1 is FAT32... 

Input w command to apply changes to sdcard and to exit fdisk 

‐ Apply new partitioning to system by command sudo partprobe 

‐ Unmount first partition of sdcard with command sudo umount /dev/sdb1 

Page 2: Create recovery sdcard for Amlogic M3 · PDF file · 2012-12-13Microsoft Word - Create recovery sdcard for Amlogic M3 devices.docx Author: Stane Created Date: 9/8/2012 7:03:28 PM

‐ Format sdcard partition by command sudo mkfs.msdos /dev/sdb1 

‐ Now when partitioning is done, I will use WinHex Windows utlilty to create actual recovery 

sdcard.  For that purpose you can use any other HEX utility which can read/write to physical 

medium. 

CreatingrecoverysdcardwithWinHexutility 

First, if using Windows Vista or Windows 7, you have to run WinHex as Administrator (right click on 

WinHex.exe, Run as Administrator). 

Next thing you have to do is to backup your partition info. To do that, first you have to Open your 

sdcard (Physical Media – this is important). To do that, go to Tools menu and select Open Disk. 

Dialog like this one will appear: 

 

As i said, you have to open Physical Media. You will see that I have selected RM1: MultipleCard 

Reder (3,7GB, USB). This is my sdcard. You will have something similar like this in your dialog. Now, 

select it and click OK. 

   

Page 3: Create recovery sdcard for Amlogic M3 · PDF file · 2012-12-13Microsoft Word - Create recovery sdcard for Amlogic M3 devices.docx Author: Stane Created Date: 9/8/2012 7:03:28 PM

Make selection of data starting from offset 000001B0 as shown on picture: 

 

When selected, press CTRL+C to copy this data to clipboard 

Now right click on Removable medium 1 tab on top of WinHex screen and select Close. 

Navigate to menu Tools ‐> Disk Tools and select Clone Disk. For Source click on button with 

document picture in it and browse to your u‐boot‐aml‐ucl.bin file. For destination click on button 

with disk image in it and choose your sdcard (Physical Media). Check (if not checked) option Copy 

entire raw image file and for Start sector (destination) enter 0.  See picture below: 

 

Page 4: Create recovery sdcard for Amlogic M3 · PDF file · 2012-12-13Microsoft Word - Create recovery sdcard for Amlogic M3 devices.docx Author: Stane Created Date: 9/8/2012 7:03:28 PM

Now click OK button for bootloader to be copied to your sdcard (Warnings will be shown, just click 

Ok on them). After that, Notepad will be opened with log. Just close it. Also do right click on 

Removable medium 1 tab and click Close. 

Now reinsert your sdcard to your computer. Windows will probably complain on disk not formatted 

and will ofer you to format disk. Ignore this, DO NOT FORMAT. 

Go again to Tools and select Open disk to open your sdcard. Now, again, go to offset 000001B0 and 

right click on it, select Edit and in next menu choose Clipboard data and select Write. Confirm all that 

WinHex asks for. When done you should have something like this: 

 

Now click on Save button on top of screen (confirm that you want to save it – you will be promted) 

and close WinHex. 

After that, reinsert your sdcard to your pc. Windows should recognize sdcard as formatted one and 

without any files on it. Now copy your firmware upgrade files to it and your recovery sdcard is ready 

to use.