+# Copyright 2009-2010, The Android-x86 Open Source Project
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
ifeq ($(TARGET_ARCH),x86)
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
endef
endif
+define check-density
+ eval d=$$(grep ^ro.sf.lcd_density $(INSTALLED_DEFAULT_PROP_TARGET) $(INSTALLED_BUILD_PROP_TARGET) | sed 's|\(.*\)=\(.*\)|\2|'); \
+ [ -z "$$d" ] || ( awk -v d=$$d ' BEGIN { \
+ if (d <= 180) { \
+ label="liveh"; dpi="HDPI"; \
+ } else { \
+ label="livem"; dpi="MDPI"; \
+ } \
+ } { \
+ if (match($$2, label)) \
+ s=5; \
+ else if (match($$0, dpi)) \
+ s=4; \
+ else \
+ s=0; \
+ for (i = 0; i < s; ++i) \
+ getline; \
+ gsub(" DPI=[0-9]*",""); print $$0; \
+ }' $(1) > $(1)_ && mv $(1)_ $(1) )
+endef
+
initrd_dir := $(LOCAL_PATH)/initrd
initrd_bin := \
$(initrd_dir)/init \
INSTALL_RAMDISK := $(PRODUCT_OUT)/install.img
$(INSTALL_RAMDISK): $(wildcard $(LOCAL_PATH)/install/*/*) | $(MKBOOTFS)
+ $(if $(TARGET_INSTALL_SCRIPTS),$(ACP) -p $(TARGET_INSTALL_SCRIPTS) $(TARGET_INSTALLER_OUT)/scripts)
$(MKBOOTFS) $(dir $(dir $(<D))) | gzip -9 > $@
boot_dir := $(PRODUCT_OUT)/boot
-$(boot_dir): $(wildcard $(LOCAL_PATH)/boot/isolinux/*) | $(ACP)
+$(boot_dir): $(wildcard $(LOCAL_PATH)/boot/isolinux/*) $(systemimg) $(GENERIC_X86_CONFIG_MK) | $(ACP)
rm -rf $@
$(ACP) -pr $(dir $(<D)) $@
ISO_IMAGE := $(PRODUCT_OUT)/$(TARGET_PRODUCT).iso
$(ISO_IMAGE): $(boot_dir) $(BUILT_IMG)
@echo ----- Making iso image ------
+ $(hide) $(call check-density,$</isolinux/isolinux.cfg)
$(hide) sed -i "s|\(Installation CD\)\(.*\)|\1 $(VER)|; s|CMDLINE|$(BOARD_KERNEL_CMDLINE)|" $</isolinux/isolinux.cfg
genisoimage -vJURT -b isolinux/isolinux.bin -c isolinux/boot.cat \
-no-emul-boot -boot-load-size 4 -boot-info-table \
- -input-charset utf-8 -V "Android LiveCD" -o $@ $^
+ -input-charset utf-8 -V "Android-x86 LiveCD" -o $@ $^
ANDROID_SRC := /android-system
USB_BOOT := $(PRODUCT_OUT)/usb_boot
ln $(BUILT_IMG) $(USB_BOOT)$(ANDROID_SRC)
$(ACP) -fp $(<D)/* $(<D)/../install/grub/android-x86.xpm.gz $(USB_BOOT)
ln -s grub4dos $(USB_BOOT)/kernel
+ $(hide) $(call check-density,$(USB_BOOT)/menu.lst)
$(hide) sed -i "s|VER|$(VER)|; s|CMDLINE|$(BOARD_KERNEL_CMDLINE)|" $(USB_BOOT)/menu.lst
num_blocks=`du -sk $(USB_BOOT) | tail -n1 | awk '{print $$1;}'`; \
num_inodes=`find $(USB_BOOT) | wc -l`; \