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 compile on Ubuntu Mate 21 #44

Open
Moldytzu opened this issue Oct 27, 2021 · 7 comments
Open

Can't compile on Ubuntu Mate 21 #44

Moldytzu opened this issue Oct 27, 2021 · 7 comments

Comments

@Moldytzu
Copy link

mkdir -p mnt/fake/
dd if=bootloader/stage1.bin of=hdd.img conv=notrunc
0+1 records in
0+1 records out
446 bytes copied, 0,000152826 s, 2,9 MB/s
dd if=bootloader/stage2.bin of=hdd.img seek=1 conv=notrunc
3+0 records in
3+0 records out
1536 bytes (1,5 kB, 1,5 KiB) copied, 0,000147727 s, 10,4 MB/s
loopdev="/sbin/losetup -f" &&
sudo /sbin/losetup -o1048576 "$loopdev" hdd.img &&
sudo mkdosfs -v -F32 "$loopdev" &&
sudo /bin/mount -t vfat "$loopdev" mnt/fake/ &&
sudo mkdir mnt/fake/bin/ &&
sudo mkdir mnt/fake/sys/ &&
sudo mkdir mnt/fake/dev/ &&
sudo mkdir mnt/fake/proc/ &&
sudo /bin/cp init/debug/init.bin mnt/fake/ &&
sudo /bin/cp kernel/debug/kernel.bin mnt/fake/ &&
sudo /bin/cp programs/dist/* mnt/fake/bin/ &&
sleep 0.1 &&
sudo /bin/umount mnt/fake/ &&
sudo /sbin/losetup -d "$loopdev"
losetup: cannot find an unused loop device: Permission denied
make: *** [Makefile:33: thor.flp] Error 1

@Moldytzu
Copy link
Author

and with sudo:
using 0xf8 media descriptor, with 1005921 sectors;
drive number 0x80;
filesystem has 2 32-bit FATs and 8 sectors per cluster.
FAT size is 984 sectors, and provides 125490 clusters.
There are 32 reserved sectors.
Volume ID is c3c6651a, no volume label.
umount: /home/moldu/thor-os/mnt/fake: target is busy.
make: *** [Makefile:33: thor.flp] Error 32

@wichtounet
Copy link
Owner

wichtounet commented Oct 29, 2021

Hi Moldytzu

Unfortunately, I have not touched this project in several years and I do not use Ubuntu, so I won't be able to help you debug this issue.

@tkchia
Copy link
Contributor

tkchia commented Jan 12, 2022

Hello @Moldytzu,

losetup: cannot find an unused loop device: Permission denied

Possibly /sbin/losetup -f ("find the first unused loop device") no longer works from a non-root account? That would mean that

loopdev="/sbin/losetup -f" && ...

should now probably be

loopdev="sudo /sbin/losetup -f" && ...

I am not sure about the target is busy error though. Perhaps it is necessary to sleep longer so that the system has time to flush everything? Or it might be necessary to sync the loopback filesystem, e.g.

sync &&
sleep 0.1 && ...

Let me know if the above works for you. Thank you!

@Aayushi-R
Copy link

gives me an error saying:
[debug] Compile src/acpi.cpp
In file included from src/acpi.cpp:8:
include/acpica.hpp:18:10: fatal error: accommon.h: No such file or directory
18 | #include <accommon.h>
| ^~~~~~~~~~~~
compilation terminated.

@wichtounet
Copy link
Owner

@Aayushi-R This file should be included in a submodule, have you checked out all the submodules?

@CMK-student
Copy link

CMK-student commented Mar 27, 2024

@wichtounet Hi! I am making this OS for a class and I am having a problem. The error message I get is

WARNING: Image format was not specified for 'hdd.img' and probing guessed raw.
         Automatically detecting the format is dangerous for raw images, write operations on block 0 will be restricted.
         Specify the 'raw' format explicitly to remove the restrictions.

qemu-system-x86_64: -netdev tap,helper=/usr/libexec/qemu-bridge-helper,id=thor_net0: bridge helper failed

Is there anything anyone knows about this?
Thank you!

@wichtounet
Copy link
Owner

@CMK-student I have not run this OS in years, so recent tooling probably changed enough to make it not work.

The first warning can likely be ignored and can be fixed with setting the raw format when running Qemu.

For the second, it may be that the qemu-bridge-helper does not exit on your computer.

You can try to do make qemu_user to run with a different network mode.

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

5 participants