0% found this document useful (0 votes)
26 views

Hbk Practical

The document outlines the practical session for the CSAHK501 Hobby Kernel Development module, focusing on preparing a working environment, installing necessary software tools, and configuring a virtual environment. It details the installation processes for MSYS2, GCC, QEMU, NASM, and Visual Studio Code, along with key competencies and learning outcomes related to memory management. Additionally, it emphasizes the importance of teamwork, attention to detail, and flexibility in the learning process.

Uploaded by

nickitagiramata
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
26 views

Hbk Practical

The document outlines the practical session for the CSAHK501 Hobby Kernel Development module, focusing on preparing a working environment, installing necessary software tools, and configuring a virtual environment. It details the installation processes for MSYS2, GCC, QEMU, NASM, and Visual Studio Code, along with key competencies and learning outcomes related to memory management. Additionally, it emphasizes the importance of teamwork, attention to detail, and flexibility in the learning process.

Uploaded by

nickitagiramata
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 11

MODULE CODE AND TITLE: CSAHK501 HOBBY KERNEL

DEVELOPMENT

Prepared by Trainer GASANGWA Callixte

PRACTCAL SESSION
Learning Outcome 1: Prepare Working Environment
Indicative contents

1.1 Selection of tools and equipment


1.2 Installation of Software tools
1.3 Configuring virtual environment

Key Competencies For Learning Outcome 1: Prepare Working Environment

Knowledge Skills Attitudes


• Description of hobby • Installing required • Being attentive
kernel. software tools • Being flexible
• Identification of the • Configuring required • Having team work
required tools for hobby software tools • Having confidence
kernel development.
• Identification hardware
compatibility.

XYZ Electronics Ltd located in Gasabo district, it is a growing startup that specializes in creating
different computer-based solutions. They have built a computer that is supposed to
manipulate .txt files. The company is facing a problem on their self-built computer as it does not
run a .txt file because it doesn’t have an operating system. As an OS Developer, Explain to them
Hobby Kernel and it’s benefits and describe the tools and equipment's to use.

Indicative content 1.2: Installation of software tools

Task:
1.You are requested to go to the computer lab and do the task below individually.
As a Trainee in Level 5 CSA you are requested to install the following software tools in your
computer: Msys2, QEMU, NASM,GCC and Visual Studio Code

Installation
1. Download the installer :msys2-x86_64.exe
2. Run the installer. Installing MSYS2 requires 64 bit Windows 10 or newer.
3. Enter your desired Installation Folder (short ASCII-only path on a NTFS volume, no
accents, no spaces, no symlinks, no subst or network drives, no FAT).

4. When done, click Finish.


Now MSYS2 is ready for you and a terminal for the UCRT64 environment will launch.

5. Update the Package Database and Core System


pacman -Syu
6. You will probably want to install some tools like the mingw-w64 GCC to start compiling
projects:
To install GCC Run this command
$ pacman -S mingw-w64-ucrt-x86_64-gcc
The terminal window will show the output as below. Type Y and press Enter key to
continue:

7. Now you can call gcc to build software for Windows by running this command.
$ gcc --version
gcc.exe (Rev2, Built by MSYS2 project) 13.2.0
8. After installing MSYS2 you can install QEMU. First Update the package database and
core system packages by run this command: pacman -Syu
9. Now you can install QEMU by running the following command:
pacman -S mingw-w64-x86_64-qemu
After press Y for yes to continue, wait until you see the following output:

10. Create folder under UCRT64 where to save project files by running this command
mkdir folder_name
eg: mkdir hobby_pro
11. Enter the directory you created by running:
Cd hobby_pro

12. Under hobby_pro run the following command install NASM


Pacman -S nasm
Steps to install Visual Studio Code (VS Code)
Step 1: Download VS Code

• Go to the Visual Studio Code website.


• Click the Download for Windows button.
Step 2: Run the Installer

• Open the downloaded .exe file.


• In the installation wizard, click Next to proceed.
• Accept the license agreement and click Next.
• Choose your installation location and click Next.
• Select any additional tasks you want (e.g., adding to PATH) and click Next.
• Click Install to start the installation.
Step 3: Launch VS Code

• Once the installation is complete, you can check Launch Visual Studio Code and
click Finish.
• Alternatively, find VS Code in the Start menu or search for it.

MSYS2 Installation
• Download: Get msys2-x86_64.exe.
• Run Installer: Requires 64-bit Windows 10 or
newer.
• Choose Installation Folder: Use a short, ASCII-
only path on NTFS (no spaces or accents).
• Finish Installation: Click Finish; UCRT64
terminal launches.
• Update Packages: Run pacman -Syu.
• Install GCC: pacman -S mingw-w64-ucrt-
x86_64-gcc and confirm with Y.
• Verify GCC: Run gcc --version.
• Re-Update Packages: Run pacman -Syu.
• Install QEMU: pacman -S mingw-w64-x86_64-
qemu and confirm with Y.
• Create Project Folder: mkdir folder_name
(e.g., mkdir hobby_pro).
• Navigate to Folder: cd hobby_pro.
• Install NASM: Run pacman -S nasm.
Visual Studio Code (VS Code) Installation
• Download: Go to the Visual Studio Code
website and click Download for Windows.
• Run Installer: Open the downloaded .exe file.
• Follow Installation Wizard:
• Click Next and accept the license.
• Choose installation location and select tasks
(e.g., adding to PATH).
• Click Install.
• Launch VS Code: Check Launch Visual Studio
Code and click Finish or find it in the Start menu.

Indicative content 1.3: Configuring Virtual Environment

Key readings 1.3.1


To configure the path of Visual Studio Code in MSYS using your .bashrc file, you can follow
these steps:
• Open your .bashrc file: You can do this with a text editor. For example, you can use
nano:
nano ~/.bashrc
• Add VS Code to your PATH: You need to add the directory where code (the
command to launch VS Code) is located to your PATH. Typically, if you installed VS
Code in the default location, you might add something like this:
export PATH=$PATH:/c/Program Files/Microsoft\ VS \Code/bin
or
export PATH=$PATH:/c/user/pc_user_name/appdata/local/programs/Microsoft\
VS \Code/bin
Adjust the path as necessary based on your installation directory.
3. Save and exit: If you're using nano, save your changes by pressing CTRL + O, then
Enter, and exit by pressing CTRL + X.
4. Reload your .bashrc: To apply the changes without restarting the terminal, run:
source ~/.bashrc
• Verify the configuration: You can check if the configuration worked by running:
code –version
If everything is set up correctly, this command should output the version of Visual
Studio Code installed on your system.

Configuring the path of Visual Studio Code in MSYS using your .bashrc file:
1. Open .bashrc: Use a text editor (e.g., nano ~/.bashrc) to open your .bashrc file.
2.Add VS Code to PATH: Insert the following line, adjusting the path as needed based on your
installation:
• For default location:
export PATH="$PATH:/c/Program Files/Microsoft VS Code/bin"
For an alternative location:
export PATH="$PATH:/c/user/pc_user_name/appdata/local/programs/Microsoft VS
Code/bin"
3.Save and Exit: If using nano, press CTRL + O to save, then CTRL + X to exit.
4.Reload .bashrc: Apply changes with:
source ~/.bashrc
5.Verify Configuration: Check if the setup worked by running:
code –version
It should display the installed version of Visual Studio Code.
Learning Outcome 2: Implement Memory Management

Image/illustration reflecting the learning outcome contents


Indicative contents

2.1 Implementation of memory hierarchy and addressing


2.2 Implementation of memory allocation
2.3 Managing Virtual memory and swapping techniques
2.4 Applying defragmentation techniques

Key Competencies for Learning Outcome 2: Implement Memory Management

Knowledge Skills Attitudes


• Description of memory • Application of • Paying attention to
addressing and its memory addressing. detail
modes. • Flexibility
• Implementation of • Time management
• Description memory Cache. and organized
allocation and • Patience
management unit. • Implementation of
memory allocation. • Confidence
• Description layout of
process address space. • Implementation of
virtual memory.
• Identification
fragmentation • Application of
techniques fragmentation
techniques

Learning outcome 2 objectives:


By the end of the learning outcome, the trainees will be able to:
• Describe Correctly memory addressing and its model as used in memory management
• Describe correctly memory allocation management unit as used in memory management
• Describe correctly the layout of process address space as used in memory management
• Identify properly fragmentation techniques as used in memory management
• Apply properly memory addressing in the context of memory management
• Implement correctly Cashe in the context of memory management
• Implement correctly memory allocation in the context of memory management
• Implement correctly virtual memory as used in memory management
• Apply properly fragmentation techniques used in memory management
Resources
Equipment Tools Materials
• Computer • VS Code • Internet
• Projector • MSYS2 • Electricity
• GCC
• QEMU

You might also like