{"id":40092551,"url":"https://github.com/gugacs/sweb-env","last_synced_at":"2026-04-13T13:02:05.135Z","repository":{"id":181787074,"uuid":"603818757","full_name":"gugacs/sweb-env","owner":"gugacs","description":"My development setup to work on the SWEB educational OS.","archived":false,"fork":false,"pushed_at":"2025-03-28T12:24:36.000Z","size":16,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-06T06:51:37.790Z","etag":null,"topics":["bash","docker","docker-compose","educational-project","macos","operating-system","os","os-development","osx","windows"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gugacs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2023-02-19T17:00:56.000Z","updated_at":"2025-03-28T12:24:41.000Z","dependencies_parsed_at":null,"dependency_job_id":"e9aa54c6-2c56-42e0-beac-1bf6514c604a","html_url":"https://github.com/gugacs/sweb-env","commit_stats":null,"previous_names":["iimpaq/sweb-env","gugacs/sweb-env"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/gugacs/sweb-env","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gugacs%2Fsweb-env","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gugacs%2Fsweb-env/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gugacs%2Fsweb-env/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gugacs%2Fsweb-env/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gugacs","download_url":"https://codeload.github.com/gugacs/sweb-env/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gugacs%2Fsweb-env/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31753551,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T09:16:15.125Z","status":"ssl_error","status_checked_at":"2026-04-13T09:16:05.023Z","response_time":93,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bash","docker","docker-compose","educational-project","macos","operating-system","os","os-development","osx","windows"],"created_at":"2026-01-19T10:06:09.765Z","updated_at":"2026-04-13T13:02:05.129Z","avatar_url":"https://github.com/gugacs.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 🌐 sweb-env\n\n## 📝 Description\nThis repository contains scripts to set up a complete development environment for the SWEB educational operating system on macOS. It uses Docker for the development environment and QEMU for running the OS.\n\n## ⚠️ Disclaimer\nUse at your own risk! While this setup has been tested, I cannot take responsibility for any issues that might arise from using these scripts. Development environments can be complex, and unexpected problems may occur depending on your specific system configuration. Always back up your work before making significant changes to your development environment.\n\n## 🔧 Prerequisites\nBefore you begin, ensure you have the following installed on your macOS system:\n\n1. **Homebrew** - Package manager for macOS\n   ```bash\n   /bin/bash -c \"$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)\"\n   ```\n   \n2. **Zsh** - Shell environment (comes pre-installed on newer macOS versions)\n\n3. **QEMU** - Emulator to run the OS\n   ```bash\n   brew install qemu\n   ```\n\n4. **Docker Desktop** - For containerized development\n   ```bash\n   brew install --cask docker\n   ```\n   After installation, launch Docker Desktop from your Applications folder.\n\n## 🚀 Getting Started\n\n### Initial Setup\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/IImpaq/sweb-env.git\n   cd sweb-env\n   ```\n\n2. Clone the SWEB repository:\n   ```bash\n   git clone https://github.com/isec-tugraz/sweb.git src\n   ```\n   (You can replace with your own SWEB repository URL)\n\n3. Run the setup script:\n   ```bash\n   ./setup.sh\n   ```\n\n## 💻 Development Workflow\n\n### Starting Your Development Session\n1. **Start the Docker container**:\n   ```bash\n   ./run.sh\n   ```\n\n2. **Open the 'src' folder as a project in your IDE** (CLion recommended):\n   - When opening for the first time, create a new toolchain and select the Docker container\n   - Move the Docker toolchain up in the hierarchy to use it as default\n\n3. **Make your code changes** in the ```src``` directory\n\n4. **Compile your changes**:\n   ```bash\n   ../compile.sh release   # For release mode\n   # OR\n   ../compile.sh debug     # For debug mode\n   ```\n\n5. **Run the OS**:\n   ```bash\n   cd src\n   ../emulate.sh run\n   ```\n\n### Debugging the OS\n1. **Compile in debug mode**:\n   ```bash\n   ../compile.sh debug\n   ```\n\n2. **Start QEMU in debug mode**:\n   ```bash\n   cd src\n   ../emulate.sh debug\n   ```\n\n3. **Connect your IDE debugger** to the QEMU instance\n\n### Ending Your Session\nWhen you're done working:\n```bash\n../stop.sh\n```\n\n## 🔍 Setting Up CLion for Debugging\n\n1. Click \"Edit Configurations...\"\n2. Click the plus icon and select \"Remote Debug\"\n3. Configure the following settings:\n   - Name: Choose any logical name\n   - 'target remote' args: ```127.0.0.1:1234```\n   - Symbol file: ```/tmp/sweb/kernel64.x```\n   - Sysroot: ```/tmp/sweb/```\n   - Path mapping:\n     - Remote: ```/tmp/src/```\n     - Local: Path to your local SWEB repository\n\n## 📋 Complete Example Workflow\n\n```bash\n# First time setup:\ngit clone https://github.com/IImpaq/sweb-env.git\ncd sweb-env\ngit clone https://github.com/isec-tugraz/sweb.git src\n./setup.sh\n\n# Daily development workflow:\n# When starting:\n./run.sh\ncd src\n\n# Make code changes in src directory\n../compile.sh release\n../emulate.sh run\n\n# When finished:\ncd ..\n./stop.sh\n```\n\n## 🗂️ Repository Structure and Scripts\n\n### Scripts Overview\nThis repository contains several utility scripts to manage your SWEB development environment:\n\n- **```setup.sh```**: Initializes the Docker environment and prepares everything for first use\n- **```run.sh```**: Starts the Docker container for development\n- **```stop.sh```**: Stops the running Docker container\n- **```compile.sh```**: Compiles the SWEB operating system (accepts ```debug``` or ```release``` parameter)\n- **```clean.sh```**: Removes build artifacts and cleans the project\n- **```emulate.sh```**: Launches QEMU to run or debug the compiled OS\n\n### Key Files and Locations\n- **```docker-compose.yml```**: Defines the Docker container configuration for the development environment\n- **```src/```**: Directory containing the SWEB source code (created by cloning your SWEB repository)\n- **```/tmp/sweb/```**: Location inside the Docker container where compiled SWEB files are stored\n- **```/tmp/src/```**: Location inside the Docker container where source files are mounted\n- **```/tmp/sweb/kernel64.x```**: The compiled kernel binary used for debugging\n- **```127.0.0.1:1234```**: Default debugging port used by QEMU for GDB connection\n\n## 👤 Author\nMarcus Gugacs\n\n## 📄 License\nSee LICENSE file\n\n## 🙏 Acknowledgments\n* https://github.com/isec-tugraz/sweb\n* https://www.isec.tugraz.at/course/operating-systems-inp32512uf-wintersemester-2022-23/\n* https://www.isec.tugraz.at/teaching/materials/os/tutorials/sweb-kernel-debuggen-mit-cgdb/\n* https://brew.sh/\n* https://www.qemu.org/\n* https://www.zsh.org/\n* https://www.docker.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgugacs%2Fsweb-env","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgugacs%2Fsweb-env","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgugacs%2Fsweb-env/lists"}