Booting the Neo FreeRunner from SD via U-Boot

From Openmoko

(Difference between revisions)
Jump to: navigation, search
(Step 3: Add uboot boot entry: Make image name variable)
(Step 3: Add uboot boot entry: uImage-8 vs. uImage typo)
Line 25: Line 25:
  
 
  GTA01Bv3 # setenv menu_4 Boot from SD: setenv bootargs root=/dev/mmcblk0p1 rootdelay=5 console=ttySAC0,115200 console=tty0 loglevel=8 \${mtdparts}\; mmcinit\; ext2load mmc 0 0x32000000 /boot/\${sd_image_name}\; bootm 0x32000000
 
  GTA01Bv3 # setenv menu_4 Boot from SD: setenv bootargs root=/dev/mmcblk0p1 rootdelay=5 console=ttySAC0,115200 console=tty0 loglevel=8 \${mtdparts}\; mmcinit\; ext2load mmc 0 0x32000000 /boot/\${sd_image_name}\; bootm 0x32000000
  GTA01Bv3 # setenv sd_image_name uImage-8
+
  GTA01Bv3 # setenv sd_image_name uImage
 
  GTA01Bv3 # saveenv
 
  GTA01Bv3 # saveenv
  

Revision as of 16:28, 14 March 2007

Here are the steps described to boot your system from an SD card.

Contents

Step 1: build your kernel

Get a fresh 2.6.20.2 kernel and apply the patches from the OpenMoko projekt.

alphaone@elara openmoko $ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.2.tar.bz2
alphaone@elara openmoko $ tar -xjf linux-2.6.20.2.tar.bz2
alphaone@elara openmoko $ cd linux-2.6.20.2
alphaone@elara linux-2.6.20.2 $ svn co http://svn.openmoko.org/trunk/src/target/kernel/patches
alphaone@elara linux-2.6.20.2 $ quilt -a push

Now download the defconfig from http://svn.openmoko.org/trunk/oe/packages/linux/linux-gta01/defconfig-2.6.20.2-fic-gta01 and tweak the kernel in any way you want (be sure to build MMC/SD card support into the kernel). When done build the kernel and follog the steps in Bootloader#Creating_bootable_images.

Step 2: populate SD card

Mount your SD card somewhere and put your image on it

elara openmoko # mount /dev/mmcblk0p1 /dev/moko
elara openmoko # tar -C /mnt/moko/ -xvzf openmoko-devel-image-fic-gta01-20070313022035.rootfs.tar.gz

Now we also want the kernel on there

elara openmoko # cp uImage /mnt/moko/boot/

Step 3: Add uboot boot entry

Start uboot in bootmenu mode and add the following entry via serial console:

GTA01Bv3 # setenv menu_4 Boot from SD: setenv bootargs root=/dev/mmcblk0p1 rootdelay=5 console=ttySAC0,115200 console=tty0 loglevel=8 \${mtdparts}\; mmcinit\; ext2load mmc 0 0x32000000 /boot/\${sd_image_name}\; bootm 0x32000000
GTA01Bv3 # setenv sd_image_name uImage
GTA01Bv3 # saveenv

You can now easily boot a different kernel by changing the variable sd_image_name to the new name.

Step 4: Boot into the new system

Power off your device, insert the SD card and boot into the boot menu. You should have an entry called "Boot from SD" which does exactly that. :-)

Personal tools

Here are the steps described to boot your system from an SD card.

Step 1: build your kernel

Get a fresh 2.6.20.2 kernel and apply the patches from the OpenMoko projekt.

alphaone@elara openmoko $ wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.2.tar.bz2
alphaone@elara openmoko $ tar -xjf linux-2.6.20.2.tar.bz2
alphaone@elara openmoko $ cd linux-2.6.20.2
alphaone@elara linux-2.6.20.2 $ svn co http://svn.openmoko.org/trunk/src/target/kernel/patches
alphaone@elara linux-2.6.20.2 $ quilt -a push

Now download the defconfig from http://svn.openmoko.org/trunk/oe/packages/linux/linux-gta01/defconfig-2.6.20.2-fic-gta01 and tweak the kernel in any way you want (be sure to build MMC/SD card support into the kernel). When done build the kernel and follog the steps in Bootloader#Creating_bootable_images.

Step 2: populate SD card

Mount your SD card somewhere and put your image on it

elara openmoko # mount /dev/mmcblk0p1 /dev/moko
elara openmoko # tar -C /mnt/moko/ -xvzf openmoko-devel-image-fic-gta01-20070313022035.rootfs.tar.gz

Now we also want the kernel on there

elara openmoko # cp uImage /mnt/moko/boot/

Step 3: Add uboot boot entry

Start uboot in bootmenu mode and add the following entry via serial console:

GTA01Bv3 # setenv menu_4 Boot from SD: setenv bootargs root=/dev/mmcblk0p1 rootdelay=5 console=ttySAC0,115200 console=tty0 loglevel=8 \${mtdparts}\; mmcinit\; ext2load mmc 0 0x32000000 /boot/\${sd_image_name}\; bootm 0x32000000
GTA01Bv3 # setenv sd_image_name uImage
GTA01Bv3 # saveenv

You can now easily boot a different kernel by changing the variable sd_image_name to the new name.

Step 4: Boot into the new system

Power off your device, insert the SD card and boot into the boot menu. You should have an entry called "Boot from SD" which does exactly that. :-)