Google Summer of Code 2024

Events from the world of KolibriOS and its developers
  • Hello,

    We are glad to announce that KolibriOS has been accepted to participate in Google Summer of Code 2024!🎉

    This is our third time after 2014 and 2016. It has been a while, yes. We are grateful to all the contributors, users and enjoyers who made this dream come true again.

    Prospective students are welcome to find our ideas page here.

    Each student is required to make a post with answers (see ideas page) until the application deadline.

    Have fun!
  • Task: draws the text 'Hello GSoC 2024' and creates a button 'Paint' that will change the color of that text between any three colors

    Solution:

    Code: Select all

    #![no_std]
    #![no_main]
    
    use alloc::vec::Vec;
    use cstr_core::{cstr, CStr};
    
    use kos::{
        graphics::{display_message, Color, Dot, Size},
        input::fetch_key,
        system::{get_lang, Lang},
        threads::{exit, fetch_event, Event},
        windows::{
            define_button, define_window, end_window_draw, get_button_id, start_window_draw,
            WindowKind, WindowParams, CLOSE_BUTTON,
        },
    };
    
    const HEADER: &CStr = cstr!("Hey Kolibri");
    const MSG: &CStr = cstr!("Hello GSoC 2024");
    const BTN: u32 = 42;
    const COLORS: [(u8, u8, u8); 3] = [(255, 0, 0), (0, 255, 0), (0, 0, 255)];
    
    #[macro_use]
    extern crate alloc;
    
    fn draw_window(c: usize) {
        start_window_draw();
    
        define_window(
            Dot { x: 50, y: 50 },
            Size {
                width: 300,
                height: 400,
            },
            WindowParams {
                color: Color::rgb(0xff, 0xff, 0xff),
                kind: WindowKind::Themed,
                title: Some(HEADER),
            },
        );
    
        let color = COLORS[c % 3];
        display_message(
            Dot { x: 10, y: 10 },
            Color::rgb(color.0, color.1, color.2),
            MSG,
            None,
        );
    
        define_button(
            Dot { x: 10, y: 70 },
            Size {
                width: 70,
                height: 15,
            },
            BTN,
            true,
            true,
            Some(Color::rgb(128, 255, 128)),
        );
    
        display_message(
            Dot { x: 10, y: 70 },
            Color::rgb(0, 0, 0),
            cstr!("Paint"),
            None,
        );
    
        end_window_draw();
    
        return;
    }
    
    fn button_handler(c: &mut usize) {
        let btn_id = get_button_id();
    
        if btn_id.is_some() {
            match btn_id.unwrap() {
                CLOSE_BUTTON => exit(),
                BTN => {
                    *c += 1;
                    draw_window(*c);
                }
                _ => {}
            }
        }
    }
    
    #[no_mangle]
    fn kol_main() {
        let mut c = 0;
    
        while let Some(ev) =
            fetch_event((Event::Redraw as u32) | (Event::KeyPress as u32) | (Event::BtnPress as u32))
        {
            match ev {
                Event::Redraw => draw_window(c),
                Event::KeyPress => drop(fetch_key()),
                Event::BtnPress => button_handler(&mut c),
                _ => break,
            }
        }
    }
    
    
  • Intake task: parsing a local RSS feed for the RSS/Atom feed reader project.

    Currently, the program parses a local RSS feed and displays it's contents: https://files.catbox.moe/pjqfgp.png

    The target XML file should be placed at `/sys/MEDIA/example.rss`.

    Attached with this post are the program and RSS schema file, along with links to library files.
    The supporting files `asm-xml.inc` and `xml.obj` can be found in the following archives:
    - https://board.kolibrios.org/download/f ... 9cff948de9
    - download/file.php?id=2508&sid=34fb35818 ... 9cff948de9
    Attachments
    minifeed.asm (9.99 KiB)
    Downloaded 232 times
    rss-schema.xml (375 Bytes)
    Downloaded 253 times
  • Intake task: Create two to three ext4 disk images that test various mkfs.ext4 capabilties.
    GSOC task: Write support for ext4 file system.

    Three different ext4 file system images test different features of the ext4 file system: addressing length: 32-bit vs 64-bit, no extents, and dir_index implementation.

    TESTS:

    t071 and t072 check with the file system being 32/64bit.
    t073 makes the image without dir_index implementation and tries to read a file.
    t074 makes the image without extent, and tries to read through a large file.

    These are to be placed inside `umka/test`

    IMAGE GENERATION:

    All the image generation happens inside "ext4.sh". A makefile is provided for leisure, and one can simply run "make clean" and then "make" to make all the test disk images. It is to be placed in `umka/img/`
    Attachments
    disk_gen.tar.gz (459.5 KiB)
    disk generation
    Downloaded 197 times
    tests.tar.gz (2.2 KiB)
    tests
    Downloaded 227 times
    Last edited by tejas_t on Tue Apr 02, 2024 7:13 pm, edited 2 times in total.
  • Here is my code for the NVMe driver test task. The task was to enumerate all NVMe devices on the PCI bus and report the capacity of the disk. I'm still currently working on reporting the capacity of the disk, since you have to initialize the controller first before you can send an identify command to the controller, and this requires you to do a lot of reading and setup the appropriate data structures. However, I was able to map the MMIO registers and query important information needed to setup the controller, so I have basically done a fair portion of the initialization work already.
    Attachments
    nvme.inc (7.84 KiB)
    Downloaded 175 times
    nvme.asm (5.54 KiB)
    Downloaded 248 times
  • GSOC Task: SDL2 Port for KolibriOS
    Test Task: Fixing sound bug of PokeMini: https://github.com/KolibriOS/kolibrios/issues/18

    There is a small bug in PokeMini where closing the program using "X" button of the window, last played in game sound hangs on which continues to play as a single infinite note until the shutdown or reboot of the system. The fix ports the current version of PokeMini in KolibriOS' source code to newlibc as it currently relies on menuetlibc for compiling.
    Before fix
    Downloaded 210 times
    After fix
    Downloaded 213 times

    For such changes, a new Makefile has been made. Here is the patch for it:
    Downloaded 230 times
  • Was too late the revise my app to GSoC so submitting here.
    Attachments
    Downloaded 242 times
  • Hello, Everyone
    My GSoC task is to write an RSS news reader as a standalone KolibriOS application.
    I was assigned a test task of creating a KolibriOS application which parses the locally stored RSS/XML data and displays it on the application window.

    An Example KolibriOS program was present in OS so I tried to understand the program and figured out how to create programs for KolibriOS.
    I faced many challenges as a beginner but the mentors supported and helped me even with my silly doubts. As a result, I completed my test task. I have attached the Image of the working application.
    Attachments
    RSS News Reader Application.png
    RSS News Reader Application.png (82.42 KiB)
    Viewed 7772 times
  • Who is online

    Users browsing this forum: No registered users and 1 guest