2009-10-24 08:45:54 +00:00
|
|
|
# -*- makefile -*-
|
|
|
|
LINK_BASE = 0x80200000
|
|
|
|
target_machine=yeeloong
|
|
|
|
COMMON_CFLAGS += -march=mips3
|
|
|
|
COMMON_ASFLAGS += -march=mips3
|
2010-02-10 00:49:47 +00:00
|
|
|
|
2010-05-31 11:58:18 +00:00
|
|
|
kernel_img_HEADERS += pci.h bitmap.h video.h gfxterm.h font.h \
|
|
|
|
bitmap_scale.h bufio.h cs5536.h machine/pci.h
|
2010-02-25 14:10:18 +00:00
|
|
|
|
2009-10-24 08:45:54 +00:00
|
|
|
include $(srcdir)/conf/mips.mk
|
|
|
|
|
2010-04-24 23:54:46 +00:00
|
|
|
pkglib_PROGRAMS = kernel.img
|
2009-12-20 Robert Millan <rmh.grub@aybabtu.com>
* kern/mips/yeeloong/init.c (grub_video_sm712_init)
(grub_video_video_init, grub_video_bitmap_init)
(grub_font_manager_init, grub_term_gfxterm_init)
(grub_at_keyboard_init): New extern declarations.
(grub_machine_init): Initialize gfxterm and at_keyboard.
* kern/main.c (grub_main): Revert grub_printf delay kludge.
* util/grub-install.in: Revert embed of `at_keyboard.mod' and
`gfxterm.mod' into core image.
* conf/mips.rmk (pkglib_IMAGES, kernel_img_SOURCES)
(kernel_img_CFLAGS, kernel_img_ASFLAGS, kernel_img_LDFLAGS)
(kernel_img_FORMAT): Copy to ...
* conf/mips-qemu-mips.rmk (pkglib_IMAGES, kernel_img_SOURCES)
(kernel_img_CFLAGS, kernel_img_ASFLAGS, kernel_img_LDFLAGS)
(kernel_img_FORMAT): ... here, and ...
* conf/mips-yeeloong.rmk (pkglib_IMAGES, kernel_img_SOURCES)
(kernel_img_CFLAGS, kernel_img_ASFLAGS, kernel_img_LDFLAGS)
(kernel_img_FORMAT): ... here.
(kernel_img_SOURCES): Add files necessary for output (gfxterm)
and input (at_keyboard) terminals in kernel.
(kernel_img_CFLAGS): Add `-DUSE_ASCII_FAILBACK'.
(pkglib_MODULES): Remove `pci.mod'.
(pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS)
(sm712_mod_SOURCES, sm712_mod_CFLAGS, sm712_mod_LDFLAGS)
(at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
(at_keyboard_mod_LDFLAGS): Remove variables.
2010-01-20 01:19:53 +00:00
|
|
|
kernel_img_SOURCES = kern/$(target_cpu)/startup.S \
|
|
|
|
kern/main.c kern/device.c kern/$(target_cpu)/init.c \
|
|
|
|
kern/$(target_cpu)/$(target_machine)/init.c \
|
|
|
|
kern/disk.c kern/dl.c kern/err.c kern/file.c kern/fs.c \
|
|
|
|
kern/misc.c kern/mm.c kern/term.c \
|
|
|
|
kern/rescue_parser.c kern/rescue_reader.c \
|
|
|
|
kern/list.c kern/handler.c kern/command.c kern/corecmd.c \
|
|
|
|
kern/parser.c kern/partition.c kern/env.c kern/$(target_cpu)/dl.c \
|
|
|
|
kern/generic/millisleep.c kern/generic/rtc_get_time_ms.c kern/time.c \
|
|
|
|
kern/$(target_cpu)/cache.S \
|
|
|
|
\
|
|
|
|
term/at_keyboard.c \
|
|
|
|
font/font_cmd.c font/font.c io/bufio.c \
|
|
|
|
video/video.c video/fb/video_fb.c video/fb/fbblit.c \
|
|
|
|
video/fb/fbfill.c video/fb/fbutil.c video/bitmap.c \
|
2010-02-03 00:34:55 +00:00
|
|
|
video/bitmap_scale.c video/sm712.c bus/pci.c bus/bonito.c \
|
2009-12-20 Robert Millan <rmh.grub@aybabtu.com>
* kern/mips/yeeloong/init.c (grub_video_sm712_init)
(grub_video_video_init, grub_video_bitmap_init)
(grub_font_manager_init, grub_term_gfxterm_init)
(grub_at_keyboard_init): New extern declarations.
(grub_machine_init): Initialize gfxterm and at_keyboard.
* kern/main.c (grub_main): Revert grub_printf delay kludge.
* util/grub-install.in: Revert embed of `at_keyboard.mod' and
`gfxterm.mod' into core image.
* conf/mips.rmk (pkglib_IMAGES, kernel_img_SOURCES)
(kernel_img_CFLAGS, kernel_img_ASFLAGS, kernel_img_LDFLAGS)
(kernel_img_FORMAT): Copy to ...
* conf/mips-qemu-mips.rmk (pkglib_IMAGES, kernel_img_SOURCES)
(kernel_img_CFLAGS, kernel_img_ASFLAGS, kernel_img_LDFLAGS)
(kernel_img_FORMAT): ... here, and ...
* conf/mips-yeeloong.rmk (pkglib_IMAGES, kernel_img_SOURCES)
(kernel_img_CFLAGS, kernel_img_ASFLAGS, kernel_img_LDFLAGS)
(kernel_img_FORMAT): ... here.
(kernel_img_SOURCES): Add files necessary for output (gfxterm)
and input (at_keyboard) terminals in kernel.
(kernel_img_CFLAGS): Add `-DUSE_ASCII_FAILBACK'.
(pkglib_MODULES): Remove `pci.mod'.
(pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS)
(sm712_mod_SOURCES, sm712_mod_CFLAGS, sm712_mod_LDFLAGS)
(at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
(at_keyboard_mod_LDFLAGS): Remove variables.
2010-01-20 01:19:53 +00:00
|
|
|
term/gfxterm.c commands/extcmd.c lib/arg.c \
|
2010-05-31 11:58:18 +00:00
|
|
|
bus/cs5536.c \
|
2009-12-20 Robert Millan <rmh.grub@aybabtu.com>
* kern/mips/yeeloong/init.c (grub_video_sm712_init)
(grub_video_video_init, grub_video_bitmap_init)
(grub_font_manager_init, grub_term_gfxterm_init)
(grub_at_keyboard_init): New extern declarations.
(grub_machine_init): Initialize gfxterm and at_keyboard.
* kern/main.c (grub_main): Revert grub_printf delay kludge.
* util/grub-install.in: Revert embed of `at_keyboard.mod' and
`gfxterm.mod' into core image.
* conf/mips.rmk (pkglib_IMAGES, kernel_img_SOURCES)
(kernel_img_CFLAGS, kernel_img_ASFLAGS, kernel_img_LDFLAGS)
(kernel_img_FORMAT): Copy to ...
* conf/mips-qemu-mips.rmk (pkglib_IMAGES, kernel_img_SOURCES)
(kernel_img_CFLAGS, kernel_img_ASFLAGS, kernel_img_LDFLAGS)
(kernel_img_FORMAT): ... here, and ...
* conf/mips-yeeloong.rmk (pkglib_IMAGES, kernel_img_SOURCES)
(kernel_img_CFLAGS, kernel_img_ASFLAGS, kernel_img_LDFLAGS)
(kernel_img_FORMAT): ... here.
(kernel_img_SOURCES): Add files necessary for output (gfxterm)
and input (at_keyboard) terminals in kernel.
(kernel_img_CFLAGS): Add `-DUSE_ASCII_FAILBACK'.
(pkglib_MODULES): Remove `pci.mod'.
(pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS)
(sm712_mod_SOURCES, sm712_mod_CFLAGS, sm712_mod_LDFLAGS)
(at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
(at_keyboard_mod_LDFLAGS): Remove variables.
2010-01-20 01:19:53 +00:00
|
|
|
symlist.c
|
|
|
|
kernel_img_CFLAGS = $(COMMON_CFLAGS) -DUSE_ASCII_FAILBACK
|
|
|
|
kernel_img_ASFLAGS = $(COMMON_ASFLAGS)
|
2010-04-10 23:14:31 +00:00
|
|
|
kernel_img_LDFLAGS += $(COMMON_LDFLAGS) -Wl,-N,-S,-Ttext,$(LINK_BASE),-Bstatic
|
2009-12-20 Robert Millan <rmh.grub@aybabtu.com>
* kern/mips/yeeloong/init.c (grub_video_sm712_init)
(grub_video_video_init, grub_video_bitmap_init)
(grub_font_manager_init, grub_term_gfxterm_init)
(grub_at_keyboard_init): New extern declarations.
(grub_machine_init): Initialize gfxterm and at_keyboard.
* kern/main.c (grub_main): Revert grub_printf delay kludge.
* util/grub-install.in: Revert embed of `at_keyboard.mod' and
`gfxterm.mod' into core image.
* conf/mips.rmk (pkglib_IMAGES, kernel_img_SOURCES)
(kernel_img_CFLAGS, kernel_img_ASFLAGS, kernel_img_LDFLAGS)
(kernel_img_FORMAT): Copy to ...
* conf/mips-qemu-mips.rmk (pkglib_IMAGES, kernel_img_SOURCES)
(kernel_img_CFLAGS, kernel_img_ASFLAGS, kernel_img_LDFLAGS)
(kernel_img_FORMAT): ... here, and ...
* conf/mips-yeeloong.rmk (pkglib_IMAGES, kernel_img_SOURCES)
(kernel_img_CFLAGS, kernel_img_ASFLAGS, kernel_img_LDFLAGS)
(kernel_img_FORMAT): ... here.
(kernel_img_SOURCES): Add files necessary for output (gfxterm)
and input (at_keyboard) terminals in kernel.
(kernel_img_CFLAGS): Add `-DUSE_ASCII_FAILBACK'.
(pkglib_MODULES): Remove `pci.mod'.
(pci_mod_SOURCES, pci_mod_CFLAGS, pci_mod_LDFLAGS)
(sm712_mod_SOURCES, sm712_mod_CFLAGS, sm712_mod_LDFLAGS)
(at_keyboard_mod_SOURCES, at_keyboard_mod_CFLAGS)
(at_keyboard_mod_LDFLAGS): Remove variables.
2010-01-20 01:19:53 +00:00
|
|
|
kernel_img_FORMAT = binary
|
2009-10-24 08:45:54 +00:00
|
|
|
|
2009-12-02 07:39:17 +00:00
|
|
|
# For ata.mod.
|
|
|
|
pkglib_MODULES += ata.mod
|
|
|
|
ata_mod_SOURCES = disk/ata.c
|
|
|
|
ata_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
ata_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For lspci.mod
|
|
|
|
pkglib_MODULES += lspci.mod
|
|
|
|
lspci_mod_SOURCES = commands/lspci.c
|
|
|
|
lspci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
lspci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For ata_pthru.mod.
|
|
|
|
pkglib_MODULES += ata_pthru.mod
|
|
|
|
ata_pthru_mod_SOURCES = disk/ata_pthru.c
|
|
|
|
ata_pthru_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
ata_pthru_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
2009-12-07 15:16:10 +00:00
|
|
|
|
|
|
|
# For mmap.mod.
|
|
|
|
pkglib_MODULES += mmap.mod
|
|
|
|
mmap_mod_SOURCES = mmap/mmap.c mmap/mips/yeeloong/uppermem.c
|
|
|
|
mmap_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
mmap_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
mmap_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
2009-12-09 18:39:21 +00:00
|
|
|
|
2009-12-11 21:14:09 +00:00
|
|
|
# For datetime.mod
|
|
|
|
pkglib_MODULES += datetime.mod
|
|
|
|
datetime_mod_SOURCES = lib/cmos_datetime.c
|
|
|
|
datetime_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
datetime_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2010-03-04 16:03:43 +00:00
|
|
|
pkglib_MODULES += linux.mod
|
|
|
|
linux_mod_SOURCES = loader/$(target_cpu)/linux.c
|
|
|
|
linux_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
linux_mod_ASFLAGS = $(COMMON_ASFLAGS)
|
|
|
|
linux_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
2009-12-11 21:14:09 +00:00
|
|
|
|
2010-05-31 11:58:18 +00:00
|
|
|
# For usb.mod
|
|
|
|
pkglib_MODULES += usb.mod
|
|
|
|
usb_mod_SOURCES = bus/usb/usb.c bus/usb/usbtrans.c bus/usb/usbhub.c
|
|
|
|
usb_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
usb_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For usbtest.mod
|
|
|
|
pkglib_MODULES += usbtest.mod
|
|
|
|
usbtest_mod_SOURCES = commands/usbtest.c
|
|
|
|
usbtest_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
usbtest_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For ohci.mod
|
|
|
|
pkglib_MODULES += ohci.mod
|
|
|
|
ohci_mod_SOURCES = bus/usb/ohci.c
|
|
|
|
ohci_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
ohci_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For usbms.mod
|
|
|
|
pkglib_MODULES += usbms.mod
|
|
|
|
usbms_mod_SOURCES = disk/usbms.c
|
|
|
|
usbms_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
usbms_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
|
|
|
# For usb_keyboard.mod
|
|
|
|
pkglib_MODULES += usb_keyboard.mod
|
|
|
|
usb_keyboard_mod_SOURCES = term/usb_keyboard.c
|
|
|
|
usb_keyboard_mod_CFLAGS = $(COMMON_CFLAGS)
|
|
|
|
usb_keyboard_mod_LDFLAGS = $(COMMON_LDFLAGS)
|
|
|
|
|
2009-12-09 18:39:21 +00:00
|
|
|
sbin_SCRIPTS += grub-install
|
|
|
|
grub_install_SOURCES = util/grub-install.in
|