I'm trying to understand the details of linux booting on arm architecture. I did lot of search on the internet and understood so far some details although I feel each time I read an article it brings lot of other new terms and this makes things more complex. I do have 2 boards running linux, an olimex 9261 and a beaglebone black. My expertise in embedded systems especially arm is pretty good, but didn't play too much with linux though (except some user space programs and char drivers in kernel).
Here are my questions:
One one board I have the following uboot output (linux 2.6.30):
bootargs=mem=64M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2
bootcmd= cp.b 0xC0042000 0x22000000 0x00199954; bootm 0x22000000
The board has 64MB RAM (mapped at 0x20000000), 512MB nand flash(didn't find mapping so far) and 2MB data flash (mapped at 0xc0000000).
What I don't understand here:
- why there is a mem=64 in the bootargs? Isn't this supposed to be given as ATAG or DTB ?
- why is there a console given as argument when we pass the control to kernel? Is the kernel using the tty already configured by uboot?
- initrd vs rootfs. This is still not clear to me. I know initrd can be included in kernel as a block device or a separate image for which uboot has to pass address details to kernel (true?). Can we have a kernel without an initrd included + another file system, like this jffs2, from which the kernel will run rest of drivers? Actually I'm not able to understand full details of the file system used by kernel at boot. In this setup I have, there are 4 files: uImage, bootstrap, env.bin and jffs2 file system. So there is no initrd. How is this working? And how is the process of rooting the file system pointed in the above bootargs? In my understanding, the kernel should access first the jffs2 file system, then grab the image found in /dev/mtdblock1 and mount it. Perhaps my understanding is wrong. Actually this interaction between kernel and file system is what I seem not to understand. In the above bootcmd, the kernel is copied from nand to sdram then bootm jumps to it. But how does the kernel find the jffs at booting time? I see this output line during boot: VFS: Mounted root (jffs2 filesystem) on device 31:1.
In the board user guide I found this:
WARNING: Due to AT91SAM9261 chip errata booting from NAND flash is not supported.
...
512MB NAND Flash (seen in Linux as silicon drive).
- After compiling the kernel, I observed the System.map doesn't have all symbols. I checked the vmlinux and it's the same. Does anyone know why? Maybe the compiler was not configured properly?
Many thanks, Daniel.