Welcome to Linux Forums!

With a comprehensive Linux Forum, information on various types of Linux software and many Linux Reviews articles, we have all the knowledge you need a click away, or accessible via our knowledgeable members.

Linux Forum ArticlesLinux ForumsLinux Forum DownloadsLinux HostsFree MagazinesJobs
Home|Register|FAQ|Member List|Calendar|Unanswered Posts|Forum Rules|Today's Posts|Advanced Search|
SEARCH FOR IN
Go Back   Linux Forums > GNU Linux Zone > The Linux Kernel
Reload this Page Bran's Kernel development tutorial
Linux Forums
Linux Forums
Welcome To The Linux Forums!
Welcome to Linux Forums. We pride ourselves in being one of the largest Linux communities on the web, we encourage you to REGISTER on our forums and participate in the community. There are over 150,000 members ready to answer your questions. JOINING US today will allow you to make new posts, get support, send messages to other members and submit downloads to our downloads directory and many other great features!

The Linux Kernel Compiling, theory, programming or other discussion about the linux kernel

Reply
 
Thread Tools Display Modes
Old 11-21-2007   #1 (permalink)
Just Joined!
 
Join Date: May 2007
Posts: 6
Bran's Kernel development tutorial

Hi Experts,

I was reading Bran's Kernel development tool at following link: Bona Fide OS Development Bran's Kernel Development Tutorial

I used link.ld start.asm main.c system.h scrn.c file from this link as it is.

As per the tutorial, it says add the two function calls(init_video() and puts()) to main function in main.c

After adding the above two function calls to the main function, I compiled the code with following commands

nasm -f aout -o start.o start.asm
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o main.o main.c
gcc -Wall -O -fstrength-reduce -fomit-frame-pointer -finline-functions -nostdinc -fno-builtin -I./include -c -o scrn.o scrn.c
ld -T link.ld -o kernel.bin start.o scrn.o

Compilation and linking went fine, and kernel.bin was generated

I copied kernel.bin to /boot and edited menu.lst under grub to pick up this kernel as follows.
title joachim
root (hd0,6)
kernel /kernel.bin


Now, when I rebooted the system and tried to boot with kernel.bin, I got following error:
Error 13: Invalid or Unsupported executable format

When I removed the calls to init_video() and puts() from the main() function and used the newly generated kernel.bin, I did not get any error 13 as mentioned above.

Request you to help in this regard.

For all the files that are mentioned above are available at :
Bona Fide OS Development Bran's Kernel Development Tutorial

Because there is lot of code, I did not paste it here.

Thanks and Regards,
Paresh
linuxforums_paresh is offline   Reply With Quote
Old 01-18-2008   #2 (permalink)
Just Joined!
 
Join Date: Jan 2008
Posts: 1
Using the ld script from here:
http://www.jamesmolloy.co.uk/tutoria...7;20setup.html
...worked.
-Ralph
slowfranklin is offline   Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off
 

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem with bigfiles on NFS (celerra) eliraza Servers 0 09-11-2007 06:45 AM
Suse 10.2 Hogging Memory amyno SuSE Linux Help 13 06-28-2007 12:35 AM
Web Browsers Instability HighDensity Misc 6 06-25-2007 10:09 AM
raid 5 array fails to build and mount upon reboot hvidgaard Servers 1 02-24-2007 07:17 PM
gpm-> /dev/mouse: No Such Device TrashOverride Peripherals / Hardware 3 05-07-2004 02:29 PM

Free Magazines
Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe
Systems Management News, the newspaper for IT systems administration and data center managers!
Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe
The Enterprise Newsweekly
eWeek is the essential technology information source for builders of e-business.
subscribe
Oracle Magazine
Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe
Total Telecom
Total Telecom is "The Economist of the communications industry".
subscribe
More free magazines »



All times are GMT. The time now is 04:31 AM.




© 2000 - 2008 - All Rights Reserved - Property of  MAS Media

Content Relevant URLs by vBSEO 3.2.0