autoconf for OSdev?

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply

What do you use to compile/build your OS?

autoconf/automake
1
2%
hand-written Makefile
28
61%
Shell/Batch script
11
24%
Other
6
13%
 
Total votes: 46

User avatar
Zenith
Member
Member
Posts: 224
Joined: Tue Apr 10, 2007 4:42 pm

autoconf for OSdev?

Post by Zenith »

Well, for the past week I've been trying to get autoconf/make to work with my OS (written in C and ASM using nasm, gcc under cygwin).

I've used autoconf before but that was with a 'typical' C project which was much simpler to compile than an OS (which requires special compile flags, linker scripts, an assembler, etc.) :wink:

So I was wondering: Who here uses autoconf and automake, why, and could explain to me in what amazing way they got it to work? :)
User avatar
lukem95
Member
Member
Posts: 536
Joined: Fri Aug 03, 2007 6:03 am
Location: Cambridge, UK

Post by lukem95 »

DJGPP with elf toolset and custom makefile
~ Lukem95 [ Cake ]
Release: 0.08b
Image
User avatar
JamesM
Member
Member
Posts: 2935
Joined: Tue Jul 10, 2007 5:27 am
Location: York, United Kingdom
Contact:

Post by JamesM »

I've used autoconf for my project, but changed to using custom makefiles. Much more flexible.
User avatar
neon
Member
Member
Posts: 1567
Joined: Sun Feb 18, 2007 7:28 pm
Contact:

Post by neon »

None of those. I use nasm for the bootloader, and MSVC++ to build the projects and kernel.
OS Development Series | Wiki | os | ncc
char c[2]={"\x90\xC3"};int main(){void(*f)()=(void(__cdecl*)(void))(void*)&c;f();}
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Post by piranha »

Other: I use both a shell script and a makefile.

The shell script cd's into the kernel directory, runs make, and updates the image file with a loop device.

It's easier to deal then programming that into the makefile (for me).

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
phire
Posts: 4
Joined: Wed Jan 16, 2008 7:25 pm
Location: Christchruch, New Zealand

Post by phire »

I use a custom makefile, I find it much simpler than using autoconf/make.
piranha wrote:The shell script cd's into the kernel directory, runs make, and updates the image file with a loop device.

It's easier to deal then programming that into the makefile (for me).
Makefiles are pretty much shell scripts, this is what I use for installing to floppy (blackthunder is the kernel)

Code: Select all

install : blackthunder grub.img
	@echo Installing kernel to floppy image...
	@mount grub.img 
	@cp blackthunder /mnt/floppy/
	@umount grub.img
	@echo "...done"
For this to work you need to add a line like this to /etc/fstab:

Code: Select all

/full/path/to/grub.img /mnt/floppy vfat loop,user,noauto 0 0
User avatar
piranha
Member
Member
Posts: 1391
Joined: Thu Dec 21, 2006 7:42 pm
Location: Unknown. Momentum is pretty certain, however.
Contact:

Post by piranha »

Ah. But if you change the path to grub.img then you have to deal with other stuff too.

I don't know, makfiles are useful, but they annoy me too.

-JL
SeaOS: Adding VT-x, networking, and ARM support
dbittman on IRC, @danielbittman on twitter
https://dbittman.github.io
jzgriffin
Member
Member
Posts: 190
Joined: Tue Sep 26, 2006 1:40 pm
Libera.chat IRC: Nokurn
Location: Ontario, CA, USA
Contact:

Post by jzgriffin »

I use a large series of tubes, I mean, makefiles. The make system just seems like a really powerful, flexible tool, and I've never had issues with it on any sort of project in the past (OSDev or other).
phire
Posts: 4
Joined: Wed Jan 16, 2008 7:25 pm
Location: Christchruch, New Zealand

Post by phire »

piranha wrote: Ah. But if you change the path to grub.img then you have to deal with other stuff too.
That's an implementation issue, I did it that way so I didn't have to run 'make install' as root.
User avatar
Brendan
Member
Member
Posts: 8561
Joined: Sat Jan 15, 2005 12:00 am
Location: At his keyboard!
Contact:

Post by Brendan »

Hi,

I use shell scripts and my own "system build utility", which replaces make, gets dependancies from the source code instead of using makefiles, generates HTML documentation and does some other things for me (hex dump, disassembly, etc).


Cheers,

Brendan
For all things; perfection is, and will always remain, impossible to achieve in practice. However; by striving for perfection we create things that are as perfect as practically possible. Let the pursuit of perfection be our guide.
skyking
Member
Member
Posts: 174
Joined: Sun Jan 06, 2008 8:41 am

Post by skyking »

neon wrote:None of those. I use nasm for the bootloader, and MSVC++ to build the projects and kernel.
So you don't use other :wink:

My build system is scons based, building the kernel requires some specials that normal programs don't use.
User avatar
Steve the Pirate
Member
Member
Posts: 152
Joined: Fri Dec 15, 2006 7:01 am
Location: Brisbane, Australia
Contact:

Post by Steve the Pirate »

I use a custom makefile - both to compile and link the kernel, and with an install directive to create a CD image.
My Site | My Blog
Symmetry - My operating system.
Post Reply