mOS in Ubuntu
sxmxr opened this issue · 34 comments
Hi @MQuy, I and my teammates have successfully installed GCC Cross-complier using that Wikipedia page which was mentioned in one of the earlier issues. (https://wiki.osdev.org/GCC_Cross-Compiler) I have installed i686-elf-gcc successfully(Screenshot-1) Now while installing the whole project, using the mentioned shell scripts in the read.me, I got error like, "./create_image.sh: line 6: hdiutil: command not found".(Screenshot 2). My host OS is Windows 10 and I'm using Ubuntu 20.04 within the virtual box.
@sxmxr if you check out master branch and run like this I think it will work
$ cd src
$ ./create_image.sh
$ ./build qemu iso
you shouldn't need to change anything, I changed create_image.sh
to support ubuntu if you pull master.
To build toolchain
$ cd src
$ cd toolchain && ./build.sh
Run
$ cd src
$ ./create_image.sh
$ ./build.sh qemu iso
@MQuy Thank you for your response. ./create_image.sh was compiled successfully but while running "./build qemu iso" command I'm getting this error.
can you send a screenshot if you run the command below
cd src/kernel && make clean && make
hum, what is your ubuntu version? my guess is the latest gcc have breaking changes, could you try with gcc 9.x
hum, what is your ubuntu version? my guess is the latest gcc have breaking changes, could you try with gcc 9.x
@MQuy My ubuntu version is 20.04. So I have to make cross compiler again. Right?
yes, try with gcc 9.x :)
yes, try with gcc 9.x :)
Thank you, for your response. I'll get back to you in case of any queries.
@MQuy Ubuntu isn't working for me. So I am thinking to install Mac-OS on VirtualBox and will run it. Is it possible?
can you give more details about the error above? I think Ubuntu is better in long term
@MQuy Here are the steps I have followed, Please correct me if I'm wrong :
- Followed steps of https://wiki.osdev.org/GCC_Cross-Compiler and installed GCC 9.1.0 and Binutils 2.32, so basically activated new cross-compiler.
- Downloaded the source code of mOS and moved to src directory.
- Then I entered this command "$ cd toolchain && ./build.sh"
- After that I got the above error.
could you try to open build.sh
and modify these variables to fit in your case and run again?
PREFIX="$HOME/opt/cross"
TARGET=i386-mos
# SYSROOT cannot locate inside PREFIX
SYSROOT="$HOME/Projects/mos/src/toolchain/sysroot"
JOBCOUNT=$(nproc)
@MQuy Thank you for your response. Just to confirm, according to this (https://wiki.osdev.org/GCC_Cross-Compiler) my target variable will be TARGET=i686-elf. Right? or do I have to change target to i386-mos?
P.S. I have changed the SYSROOT.
No, only SYSROOT, make sure that folder exist
@MQuy Thank you for your help. ToolChain is compiled successfully. Now while compiling the "./create_image.sh" I'm getting this error.
you should umount like this first
sudo umount /mnt/mos
sudo rm -rf /mnt/mos
can you comment this line from ./create_image.sh
and run it again
# cd ports/figlet && ./package.sh && cd ../..
@MQuy Sorry for the inconvenience I have caused. But I'm totally new to these topics and my faculty has given a project to implement a new feature in existing features. I'm planning to implement SMP and 2 level paging.
no np, feel free to ask, I will answer when I am online ;)
did you remove that line? you don't need that program to run
you don't have logs folder
$ cd src && mkdir logs
can you open another terminal
$ cd src && gdb isodir/boot/mos.bin
``
in that gdb, type c and enter
ops, I forget it should be
target remote localhost:1234
c
So whenever I make changes, I have to run "$ ./build.sh qemu iso" , $ cd src && gdb isodir/boot/mos.bin, target remote localhost:1234, c" commands. Right?
if you make changes to src/apps
or src/libraries
you have to run ./create_image.sh