s/ARCH/VA_ARCH/

This commit is contained in:
Albert Hopkins 2018-10-26 23:24:05 -07:00
parent 177dd2f4ed
commit cac3d36946
1 changed files with 13 additions and 13 deletions

View File

@ -25,8 +25,8 @@ TIMEZONE = UTC
DISK_SIZE = 6.0G DISK_SIZE = 6.0G
SWAP_SIZE = 30 SWAP_SIZE = 30
SWAP_FILE = $(CHROOT)/.swap SWAP_FILE = $(CHROOT)/.swap
ARCH = amd64 VA_ARCH = amd64
KERNEL_CONFIG = configs/kernel.config.$(ARCH) KERNEL_CONFIG = configs/kernel.config.$(VA_ARCH)
MAKEOPTS = -j5 -l5.64 MAKEOPTS = -j5 -l5.64
ENABLE_SSHD = NO ENABLE_SSHD = NO
CHANGE_PASSWORD = YES CHANGE_PASSWORD = YES
@ -68,7 +68,7 @@ inroot := systemd-nspawn --quiet \
--bind=$(PKGDIR):/usr/portage/packages \ --bind=$(PKGDIR):/usr/portage/packages \
--bind=$(DISTDIR):/usr/portage/distfiles --bind=$(DISTDIR):/usr/portage/distfiles
ifeq ($(ARCH),x86) ifeq ($(VA_ARCH),x86)
inroot := linux32 $(inroot) inroot := linux32 $(inroot)
endif endif
@ -90,7 +90,7 @@ export APPLIANCE ACCEPT_KEYWORDS CHROOT EMERGE HEADLESS M4 M4C inroot
export HOSTNAME MAKEOPTS TIMEZONE USEPKG WORLD export HOSTNAME MAKEOPTS TIMEZONE USEPKG WORLD
export USEPKG RSYNC_MIRROR export USEPKG RSYNC_MIRROR
unexport PKGDIR ARCH unexport PKGDIR VA_ARCH
all: stage4 all: stage4
@ -122,28 +122,28 @@ endif
cp -L /etc/resolv.conf $(CHROOT)/etc/resolv.conf cp -L /etc/resolv.conf $(CHROOT)/etc/resolv.conf
touch $(PREPROOT) touch $(PREPROOT)
stage3-$(ARCH).tar.bz2: stage3-$(VA_ARCH).tar.bz2:
@scripts/echo You do not have a stage3 tarball. Consider \"make sync_stage3\" @scripts/echo You do not have a stage3 tarball. Consider \"make sync_stage3\"
@exit 1 @exit 1
sync_stage3: sync_stage3:
./scripts/fetch-stage3 --specialty=systemd --outfile=stage3-$(ARCH).tar.bz2 $(ARCH) ./scripts/fetch-stage3 --specialty=systemd --outfile=stage3-$(VA_ARCH).tar.bz2 $(VA_ARCH)
$(STAGE3): stage3-$(ARCH).tar.bz2 $(STAGE3): stage3-$(VA_ARCH).tar.bz2
mkdir -p $(CHROOT) mkdir -p $(CHROOT)
ifdef stage4-exists ifdef stage4-exists
@scripts/echo Using stage4 tarball: `basename $(STAGE4_TARBALL)` @scripts/echo Using stage4 tarball: `basename $(STAGE4_TARBALL)`
tar xpf "$(STAGE4_TARBALL)" -C $(CHROOT) tar xpf "$(STAGE4_TARBALL)" -C $(CHROOT)
else else
@scripts/echo Using stage3 tarball @scripts/echo Using stage3 tarball
tar xpf stage3-$(ARCH).tar.bz2 -C $(CHROOT) tar xpf stage3-$(VA_ARCH).tar.bz2 -C $(CHROOT)
endif endif
rm -f $(CHROOT)/etc/localtime rm -f $(CHROOT)/etc/localtime
touch $(STAGE3) touch $(STAGE3)
$(COMPILE_OPTIONS): $(STAGE3) $(PORTAGE_DIR) configs/make.conf.$(ARCH) configs/locale.gen $(PACKAGE_FILES) $(COMPILE_OPTIONS): $(STAGE3) $(PORTAGE_DIR) configs/make.conf.$(VA_ARCH) configs/locale.gen $(PACKAGE_FILES)
cp configs/make.conf.$(ARCH) $(CHROOT)/etc/portage/make.conf cp configs/make.conf.$(VA_ARCH) $(CHROOT)/etc/portage/make.conf
echo ACCEPT_KEYWORDS=$(ACCEPT_KEYWORDS) >> $(CHROOT)/etc/portage/make.conf echo ACCEPT_KEYWORDS=$(ACCEPT_KEYWORDS) >> $(CHROOT)/etc/portage/make.conf
-[ -f "appliances/$(APPLIANCE)/make.conf" ] && cat "appliances/$(APPLIANCE)/make.conf" >> $(CHROOT)/etc/portage/make.conf -[ -f "appliances/$(APPLIANCE)/make.conf" ] && cat "appliances/$(APPLIANCE)/make.conf" >> $(CHROOT)/etc/portage/make.conf
cp configs/locale.gen $(CHROOT)/etc/locale.gen cp configs/locale.gen $(CHROOT)/etc/locale.gen
@ -254,7 +254,7 @@ $(RAW_IMAGE): $(STAGE4_TARBALL) scripts/grub.shell scripts/motd.sh
mkdir $(CHROOT) mkdir $(CHROOT)
mount -o noatime `cat partitions`p1 $(CHROOT) mount -o noatime `cat partitions`p1 $(CHROOT)
tar -xf $(STAGE4_TARBALL) --numeric-owner $(COPY_ARGS) -C $(CHROOT) tar -xf $(STAGE4_TARBALL) --numeric-owner $(COPY_ARGS) -C $(CHROOT)
scripts/motd.sh $(EXTERNAL_KERNEL) $(VIRTIO) $(DISK_SIZE) $(SWAP_SIZE) $(DASH) $(ARCH) > $(CHROOT)/etc/motd scripts/motd.sh $(EXTERNAL_KERNEL) $(VIRTIO) $(DISK_SIZE) $(SWAP_SIZE) $(DASH) $(VA_ARCH) > $(CHROOT)/etc/motd
ifneq ($(EXTERNAL_KERNEL),YES) ifneq ($(EXTERNAL_KERNEL),YES)
echo '(hd0) ' `cat partitions` > device-map echo '(hd0) ' `cat partitions` > device-map
$(CHROOT)/usr/sbin/grub-install --no-floppy --grub-mkdevicemap=device-map --directory=$(CHROOT)/usr/lib/grub/i386-pc --boot-directory=$(CHROOT)/boot `cat partitions` $(CHROOT)/usr/sbin/grub-install --no-floppy --grub-mkdevicemap=device-map --directory=$(CHROOT)/usr/lib/grub/i386-pc --boot-directory=$(CHROOT)/boot `cat partitions`
@ -289,7 +289,7 @@ $(VMDK_IMAGE): $(RAW_IMAGE)
vmdk: $(VMDK_IMAGE) vmdk: $(VMDK_IMAGE)
$(STAGE4_TARBALL): $(PORTAGE_DIR) stage3-$(ARCH).tar.bz2 appliances/$(APPLIANCE) configs/rsync-excludes $(STAGE4_TARBALL): $(PORTAGE_DIR) stage3-$(VA_ARCH).tar.bz2 appliances/$(APPLIANCE) configs/rsync-excludes
$(MAKE) $(STAGE3) $(MAKE) $(STAGE3)
$(MAKE) $(PREPROOT) $(MAKE) $(PREPROOT)
$(MAKE) $(SOFTWARE) $(MAKE) $(SOFTWARE)
@ -367,7 +367,7 @@ help:
@echo 'CHROOT= - The directory to build the chroot' @echo 'CHROOT= - The directory to build the chroot'
@echo 'DISK_SIZE= - Size of the disk image' @echo 'DISK_SIZE= - Size of the disk image'
@echo 'SWAP_SIZE= - Size of the swap file' @echo 'SWAP_SIZE= - Size of the swap file'
@echo 'ARCH= - Architecture to build for (x86 or amd64)' @echo 'VA_ARCH= - Architecture to build for (x86 or amd64)'
@echo 'VIRTIO=YES - Configure the stage2/image to use virtio' @echo 'VIRTIO=YES - Configure the stage2/image to use virtio'
@echo 'EXTERNAL_KERNEL=YES - Do not build a kernel in the image' @echo 'EXTERNAL_KERNEL=YES - Do not build a kernel in the image'
@echo 'HEADLESS=YES - Build a headless (serial console) image.' @echo 'HEADLESS=YES - Build a headless (serial console) image.'