1 #### These settings are made to build the ArchLinux DevStack CD.
2 # The directory that you'll be using for the actual build process.
4 # A list of packages to install, either space separated in a string or line separated in a file. Can include groups.
5 PACKAGES
="`cat packages.list` $(BOOTLOADER)"
6 # The name of our ISO. Does not specify the architecture!
7 NAME
=archlinux-devstack
8 # Version will be appended to the ISO.
10 # Kernel version. You'll need this.
12 # Architecture will also be appended to the ISO name.
14 # Bootloader for our livecd/liveusb to use. For a list of available bootloader see below.
16 # Current working directory
18 # This is going to be the full name the final iso/img will carry
19 FULLNAME
=$(PWD
)/$(NAME
)-$(VER
)-$(ARCH
)
21 # In case "make all" is called, the next line tries to build both, iso and usb-img.
22 all: my-arch-iso my-arch-usb
23 # The following line firstly executes overlay (defined below) and then executes the grub-gfx (which is also defined below).
24 # It will execute itself only after it has executed overlay and then grub-gfx (or whatever you set BOOTLOADER to above).
25 # Changing $BOOTLOADER to only grub, will result in GRUB losing its ability to display graphical images but you might gain
26 # more compatibility and loading speed.
27 # Setting $BOOTLOADER to isolinux will make the resulting image a lot more compatible with really old systems.
28 # Therefore, if you are building a live cd for really old systems, you will want to use isolinux.
29 # When my-arch-iso/usb is finally executed, it will create the final image file from the $WORKDIR using mkarchiso.
30 # Since this is the last step of any image creation procedure, this routine is always called at the very end. Let's move on.
31 my-arch-usb
: overlay
$(BOOTLOADER
)
32 mkarchiso
-f
-p
$(BOOTLOADER
) usb
"$(WORKDIR)" "$(FULLNAME)".img
33 my-arch-iso
: overlay
$(BOOTLOADER
)
34 mkarchiso
-f
-p
$(BOOTLOADER
) iso
"$(WORKDIR)" "$(FULLNAME)".iso
37 # When overlay is called, it will first execute base-iso.
38 # The overlay routine is therefore always executed third.
40 cp
-r overlay
"$(WORKDIR)/"
42 # The next routine base-iso is always executed second.
43 # It executes root-image and then itself. base-iso is used for adding a bootloader and an initrd into
44 # the then already existing base-system which is created by root-image.
46 mv
"$(WORKDIR)/root-image/boot" "$(WORKDIR)/iso/"
47 cp
-r boot-files
/* "$(WORKDIR)/iso/boot/"
48 cp isomounts
"$(WORKDIR)"
49 sed
-i
"s|@ARCH@|$(ARCH)|g" "$(WORKDIR)/isomounts"
50 mkinitcpio
-c
$(pwd
)/mkinitcpio.conf
-b
"$(WORKDIR)/root-image" -k
$(KVER
) -g
"$(WORKDIR)/iso/boot/$(NAME)".img
52 # The root-image' routine is always executed first.
53 # It only downloads and installs all packages into the $WORKDIR, giving you a basic system to use as a base.
55 mkarchiso
-p
$(PACKAGES
) create
"$(WORKDIR)"
57 # In case "make clean" is called, the following routine gets rid of all files created by this Makefile.
59 rm -rf
"$(WORKDIR)" "$(FULLNAME)".img
"$(FULLNAME)".iso
61 # Your choice for $BOOTLOADER above determines which routine is executed here.
62 # This routine is always executed fourth, just before generating the actual image.
64 cp
-r
"$(WORKDIR)/root-image/usr/lib/grub/i386-pc/"* "$(WORKDIR)/iso/boot/grub"
66 cp
-r
"$(WORKDIR)/root-image/usr/lib/grub/i386-pc/"* "$(WORKDIR)/iso/boot/grub"
68 cp
-r
"$(WORKDIR)/root-image/usr/lib/syslinux/isolinux.bin" "$(WORKDIR)/iso/boot/isolinux"