Porting to an AM186 demo board, need some help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I have a AMD demo board with a AM186ES 40MHz chip, 256k flash and 256k
RAM. This chip is slightly different from others like the 8018x one in ELKS.

I've started to write code for this chip, but I am struggling with
menuconfig and Makefiles. My files are not even get compiled (verified
by adding "#error bla" to files, no error thrown).

My steps so far:

1) I started by creating a (huge) MSR definition file directly from
datasheet, this one should be 100% done, hopefully nothing missed :)

I copied files from recent 8018x changes to -am186.c and rewrote
routines/pieces for my MCU, added to makefiles etc:

2) elks/config.in

...

    choice 'Select system' \
        "IBM-PC CONFIG_ARCH_IBMPC \
         AM186  CONFIG_ARCH_AM186 \
         8018X    CONFIG_ARCH_8018X" IBM-PC

...

    elif [ "$CONFIG_ARCH_8018X" = "y" ]; then

        comment 'Platform'

        comment 'Devices'
    elif [ "$CONFIG_ARCH_AM186" = "y" ]; then
        comment 'Platform'
        comment 'Devices'
    fi

...

    if [ "$CONFIG_ARCH_AM186" = "y" ]; then
        bool 'Build kernel as ROM-bootable' CONFIG_ROMCODE      n
    fi

...

3) created arch/i86/drivers/char/conio-am186.c

4) changed arch/i86/drivers/char/Makefile

...

ifeq ($(CONFIG_ARCH_AM186), y)
    CONIO = am186
    SERIAL = template
endif
....

5) created arch/i86/kernel/irq-am186.c

6) changed arch/i86/kernel/irqtab.S

7) created arch/i86/kernel/timer-am186.c

8) changed arch/i86/kernel/Makefile

...

ifeq ($(CONFIG_ARCH_AM186), y)
OBJS += irq-am186.o timer-am186.o
endif

...

9) changed include/linuxmt/config.h

#ifdef CONFIG_ARCH_AM186
#define MAX_SERIAL        2    /* max number of serial tty devices*/

#define SETUP_VID_COLS        80    /* BIOS video # columns */
#define SETUP_VID_LINES        25    /* BIOS video # lines */
#define SETUP_CPU_TYPE        5    /* processor type 80186 */
#define SETUP_MEM_KBYTES    256    /* base memory in 1K bytes */
#define SETUP_ROOT_DEV        0x0600    /* root device ROMFS */
#define SETUP_ELKS_FLAGS    0    /* flags for root device type */
#define SETUP_PART_OFFSETLO    0    /* partition offset low word */
#define SETUP_PART_OFFSETHI    0    /* partition offset high word */
#define SYS_CAPS        0    /* no XT/AT capabilities */

#define SETUP_HEAPSIZE        1024    /* minimum kernel heap for now*/

#define CONFIG_AM186_FCPU    40
#endif

10) created a .config with these settings:

CONFIG_ARCH_AM186=y
CONFIG_SMALL_KERNEL=y
CONFIG_ROMCODE=y
CONFIG_EXPERIMENTAL=y
CONFIG_ROM_SETUP_CODE=0xe000
CONFIG_ROM_KERNEL_CODE=0xe060
CONFIG_ROM_SETUP_DATA=0x0060
CONFIG_ROM_KERNEL_DATA=0x0080
CONFIG_ROM_BASE=0xe000
CONFIG_ROM_CHECKSUM_SIZE=64
CONFIG_ROM_BOOTABLE_BY_RESET=y
CONFIG_ROM_RESET_ADDRESS=0x0003
CONFIG_ROMFS_FS=y
CONFIG_ROMFS_BASE=0x8000
CONFIG_FULL_VFS=y
CONFIG_PIPE=y
CONFIG_CONSOLE_HEADLESS=y
CONFIG_KEYBOARD_SCANCODE=y
CONFIG_CONSOLE_SERIAL=y
CONFIG_CHAR_DEV_RS=y
CONFIG_APP_SASH=y
CONFIG_IMG_ROM=y

After all that I go to root folder of source, where I have run build.sh
the first time.

I do this:

$ source env.sh

$ make clean

$ make

It runs for quite a few minutes (old machine) and stops with this:

...

...

gcc -I/home/bx/elks-dev/elks-am186/include
-I/home/bx/elks-dev/elks-am186/elks/include -o build build.c
gcc -I/home/bx/elks-dev/elks-am186/include
-I/home/bx/elks-dev/elks-am186/elks/include -o mkbootloader mkbootloader.c
make[3]: Verzeichnis „/home/bx/elks-dev/elks-am186/elks/arch/i86/tools“
wird verlassen
gcc -E -traditional -I/home/bx/elks-dev/elks-am186/include
-I/home/bx/elks-dev/elks-am186/elks/include
-I/home/bx/elks-dev/elks-am186/libc/include -DUTS_RELEASE=\"0.4.0\"
-D__KERNEL__ -o boot/setup.tmp boot/setup.S
ia16-elf-as   --32-segelf -o boot/setup.o boot/setup.tmp
rm boot/setup.tmp
ia16-elf-ld.gold  -s  -M -T
/home/bx/elks-dev/elks-am186/elks/elks-tiny.ld -o boot/setup
boot/setup.o > boot/setup.map
boot/setup.o(.text+0x2e): error: undefined reference to 'arch_set_initseg'
boot/setup.o(.text+0xfe): error: undefined reference to 'putc'
boot/setup.o(.text+0x112): error: undefined reference to 'putc'
boot/setup.o(.text+0x140): error: undefined reference to 'putc'
make[2]: *** [Makefile:98: boot/setup] Fehler 1
make[2]: Verzeichnis „/home/bx/elks-dev/elks-am186/elks/arch/i86“ wird
verlassen
make[1]: *** [Makefile:75: Image] Fehler 2
make[1]: Verzeichnis „/home/bx/elks-dev/elks-am186/elks“ wird verlassen
make: *** [Makefile:13: all] Fehler 2


What am I missing / did I do wrong?


Thank you,

Nils







[Index of Archives]     [Kernel]     [Linux ia64]     [DCCP]     [Linux for ARM]     [Yosemite News]     [Linux SCSI]     [Linux Hams]

  Powered by Linux