X-Git-Url: http://git.plutz.net/?a=blobdiff_plain;f=Makefile;h=5ea6b7c89d90bd0d1daa07a965be32c22b423613;hb=6e271a225b0001a1d4e3e966fdddf6fbd91e7b97;hp=a80a8a73fac6f26b11b3c992c99d400f97fcd6df;hpb=6b5a1635659e158e71c3ef319f0cb191bf965093;p=bootimage diff --git a/Makefile b/Makefile index a80a8a7..5ea6b7c 100644 --- a/Makefile +++ b/Makefile @@ -9,14 +9,14 @@ CONFIG := config_base/ PACKAGES := apt bilibop-lockfs btrfs-tools busybox-static bzip2 ca-certificates cron deborphan extlinux gzip htop ifupdown init iputils-ping irqbalance isc-dhcp-client less live-boot live-boot-initramfs-tools make man-db nbd-client net-tools nmap ntpdate openssh-client openssh-server p7zip-full pciutils rsync squashfs-tools sshfs sudo systemd unace unrar-free unzip vim wget wireless-tools wpasupplicant xz-utils zip -Include *.mk +include *.mk stretch_%_root/bin/sh: btrfs subvolume create "$(subst bin/sh,,$@)" || mkdir "$(subst bin/sh,,$@)" chmod 755 "$(subst bin/sh,,$@)" debootstrap --arch=${ARCH} --variant=minbase stretch "$(subst bin/sh,,$@)" -stretch_%_root/: stretch_%_root/bin/sh ${CONFIG} .FORCE +stretch_%_root/: stretch_%_root/bin/sh ${CONFIG} permissions .FORCE for tree in ${CONFIG}; do for file in apt default timezone; do cp -av "$$tree/etc/$$file" "$@/etc/" || true; done; done chroot "$@" ln -sf /bin/true /usr/local/sbin/invoke-rc.d chroot "$@" sh -c 'apt-mark showmanual |xargs apt-mark auto || true' @@ -32,7 +32,7 @@ stretch_%_root/: stretch_%_root/bin/sh ${CONFIG} .FORCE chroot "$@" apt-get clean touch "$@" -stretch_%_config/: stretch_%_root/ ${CONFIG} .FORCE +stretch_%_config/: stretch_%_root/ ${CONFIG} permissions .FORCE btrfs subvolume delete "$@" || rm -r "$@" || true btrfs subvolume snapshot "$<" "$@" || cp -rlv "$<" "$@" cp -av $(addsuffix /*, ${CONFIG}) "$@" @@ -45,3 +45,19 @@ stretch_%_config/: stretch_%_root/ ${CONFIG} .FORCE stretch_%.squashfs: stretch_%_config/ rm "$@" || true mksquashfs "$<" "$@" -comp xz + +/dev/sd%: partitions vmlinuz initrd.img syslinux.cfg .FORCE + mkdir mount + sfdisk ${@}