How to boot Linux on Pandaboard
Better display @ http://tek-life.github.io/blog/how-to-boot-linux-on-pandaboard/
Pandaboard Specification
- CPU:OMAP4460 ES1.1
- Board: OMAP4 Panda rev B2
- DRAM: 1 GiB
Serial Port Settings
- BAUD RATE: 115200
- DATA: 8bit
- PARITY: none
- STOP: 1bit
- FLOW CONTROL: none
Preparation of SD card
For pandaboard, SD Card should have 2 partitions at least: one for the boot and one for the rootfs. A script below could make partitions for SD Card.$wget http://git.openembedded.org/openembedded/plain/contrib/angstrom/omap3-mkcard.sh
$chmod 777 omap3-mkcard.sh
$./omap3-mkcard.sh /dev/sdb
After running the script, then mount the SD card partitions on host to verify:$mkdir /tmp/mmc1
$mkdir /tmp/mmc2
$sudo mount /dev/sdb1 /tmp/mmc1
$sudo mount /dev/sdb2 /tmp/mmc2
Preparation for UBoot
$git clone git://git.denx.de/u-boot.git
$git checkout -b v2013.4 v2013.4 <set ARCH and CROSS_COMPILE environment variables>
$make omap4_panda_config
$make
That will generate the following files:MLO u-boot.img u-boot.bin
MLO
is the x-loader binary with a header containing the memory location to load the file to and the size of the file.u-boot.img
is exactly the same as u-boot.bin
, but a u-boot header has been appended (using mkimage). Nowadays , with current version of u-boot it is expected to use u-boot.img, as this filename is hardcoded in the initial bootloader (MLO).So now you can copy the 2 files (MLO and u-boot.img) onto the SD boot partition.
$cp MLO u-boot.img /media/boot
Linaro is also maintaining its own stable version of u-boot which is being used for Linaro and Canonical releases. The git tree is located here.More information about uboot could be found here.
Preparation for Linux Kernel
$git clone git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
$git checkout -b v3.4 v3.4
$make omap2plus_defconfig
$make uImage
The default omap2plus_defconfig
is the kernel configuration that works on any OMAP2+ boards. There are default settings, that you might want to change. For example, you can enable USB EHCI and that will bring support for the USB host on the Panda. Of course there are tons of other settings that you can change.$cp arch/arm/boot/uImage /media/boot
Preparation for File System
Get file system from below URL.http://cdimage.ubuntu.com/ubuntu-core/releases/12.04/release/ubuntu-core-12.04.1-core-armhf.tar.gz
Untar the filesystem onto the SDCard:$cd /media/rootfs
$sudo tar --numeric-owner ubuntu-core-12.04.1-core-armhf.tar.gz
Boot script for uBoot
Create the boot script file boot.script with the following content:fatload mmc 0:1 0x80000000 uImage
setenv bootargs rw vram=32M fixrtc mem=1G@0x80000000 root=/dev/mmcblk0p2 console=ttyO2,115200n8 rootwait
bootm 0x80000000
Generate the boot.scr file:mkimage -A arm -T script -C none -n "Boot Image" -d boot.script boot.scr
Copy the boot.scr to SD card boot partition.cp boot.scr /media/boot
NOTE: the boot.scr is not necessary, you could input this script to uBoot shell by hand.Now, everything is ok. It't time to plug in the SD card to pandaboard.
评论
发表评论