From 5d0d86c3272891e96ee46fedeb6d2b795446b89f Mon Sep 17 00:00:00 2001
From: Thomas Chou <thomas@wytron.com.tw>
Date: Mon, 26 Nov 2007 23:11:43 +0800
Subject: [PATCH] nios2: regenerate initramfs from romfs dir

The initramfs in the initial kernel build was empty. It should be regenerated from romfs dir after modules and user apps installed.

Signed-off-by: Thomas Chou <thomas@wytron.com.tw>

diff --git a/vendors/Altera/nios2nommu/Makefile b/vendors/Altera/nios2nommu/Makefile
index cce4d76..798ddd5 100644
--- a/vendors/Altera/nios2nommu/Makefile
+++ b/vendors/Altera/nios2nommu/Makefile
@@ -42,6 +42,8 @@ romfs:
 
 image:
 	[ -d $(IMAGEDIR) ] || mkdir -p $(IMAGEDIR)
+	-rm $(ROOTDIR)/$(LINUXDIR)/usr/initramfs_data.cpio.gz
+	LDFLAGS="" $(MAKEARCH_KERNEL) -C $(ROOTDIR)/$(LINUXDIR) $(LINUXTARGET)
 	cp $(ROOTDIR)/$(LINUXDIR)/arch/nios2nommu/boot/zImage $(KERNELZ)
 
 
-- 
1.5.3.3

