Another Makefile rules reoder/fixes
Signed-off-by: Gerardo Exequiel Pozzi <vmlinuz386@yahoo.com.ar>
This commit is contained in:
parent
ca492e3041
commit
44550defdb
@ -18,6 +18,7 @@ all-usb: net-usb core-usb
|
|||||||
all-net: net-iso net-usb
|
all-net: net-iso net-usb
|
||||||
all-core: core-iso core-usb
|
all-core: core-iso core-usb
|
||||||
|
|
||||||
|
|
||||||
# Rules for each type of image
|
# Rules for each type of image
|
||||||
core-iso: $(COREname).iso
|
core-iso: $(COREname).iso
|
||||||
$(COREname).iso: core-pkgs base-fs
|
$(COREname).iso: core-pkgs base-fs
|
||||||
@ -34,51 +35,62 @@ $(NETname).img: base-fs
|
|||||||
|
|
||||||
|
|
||||||
# This is the main rule for make the working filesystem.
|
# This is the main rule for make the working filesystem.
|
||||||
base-fs: boot-files initcpio overlay iso-mounts
|
base-fs: root-image boot-files initcpio overlay iso-mounts $(BOOTLOADER)
|
||||||
|
|
||||||
# Rule for make /boot
|
|
||||||
boot-files: root-image $(BOOTLOADER)
|
|
||||||
cp -r $(WORKDIR)/root-image/boot $(WORKDIR)/iso/
|
|
||||||
cp $(WORKDIR)/root-image/usr/share/licenses/common/GPL2/license.txt $(WORKDIR)/iso/boot/memtest86+/memtest.bin.COPYING
|
|
||||||
cp -r boot-files/* $(WORKDIR)/iso/boot/
|
|
||||||
|
|
||||||
# Rule to process isomounts file.
|
|
||||||
iso-mounts: $(WORKDIR)/isomounts
|
|
||||||
$(WORKDIR)/isomounts: isomounts root-image
|
|
||||||
sed "s|@ARCH@|$(ARCH)|g" $< > $@
|
|
||||||
|
|
||||||
# Rules for make the root-image for base filesystem.
|
# Rules for make the root-image for base filesystem.
|
||||||
root-image: $(WORKDIR)/root-image/.arch-chroot
|
root-image: $(WORKDIR)/root-image/.arch-chroot
|
||||||
$(WORKDIR)/root-image/.arch-chroot:
|
$(WORKDIR)/root-image/.arch-chroot:
|
||||||
mkarchiso -p $(PACKAGES) create $(WORKDIR)
|
mkarchiso -p $(PACKAGES) create $(WORKDIR)
|
||||||
|
|
||||||
|
|
||||||
|
# Rule for make /boot
|
||||||
|
boot-files: root-image
|
||||||
|
cp -r $(WORKDIR)/root-image/boot $(WORKDIR)/iso/
|
||||||
|
cp $(WORKDIR)/root-image/usr/share/licenses/common/GPL2/license.txt $(WORKDIR)/iso/boot/memtest86+/memtest.bin.COPYING
|
||||||
|
cp -r boot-files/* $(WORKDIR)/iso/boot/
|
||||||
|
|
||||||
|
|
||||||
# Rules for initcpio images
|
# Rules for initcpio images
|
||||||
initcpio: $(WORKDIR)/iso/boot/archiso_ide.img $(WORKDIR)/iso/boot/archiso_pata.img
|
initcpio: $(WORKDIR)/iso/boot/archiso_ide.img $(WORKDIR)/iso/boot/archiso_pata.img
|
||||||
$(WORKDIR)/iso/boot/archiso_ide.img: initcpio-ide root-image
|
$(WORKDIR)/iso/boot/archiso_ide.img: initcpio-ide root-image
|
||||||
|
mkdir -p $(WORKDIR)/iso/boot
|
||||||
mkinitcpio -c ./initcpio-ide -b $(WORKDIR)/root-image -k $(kver) -g $@
|
mkinitcpio -c ./initcpio-ide -b $(WORKDIR)/root-image -k $(kver) -g $@
|
||||||
$(WORKDIR)/iso/boot/archiso_pata.img: initcpio-pata root-image
|
$(WORKDIR)/iso/boot/archiso_pata.img: initcpio-pata root-image
|
||||||
|
mkdir -p $(WORKDIR)/iso/boot
|
||||||
mkinitcpio -c ./initcpio-pata -b $(WORKDIR)/root-image -k $(kver) -g $@
|
mkinitcpio -c ./initcpio-pata -b $(WORKDIR)/root-image -k $(kver) -g $@
|
||||||
|
|
||||||
|
|
||||||
# overlay filesystem
|
# overlay filesystem
|
||||||
overlay:
|
overlay:
|
||||||
if [ ! -d $(WORKDIR)/overlay/etc/pacman.d ]; then \
|
mkdir -p $(WORKDIR)/overlay/etc/pacman.d
|
||||||
mkdir -p -m755 $(WORKDIR)/overlay/etc/pacman.d; \
|
|
||||||
fi
|
|
||||||
cp -r overlay $(WORKDIR)/
|
cp -r overlay $(WORKDIR)/
|
||||||
wget -O $(WORKDIR)/overlay/etc/pacman.d/mirrorlist http://www.archlinux.org/mirrorlist/$(ARCH)/all/
|
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
|
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
|
# Rule for make the [core] repo packages
|
||||||
core-pkgs:
|
core-pkgs:
|
||||||
./download-repo.sh core $(WORKDIR)/core-pkgs
|
./download-repo.sh core $(WORKDIR)/core-pkgs
|
||||||
|
|
||||||
# Bootloaders
|
|
||||||
|
# Rules for bootloaders
|
||||||
grub-gfx: root-image
|
grub-gfx: root-image
|
||||||
cp -r $(WORKDIR)/root-image/usr/lib/grub/i386-pc/* $(WORKDIR)/iso/boot/grub
|
mkdir -p $(WORKDIR)/iso/boot/grub
|
||||||
|
cp $(WORKDIR)/root-image/usr/lib/grub/i386-pc/* $(WORKDIR)/iso/boot/grub/
|
||||||
grub: root-image
|
grub: root-image
|
||||||
cp -r $(WORKDIR)/root-image/usr/lib/grub/i386-pc/* $(WORKDIR)/iso/boot/grub
|
mkdir -p $(WORKDIR)/iso/boot/grub
|
||||||
|
cp $(WORKDIR)/root-image/usr/lib/grub/i386-pc/* $(WORKDIR)/iso/boot/grub/
|
||||||
syslinux: root-image
|
syslinux: root-image
|
||||||
cp -r $(WORKDIR)/root-image/usr/lib/syslinux/isolinux.bin $(WORKDIR)/iso/boot/isolinux
|
mkdir -p $(WORKDIR)/iso/boot/isolinux
|
||||||
|
cp $(WORKDIR)/root-image/usr/lib/syslinux/isolinux.bin $(WORKDIR)/iso/boot/isolinux/
|
||||||
|
|
||||||
|
|
||||||
# Clean-up all work
|
# Clean-up all work
|
||||||
clean:
|
clean:
|
||||||
@ -87,6 +99,8 @@ clean:
|
|||||||
|
|
||||||
.PHONY: all all-iso all-usb all-net all-core
|
.PHONY: all all-iso all-usb all-net all-core
|
||||||
.PHONY: net-iso net-usb core-iso core-usb
|
.PHONY: net-iso net-usb core-iso core-usb
|
||||||
.PHONY: base-fs boot-files iso-mounts root-image initcpio overlay core-pkgs
|
.PHONY: base-fs
|
||||||
|
.PHONY: root-image boot-files initcpio overlay iso-mounts
|
||||||
|
.PHONY: core-pkgs
|
||||||
.PHONY: grub-gfx grub syslinux
|
.PHONY: grub-gfx grub syslinux
|
||||||
.PHONY: clean
|
.PHONY: clean
|
||||||
|
Loading…
Reference in New Issue
Block a user