Skip to content

Commit

Permalink
[build] remove nasm dependency from docs & install scripts
Browse files Browse the repository at this point in the history
  • Loading branch information
hawkw committed Feb 1, 2017
1 parent 5c4265c commit 21d2659
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 15 deletions.
16 changes: 6 additions & 10 deletions BUILDING.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,6 @@ $ make env
```
Once you've run `make env`, you should have a correctly configured build environment, and you should be ready to build SOS.

**NOTE:** right now, there are only automatic install scripts for macOS. This is because the setup process on macOS is the most complex, and so providing scripts to automate it is a priority. Automatic setup scripts for Linux are coming soon.


If you'd rather install and configure everything yourself, or your system isn't supported by the automatic install scripts, you can follow these instructions to set up a suitable environment for building SOS:

installing Rust
Expand Down Expand Up @@ -41,7 +38,6 @@ installing build dependencies
-----------------------------

Once you have Rust installed, you will need the following additional dependencies:
+ `nasm`
+ `ld`
+ `grub-mkrescue` & `xorriso`
+ `qemu` for running the kernel under emulation
Expand All @@ -54,25 +50,25 @@ Depending on your OS, you'll want to install these dependencies somewhat differe
On Debian you can install them with

```
$ sudo apt-get install nasm xorriso qemu mtools build-essential
$ sudo apt-get install xorriso qemu mtools build-essential
```
On Arch Linux you can install them with
```
$ sudo pacman -S --needed binutils grub libisoburn nasm qemu mtools
$ sudo pacman -S --needed binutils grub libisoburn qemu mtools
```
And on Fedora with
```
$ sudo dnf install nasm xorriso qemu
$ sudo dnf instal xorriso qemu
```
On Gentoo it's
```
$ sudo emerge app-emulation/qemu dev-lang/nasm dev-libs/libisoburn sys-boot/grub
$ sudo emerge app-emulation/qemu dev-libs/libisoburn sys-boot/grub
```

You will also need `x86_64-elf-objcopy` and `x86_64-elf-strip`.
You will also need `x86_64-elf-objcopy` and `x86_64-elf-strip` executables.
On x86_64 Linux you can simply symlink them to your regular `objcopy` and `strip`.

If you are on Gentoo but on another architecture you can build a cross-compiled version of `binutils` (which contains `objcopy` and `strip`) with
If you are using Gentoo but on another architecture you can build a cross-compiled version of `binutils` (which contains `objcopy` and `strip`) with
```
$ sudo emerge sys-devel/crossdev
$ sudo crossdev -s0 --target x86_64-elf
Expand Down
3 changes: 0 additions & 3 deletions Brewfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
# for assembling x86
brew 'nasm'

# for making a bootable ISO
brew 'xorriso'

Expand Down
4 changes: 2 additions & 2 deletions scripts/install-env-linux.sh
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ case $distro in
exit
fi

sudo apt-get install nasm xorriso qemu build-essential mtools | sed "s/^/${bold}apt-get:${normal} /"
sudo apt-get install xorriso qemu build-essential mtools | sed "s/^/${bold}apt-get:${normal} /"
;;
Arch | ManjaroLinux)
echo "${bold}install-env-linux:${normal} Installing with pacman."
Expand All @@ -56,7 +56,7 @@ case $distro in
exit
fi

sudo pacman -S --needed binutils grub libisoburn nasm qemu mtools | sed "s/^/${bold}pacman:${normal} /"
sudo pacman -S --needed binutils grub libisoburn qemu mtools | sed "s/^/${bold}pacman:${normal} /"
;;
esac
# todo: support non-x86_64 architectures here (later)
Expand Down

0 comments on commit 21d2659

Please sign in to comment.