bootable/newinstaller
Revision | 75a8f3d4e998490fe14455ad59ca9c0e82520695 (tree) |
---|---|
Zeit | 2019-10-05 19:43:40 |
Autor | Chih-Wei Huang <cwhuang@linu...> |
Commiter | Chih-Wei Huang |
Fix building issues of q-x86
Android 10 restricts the external host tools usable inside the build.
To overcome that, specify the PATH directly.
@@ -74,6 +74,7 @@ $(boot_dir): $(shell find $(LOCAL_PATH)/boot -type f | sort -r) $(isolinux_files | ||
74 | 74 | $(ACP) -pr $(dir $(<D)) $@ |
75 | 75 | $(ACP) -pr $(dir $(<D))../install/grub2/efi $@ |
76 | 76 | $(ACP) $(isolinux_files) $@/isolinux |
77 | + PATH="/sbin:/usr/sbin:/bin:/usr/bin"; \ | |
77 | 78 | img=$@/boot/grub/efi.img; dd if=/dev/zero of=$$img bs=1M count=4; \ |
78 | 79 | mkdosfs -n EFI $$img; mmd -i $$img ::boot; \ |
79 | 80 | mcopy -si $$img $@/efi ::; mdel -i $$img ::efi/boot/*.cfg |
@@ -81,14 +82,15 @@ $(boot_dir): $(shell find $(LOCAL_PATH)/boot -type f | sort -r) $(isolinux_files | ||
81 | 82 | BUILT_IMG := $(addprefix $(PRODUCT_OUT)/,ramdisk.img initrd.img install.img) $(systemimg) |
82 | 83 | BUILT_IMG += $(if $(TARGET_PREBUILT_KERNEL),$(TARGET_PREBUILT_KERNEL),$(PRODUCT_OUT)/kernel) |
83 | 84 | |
84 | -GENISOIMG := $(if $(shell which xorriso 2> /dev/null),xorriso -as mkisofs,genisoimage) | |
85 | 85 | ISO_IMAGE := $(PRODUCT_OUT)/$(TARGET_PRODUCT).iso |
86 | 86 | $(ISO_IMAGE): $(boot_dir) $(BUILT_IMG) |
87 | 87 | @echo ----- Making iso image ------ |
88 | 88 | $(hide) sed -i "s|\(Installation CD\)\(.*\)|\1 $(VER)|; s|CMDLINE|$(BOARD_KERNEL_CMDLINE)|" $</isolinux/isolinux.cfg |
89 | 89 | $(hide) sed -i "s|VER|$(VER)|; s|CMDLINE|$(BOARD_KERNEL_CMDLINE)|" $</efi/boot/android.cfg |
90 | 90 | sed -i "s|OS_TITLE|$(if $(RELEASE_OS_TITLE),$(RELEASE_OS_TITLE),Android-x86)|" $</isolinux/isolinux.cfg $</efi/boot/android.cfg |
91 | - $(GENISOIMG) -vJURT -b isolinux/isolinux.bin -c isolinux/boot.cat \ | |
91 | + PATH="/sbin:/usr/sbin:/bin:/usr/bin"; \ | |
92 | + which xorriso > /dev/null 2>&1 && GENISOIMG="xorriso -as mkisofs" || GENISOIMG=genisoimage; \ | |
93 | + $$GENISOIMG -vJURT -b isolinux/isolinux.bin -c isolinux/boot.cat \ | |
92 | 94 | -no-emul-boot -boot-load-size 4 -boot-info-table -eltorito-alt-boot -e boot/grub/efi.img -no-emul-boot \ |
93 | 95 | -input-charset utf-8 -V "$(if $(RELEASE_OS_TITLE),$(RELEASE_OS_TITLE),Android-x86) LiveCD" -o $@ $^ |
94 | 96 | $(hide) external/syslinux/bios/utils/isohybrid.pl $@ |
@@ -98,6 +100,7 @@ rpm: $(wildcard $(LOCAL_PATH)/rpm/*) $(BUILT_IMG) | ||
98 | 100 | @echo ----- Making an rpm ------ |
99 | 101 | OUT=$(abspath $(PRODUCT_OUT)); mkdir -p $$OUT/rpm/BUILD; rm -rf $$OUT/rpm/RPMS/*; $(ACP) $< $$OUT; \ |
100 | 102 | echo $(VER) | grep -vq rc; EPOCH=$$((-$$? + `echo $(VER) | cut -d. -f1`)); \ |
103 | + PATH="/sbin:/usr/sbin:/bin:/usr/bin"; \ | |
101 | 104 | rpmbuild -bb --target=$(if $(filter x86,$(TARGET_ARCH)),i686,x86_64) -D"cmdline $(BOARD_KERNEL_CMDLINE)" \ |
102 | 105 | -D"_topdir $$OUT/rpm" -D"_sourcedir $$OUT" -D"systemimg $(notdir $(systemimg))" -D"ver $(VER)" -D"epoch $$EPOCH" \ |
103 | 106 | $(if $(BUILD_NAME_VARIANT),-D"name $(BUILD_NAME_VARIANT)") \ |