Ada Bare Bones: Difference between revisions

no edit summary
[unchecked revision][unchecked revision]
m (system.ads needs to be placed into rts/boards/i386/adainclude/ instead of rts/boards/i386/)
No edit summary
Line 4:
 
<big><b>WAIT! Have you read [[Getting Started]], [[Beginner Mistakes]], and some of the related [[:Category:OS theory|OS theory]]?</b></big>
 
'''N.B:''' This is a work in progress, I will remove this notice when I think it's complete.
 
==Preface==
Line 75 ⟶ 77:
pragma Restrictions (No_Secondary_Stack);
</source>
 
The final version of [https://github.com/Lucretia/bare_bones/blob/master/gnat.adc gnat.adc] can be downloaded from GitHub.
 
By passing the '''-r''' flag to the binder (inside the bare_bones.gpr file), the binder will list further restrictions you can apply to enforce further checks.
Line 83 ⟶ 87:
end Binder;
</source>
 
Between the GNAT Reference Manual and the Ada 2005 Reference Manual, you can find out what the various pragmas are and what they do.
 
====Discard_Names====
Line 443 ⟶ 449:
===multiboot.ads===
 
I won't show the source to this package as I have made it more Ada-like and it's quite large, so I will link to the current versions, [https://github.com/Lucretia/bare_bones/blob/master/src/pc/multiboot.ads multiboot.ads] and [https://github.com/Lucretia/bare_bones/blob/master/src/pc/multiboot.adb multiboot.adb].
<source lang="ada">
-- TODO
</source>
 
===Console===
Line 773 ⟶ 777:
end Bare_Bones;
</source>
 
==Raspberry Pi==
 
===Boot process===
 
As stated in [http://www.raspberrypi.org/phpBB3/viewtopic.php?f=63&t=6685], the RPi boot proces is as follows:
 
# Power on starts the stage 1 boot loader which is on the SoC, which loads the stage 2 boot loader (bootcode.bin) into L2 cache (thus turning it on).
# bootcode.bin enables SDRAM and loads the stage 3 boot loader (loader.bin).
# loader.bin loads and executes the VideoCore firmware (start.elf).
# start.elf loads config.txt, cmdline.txt and kernel.img.
 
The config.txt file can contain aline "kernel=<name>" where you can name the kernel image anything you like.
 
==Testing==
Line 779 ⟶ 796:
 
<source lang="bash">
make qemu
 
qemu -kernel bare_bones
</source>
 
Line 789 ⟶ 804:
 
I have created a Git repository on [https://github.com/Lucretia/bare_bones GitHub] containing the source above so you don't have to do it by hand if you don't want to.
 
In fact there have ben a lot of changes since I started this project and it is a better idea to grab the source from GutHub as it will be more up to date. I will leave the documents above so you cn see how it's evolved and also how it works, maybe a bit clearer that it is now.
 
==Future==
 
# Implement a Raspberry Pi version.
# Implement a secondary stack so we can use 'Image attributes.
# Implement a 64-bit version (non EFI).
Line 799 ⟶ 815:
[[Category:Bare bones tutorials]]
[[Category:Ada]]
stage
Anonymous user