mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-27 17:13:11 +02:00
added generation of x86 livecds, from #2391
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@9191 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
78a1e6d602
commit
58b2f95a87
@ -48,6 +48,13 @@ menu "Target Images"
|
|||||||
help
|
help
|
||||||
Ext2 file system with some free space for uml images
|
Ext2 file system with some free space for uml images
|
||||||
|
|
||||||
|
config TARGET_ROOTFS_ISO
|
||||||
|
bool "iso"
|
||||||
|
default n
|
||||||
|
depends TARGET_ROOTFS_INITRAMFS && TARGET_x86
|
||||||
|
help
|
||||||
|
Create some bootable ISO image
|
||||||
|
|
||||||
comment "Image Options"
|
comment "Image Options"
|
||||||
|
|
||||||
source "target/linux/*/image/Config.in"
|
source "target/linux/*/image/Config.in"
|
||||||
|
@ -81,6 +81,12 @@ ifeq ($(CONFIG_TARGET_ROOTFS_EXT2FS),y)
|
|||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
ifeq ($(CONFIG_TARGET_ROOTFS_ISO),y)
|
||||||
|
define Image/mkfs/iso
|
||||||
|
$(call Image/Build,iso)
|
||||||
|
endef
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
define Image/mkfs/prepare/default
|
define Image/mkfs/prepare/default
|
||||||
find $(TARGET_DIR) -type f -not -perm +0100 -not -name 'ssh_host*' | $(XARGS) chmod 0644
|
find $(TARGET_DIR) -type f -not -perm +0100 -not -name 'ssh_host*' | $(XARGS) chmod 0644
|
||||||
@ -113,6 +119,7 @@ ifneq ($(IB),1)
|
|||||||
$(call Image/mkfs/squashfs)
|
$(call Image/mkfs/squashfs)
|
||||||
$(call Image/mkfs/tgz)
|
$(call Image/mkfs/tgz)
|
||||||
$(call Image/mkfs/ext2)
|
$(call Image/mkfs/ext2)
|
||||||
|
$(call Image/mkfs/iso)
|
||||||
else
|
else
|
||||||
install: compile install-targets
|
install: compile install-targets
|
||||||
$(call Image/BuildKernel)
|
$(call Image/BuildKernel)
|
||||||
@ -120,6 +127,7 @@ else
|
|||||||
$(call Image/mkfs/squashfs)
|
$(call Image/mkfs/squashfs)
|
||||||
$(call Image/mkfs/tgz)
|
$(call Image/mkfs/tgz)
|
||||||
$(call Image/mkfs/ext2)
|
$(call Image/mkfs/ext2)
|
||||||
|
$(call Image/mkfs/iso)
|
||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(IB),1)
|
ifneq ($(IB),1)
|
||||||
|
@ -19,4 +19,6 @@ DEFAULT_PACKAGES += kmod-natsemi kmod-ne2k-pci
|
|||||||
$(eval $(call Target,generic))
|
$(eval $(call Target,generic))
|
||||||
$(eval $(call Target,mediacenter))
|
$(eval $(call Target,mediacenter))
|
||||||
$(eval $(call BuildTarget))
|
$(eval $(call BuildTarget))
|
||||||
|
$(eval $(call RequireCommand,mkisofs, \
|
||||||
|
Please install mkisofs. \
|
||||||
|
))
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
config X86_GRUB_IMAGES
|
config X86_GRUB_IMAGES
|
||||||
bool "Build GRUB images (Linux x86 or x86_64 host only)"
|
bool "Build GRUB images (Linux x86 or x86_64 host only)"
|
||||||
depends TARGET_x86
|
depends TARGET_x86
|
||||||
depends TARGET_ROOTFS_EXT2FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
|
depends TARGET_ROOTFS_EXT2FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS || TARGET_ROOTFS_ISO
|
||||||
default y
|
default y
|
||||||
|
|
||||||
config X86_GRUB_IMAGES_PAD
|
config X86_GRUB_IMAGES_PAD
|
||||||
|
@ -74,6 +74,20 @@ define Image/Build/squashfs
|
|||||||
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
|
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Image/Build/iso
|
||||||
|
$(CP) \
|
||||||
|
$(STAGING_DIR_HOST)/usr/lib/grub/i386-pc/stage2_eltorito \
|
||||||
|
$(KDIR)/root.grub/boot/grub/stage2_eltorito
|
||||||
|
sed -i \
|
||||||
|
-e 's#@CMDLINE@#$(strip $(call Image/cmdline/$(1))) $(BOOTOPTS)#g' \
|
||||||
|
-e 's#@BAUDRATE@#$(CONFIG_X86_GRUB_BAUDRATE)#g' \
|
||||||
|
-e 's#(hd0,0)#(cd)#g' \
|
||||||
|
$(KDIR)/root.grub/boot/grub/menu.lst
|
||||||
|
$(CP) $(KDIR)/bzImage $(KDIR)/root.grub/boot/vmlinuz
|
||||||
|
mkisofs -R -b boot/grub/stage2_eltorito -no-emul-boot -boot-load-size 4 -boot-info-table \
|
||||||
|
-o $(KDIR)/root.iso $(KDIR)/root.grub
|
||||||
|
endef
|
||||||
|
|
||||||
define Image/BuildKernel
|
define Image/BuildKernel
|
||||||
$(CP) $(KDIR)/bzImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz
|
$(CP) $(KDIR)/bzImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz
|
||||||
endef
|
endef
|
||||||
@ -86,3 +100,4 @@ define Image/Build
|
|||||||
endef
|
endef
|
||||||
|
|
||||||
$(eval $(call BuildImage))
|
$(eval $(call BuildImage))
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user