Skip to content

Commit

Permalink
Make syslinux dependency downloadable from Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
djphoenix committed Sep 5, 2016
1 parent 57dbd7d commit 25f4e28
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 7 deletions.
3 changes: 2 additions & 1 deletion .gitignore
@@ -1,3 +1,4 @@
*.o
.output
bin
bin
deps
4 changes: 3 additions & 1 deletion .gitlab-ci.yml
Expand Up @@ -3,10 +3,12 @@ stages:

job1:
stage: build
cache:
paths:
- deps
only:
- master
script:
- curl 'https://www.kernel.org/pub/linux/utils/boot/syslinux/6.xx/syslinux-6.03.zip' > deps/syslinux.zip
- make images
artifacts:
name: "%CI_BUILD_REF_NAME"
Expand Down
14 changes: 12 additions & 2 deletions Makefile
Expand Up @@ -26,6 +26,9 @@ else
endif
endif

DEP_SYSLINUX_VER = 6.03
DEP_SYSLINUX_URL = https://www.kernel.org/pub/linux/utils/boot/syslinux/6.xx/syslinux-6.03.zip

CC=$(PREFIX)gcc
LD=$(PREFIX)ld
AS=$(PREFIX)as
Expand Down Expand Up @@ -118,16 +121,23 @@ check: $(SOURCES) $(MODSRCS)

bin/phoenixos: $(BIN)
@ mkdir -p $(dir $@)
@ echo CP $@
@ cp $^ $@

ISOROOT := $(ODIR)/iso

bin/phoenixos.iso: $(BIN) deps/syslinux.zip
deps/syslinux-$(DEP_SYSLINUX_VER).zip:
@ mkdir -p $(dir $@)
@ echo DL $@
@ wget -q '$(DEP_SYSLINUX_URL)' -O $@

bin/phoenixos.iso: $(BIN) deps/syslinux-$(DEP_SYSLINUX_VER).zip
@ mkdir -p $(dir $@)
@ mkdir -p $(ISOROOT)
@ unzip -q -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
@ unzip -q -u -j deps/syslinux-$(DEP_SYSLINUX_VER).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
@ echo ISO $@
@ $(MKISOFS) -quiet -r -J -V 'PhoeniX OS' -o $@ -b isolinux.bin -c boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table $(ISOROOT)/ || echo $(MKISOFS) not installed
@ rm -rf $(ISOROOT)

Expand Down
3 changes: 0 additions & 3 deletions deps/syslinux.zip

This file was deleted.

0 comments on commit 25f4e28

Please sign in to comment.