klange / toaruos

A completely-from-scratch hobby operating system: bootloader, kernel, drivers, C library, and userspace including a composited graphical UI, dynamic linker, syntax-highlighting text editor, network stack, etc.
https://toaruos.org/
University of Illinois/NCSA Open Source License
6.03k stars 475 forks source link

I Need Some Help. To Recompile this project after some modifications. #293

Closed TunifyBasic closed 7 months ago

TunifyBasic commented 7 months ago

after compiling and running the kernel for the first time doing some modification then trying to recompile it i got this error:

$ sudo docker run -v `pwd`:/root/misaka -w /root/misaka -e LANG=C.UTF-8 -t toaruos/build-tools:1.99.x util/build-in-docker.sh 
ln: failed to create symbolic link 'util/local/gcc_local': File exists
x86_64-pc-toaru-gcc -O2 -std=gnu11 -ffreestanding -Wall -Wextra -Wno-unused-parameter -z max-page-size=0x1000 -fPIC -c -o libc/main.o libc/main.c
make: x86_64-pc-toaru-gcc: Command not found
make: *** [Makefile:138: libc/main.o] Error 127

i also tryied:

$ make
x86_64-pc-toaru-gcc -O2 -std=gnu11 -ffreestanding -Wall -Wextra -Wno-unused-parameter -z max-page-size=0x1000 -fPIC -c -o libc/main.o libc/main.c
make: x86_64-pc-toaru-gcc: Command not found
make: *** [Makefile:138: libc/main.o] Error 127

also i wonder how could i compile it to work on aarch64 (for raspberry pi)

it might seem stupid but i am interested in this project and i need some help.

klange commented 7 months ago

It sounds like you made an attempt to build the toolchain locally - the Docker builds assume you are coming from an empty repo, so when your local directory is mapped in, the script that “installs” the Docker image’s toolchain fails.

For the second question, there is a different Docker image with an aarch64 toolchain - you can check the Github Actions configuration to see how that is used. The RPi builds aren’t very useful, though, as I have not made much progress on the USB stack - they can boot to a desktop you can’t interact with, and with some changes you can get a serial console over the miniuart, but they’re not generally useful.

klange commented 7 months ago

sudo docker run

You should not run docker with sudo. You should add your user to the appropriate group to run docker as yourself. If you run docker as root, the permissions on files produced within the container may cause issues.

klange commented 7 months ago

Did you make an attempt to build that failed? The last step in the build-in-docker.sh removes the util/local symlink. You can try removing it manually before proceeding - the scripts were not intended for active development.

TunifyBasic commented 7 months ago

thank that was helpful.