In the quest for the ideal XBMC set-top box, I’ve bought an ODROID-U2. It’s a small devboard with an Exynos 4412 quad-core Cortex-A9 processor. Pretty much the same chipset as the Samsung Galaxy S3 or the Note 2, which should be more than enough to power XBMC I figured. (Note: At this point it doesn’t run XBMC flawless yet, the menus work great and much faster than on the RPi or the Pivos XIOS DS, 720p content seems to work fine, but 1080 still stutters a bit. However, that’ll supposedly get fixed once XBMC upgrades to multi-core ffmpeg or the video decoder will be implemented)
While the ODROID will boot from MicroSD perfectly, there’s another option called eMMC that is supposedly much faster. If you buy it from them, it’ll include a small converter to microSD so you can flash it with a computer. However, as it turns out this converter is absolute garbage. it’s too big to fit into a regular uSD-SD converter, and even after I filed it down to the appropriate size, it still didn’t work.
So I had this nice box, with Android 4.0 pre-installed, but the one method to upgrade was broken.
Luckily, there’s another way to upgrade by booting to Ubuntu from a microSD card, and access the eMMC module on-board from there. I’ll detail how I did it here.
What will you need?
You’ll need the following to complete this:
- The ODROID-U2 itself.
- a microSD card loaded with an Ubuntu image for the ODROID-U2.
- The “USB-UART Module Kit“
- an eMMC image for your eMMC card.
- Some way to get the files from and to the ODROID. (USB-stick, network+ssh, etc)
Step 1: Boot to Ubuntu
- Attach the USB-UART module to the ODROID and to your PC
- Connect to the USB-UART module using either hyperterm or putty
- (Windows 7) Start -> Computer (right click) -> Properties, click “Device manager” in the left bar. Look under”Ports (COM & LPT)”, search for “Silicon Labs CP210x USB to UART Bridge”, the part at the end inbetween brackets is the COM port. in my case COM5.
- Start Putty
- Select “Serial”, under serial line enter the COM port, e.g. COM5. under speed sneter 115200
- On the left go to Connection -> Serial
- Ensure that the following options are set:
- Speed (baud): 115200
- Data bits: 8
- Stop bits: 1
- Parity: None
- Flow control: None
- DETACH the eMMC card, and insert the uSD card. This is to force the system to boot from SD instead of eMMC
- Power-on the ODROID-U2, and on the computer in Putty keep hitting enter until you see a few lines of “Exynos4412 #”
- Make sure you see the line “Checking Boot Mode … SDMMC”. If it states EMMC, reset again without the eMMC attached.
- At this point, attach the eMMC card. This is to make sure Ubuntu does actually recognize the eMMC, while the bootloader never saw it attached.
- type “boot” and hit enter in the terminal
- After a lot of data you should get a shell with “root@linaro-ubuntu-desktop:~#”, congratulations, you’re in 🙂
- Mind you that it’s normal if there’s other data on the terminal being spat out, like “[ 91.529517] NOHZ: local_softirq_pending 08” or “[ 80.665871] HKDK4412: CPUFREQ Policy setted to 1.7Ghz at boot”
- type “ls /dev/mmcblk*” and hit enter
- Do you see at least /dev/mmcblk0 and /dev/mmcblk1 ? if not, something went wrong and the eMMC wasn’t recognized
- type “mount -l” and hit enter
- Look for the first line, it should look like this:
/dev/mmcblk1p2 on / type ext4 (rw,errors=remount-ro) [rootfs]
This line means that Ubuntu runs from mmcblk1, and the eMMC will probably be on mmcblk0. if that line reads /dev/mmcblk0… it’s the other way round.
In this post I’ll assume the SD is at mmcblk1 and the eMMC is at mmcblk0. If it’s the other way around for you, remember to swap those around in any commands you type.
- do “df -h” and check to see if you have enough diskspace somewhere to store the images. In my case, / had more than 3GB free, so I’m using that.
Note that you can’t use anything on the eMMC itself, so nothing that starts with /dev/mmcblk0 should be used.
- Do “mount -l | grep /dev/mmcblk0”
- And for each line, do “umount /dev/mmcblk0p…” (the first part of the line)
- This is to ensure that Ubuntu isn’t writing to the eMMC by itself.
It’s always a good idea to have a backup, so we’ll make one. You can skip this step, but I believe it’s better to be safe than sorry.
In my case, I needed about 600mb free to make a backup of my 8GB eMMC card. If you have more data on there, it could be much bigger. Seeing as I had some room on /, I do this to generate a backup:
- cd /
- dd if=/dev/mmcblk0 | gzip -4 > backup.gz
This will take a few minutes. I believe for my 8GB card it took about 15 minutes. If you want to have an estimate, first let it run for 30 seconds or so, and hit Ctrl+c, it should spit out how fast it’s copying. use that to calculate how long it’ll take, and run it again to finish it.
If you want to put that backup back for whatever reason, use the following commands:
- cd /
- gzip -d -c backup.gz | dd of=/dev/mmcblk0 bs=8M
- First get a list of files in the zipfile with: “unzip -l OdroidU2_eMMC_8G_image_04-Jan-2013.zip”
- Ensure there is only one .img file in there
- run: unzip -p <zipfile> <imgfile> | dd of=/dev/mmcblk0 bs=8M
for example: unzip -p OdroidU2_eMMC_8G_image_04-Jan-2013.zip ODROID-U2.img | dd of=/dev/mmcblk0 bs=8M
Note that you don’t have to unzip the file first, you can unzip it directly to your eMMC.
The ctrl+c trick mentioned in the backups to gauge the speed doesn’t work here. For me it did about 17.9 MB/second, and the whole flash of 2.8GB took about 3 minutes.
- TADAA! You’re done!
- type “shutdown -h now” to shut down the box neatly.