Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

initrd build error

Altera_Forum
Honored Contributor II
1,095 Views

hi 

 

I have enabled initrd support in my kernel and while building I am getting following error (I am adding it below) , Can any body suggest something on it. I am pasting my .config file part also. 

 

thanks 

 

Ankur 

 

-------------------------------------------------------------------------------------------------- 

**.config file**# # Block devices# # CONFIG_BLK_DEV_FD is not set 

CONFIG_BLK_DEV_LOOP=y# CONFIG_BLK_DEV_CRYPTOLOOP is not set# CONFIG_BLK_DEV_NBD is not set 

CONFIG_BLK_DEV_RAM=y 

CONFIG_BLK_DEV_RAM_SIZE=4096 

CONFIG_BLK_DEV_INITRD=y  

------------------------------------------------------------------------------------------------- 

 

 

error  

 

 

 

CC init/do_mounts_initrd.o 

In file included from include/linux/unistd.h:9, 

from init/do_mounts_initrd.c:2: 

include/asm/unistd.h:659: error: parse error before "setsid" 

include/asm/unistd.h:659: warning: return type defaults to `int' 

include/asm/unistd.h: In function `setsid': 

include/asm/unistd.h:659: error: `pid_t' undeclared (first use in this function)include/asm/unistd.h:659: error: (Each undeclared identifier is reported only once 

include/asm/unistd.h:659: error: for each function it appears in.) 

include/asm/unistd.h: At top level: 

include/asm/unistd.h:660: error: parse error before "off_t" 

include/asm/unistd.h:660: warning: function declaration isn't a prototype 

include/asm/unistd.h: In function `write': 

include/asm/unistd.h:660: error: `fd' undeclared (first use in this function) 

include/asm/unistd.h:660: error: `buf' undeclared (first use in this function) 

include/asm/unistd.h:660: error: `count' undeclared (first use in this function)include/asm/unistd.h: At top level: 

include/asm/unistd.h:661: error: parse error before "off_t" 

include/asm/unistd.h:661: warning: function declaration isn't a prototype 

include/asm/unistd.h: In function `read': 

include/asm/unistd.h:661: error: `fd' undeclared (first use in this function) 

include/asm/unistd.h:661: error: `buf' undeclared (first use in this function) 

include/asm/unistd.h:661: error: `count' undeclared (first use in this function)include/asm/unistd.h: At top level: 

include/asm/unistd.h:662: error: parse error before "lseek" 

include/asm/unistd.h:662: error: parse error before "off_t" 

include/asm/unistd.h:662: warning: return type defaults to `int' 

include/asm/unistd.h:662: warning: function declaration isn't a prototype 

include/asm/unistd.h: In function `lseek': 

include/asm/unistd.h:662: error: `fd' undeclared (first use in this function) 

include/asm/unistd.h:662: error: `offset' undeclared (first use in this function) 

include/asm/unistd.h:662: error: `count' undeclared (first use in this function)include/asm/unistd.h:662: error: `off_t' undeclared (first use in this function)include/asm/unistd.h: At top level: 

include/asm/unistd.h:668: error: parse error before "waitpid" 

include/asm/unistd.h:668: error: parse error before "pid" 

include/asm/unistd.h:668: warning: return type defaults to `int' 

include/asm/unistd.h:668: warning: function declaration isn't a prototype 

include/asm/unistd.h: In function `waitpid': 

include/asm/unistd.h:668: error: `pid' undeclared (first use in this function) 

include/asm/unistd.h:668: error: `wait_stat' undeclared (first use in this function) 

include/asm/unistd.h:668: error: `options' undeclared (first use in this function) 

include/asm/unistd.h:668: error: `pid_t' undeclared (first use in this function)include/asm/unistd.h: At top level: 

include/asm/unistd.h:671: error: parse error before "wait" 

include/asm/unistd.h:672: warning: return type defaults to `int' 

make[1]: *** [init/do_mounts_initrd.o] Error 1 

make: *** [init] Error 2
0 Kudos
1 Reply
Altera_Forum
Honored Contributor II
420 Views

Hi Ankur, 

 

Please try patch, 

 

include/asm-nios2nommu/unistd.h 

*** unistd.h 2005/10/30 12:13:57 1.1 

--- unistd.h 2005/10/30 12:14:16 

*************** 

*** 641,646 **** 

--- 641,650 ---- 

 

# ifdef __KERNEL_SYSCALLS__ 

 

+# include <linux/compiler.h> 

+# include <linux/interrupt.h> 

+# include <linux/types.h> 

+  

/* 

* we need this inline - forking from kernel space will result 

* in NO COPY ON WRITE (!!!), until an execve is executed. This 

 

 

arch/nios2nommu/kernel/setup.c 

*** setup.c 2005/10/30 12:18:59 1.1 

--- setup.c 2005/10/30 12:19:08 

*************** 

*** 59,65 **** 

# include <asm/asm-offsets.h> 

 

# ifdef CONFIG_BLK_DEV_INITRD 

!# include <linux/blk.h> 

# include <asm/pgtable.h> 

# endif 

 

--- 59,65 ---- 

# include <asm/asm-offsets.h> 

 

# ifdef CONFIG_BLK_DEV_INITRD 

!# include <linux/blkdev.h> 

# include <asm/pgtable.h> 

# endif 

 

 

 

 

 

 

 

 

--- Quote Start ---  

originally posted by ankur@May 11 2005, 06:33 PM 

hi 

 

i have enabled initrd support in my kernel and while building i am getting following error (i am adding it below) , can any body suggest something on it. i am pasting my .config file part also. 

 

thanks 

 

ankur 

 

-------------------------------------------------------------------------------------------------- 

**.config file**[/b]# # Block devices# # CONFIG_BLK_DEV_FD is not set 

CONFIG_BLK_DEV_LOOP=y# CONFIG_BLK_DEV_CRYPTOLOOP is not set# CONFIG_BLK_DEV_NBD is not set 

CONFIG_BLK_DEV_RAM=y 

CONFIG_BLK_DEV_RAM_SIZE=4096 

CONFIG_BLK_DEV_INITRD=y  

------------------------------------------------------------------------------------------------- 

   

 

error  

 

 

 

CC      init/do_mounts_initrd.o 

In file included from include/linux/unistd.h:9, 

              from init/do_mounts_initrd.c:2: 

include/asm/unistd.h:659: error: parse error before "setsid" 

include/asm/unistd.h:659: warning: return type defaults to `int&#39; 

include/asm/unistd.h: In function `setsid&#39;: 

include/asm/unistd.h:659: error: `pid_t&#39; undeclared (first use in this function)include/asm/unistd.h:659: error: (Each undeclared identifier is reported only once 

include/asm/unistd.h:659: error: for each function it appears in.) 

include/asm/unistd.h: At top level: 

include/asm/unistd.h:660: error: parse error before "off_t" 

include/asm/unistd.h:660: warning: function declaration isn&#39;t a prototype 

include/asm/unistd.h: In function `write&#39;: 

include/asm/unistd.h:660: error: `fd&#39; undeclared (first use in this function) 

include/asm/unistd.h:660: error: `buf&#39; undeclared (first use in this function) 

include/asm/unistd.h:660: error: `count&#39; undeclared (first use in this function)include/asm/unistd.h: At top level: 

include/asm/unistd.h:661: error: parse error before "off_t" 

include/asm/unistd.h:661: warning: function declaration isn&#39;t a prototype 

include/asm/unistd.h: In function `read&#39;: 

include/asm/unistd.h:661: error: `fd&#39; undeclared (first use in this function) 

include/asm/unistd.h:661: error: `buf&#39; undeclared (first use in this function) 

include/asm/unistd.h:661: error: `count&#39; undeclared (first use in this function)include/asm/unistd.h: At top level: 

include/asm/unistd.h:662: error: parse error before "lseek" 

include/asm/unistd.h:662: error: parse error before "off_t" 

include/asm/unistd.h:662: warning: return type defaults to `int&#39; 

include/asm/unistd.h:662: warning: function declaration isn&#39;t a prototype 

include/asm/unistd.h: In function `lseek&#39;: 

include/asm/unistd.h:662: error: `fd&#39; undeclared (first use in this function) 

include/asm/unistd.h:662: error: `offset&#39; undeclared (first use in this function) 

include/asm/unistd.h:662: error: `count&#39; undeclared (first use in this function)include/asm/unistd.h:662: error: `off_t&#39; undeclared (first use in this function)include/asm/unistd.h: At top level: 

include/asm/unistd.h:668: error: parse error before "waitpid" 

include/asm/unistd.h:668: error: parse error before "pid" 

include/asm/unistd.h:668: warning: return type defaults to `int&#39; 

include/asm/unistd.h:668: warning: function declaration isn&#39;t a prototype 

include/asm/unistd.h: In function `waitpid&#39;: 

include/asm/unistd.h:668: error: `pid&#39; undeclared (first use in this function) 

include/asm/unistd.h:668: error: `wait_stat&#39; undeclared (first use in this function) 

include/asm/unistd.h:668: error: `options&#39; undeclared (first use in this function) 

include/asm/unistd.h:668: error: `pid_t&#39; undeclared (first use in this function)include/asm/unistd.h: At top level: 

include/asm/unistd.h:671: error: parse error before "wait" 

include/asm/unistd.h:672: warning: return type defaults to `int&#39; 

make[1]: *** [init/do_mounts_initrd.o] Error 1 

make: *** [init] Error 2 

<div align='right'><{post_snapback}> (index.php?act=findpost&pid=6841) 

--- Quote End ---  

[/b] 

--- Quote End ---  

0 Kudos
Reply