aboutsummaryrefslogtreecommitdiffstats
path: root/target
diff options
context:
space:
mode:
authorJohn Crispin <john@openwrt.org>2007-10-08 18:53:19 +0000
committerJohn Crispin <john@openwrt.org>2007-10-08 18:53:19 +0000
commit215fa7eb8b055e580c30a9851fbcacdc5fef15a6 (patch)
treeefdafbe4938b49e93198f6371d2cff7ba65506c4 /target
parent0f4363326335a3acf67d821e6f4e6958bd2c4cba (diff)
downloadupstream-215fa7eb8b055e580c30a9851fbcacdc5fef15a6.tar.gz
upstream-215fa7eb8b055e580c30a9851fbcacdc5fef15a6.tar.bz2
upstream-215fa7eb8b055e580c30a9851fbcacdc5fef15a6.zip
added generation of x86 livecds, from #2391
SVN-Revision: 9191
Diffstat (limited to 'target')
-rw-r--r--target/linux/x86/Makefile4
-rw-r--r--target/linux/x86/image/Config.in2
-rw-r--r--target/linux/x86/image/Makefile15
3 files changed, 19 insertions, 2 deletions
diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile
index 27987a41bf..ddb50e6404 100644
--- a/target/linux/x86/Makefile
+++ b/target/linux/x86/Makefile
@@ -19,4 +19,6 @@ DEFAULT_PACKAGES += kmod-natsemi kmod-ne2k-pci
$(eval $(call Target,generic))
$(eval $(call Target,mediacenter))
$(eval $(call BuildTarget))
-
+$(eval $(call RequireCommand,mkisofs, \
+ Please install mkisofs. \
+))
diff --git a/target/linux/x86/image/Config.in b/target/linux/x86/image/Config.in
index a602496856..4a36f63128 100644
--- a/target/linux/x86/image/Config.in
+++ b/target/linux/x86/image/Config.in
@@ -1,7 +1,7 @@
config X86_GRUB_IMAGES
bool "Build GRUB images (Linux x86 or x86_64 host only)"
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
config X86_GRUB_IMAGES_PAD
diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile
index f19e6b3f38..d470fe1c5f 100644
--- a/target/linux/x86/image/Makefile
+++ b/target/linux/x86/image/Makefile
@@ -74,6 +74,20 @@ define Image/Build/squashfs
$(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
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
$(CP) $(KDIR)/bzImage $(BIN_DIR)/openwrt-$(BOARD)-$(KERNEL)-vmlinuz
endef
@@ -86,3 +100,4 @@ define Image/Build
endef
$(eval $(call BuildImage))
+