bincompat-django-python - #111
Open
alxcris wants to merge 4 commits into
Open
Conversation
alxcris
force-pushed
the
django-port-final
branch
2 times, most recently
from
July 11, 2026 10:43
82fd7c3 to
07db624
Compare
There was a problem hiding this comment.
Pull request overview
Adds a new bincompat-django6.0-python3.12 catalog entry intended to run a minimal Django 6.0 app on Unikraft via the ELF Loader (QEMU + Firecracker), including a Docker-built root filesystem and helper scripts.
Changes:
- Introduces a minimal Django app (
server.py) plus a scratch-based Docker rootfs build. - Adds build/run/test automation scripts and a Firecracker config for x86_64.
- Adds setup helpers and documentation for manual execution.
Reviewed changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| bincompat-django6.0-python3.12/setup.sh | Creates workdir/ and symlinks required repos into it. |
| bincompat-django6.0-python3.12/rootfs/server.py | Minimal Django app configured to run runserver on 0.0.0.0:8080. |
| bincompat-django6.0-python3.12/rootfs/requirements.txt | Python deps for the rootfs (Django). |
| bincompat-django6.0-python3.12/rootfs/Makefile | Make wrapper intended to build via Unikraft workdir/ paths. |
| bincompat-django6.0-python3.12/rootfs/Dockerfile | Builds a scratch rootfs containing Python 3.12 + installed Django. |
| bincompat-django6.0-python3.12/README.md | Manual setup/build/run instructions for QEMU. |
| bincompat-django6.0-python3.12/fc.x86_64.json | Firecracker boot config (kernel path, boot args, initrd). |
| bincompat-django6.0-python3.12/.scripts/README.md | Helper-script documentation for build/run workflows. |
| bincompat-django6.0-python3.12/.scripts/common.sh | Shared build helper to reuse elfloader-net base kernel artifacts. |
| bincompat-django6.0-python3.12/.scripts/build/rootfs.x86_64 | Rootfs/initrd build script (currently Makefile-based). |
| bincompat-django6.0-python3.12/.scripts/build/kernel.qemu.x86_64 | Builds the base ELF loader kernel for QEMU via elfloader-net. |
| bincompat-django6.0-python3.12/.scripts/build/kernel.fc.x86_64 | Builds the base ELF loader kernel for Firecracker via elfloader-net. |
| bincompat-django6.0-python3.12/.scripts/build/qemu.x86_64 | Convenience script to build rootfs + kernel for QEMU. |
| bincompat-django6.0-python3.12/.scripts/build/fc.x86_64 | Convenience script to build rootfs + kernel for Firecracker. |
| bincompat-django6.0-python3.12/.scripts/run/qemu.x86_64 | Runs the base kernel under QEMU with initrd + Django command line. |
| bincompat-django6.0-python3.12/.scripts/run/fc.x86_64 | Runs the base kernel under Firecracker with initrd + Django command line. |
| bincompat-django6.0-python3.12/.scripts/test/common.sh | Test helpers (cleanup, start instance, ping/curl checks). |
| bincompat-django6.0-python3.12/.scripts/test/wrapper.sh | Test wrapper that starts the instance and asserts expected behavior. |
| bincompat-django6.0-python3.12/.scripts/test/all.sh | Runs build+run test flows for QEMU and Firecracker. |
| bincompat-django6.0-python3.12/.scripts/test/README.md | Test instructions for the new example. |
| bincompat-django6.0-python3.12/.scripts/test/.gitignore | Ignores test logs. |
| bincompat-django6.0-python3.12/.gitignore | Ignores build artifacts and Python cache. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+1
to
+6
| #!/bin/sh | ||
|
|
||
| rm -f initrd.cpio | ||
| make -C rootfs/ clean | ||
| make -C rootfs/ | ||
| ./workdir/unikraft/support/scripts/mkcpio initrd.cpio ./rootfs/ |
Comment on lines
+1
to
+5
| UK_ROOT ?= $(PWD)/workdir/unikraft | ||
| UK_BUILD ?= $(PWD)/workdir/build | ||
| UK_APP ?= $(PWD)/workdir/apps/elfloader | ||
| LIBS_BASE = $(PWD)/workdir/libs | ||
| UK_LIBS ?= $(LIBS_BASE)/libelf |
Comment on lines
+15
to
+21
| ./setup.sh | ||
| mkdir rootfs | ||
| docker build -t unikraft-django-fs . | ||
| docker container create --name unikraft-django-container unikraft-django-fs sh | ||
| docker export unikraft-django-container -o rootfs.tar | ||
| tar xvf rootfs.tar -C rootfs/ | ||
| test -f initrd.cpio || ./workdir/unikraft/support/scripts/mkcpio initrd.cpio ./rootfs/ |
Comment on lines
+42
to
+47
| mkdir rootfs | ||
| docker build -t unikraft-django-fs . | ||
| docker container create --name unikraft-django-container unikraft-django-fs sh | ||
| docker export unikraft-django-container -o rootfs.tar | ||
| tar xvf rootfs.tar -C rootfs/ | ||
| test -f initrd.cpio || ./workdir/unikraft/support/scripts/mkcpio initrd.cpio ./rootfs/ |
Comment on lines
+3
to
+5
| These are companions instruction to the main instructions in the [`README`](README.md). | ||
|
|
||
| Use scripts as quick actions for building and running the bincompat C HTTP server on Unikraft: |
Comment on lines
+14
to
+18
| # Start instance. | ||
| start_instance 2>&1 | grep "Hello from Unikraft!" 1>&2 | ||
| if test $? -ne 0; then | ||
| echo "Wrong message printed." 1>&2 | ||
| echo "FAILED" |
| @@ -0,0 +1 @@ | |||
| django==6.0 | |||
alxcris
force-pushed
the
django-port-final
branch
3 times, most recently
from
July 11, 2026 12:17
c4b617c to
2c83557
Compare
Signed-off-by: alxcris <ilie_alexandru26@yahoo.com>
alxcris
force-pushed
the
django-port-final
branch
from
July 11, 2026 12:19
2c83557 to
bab21a3
Compare
razvand
reviewed
Jul 11, 2026
razvand
left a comment
Contributor
There was a problem hiding this comment.
The .scripts/test/README.md and README.md and rootfs/server.py file use Windows endings (CRLF).
Be sure all files have ending newlines.
Remove trailing whitespaces.
Remove the file rootfs/Makefile if it's not used.
|
|
||
| firecracker-x86_64 \ | ||
| --api-sock firecracker.socket \ | ||
| --config-file fc.x86_64.json No newline at end of file |
| ./setup.sh | ||
| test -d ./.scripts/test/log || mkdir ./.scripts/test/log | ||
| test_build_run qemu.x86_64 | ||
| test_build_run fc.x86_64 No newline at end of file |
| exit 0 | ||
| } | ||
|
|
||
| start_command="$1" No newline at end of file |
|
|
||
| if __name__ == "__main__": | ||
| from django.core.management import execute_from_command_line | ||
| execute_from_command_line(["", "runserver", "0.0.0.0:8080", "--noreload"]) No newline at end of file |
Co-authored-by: Razvan Deaconescu <razvan@rosedu.org> Signed-off-by: aLeX <ilie_alexandru26@yahoo.com>
Co-authored-by: Razvan Deaconescu <razvan@rosedu.org> Signed-off-by: aLeX <ilie_alexandru26@yahoo.com>
Co-authored-by: Razvan Deaconescu <razvan@rosedu.org> Signed-off-by: aLeX <ilie_alexandru26@yahoo.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Draft PR django6.0-python3.12
I've chosen to base the structure on the bincompat-c-hello directory and adapted the Makefile and configuration scripts to ensure compatibility with the Django 6.0 and Python 3.12 environment.
The application has been successfully tested and runs correctly with Unikraft locally.