Free Web Hosting Provider - Web Hosting - E-commerce - High Speed Internet - Free Web Page
Search the Web

AtheOS: the responsive free desktop operating system

The AtheOS Info Site FAQs

atheos.s5.com

Frequently Asked Questions


  1. About AtheOS
    1. What is AtheOS?
    2. What is AtheOS written in?
    3. How can I contribute to the development of the OS itself?
    4. Are there any IRC channels for AtheOS?
    5. What other web-sites are there for AtheOS?
    6. What's set in stone, and what can still change?
    7. Is there any part of AtheOS that Kurt is not interested in getting feedback and constructive criticism about?
    8. Who supplied these answers?
  2. Drivers
    1. What documentation is there on how to port a Linux driver to AtheOS?
    2. What support is there for developing AtheOS drivers?
    3. What are the differences between the Linux and AtheOS driver interfaces?
    4. Can I "test" a driver implementation from userspace, or are the syscalls the driver uses only reachable from kernelspace, e.g. get_pci_info?
  3. Localisation
    1. How do I get non-English characters (e.g. å or ö) to work in the keymap I've set up?
    2. What source do I need to modify to support Chinese(Big-5) at the kernel level?
    3. Any plans to add support for special keys like the ones for adding accents to "normal" characters (e.g. pressing the "dots" key followed by an "a" and get an ä)?
  4. Installation
    1. What's the easiest way to install AtheOS?
    2. How do I build AtheOS from scratch, say with gcc on a Linux machine?
  5. Getting started
    1. How can I CapsLock and NumLock to work?
    2. How do I take a screenshot?
  6. Developing for AtheOS
    1. How do I make a view (TextView) use a fixed font?
    2. How do I avoid segfauits when calling libatheos methods, like Desktop().GetResolution()?
  7. Handling graphics
    1. What are the best source-code examples to study for using bitmaps?
    2. How can I make a Bitmap from a raw pixel data?
    3. How do you copy raw data into the Bitmap class?

Answers

  1. About AtheOS

    [Back to top]
     
    1. What is AtheOS?

      Coming soon
      [Back to top]
       
    2. What is AtheOS written in?

      The official FAQ states: "...most of AtheOS is written in highly portable C/C++. There is *very* little assembly code...".
      [Back to top]
       
    3. How can I contribute to the development of the OS itself?

      If you create new device drivers, Kurt will host them at the official AtheOS site,www.atheos.cx (and include a binary with the base-distro). If you improve an existing device-driver, send a patch to Kurt and he'll add it to the driver, if it makes sense to him.

      Kurt is not at all interested in patches for the core system.
      [Back to top]
       
    4. Are there any IRC channels for AtheOS?

      There are several: -

  2. Drivers

    [Back to top]
     
    1. What documentation is there on how to port a Linux driver to AtheOS?

      There is very little, almost no, documentation on how to write device drivers for AtheOS.

      Kurt has ported two Linux NIC drivers 'quite easily' - they were pretty self-sufficient, not relying on much support from the kernel.
      Correct as at: 5/May/01 [Back to top]
       
    2. What support is there for developing AtheOS drivers?

      There is a mailing list specifically for AtheOS driver developers, and you can subscribe to it by writing an email to AtheOS-Driver-Dev-subscribe@ethernalquest.org. The list only accepts plain text mails under 30KB, and is currently unmoderated.
      Correct as at: 13/May/01 [Back to top]
       
    3. What are the differences between the Linux and AtheOS driver interfaces?

      The major driver difference between AtheOS and Linux is that, in Linux, basically the modules are a part of the kernel that's not yet loaded, and in AtheOS there's a sharp distinction between the device driver and the kernel.

      Linux modules can access most of the "internal" kernel structures, e.g. to wait for an event they normally link nodes into internal scheduler structures, etc., rather than the kernel having support functions that abstract it a bit.

      AtheOS has a much stricter interface between the kernel and a device driver. The kernel communicates with device drivers through abstract handles rather than internal structures, much like it communicates with applications through file-descriptors, semaphore handles, message port handles, etc etc.

      The AtheOS kernel has always been pre-emptable. Linux used to allow threads to enter the kernel only one at a time, even after they had added support for SMP. I believe the Linux kernel now allows some concurrency in the kernel, but Linux drivers might still need more semaphore protection added during a port to AtheOS.

      Linus believes multi-threading is bad, and used to be strongly against allowing multiple threads inside the kernel, but this has been relaxed a bit in later kernels to get better SMP performance.
      [Back to top]
       
    4. Can I "test" a driver implementation from userspace, or are the syscalls the driver uses only reachable from kernelspace, e.g. get_pci_info?

      Many functions are available both in user-space and kernel-space, including the get_pci_info() and allied functions. Some parts of a driver can be tested in user-space, but most of a NIC driver would not lend itself to user-space testing. For example, you can't handle interrupts from user-space, which is a show-stopper for most drivers.
      [Back to top]
       

  3. Localisation

    [Back to top]
     
    1. How do I get non-English characters (e.g. å or ö) to work in the keymap I've set up?

      First, install a font that contains all the necessary characters.

      Characters above the 7-bit ascii range must be typed as UTF-8 encoded multichars in hex, e.g. the Norwegian "aa" is encoded as the two-byte UTF-8 character(0xc3,0xa5). This gets encoded as 0xc3a5 in the ascii keymap file.
      [Back to top]
       

    2. What source do I need to modify to support Chinese(Big-5) at the kernel level?

      None! All you need to do is to install a font with the required characters - AtheOS uses UTF-8 encoded unicode throughout.
      [Back to top]
       
    3. Any plans to add support for special keys like the ones for adding accents to "normal" characters (e.g. pressing the "dots" key followed by an "a" and get an ä)?

      Kurt does plan to implement "dead-keys", but it's not very high priority.
      Correct as at: 6/Jun/01 [Back to top]
       

  4. Installation

    [Back to top]
     
    1. What's the easiest way to install AtheOS?

      Basically you (raw) write the three floppy images to disks, put the base tarball on a (FAT) partition some how, boot from disk 1, follow the prompt, mount the DOS partition, and then follow the rest of the INSTALL file. A full set of instructions can be found in the INSTALL file in the distribution.
      [Back to top]
       
    2. How do I build AtheOS from scratch, say with gcc on a Linux machine?

      The sources should come with a Makefile. Just go here, download the various pieces, and have fun.
      [Back to top]
       

  5. Getting started

    [Back to top]
     
    1. How can I CapsLock and NumLock to work?

      They don't currently work with any of the keytables - this is on Kurt's todo-list.
      Correct as at: 6/Jun/01 [Back to top]
       
    2. How do I take a screenshot?

      Snapshot support was missing before 0.3.4, but now you press Print Screen, and the snapshot appears in "/tmp/snapshot.png"
      [Back to top]
       

  6. Developing for AtheOS

    [Back to top]
     
    1. How do I make a view (TextView) use a fixed font?

      Assuming that pcTextView is your TextView object, and Lucida Sans Typewriter is your monospace typeface here's an example for release 0.3.2,

      // Change the font
      Font* pcAppFont = new Font ( *pcTextView->GetEditor()->GetFont() );
      pcAppFont->SetFamilyAndStyle( "Lucida Sans Typewriter", "Regular" );
      pcTextView->GetEditor()->SetFont(pcAppFont);


      There were some improvements made to font-handling in release 0.3.3. Font's are now reference-counted - this makes it easier to share font's between views. The notification system now allows a view to keep track of any changes made to it's current font (including replacing the font). The os::TextView class now listens to those notification's and applies the changes to its internal text-editor, so if you change os::TextView's font, internal editor will also reflect the change.
      [Back to top]
       

    2. How do I avoid segfauits when calling libatheos methods, like Desktop().GetResolution()?

      You can only call libatheos methods from inside your Application class - if you don't have one, your code segfaults when you make the call. You *must* *must* have an os::Application class created, and running (os::Application::Run()) before you make any calls to things like Desktop().GetResolution().
      [Back to top]
       

  7. Handling graphics

    [Back to top]
     
    1. What are the best source-code examples to study for using bitmaps?

      Take a look at the Xspringies, IconEdit, bmview, or Desktop-manager sources for examples on how to use the os::Bitmap class. Xspringies use a bitmap for "double-buffering" and use the appserver to render into it (by adding a view to the bitmap). IconEdit and bmview copy bitmap-data into the bitmaps themselves and only ask the appserver to render the finished bitmap into an on-screen view. Desktop-manager does both.
      [Back to top]
       
    2. How can I make a Bitmap from a raw pixel data?

      You can obtain a pointer to the raster-memory by calling the os::Bitmap::LockRaster() member. You can then copy the pixel data directly to that buffer.
      memcpy( pcBitmap->LockRaster(), pBitmapData, nBitmapSize );

      You might have to write your own copy routine if the bitmap data doesn't have the same "pitch" (bytes per row) as the bitmap.

      To be able to add support for bitmaps allocated in video-memory (to allow manipulating it by the blitter or using it as an video-overlay in the future) there is a method for obtaining the raster-pointer named LockRaster() that returns the pointer and a method named UnlockRaster() that releases it. The application server needs the lock/unlock mechanism to know when it's safe to move the bitmap, if the video-memory it uses is needed by someone else.

      Kurt plans to change this design slightly, to add a Lock() and Unlock() member that will protect the Bitmap object locally by acquiring a semaphore, and notify the application server so it doesn't move the bitmap between Lock() and Unlock() operations. The LockRaster() and UnlockRaster() will then be removed and a GetRaster() will be added instead. The above example will then look like this:
      pcBitmap->Lock();
      memcpy( pcBitmap->GetkRaster(), pBitmapData, nBitmapSize );
      pcBitmap->Unlock();

      [Back to top]
       
    3. How do you copy raw data into the Bitmap class?

      The raster-buffer is located in memory that is shared between the appserver and the application, so the application cannot change the raster-pointer.

      It is legal to write to the pointer returned by os::Bitmap::LockRaster() so you can copy your bitmap-data into the bitmap (see previous answer). Remember to set the os::Bitmap::SHARE_FRAMEBUFFER flag when constructing the bitmap or else os::Bitmap::LockRaster() will always return a NULL pointer.
      [Back to top]
       
Who supplied these answers?

DraX
Hobby
Enrico Kern
Amir Mohammadkhani
Brent P. Newhall
Jonas Sundstrom
Vanders
xdsg
And Mr. AtheOS himself, Kurt Skauen

This document was compiled by Euan Mee from posts to the Atheos-developers mailing list
[Back to top]
 

[Home] [FAQs] [Other AtheOS sites]