Backing Up The Original BusyBox Image On The NGW100
May 15th, 2009 by TheKidd
For my first few posts on the NGW100, I am going to start with a walk through on compiling a new kernel and root image for the device. This will give me a better understanding of the differences between the AP7000 vs the x86 platform when it comes to Linux and compiling its software. My main goal is to understand more about how programs are compiled and prepared to run on the Atmel platform so that when I get to my end goal, installing Asterisk/AstLinux, I have a better grasp of this platform.
Useful Notes
Here are some useful notes I’ve realized throughout the process. Might as well get these out of the way before continuing.
- The boot select jumper currently has no use. It was built into the board for future Atmel/third party development and currently has no barring on anything.
- To get to Uboot, you must be connected with a serial cable/terminal and must hit space when you see ‘Press SPACE to abort autoboot in 1 seconds‘ at the beginning of boot to get to this menu.
- The kernel/root image can be upgraded/changed by using a TFTP server or by using an SD card (I will be attempting the later through this walk through).
- - many more I’m sure –
Backing Up The Original Atmel Linux Image
Okay the following section is all hear-say. I played around for a long time in Uboot looking for a way to dump the data flash and flash chips to an image on my TFTP server and was unsuccessful. So I did the next best thing…I dd and cp -paR -ed the hell out of the system. Here is what I did, there may be an easier way:
- Inserted blank 512MB SD Card (vfat, who cares) into NGW100 and booted it up.
- Did a quick cat /etc/fstab to get an idea of what devices I needed to backup. I ignored all of the virtual directories like /var, /proc, /dev, etc.
- Attempted to run dd -if=/dev/mtdblock -of=/media/[sd card name]/filesystem.img but got an error that the device did not exist.
- Note: My best guess on this is that the system does not look at both flash chips as one but as separate entities, but, I’m new at this so I have no idea and had to move on to the next best thing.
- Ran dd -if=/dev/mtdblock1 -of=/media/[sd card name]/root.img
- Note: This is the / mount on my system. came out to 8MB which would be about one of the flash chips.
- Ran dd -if=/dev/mtdblock3 -of=/media[sd card name]/usr.img.
- Note: This is the /usr mount on my system. came out to 8MB which would be about one of the flash chips.
- I then also ran unknown image backups on /dev/mtdblock0 and mtdblock2 with the hope of grabbing Uboot or anything else I may have missed. /dev/mtdblock5+ was non existent.
- I then copied the kernel image with cp -paR uImage /media[sd card name]/. I also copied /etc, /config, /lib, and /usr again just to be safe.
- Unmounted the SD Card with umount /media/[sd card name], ejected, labeled it, and placed it in safe keeping.
All this was done as I managed to hit 1.3 GB on the BSP package. If anyone has some incite on an easier/quicker way to backup the original image, please let me know. I will mention right now that I do not have a JTAG lying around. Planning on going to Mouser Electronics in Ft Worth to build/buy one tomorrow if time permits.
Next up, I will attempt to upgrade Uboot I believe.