Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't build MaoKo on Docker #2

Open
anta40 opened this issue Jan 4, 2022 · 2 comments
Open

Can't build MaoKo on Docker #2

anta40 opened this issue Jan 4, 2022 · 2 comments

Comments

@anta40
Copy link

anta40 commented Jan 4, 2022

I've created a Docker image to build MaoKo (based on Debian).

Here's the dockerfile:

FROM debian:latest
RUN apt update && \
    apt install -y grub && \
    apt install -y wget && \
    apt install -y nasm && \
    apt install -y fasm && \
    apt install -y xorriso && \
    apt install -y perl && \
    apt install -y build-essential

Mount the Unix-Like source directory into the container:
docker run -it -v /Users/andre/Codes/Unix-Like/:/mnt/UnixLike andre104/debian-kernel-dev:0.1

Then build it:

cd /mnt/UnixLike
make

This is the output log:

flat assembler version 1.73.27 (100000 kilobytes memory)
6 passes, 0.4 seconds, 360922 bytes.
xorriso 1.5.2 : RockRidge filesystem manipulator, libburnia project.

Drive current: -outdev 'stdio:achiu-au.iso'
Media current: stdio file, overwriteable
Media status : is blank
Media summary: 0 sessions, 0 data blocks, 0 data, 24.9g free
Added to ISO image: directory '/'='/tmp/grub.kcngjq'
xorriso : UPDATE : 3 files added in 1 seconds
Added to ISO image: directory '/'='/mnt/UnixLike/iso'
xorriso : UPDATE : 7 files added in 1 seconds
ISO image produced: 361 sectors
Written to medium : 361 sectors at LBA 0
Writing to 'stdio:achiu-au.iso' completed successfully.

OK, run the ISO with qemu (I'm using Qemu 6.2.0 on Mac, btw)
qemu-system-i386 -cdrom achiu-au.iso

Qemu failed to run it:

Booting from DVD/CD...
Boot failed: Could not read from CDROM (code 0004)
Booting from ROM...
iPXE (PCI 00:03.0) starting execution... OK
..
..
..
No bootable device.

I've also created similar image based on Alpine Linux and Arch Linux. Only Arch produced runnable ISO
Strangely on my PC running Debian, the ISO also works OK.

@MaoKo
Copy link
Owner

MaoKo commented Jan 7, 2022

Ok. Sorry for the delay. I will check. I known I have a little problem with qemu in my function cpuid identification. I will push it shortly. But the No bootable device. is weird

@anta40
Copy link
Author

anta40 commented Jan 21, 2022

Hi Maoko,

I created another docker based on Ubuntu (and installed the very same packages). Strangely it also works.
This is the dockerfile, btw:

FROM ubuntu:latest 
RUN apt update && \
    apt install -y grub2 && \
    apt install -y wget && \
    apt install -y nasm && \
    apt install -y fasm && \
    apt install -y xorriso && \
    apt install -y perl && \
    apt install -y build-essential && \

The iso runs fine on qemu MacOS. Weird.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants