summaryrefslogtreecommitdiff
path: root/configs/syslinux-iso/Makefile
diff options
context:
space:
mode:
authorAaron Griffin <aaronmgriffin@gmail.com>2009-11-25 10:40:07 -0800
committerAaron Griffin <aaronmgriffin@gmail.com>2009-11-30 15:14:26 -0800
commit246a00412bcf15feedf6320fe10de6e545517b89 (patch)
tree94377634c0fd0f78557b79e52da470070e261966 /configs/syslinux-iso/Makefile
parentf77ddc0e9ce71eced048139e51bf9540883fffcc (diff)
downloadarchiso32-246a00412bcf15feedf6320fe10de6e545517b89.tar.xz
Initial commit of syslinux based iso config
Includes vesamenu config... needs testing Signed-off-by: Aaron Griffin <aaronmgriffin@gmail.com>
Diffstat (limited to 'configs/syslinux-iso/Makefile')
-rw-r--r--configs/syslinux-iso/Makefile86
1 files changed, 86 insertions, 0 deletions
diff --git a/configs/syslinux-iso/Makefile b/configs/syslinux-iso/Makefile
new file mode 100644
index 0000000..768deaa
--- /dev/null
+++ b/configs/syslinux-iso/Makefile
@@ -0,0 +1,86 @@
+ver=2009.12
+kver=2.6.31-ARCH
+
+WORKDIR=work
+
+ARCH?=$(shell uname -m)
+BOOTLOADER?=syslinux
+
+PWD=$(shell pwd)
+NETname=$(PWD)/archlinux-$(ver)-netinstall-$(ARCH).iso
+COREname=$(PWD)/archlinux-$(ver)-core-$(ARCH).iso
+
+PACKAGES="$(shell cat packages.$(ARCH)) $(BOOTLOADER)"
+
+all: net-iso core-iso
+
+# Rules for each type of image
+core-iso: $(COREname)
+net-iso: $(NETname)
+
+$(COREname): core-pkgs base-fs
+ mkarchiso -p syslinux iso $(WORKDIR) $@
+ isohybrid $@
+$(NETname): base-fs
+ mkarchiso -p syslinux iso $(WORKDIR) $@
+ isohybrid $@
+
+# This is the main rule for make the working filesystem.
+base-fs: root-image boot-files initcpio overlay iso-mounts syslinux
+
+
+# Rules for make the root-image for base filesystem.
+root-image: $(WORKDIR)/root-image/.arch-chroot
+$(WORKDIR)/root-image/.arch-chroot:
+ mkarchiso -p $(PACKAGES) create $(WORKDIR)
+
+# Rule for make /boot
+boot-files: root-image
+ cp -r $(WORKDIR)/root-image/boot $(WORKDIR)/iso/
+ cp -r boot-files/* $(WORKDIR)/iso/boot/
+
+
+# Rules for initcpio images
+initcpio: $(WORKDIR)/iso/boot/archiso.img
+$(WORKDIR)/iso/boot/archiso.img: initcpio.cfg root-image
+ mkdir -p $(WORKDIR)/iso/boot
+ mkinitcpio -c ./initcpio.cfg -b $(WORKDIR)/root-image -k $(kver) -g $@
+
+
+# overlay filesystem
+overlay:
+ mkdir -p $(WORKDIR)/overlay/etc/pacman.d
+ cp -r overlay $(WORKDIR)/
+ wget -O $(WORKDIR)/overlay/etc/pacman.d/mirrorlist http://www.archlinux.org/mirrorlist/$(ARCH)/all/
+ sed -i "s/#Server/Server/g" $(WORKDIR)/overlay/etc/pacman.d/mirrorlist
+
+
+# Rule to process isomounts file.
+iso-mounts: $(WORKDIR)/isomounts
+$(WORKDIR)/isomounts: isomounts root-image
+ sed "s|@ARCH@|$(ARCH)|g" isomounts > $@
+
+
+# Rule for make the [core] repo packages
+core-pkgs:
+ ./download-repo.sh core $(WORKDIR)/core-pkgs
+
+
+# Rules for bootloaders
+syslinux: root-image
+ mkdir -p $(WORKDIR)/iso/boot/isolinux
+ cp $(WORKDIR)/root-image/usr/lib/syslinux/*.c32 $(WORKDIR)/iso/boot/isolinux/
+ cp $(WORKDIR)/root-image/usr/lib/syslinux/isolinux.bin $(WORKDIR)/iso/boot/isolinux/
+
+
+# Clean-up all work
+clean:
+ rm -rf $(WORKDIR) $(NETname) $(COREname)
+
+
+.PHONY: all core-iso net-iso
+.PHONY: base-fs
+.PHONY: root-image boot-files initcpio overlay iso-mounts
+.PHONY: core-pkgs
+.PHONY: syslinux
+.PHONY: clean