Hbk Practical
Hbk Practical
DEVELOPMENT
PRACTCAL SESSION
Learning Outcome 1: Prepare Working Environment
Indicative contents
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.
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).
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
• 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.
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