ramips: extract eeprom for the built-in wlan module on the RT-N56U
[openwrt.git] / target / linux / x86 / image / Makefile
index b5297bb..26e34ff 100644 (file)
@@ -1,5 +1,5 @@
 # 
-# Copyright (C) 2006-2010 OpenWrt.org
+# Copyright (C) 2006-2012 OpenWrt.org
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -31,12 +31,14 @@ endif
 
 ROOTPART:=$(call qstrip,$(CONFIG_TARGET_ROOTFS_PARTNAME))
 
+GRUB_TIMEOUT:=$(call qstrip,$(CONFIG_X86_GRUB_TIMEOUT))
+
 ifneq ($(CONFIG_X86_GRUB_IMAGES),)
 
   BOOTOPTS:=$(call qstrip,$(CONFIG_X86_GRUB_BOOTOPTS))
 
-  define Image/cmdline/ext2
-    root=$(ROOTPART) rootfstype=ext2 rootwait
+  define Image/cmdline/ext4
+    root=$(ROOTPART) rootfstype=ext4 rootwait
   endef
   
   define Image/cmdline/jffs2-64k
@@ -64,6 +66,7 @@ ifneq ($(CONFIG_X86_GRUB_IMAGES),)
                -e 's#@SERIAL_CONFIG@#$(strip $(GRUB_SERIAL_CONFIG))#g' \
                -e 's#@TERMINAL_CONFIG@#$(strip $(GRUB_TERMINAL_CONFIG))#g' \
                -e 's#@CMDLINE@#$(strip $(call Image/cmdline/$(1)) $(BOOTOPTS) $(GRUB_CONSOLE_CMDLINE))#g' \
+               -e 's#@TIMEOUT@#$(GRUB_TIMEOUT)#g' \
                ./menu.lst > $(KDIR)/root.grub/boot/grub/menu.lst
        PADDING="$(CONFIG_TARGET_IMAGES_PAD)" PATH="$(TARGET_PATH)" ./gen_image_x86.sh \
                $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
@@ -88,8 +91,8 @@ ROOTDELAY=10
 
 ifneq ($(CONFIG_OLPC_BOOTSCRIPT_IMAGES),)
 
-  define Image/cmdline/ext2
-    root=$(ROOTPART) rootfstype=ext2 rootwait
+  define Image/cmdline/ext4
+    root=$(ROOTPART) rootfstype=ext4 rootwait
   endef
 
   define Image/cmdline/jffs2-64k
@@ -141,7 +144,7 @@ endef
 ifneq ($(CONFIG_X86_VDI_IMAGES),)
   define Image/Build/vdi
     # left here because the image builder doesnt need these
-    ifeq ($(1),ext2)
+    ifeq ($(1),ext4)
                rm $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).vdi || true
                qemu-img convert -f raw -O vdi \
                        $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
@@ -155,7 +158,7 @@ endif
 ifneq ($(CONFIG_X86_VMDK_IMAGES),)
   define Image/Build/vmdk
     # left here because the image builder doesnt need these
-    ifeq ($(1),ext2)
+    ifeq ($(1),ext4)
                rm $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).vmdk || true
                qemu-img convert -f raw -O vmdk \
                        $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \
@@ -164,8 +167,37 @@ ifneq ($(CONFIG_X86_VMDK_IMAGES),)
   endef
 endif
 
+define Image/Build/gzip
+       gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img
+       gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
+endef
+
+ifneq ($(CONFIG_TARGET_IMAGES_GZIP),)
+  define Image/Build/gzip/ext4
+       $(call Image/Build/gzip,ext4)
+  endef
+  ifneq ($(CONFIG_TARGET_IMAGES_PAD),)
+    define Image/Build/gzip/squashfs
+       $(call Image/Build/gzip,squashfs)
+    endef
+    define Image/Build/gzip/jffs2-64k
+       $(call Image/Build/gzip,jffs2-64k)
+    endef
+    define Image/Build/gzip/jffs2-128k
+       $(call Image/Build/gzip,jffs2-128k)
+    endef
+  endif
+endif
+
 define Image/BuildKernel
        $(CP) $(KDIR)/bzImage $(BIN_DIR)/$(IMG_PREFIX)-vmlinuz
+  ifneq ($(CONFIG_X86_ETHERBOOT_IMAGES),)
+       rm -f $(BIN_DIR)/$(IMG_PREFIX)-etherboot
+       $(STAGING_DIR_HOST)/bin/mkelfImage \
+               --append=$(CONFIG_X86_ETHERBOOT_BOOTOPTS) \
+               $(KDIR)/bzImage \
+               $(BIN_DIR)/$(IMG_PREFIX)-etherboot
+  endif
 endef
 
 define Image/Prepare
@@ -184,10 +216,7 @@ define Image/Build
   endif
        $(CP) $(KDIR)/root.$(1) $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
        $(CP) $(KDIR)/bzImage $(BIN_DIR)/$(IMG_PREFIX)-vmlinuz
-  ifeq ($(1),ext2)
-       gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img
-       gzip -f9 $(BIN_DIR)/$(IMG_PREFIX)-rootfs-$(1).img
-  endif
+       $(call Image/Build/gzip/$(1))
 endef
 
 $(eval $(call BuildImage))
This page took 0.027835 seconds and 4 git commands to generate.