Changeset 18279


Ignore:
Timestamp:
2009-11-03T02:02:39+01:00 (7 years ago)
Author:
florian
Message:

[x86] merge the olpc target with the x86 target, both tested and running

Location:
trunk/target/linux/x86
Files:
3 added
3 edited
6 copied
1 moved

Legend:

Unmodified
Added
Removed
  • trunk/target/linux/x86/Makefile

    r18127 r18279  
    1111BOARDNAME:=x86 
    1212FEATURES:=squashfs jffs2 ext2 vdi vmdk pcmcia tgz 
    13 SUBTARGETS=generic 
     13SUBTARGETS=generic olpc 
    1414 
    15 LINUX_VERSION:=2.6.31.5 
     15LINUX_VERSION:=2.6.30.9 
    1616 
    1717include $(INCLUDE_DIR)/target.mk 
  • trunk/target/linux/x86/image/Config.in

    r17722 r18279  
    11config X86_GRUB_IMAGES 
    22    bool "Build GRUB images (Linux x86 or x86_64 host only)" 
    3     depends TARGET_x86 
     3    depends TARGET_x86_generic 
    44    depends TARGET_ROOTFS_EXT2FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS || TARGET_ROOTFS_ISO 
    55        select PACKAGE_grub 
     
    3939config X86_VDI_IMAGES 
    4040    bool "Build VirtualBox image files (VDI). Requires VBoxManage" 
    41     depends TARGET_x86 
     41    depends TARGET_x86_generic 
    4242    depends TARGET_ROOTFS_EXT2FS 
    4343    depends X86_GRUB_IMAGES 
     
    4646config X86_VMDK_IMAGES 
    4747    bool "Build VMware image files (VMDK). Requires qemu-img" 
    48     depends TARGET_x86 
     48    depends TARGET_x86_generic 
    4949    depends TARGET_ROOTFS_EXT2FS 
    5050    depends X86_GRUB_IMAGES 
    5151    select PACKAGE_kmod-e1000 
     52 
     53config OLPC_BOOTSCRIPT_IMAGES 
     54    bool "Build images with bootscript" 
     55    depends TARGET_x86_olpc 
     56    depends TARGET_ROOTFS_EXT2FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS || TARGET_ROOTFS_ISO 
     57    default y 
     58 
     59config OLPC_BOOTSCRIPT_IMAGES_PAD 
     60        bool "Pad bootscript images to filesystem size (for JFFS2)" 
     61        depends OLPC_BOOTSCRIPT_IMAGES 
     62 
     63config OLPC_BOOTSCRIPT_KERNELPART 
     64    int "Kernel partition size (in MB)" 
     65    depends OLPC_BOOTSCRIPT_IMAGES 
     66    default 4 
     67 
     68config OLPC_BOOTSCRIPT_ROOTPART 
     69    string 
     70    prompt "Root partition on target device" if OLPC_BOOTSCRIPT_IMAGES 
     71    default "/dev/sda2" 
     72    help 
     73        The root partition on the final device.  If you don't know, 
     74        you probably want the default (/dev/sda2). 
     75 
  • trunk/target/linux/x86/image/Makefile

    r15840 r18279  
    99 
    1010export PATH=$(TARGET_PATH):/sbin 
     11 
     12ifeq ($(CONFIG_TARGET_x86_generic),y) 
    1113BOOTOPTS=$(strip $(subst ",, $(CONFIG_X86_GRUB_BOOTOPTS))) 
    1214ROOTPART=$(strip $(subst ",, $(CONFIG_X86_GRUB_ROOTPART))) 
    1315#"))")) # fix vim's broken syntax highlighting 
     16endif 
    1417 
     18ifeq ($(CONFIG_TARGET_x86_olpc),y) 
     19ROOTPART=$(strip $(subst ",, $(CONFIG_OLPC_BOOTSCRIPT_ROOTPART))) 
     20endif 
     21#"))")) # fix vim's broken syntax highlighting 
    1522 
    1623ifeq ($(CONFIG_X86_GRUB_IMAGES),y) 
     
    4350                -e 's#@BAUDRATE@#$(CONFIG_X86_GRUB_BAUDRATE)#g' \ 
    4451                ./menu.lst > $(KDIR)/root.grub/boot/grub/menu.lst 
    45         PADDING="$(CONFIG_X86_GRUB_IMAGES_PAD)" PATH="$(TARGET_PATH)" ./gen_image.sh $(BIN_DIR)/openwrt-$(BOARD)-$(1).image $(CONFIG_X86_GRUB_KERNELPART) $(KDIR)/root.grub $(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1) 
     52        PADDING="$(CONFIG_X86_GRUB_IMAGES_PAD)" PATH="$(TARGET_PATH)" ./gen_image_x86.sh $(BIN_DIR)/openwrt-$(BOARD)-$(1).image $(CONFIG_X86_GRUB_KERNELPART) $(KDIR)/root.grub $(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1) 
    4653        $(call Image/Build/grub/$(1)) 
    4754  endef 
     
    5764else 
    5865  define Image/Build/grub 
    59         PADDING="$(CONFIG_X86_GRUB_IMAGES_PAD)" PATH="$(TARGET_PATH)" NOGRUB=1 ./gen_image.sh $(BIN_DIR)/openwrt-$(BOARD)-$(1).image $(CONFIG_X86_GRUB_KERNELPART) "" $(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1) 
     66        PADDING="$(CONFIG_X86_GRUB_IMAGES_PAD)" PATH="$(TARGET_PATH)" NOGRUB=1 ./gen_image_x86.sh $(BIN_DIR)/openwrt-$(BOARD)-$(1).image $(CONFIG_X86_GRUB_KERNELPART) "" $(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1) 
    6067  endef 
    6168endif 
     
    8390endif 
    8491 
     92ROOTDELAY=10 
     93 
     94ifeq ($(CONFIG_OLPC_BOOTSCRIPT_IMAGES),y) 
     95  define Image/cmdline/squashfs 
     96    block2mtd.block2mtd=$(ROOTPART),65536,rootfs root=/dev/mtdblock0 rootfstype=squashfs rootdelay=$(ROOTDELAY) 
     97  endef 
     98 
     99  define Image/cmdline/jffs2-64k 
     100    block2mtd.block2mtd=$(ROOTPART),65536,rootfs root=/dev/mtdblock0 rootfstype=jffs2 rootdelay=$(ROOTDELAY) 
     101  endef 
     102 
     103  define Image/cmdline/jffs2-128k 
     104    block2mtd.block2mtd=$(ROOTPART),131072,rootfs root=/dev/mtdblock0 rootfstype=jffs2 rootdelay=$(ROOTDELAY) 
     105  endef 
     106 
     107  define Image/cmdline/ext2 
     108    root=$(ROOTPART) rootfstype=ext2 rootwait 
     109  endef 
     110 
     111  define Image/Build/bootscript 
     112        # left here because the image builder doesnt need these 
     113        $(INSTALL_DIR) $(KDIR)/root.bootscript/boot 
     114        $(CP) $(KDIR)/bzImage $(KDIR)/root.bootscript/boot/vmlinuz 
     115        sed -e 's#@CMDLINE@#$(strip $(call Image/cmdline/$(1))) $(BOOTOPTS)#g' \ 
     116                ./olpc.fth > $(KDIR)/root.bootscript/boot/olpc.fth 
     117        PADDING="$(CONFIG_OLPC_BOOTSCRIPT_IMAGES_PAD)" PATH="$(TARGET_PATH)" ./gen_image_olpc.sh $(BIN_DIR)/openwrt-$(BOARD)-$(1).image $(CONFIG_OLPC_BOOTSCRIPT_KERNELPART) $(KDIR)/root.bootscript $(CONFIG_TARGET_ROOTFS_FSPART) $(KDIR)/root.$(1) 
     118  endef 
     119endif 
     120 
    85121define Image/Prepare 
    86122        $(CP) $(LINUX_DIR)/arch/x86/boot/bzImage $(KDIR)/bzImage 
     123ifeq ($(CONFIG_TARGET_x86_generic),y) 
    87124        $(call Image/Prepare/grub) 
     125endif 
     126ifeq ($(CONFIG_TARGET_x86_olpc),y) 
     127        $(call Image/Prepare/bootscript) 
     128endif 
    88129endef 
    89130   
     
    113154define Image/Build 
    114155        $(call Image/Build/$(1)) 
     156        $(call Image/Build/bootscript,$(1)) 
    115157ifneq ($(1),iso) 
    116158        $(call Image/Build/grub,$(1)) 
Note: See TracChangeset for help on using the changeset viewer.