Skip to content

Shouhua/unos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

70 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Setup environment on Ubuntu 22.04 desktop

basic software

sudo apt install curl
sudo apt install git
sudo apt install tmux
sudo apt install build-essential
sudo apt install openssh-server
sudo add-apt-repository ppa:jonathonf/vim
sudo apt update
sudo apt install vim
sudo apt install zsh
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

Bochs

  1. Install from apt
sudo apt install bochs
sudo apt install bochs-x
sudo apt install bochs-sdl
  1. Build from source
# dispaly_library: sdl2, options=debug_gui
sudo apt install libgtk2.0-dev
git clone https://github.com/bochs-emu/Bochs.git
git checkout REL_2_7_FINAL
cd Bochs/bochs
# 命令目录可以通过./configure --help查看,默认在/usr/local/bin/bochs, 需要修改bochsrc中romimage的位置:/usr/local/share/bochs/BIOS-bochs-latest
./configure --enable-debugger --with-sdl2 --enable-usb-xhci --enable-raw-serial --enable-usb --enable-pcidev --enable-cdrom --enable-plugins --enable-debugger-gui --with-x11
make
sudo make install
# sudo make uninstall
# make clean

Cross gcc compiler

  1. Create Dockerfile
FROM randomdude/gcc-cross-x86_64-elf
RUN apt update
RUN apt upgrade -y
RUN apt install -y nasm
RUN apt install -y xorriso
RUN apt isntall -y grub-pc-bin
RUN apt install -y grub-common

VOLUME /root/env
WORKDIR /root/env
  1. Build docker image
docker build -t ./Dockerfile -t my-buildenv .
  1. Run docker image
docker run --rm -it -v $pwd:/root/env my-buildenv
  1. Make build
make clean
make
grub-mkrescue -o unos.iso iso

grub2

sudo apt install grub-pc-bin
sudo apt install grub-common
sudo apt install xorriso
sudo apt install mtools # 有可能会报错invalid mformat

Serial Port

LSB: The Least Significant Byte MSB: The Most Significant Byte

TODO

[✕] Memory Management [ ] Stack and heap on protection mode [ ] User land [ ] PCI [ ] Network

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published