Skip to content

Commit

Permalink
Added command to build ISO image
Browse files Browse the repository at this point in the history
  • Loading branch information
djphoenix committed May 10, 2016
1 parent 1774d62 commit 7cf7e78
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitattributes
@@ -0,0 +1 @@
*.zip filter=lfs diff=lfs merge=lfs -text
1 change: 1 addition & 0 deletions .gitlab-ci.yml
Expand Up @@ -11,3 +11,4 @@ job1:
name: "%CI_BUILD_REF_NAME"
paths:
- phoenixos
- phoenixos.iso
14 changes: 12 additions & 2 deletions Makefile
Expand Up @@ -15,12 +15,14 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.

PREFIX=x86_64-linux-gnu-
MKISOFS=genisoimage
ifeq ($(OS),Windows_NT)
PREFIX=x86_64-w64-mingw32-
else
UNAME_S=$(shell uname -s)
ifeq ($(UNAME_S),Darwin)
PREFIX=x86_64-elf-
MKISOFS=mkisofs
endif
endif

Expand Down Expand Up @@ -59,16 +61,24 @@ obj/modules-linked.o: obj
$(OBJCOPY) -Oelf64-x86-64 -Bi386 -Ibinary --rename-section .data=.modules $(@:.o=.b) $@

clean:
rm -rf obj $(BIN).elf $(BIN) phoenixos
rm -rf obj $(BIN).elf $(BIN) phoenixos phoenixos.iso
obj:
mkdir -p obj/mod
images: phoenixos
images: phoenixos phoenixos.iso
check:
cpplint $(SOURCES) || echo "CPPLINT not found"

phoenixos: $(BIN)
cp $< $@

phoenixos.iso: $(BIN) deps/syslinux.zip
mkdir -p .isoroot
unzip -u -j deps/syslinux.zip -d .isoroot bios/core/isolinux.bin bios/com32/elflink/ldlinux/ldlinux.c32 bios/com32/lib/libcom32.c32 bios/com32/mboot/mboot.c32
cp $(BIN) .isoroot/phoenixos
echo 'default /mboot.c32 /phoenixos' > .isoroot/isolinux.cfg
$(MKISOFS) -r -J -V 'PhoeniX OS' -o phoenixos.iso -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table .isoroot/ || echo $(MKISOFS) not installed
rm -rf .isoroot

launch:
$(QEMU) -kernel $(BIN) -smp cores=2,threads=2 -cpu Nehalem
launch-efi: OVMF.fd
Expand Down
3 changes: 3 additions & 0 deletions deps/syslinux.zip
Git LFS file not shown

0 comments on commit 7cf7e78

Please sign in to comment.