Yes. all the things what I do, I do from this website.
I added new board by copying 3c120 to 2c35. Changed Kconfig and Makefile in boards(adding few lines to my new 2c35 board). Changed Kconfig in 2c35 folder. For one try I did not changed 2c35/include/asm for my board and leaved it without change.
I leave number 2 from the tut: 2. add a new board to uClinux-dist using nios2 as a template. Beaceuse I think this is not usefull.
I tried compile kernel with my "new" board 2c35(which is old actually) and success.
Now I want to change parameters for my real board 2c35. And i changed nios.h:
# ifndef _ASM_NIOS2_H__
# define _ASM_NIOS2_H__
# if defined(CONFIG_NIOS2_MMU)
# include <asm/default_mmu.h>
/* Added compability mode with macro names from "old" design...
* FIXME: we should really fix drivers instead. but this makes it
* easier to switch between old and new design...
*/
//#define CONFIG_ALTERA_CYCLONE_III
# define DDR2_TOP_BASE DDR_SDRAM_BASE
# define DDR2_TOP_SPAN DDR_SDRAM_SPAN
# define EXT_FLASH_BASE FLASH_BASE
# define EXT_FLASH_SPAN FLASH_SPAN
# define TIMER_1MS_FREQ SYS_CLK_TIMER_FREQ
# define TIMER_1MS_BASE SYS_CLK_TIMER_BASE
# define TIMER_1MS_SPAN SYS_CLK_TIMER_SPAN
# define TIMER_1MS_IRQ SYS_CLK_TIMER_IRQ
//#define GPIO_LED1 0
DDR_SDRAM, FLASH, SYS_CLK_TIMER - those are my names in nios sopc. I dont have yet GPIO so I comment define GPIO_LED1 0. Actually I dont know what for it is.
I generated: sopc-create-header-files --single default_mmu.h and copied it to 2c35/include/asm overwriting the old one.
Now in uClinux-dist: make menuconfig (I set: Altera, nios2. In kernel selection: default all settings nad customize kernel settings)
I get:
*
* Restart config...
*
*
* NiosII board configuration
*
board configuration
> 1. 3C120 dev board (3C120)
2. 2C35 dev board (2C35) (NEW)
3. Nios Embedded Evaluation Kit (NEEK)
choice[1-3]: 2
And now: make
I get errors like
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:87: error: 'USER_LED_PIO_8OUT_BASE' undeclared here (not in a function)
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:88: error: 'USER_DIPSW_PIO_8IN_BASE' undeclared here (not in a function)
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:89: error: 'USER_PB_PIO_4IN_BASE' undeclared here (not in a function)
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:108: error: 'GPIO_LED1' undeclared here (not in a function)
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:108: error: initializer element is not constant
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:108: error: (near initialization for 'nios2_led_pins[0].gpio')
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:1157: error: 'TSE_MAC_BASE' undeclared here (not in a function)
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:1157: error: initializer element is not constant
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:1157: error: (near initialization for 'alt_tse_resource[0].start')
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:1158: error: initializer element is not constant
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:1158: error: (near initialization for 'alt_tse_resource[0].end')
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:1163: error: 'SGDMA_RX_BASE' undeclared here (not in a function)
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:1163: error: initializer element is not constant
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:1163: error: (near initialization for 'alt_tse_resource[1].start')
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:1164: error: initializer element is not constant
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:1164: error: (near initialization for 'alt_tse_resource[1].end')
/util/Altera_soft/workspace/nios2-linux/linux-2.6/arch/nios2/boards/2c35/config.c:1169: error: 'SGDMA_TX_BASE' undeclared here (not in a function)
I think the problem is in config.c but how to change it to my nios?