[Hardware Hacking General] AdamOutler:
I have a binary. Over at the Odroid forum, someone was able to pull a dump from U-Boot under minicom. So i had a HexDump format. I wrote the following Java file to convert the hex dump to a binary

ConvertHexToBinary.java:

/*ConvertHexToBinary Converts UBOOT md.b hexdumps to a binary file
Usage: ConvertHexToBinary inputFile outputFolder
Copyright (C) 2012 AdamOutler

This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
import java.io.BufferedOutputStream;
import java.io.DataInputStream;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class ConvertHexToBinary {
static String inFile = "/home/adam/Desktop/minicom.txt";
static String outFolder = "/home/adam/Desktop/";
static String outFile = outFolder + "file.bin";
static FileInputStream in = null;
static BufferedOutputStream out = null;

/**
* @param args
*/
public static void main(String[] args) {
try {
if (args[0].length() > 1) {
inFile = args[0];
outFolder = args[1];
}
} catch (java.lang.ArrayIndexOutOfBoundsException ex) {
System.out
.println("Usage: ConvertHexToBinary inputFile outputFolder");
}
new ConvertHexToBinary().doit();
}

private void doit() {
try {
in = new FileInputStream(inFile);
} catch (FileNotFoundException e) {
e.printStackTrace();
}

try {
out = new BufferedOutputStream(new FileOutputStream(outFile));
} catch (FileNotFoundException e) {
e.printStackTrace();
}
doConversion(in, out);
System.exit(0);

}

private void doConversion(FileInputStream in, BufferedOutputStream out) {
DataInputStream buffer = new DataInputStream(in);
try {
String s;
while ((s = buffer.readLine()) != null) {
System.out.println(s);
if (s.startsWith("ODROID4412")) {
out = new BufferedOutputStream(new FileOutputStream(
outFolder + s.split(" ")[3]));
continue;
}
s = s.split(": ")[1].split(" ")[0].replace(" ", "");
byte[] data = hexStringToByteArray(s);
for (int i = 0; i < data.length; i++) {
System.out.print(data[i]);
out.write(data[i]);
}
}
} catch (IOException e) {
e.printStackTrace();
}
return;
}

public static byte[] hexStringToByteArray(String s) {
int len = s.length();
byte[] data = new byte[len / 2];
for (int i = 0; i < len; i += 2) {
data[i / 2] = (byte) ((Character.digit(s.charAt(i), 16) << 4) + Character
.digit(s.charAt(i + 1), 16));
}
return data;
}
}

The following are messages from inside the converted-from-UART-UBOOT-hex-to-binary file

SB20_CONTEXT
SB10
[UART BOOT] Fail, Can not receive data ack
[UART BOOT] Fail, Can not connect to DNW
[UART BOOT] Load boot binary and then press any key to download

Looks like we got what we need. Rebellos, Ralekdev, can you verify this?

Attatched is the original hexdump and the recombined binary using the above program for the first time. Also, i've attatched files by memory locations 0x02000000(IROM) and 0x02020000(IRAM).