Tuesday, March 15, 2011

Boot up the ARM board with initramfs and generic kernel

Hello everyone,
Today, I am going to explain that how you can boot up the ARM board manually with a generic kernel and initramfs that I made it last time. Please see my previous blog post for more details about initramfs and compiling the kernel.

These are the steps for booting up the board with short explanations:
  1. mmc init    ----------->After getting prompt with Uboot, this command gets your access to SD card
  2. fatload mmc 0 0x80200000 uImage.bin   -----------> This command loads the uImage.bin or uImage to that address in the memory. uImage is your compiled kernel.
  3. fatload mmc 0 0x81600000 uImage.ramdisk  -----------> To load initramfs to that address in memory. The addresses are in hexadecimal notation.
  4. setenv bootargs console=ttyS2,115200n8 root=/dev/mmcblk0p2 rootfstype=ext2 eq rootdelay=1 nohz=off     ---------------> These are the boot args for kernel. When the kernel loads, it uses these arguments during the boot process. You can change the args according to your specification but  mine works with these args without any problems.
  5. bootm 0x80200000 0x81600000    -----------------> This will execute the kernel and initramfs in the memory, which we loaded in the steps 2 and 3, and you will get prompt to log in to the system.
That is all steps that you need to boot your board and get prompt for loging in. Here is a part of the output of my ARM board that shows booting kernel and loading initramfs from images that I already loaded in the memory:

Booting kernel from Legacy Image at 80200000 ...
Image Name: Linux-2.6.28-omap1
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 2577980 Bytes = 2.5 MB
Load Address: 80008000
Entry Point: 80008000
Verifying Checksum ... OK
Loading init Ramdisk from Legacy Image at 81600000 ...
Image Name: boot initramfs
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 2631748 Bytes = 2.5 MB
Load Address: 81600000
Entry Point: 81600000
Verifying Checksum ... OK
Loading Kernel Image ... OK
OK
Starting kernel ... 
.
.
.
Regards,
Khosro Taraghi

No comments:

Post a Comment