LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 11-18-2011, 12:27 AM   #1
qwerty4061
Member
 
Registered: Nov 2011
Posts: 31

Rep: Reputation: Disabled
vmlinux


Hi,
I was trying to build a kernel to use in a MIPS board. I downloaded a package from timesys website that came with the toolchain as well as the kernel source. I compiled the kernel using the following commands:

make ARCH=mips CROSS_COMPILE=<Path to Compiler Directory>/bin/mipsisa32r2-timesys-linux-uclibc- wds3_defconfig

make ARCH=mips CROSS_COMPILE=<Path to Compiler Directory>/bin/mipsisa32r2-timesys-linux-uclibc- menuconfig

make ARCH=mips CROSS_COMPILE=<Path to Compiler Directory>/bin/mipsisa32r2-timesys-linux-uclibc- module

make ARCH=mips CROSS_COMPILE=<Path to Compiler Directory>/bin/mipsisa32r2-timesys-linux-uclibc- INSTALL_MOD_PATH=<path to Root File System> modules_install

make ARCH=mips CROSS_COMPILE=<Path to Compiler Directory>/bin/mipsisa32r2-timesys-linux-uclibc- vmlinux

wds3_defconfig genrates the default .config for the MIPS board (wds3 is its name).

I loaded the vmlinux onto to the board and ran it(The board came with its own bootloader). I am able to run it without any problems. I dont understand how I am able to do that. My understanding is that vmlinux is just the bare linux kernel wihtout any userland tools. The one I am running even has a busybox on it. Where did all that come from. Does that mean my kernel source directory contains all of these tools also.

Thanks
 
Old 11-18-2011, 12:40 AM   #2
davemguru
Member
 
Registered: Apr 2006
Location: London
Distribution: Pclos,Debian,Puppy,Fedora
Posts: 87

Rep: Reputation: 42
Quote:
Originally Posted by qwerty4061 View Post
Hi,
I was trying to build a kernel to use in a MIPS board. I downloaded a package from timesys website that came with the toolchain as well as the kernel source. I compiled the kernel using the following commands:

make ARCH=mips CROSS_COMPILE=<Path to Compiler Directory>/bin/mipsisa32r2-timesys-linux-uclibc- wds3_defconfig

make ARCH=mips CROSS_COMPILE=<Path to Compiler Directory>/bin/mipsisa32r2-timesys-linux-uclibc- menuconfig

make ARCH=mips CROSS_COMPILE=<Path to Compiler Directory>/bin/mipsisa32r2-timesys-linux-uclibc- module

make ARCH=mips CROSS_COMPILE=<Path to Compiler Directory>/bin/mipsisa32r2-timesys-linux-uclibc- INSTALL_MOD_PATH=<path to Root File System> modules_install

make ARCH=mips CROSS_COMPILE=<Path to Compiler Directory>/bin/mipsisa32r2-timesys-linux-uclibc- vmlinux

wds3_defconfig genrates the default .config for the MIPS board (wds3 is its name).

I loaded the vmlinux onto to the board and ran it(The board came with its own bootloader). I am able to run it without any problems. I dont understand how I am able to do that. My understanding is that vmlinux is just the bare linux kernel wihtout any userland tools. The one I am running even has a busybox on it. Where did all that come from. Does that mean my kernel source directory contains all of these tools also.

Thanks
I don't have a MIPS board - but, I have a couple of NAS boxes which (I am guessing) have a similar sort of layout.
There is a NAND flash divided up into multiple chunks (devices). The hardware boot (sometimes it is UBOOT) loads the kernel image from one of these chunks and the filesystem image from another and (optionally) other filesystem images from other chunks. Depends on how it is laid out.
So, for example - with my Seagate NAS - I can leave the original (sort of proprietary) kernel untouched and flash a different filesystem image into it and ... hey presto! - I am running with my filesystem populated with the binaries I want - but, running the kernel that was originally supplied in the NAND.
I think what you are experiencing is the same sort of thing - only reversed.... You put in a new kernel - but, you didn't put in a new filesystem image - so... you got the one that was there before.

Maybe I am wrong. But, I think that's how it works.
Dave
 
1 members found this post helpful.
Old 11-18-2011, 01:11 AM   #3
qwerty4061
Member
 
Registered: Nov 2011
Posts: 31

Original Poster
Rep: Reputation: Disabled
Turns out I was completely wrong. The wds3_defconfig makes the kernel point to a cpio which contains all the required binaries and is always kept in the RAM through initramfs.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Vmlinux.o instead of vmlinuz PlatinumX Linux - Newbie 4 07-31-2008 08:06 AM
What is vmlinux.scr for ? cyu021 Linux - Software 0 05-07-2005 11:06 AM
What is the different between vmlinux and zImage? alice95089 Linux - Software 1 02-21-2005 02:10 AM
Reboot after vmlinux bigneko Arch 1 01-06-2005 04:42 AM
vmlinux eastj1974 Linux - Newbie 1 04-19-2003 03:52 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 07:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration