Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
153 changes: 18 additions & 135 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,83 +63,9 @@ jobs:
path: vibos-arm64.tar.gz
retention-days: 90

build-x86_64:
name: Build x86_64 Kernel
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up build environment
run: |
sudo apt-get update
sudo apt-get install -y \
gcc \
binutils \
qemu-system-x86 \
make \
lld \
llvm \
xorriso \
grub-pc-bin \
grub-efi-amd64-bin \
mtools \
dosfstools

- name: Build x86_64 kernel
run: |
make -f Makefile.multiarch ARCH=x86_64 clean
make -f Makefile.multiarch ARCH=x86_64 kernel

- name: Create x86_64 bootable images
run: |
# Create UEFI image
if [ -f scripts/create-uefi-image.sh ]; then
chmod +x scripts/create-uefi-image.sh
./scripts/create-uefi-image.sh || echo "UEFI image creation skipped"
fi

# Create BIOS image
if [ -f scripts/create-bios-image.sh ]; then
chmod +x scripts/create-bios-image.sh
./scripts/create-bios-image.sh || echo "BIOS image creation skipped"
fi

# Create ISO
if [ -f scripts/create-iso.sh ]; then
chmod +x scripts/create-iso.sh
./scripts/create-iso.sh || echo "ISO creation skipped"
fi

- name: Package x86_64 artifacts
run: |
mkdir -p release/x86_64
cp build/x86_64/kernel/vibos-x86_64.elf release/x86_64/

# Copy bootable images if they exist
[ -f vibos-uefi.img ] && cp vibos-uefi.img release/x86_64/
[ -f vibos-bios.img ] && cp vibos-bios.img release/x86_64/
[ -f vibos.iso ] && cp vibos.iso release/x86_64/

# Create checksums
cd release/x86_64
sha256sum * > SHA256SUMS
cd ../..

# Create tarball
tar -czf vibos-x86_64.tar.gz -C release/x86_64 .

- name: Upload x86_64 artifacts
uses: actions/upload-artifact@v4
with:
name: vibos-x86_64
path: vibos-x86_64.tar.gz
retention-days: 90

create-release:
name: Create GitHub Release
needs: [build-arm64, build-x86_64]
needs: [build-arm64]
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -154,12 +80,6 @@ jobs:
name: vibos-arm64
path: ./artifacts

- name: Download x86_64 artifacts
uses: actions/download-artifact@v4
with:
name: vibos-x86_64
path: ./artifacts

- name: Extract version
id: get_version
run: |
Expand All @@ -175,12 +95,13 @@ jobs:
cat > release_notes.md << 'EOF'
# Vib-OS ${{ steps.get_version.outputs.version }}

A Unix-like operating system with multi-architecture support.
A Unix-like operating system with ARM64 support and GUI.

## 🎯 Supported Architectures

- ✅ **ARM64** - Raspberry Pi 4/5, ARM64 UEFI boards
- ✅ **x86_64** - Modern PCs (UEFI and Legacy BIOS)
- ✅ **ARM64** - Raspberry Pi 4/5, ARM64 UEFI boards, Apple Silicon (via UTM)

> **Note**: For a standalone x86_64 UEFI build, see the [`vib-os-x86_64/`](https://github.com/viralcode/vib-OS/tree/main/vib-os-x86_64) folder.

## 📦 Downloads

Expand All @@ -190,14 +111,6 @@ jobs:
- `vibos-arm64.img` - Bootable SD card image (if available)
- `SHA256SUMS` - Checksums for verification

### x86_64
- `vibos-x86_64.tar.gz` - x86_64 kernel and bootable images
- `vibos-x86_64.elf` - Kernel binary
- `vibos-uefi.img` - UEFI bootable image (if available)
- `vibos-bios.img` - Legacy BIOS bootable image (if available)
- `vibos.iso` - Bootable ISO (if available)
- `SHA256SUMS` - Checksums for verification

## 🚀 Quick Start

### For ARM64 (Raspberry Pi 4/5)
Expand All @@ -212,56 +125,27 @@ jobs:
# Insert SD card and boot
```

### For x86_64 PC (UEFI)
```bash
# Extract the archive
tar -xzf vibos-x86_64.tar.gz

# Write to USB drive (replace /dev/sdX with your USB device)
sudo dd if=vibos-uefi.img of=/dev/sdX bs=4M status=progress
sync

# Boot from USB (select UEFI boot in BIOS)
```

### For x86_64 PC (Legacy BIOS)
```bash
# Extract the archive
tar -xzf vibos-x86_64.tar.gz

# Write to USB drive (replace /dev/sdX with your USB device)
sudo dd if=vibos-bios.img of=/dev/sdX bs=4M status=progress
sync

# Boot from USB (select Legacy/BIOS boot)
```

### For x86_64 VM (ISO)
```bash
# Extract the archive
tar -xzf vibos-x86_64.tar.gz

# Use vibos.iso with QEMU, VirtualBox, or VMware
qemu-system-x86_64 -cdrom vibos.iso -m 2G
```
### For Apple Silicon (UTM)
1. Download UTM from https://mac.getutm.app/
2. Create new ARM64 virtual machine
3. Use `vibos-arm64.img` as boot disk
4. Configure 2GB+ RAM and boot

## ✨ Features

- Multi-architecture support (ARM64, x86_64)
- Virtual memory management (MMU/paging)
- Process scheduling and context switching
- Virtual File System (VFS) with RAMFS, EXT4, APFS support
- Graphical User Interface (GUI) with window manager
- Device drivers (PCI, USB, network, storage)
- System calls and IPC
- Full graphical desktop environment
- Process scheduling and multi-threading
- Virtual File System (VFS) with RAMFS, EXT4 support
- TCP/IP networking stack
- Python and Nano scripting languages
- Doom, Snake, and other apps
- Media support (JPEG, MP3)

## 📚 Documentation

See the repository for detailed documentation:
- `BUILD_ALL.md` - Build instructions
- `MULTIARCH_QUICKSTART.md` - Quick reference
- `MULTIARCH_COMPLETE.md` - Technical details
- `README.md` - Full feature overview
- `BUILD_GUIDE.md` - Build instructions
- `docs/` - Additional documentation

## 🔒 Verification
Expand Down Expand Up @@ -292,6 +176,5 @@ jobs:
prerelease: false
files: |
artifacts/vibos-arm64.tar.gz
artifacts/vibos-x86_64.tar.gz
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
42 changes: 3 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,41 +42,6 @@ jobs:
path: build/kernel/unixos.elf
retention-days: 7

build-x86_64:
name: Build x86_64
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up build environment
run: |
sudo apt-get update
sudo apt-get install -y \
gcc \
binutils \
make \
lld \
llvm

- name: Build x86_64 kernel
run: |
make -f Makefile.multiarch ARCH=x86_64 clean
make -f Makefile.multiarch ARCH=x86_64 kernel

- name: Check build artifacts
run: |
ls -lh build/x86_64/kernel/vibos-x86_64.elf
file build/x86_64/kernel/vibos-x86_64.elf

- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: vibos-x86_64-ci
path: build/x86_64/kernel/vibos-x86_64.elf
retention-days: 7

test-arm64:
name: Test ARM64 (QEMU)
needs: build-arm64
Expand Down Expand Up @@ -108,7 +73,7 @@ jobs:

summary:
name: Build Summary
needs: [build-arm64, build-x86_64]
needs: [build-arm64]
runs-on: ubuntu-latest
if: always()

Expand All @@ -120,13 +85,12 @@ jobs:
echo "| Architecture | Status |" >> $GITHUB_STEP_SUMMARY
echo "|--------------|--------|" >> $GITHUB_STEP_SUMMARY
echo "| ARM64 | ${{ needs.build-arm64.result }} |" >> $GITHUB_STEP_SUMMARY
echo "| x86_64 | ${{ needs.build-x86_64.result }} |" >> $GITHUB_STEP_SUMMARY
echo "" >> $GITHUB_STEP_SUMMARY

if [ "${{ needs.build-arm64.result }}" == "success" ] && [ "${{ needs.build-x86_64.result }}" == "success" ]; then
if [ "${{ needs.build-arm64.result }}" == "success" ]; then
echo "✅ All builds passed!" >> $GITHUB_STEP_SUMMARY
exit 0
else
echo "❌ Some builds failed" >> $GITHUB_STEP_SUMMARY
echo "❌ Build failed" >> $GITHUB_STEP_SUMMARY
exit 1
fi
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,5 @@ docs/MULTIARCH_BUILD.md
docs/BOOT_SUPPORT.md
MULTIARCH_COMPLETE.md
BUILD_ALL.md
working-os/
.github/workflows/README.md
16 changes: 12 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
\ V /| || |_) | | |_| |___) |
\_/ |_||_.__/ \___/|____/

Vib-OS v2.2.0 - Multi-Architecture OS with Full GUI
Vib-OS v2.2.1 - Multi-Architecture OS with Full GUI
```

<p align="center">
Expand Down Expand Up @@ -45,6 +45,14 @@ Vib-OS is a from-scratch, Unix-like operating system with **full multi-architect
- ✅ **Memory Management**: MMU/paging for all architectures
- ✅ **Interrupt Handling**: GICv3 (ARM64), APIC (x86_64), PIC (x86)

### Standalone x86_64 UEFI

For a simplified x86_64 build that boots directly from UEFI on real hardware, see the **[vib-os-x86_64](vib-os-x86_64/)** folder. It includes:
- Limine bootloader integration
- Framebuffer graphics with GUI
- JPEG wallpaper support
- Easy `make` build system

## 📸 Screenshots

### Main Desktop
Expand Down Expand Up @@ -196,7 +204,7 @@ graph TD

### 🔒 Security Features
- **Spinlock Synchronization**: IRQ-safe spinlocks for ARM64 and x86_64
- **Media Sandbox**: Fault-isolating sandbox for media decoders
- **Media Sandbox**: Fault-isolating sandbox for media decoders (Runs in Kernel Mode/Ring 0 - Reliability feature, NOT a security boundary)
- **ASLR**: Address Space Layout Randomization for process protection
- **NX Protections**: Non-executable page support

Expand Down Expand Up @@ -427,8 +435,8 @@ Use UTM (https://mac.getutm.app/):
- [x] ~~**Multi-threading**: Thread creation via clone()~~ *(Done)*
- [x] ~~**EXT4 Write Support**: Full read/write with bitmap management~~ *(Done)*
- [x] ~~**Userspace Execution**: Complete sys_execve implementation~~ *(Done)*
- [ ] **x86 32-bit**: Complete kernel implementation
- [ ] **USB Support**: Add USB mass storage and HID drivers
- [/] **x86 32-bit**: Complete kernel implementation
- [/] **USB Support**: Add USB mass storage and HID drivers
- [ ] **User Accounts**: Login screen and multi-user support
- [ ] **Package Manager**: Install/remove applications
- [ ] **PNG Support**: Add PNG image decoder
Expand Down
34 changes: 34 additions & 0 deletions drivers/usb/usb_hid.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* vib-OS - USB HID Driver
* Implements Human Interface Device Class
*/

#include "drivers/usb/usb.h"
#include "mm/kmalloc.h"
#include "printk.h"

/* HID Requests */
#define HID_GET_REPORT 0x01
#define HID_GET_IDLE 0x02
#define HID_GET_PROTOCOL 0x03
#define HID_SET_REPORT 0x09
#define HID_SET_IDLE 0x0A
#define HID_SET_PROTOCOL 0x0B

/* Functions */

int usb_hid_init(struct usb_device *dev) {
printk(KERN_INFO "USB-HID: Initializing HID Device\n");

// 1. Get HID Descriptor
// 2. Set Idle (0)
// 3. Set Protocol (Boot Protocol = 0) if supported
// 4. Start Interrupt IN polling

return 0;
}

void usb_hid_irq(struct usb_device *dev) {
// Handle interrupt IN data (keypress, mouse move)
printk(KERN_DEBUG "USB-HID: Interrupt received\n");
}
Loading
Loading