Skip to content

Commit

Permalink
Added iso build makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
cavalier38 committed Nov 12, 2012
1 parent 6f68084 commit 0f307cf
Show file tree
Hide file tree
Showing 5 changed files with 49 additions and 2 deletions.
1 change: 1 addition & 0 deletions Makefile
Expand Up @@ -43,6 +43,7 @@ include mkfiles/stage1.mk
include mkfiles/stage2.mk
include mkfiles/pack.mk
include mkfiles/kernel.mk
include mkfiles/iso.mk

clean:
rm -rf $(ISO_TARGET) $(ISO_SOURCE)/{spool,cache}
Expand Down
Binary file removed isolinux/boot.cat
Binary file not shown.
Binary file removed isolinux/isolinux.bin
Binary file not shown.
4 changes: 2 additions & 2 deletions mkfiles/download.mk
Expand Up @@ -9,8 +9,8 @@ download: download-lunar
$(ISO_SOURCE)/spool/moonbase.tar.bz2:
@echo download-moonbase
@mkdir -p $(ISO_SOURCE)/spool
@wget -O $@ "`lsh eval echo '$$MOONBASE_URL'`/moonbase.tar.bz2" \
|| { rm $@ ; exit 1 ; }
@wget -O $@.tmp "`lsh eval echo '$$MOONBASE_URL'`/moonbase.tar.bz2"
@mv $@.tmp $@


# note: this installs an empty installed packages list
Expand Down
46 changes: 46 additions & 0 deletions mkfiles/iso.mk
@@ -0,0 +1,46 @@
.INTERMEDIATE: iso iso-tools iso-files iso-isolinux

iso: $(ISO_SOURCE)/lunar-$(ISO_VERSION)-$(ISO_ARCH).iso


# Host system iso tools
iso-tools:
@which mkisofs || lin cdrtools


# Prepare target files
$(ISO_TARGET)/etc/lunar.release: stage2-target
echo 'DISTRIB_ID="Lunar Linux"' > $@
echo 'DISTRIB_RELEASE="$(ISO_VERSION)"' >> $@
echo 'DISTRIB_CODENAME="$(ISO_CODENAME)"' >> $@
echo 'DISTRIB_DESCRIPTION="Lunar Linux $(ISO_CNAME)"' >> $@
echo "Lunar Linux $(ISO_CNAME)" > $@

iso-files: $(ISO_TARGET)/etc/lunar.release


# Copy the isolinux files to the target
$(ISO_TARGET)/usr/share/syslinux/isolinux.bin: stage2
@touch $@

$(ISO_TARGET)/isolinux/isolinux.bin: $(ISO_TARGET)/usr/share/syslinux/isolinux.bin
@cp $< $@

$(ISO_TARGET)/.iso-isolinux: stage2-target
@cp -r $(ISO_SOURCE)/isolinux $(ISO_TARGET)
@touch $@

iso-isolinux: $(ISO_TARGET)/.iso-isolinux $(ISO_TARGET)/isolinux/isolinux.bin


# Generate the actual image
$(ISO_SOURCE)/lunar-$(ISO_VERSION)-$(ISO_ARCH).iso: iso-tools iso-files iso-isolinux
mkisofs -o $@.tmp -R -J -l \
-V "Lunar-Linux $(ISO_CODENAME)" -v \
-d -D -N -no-emul-boot -boot-load-size 4 -boot-info-table \
-b isolinux/isolinux.bin \
-c isolinux/boot.cat \
-m spool -m doc \
-A "Lunar-$(ISO_VERSION)" $(ISO_TARGET)
#mkhybrid $@.tmp
mv $@.tmp $@

0 comments on commit 0f307cf

Please sign in to comment.