mirror of
git://projects.qi-hardware.com/iris.git
synced 2025-01-14 20:41:06 +02:00
make things work again
This commit is contained in:
parent
2d803d5650
commit
10ea4a0725
20
Makefile.am
20
Makefile.am
@ -26,8 +26,8 @@ objcopyflags = -S $(addprefix --remove-section=.,$(junk))
|
|||||||
|
|
||||||
start_load = 0x80100000
|
start_load = 0x80100000
|
||||||
|
|
||||||
noinst_DATA = iris.raw mips/start.raw mips/start-hack.S mips/board/sdram-setup.raw
|
noinst_DATA = iris.raw mips/start.raw mips/start-hack.S mips/board/stage1.raw
|
||||||
noinst_PROGRAMS = iris.elf mips/start.elf mips/board/sdram-setup.elf
|
noinst_PROGRAMS = iris.elf mips/start.elf mips/board/stage1.elf
|
||||||
|
|
||||||
%.raw: %.elf
|
%.raw: %.elf
|
||||||
$(OBJCOPY) $(objcopyflags) -Obinary $< $@
|
$(OBJCOPY) $(objcopyflags) -Obinary $< $@
|
||||||
@ -61,11 +61,11 @@ mips_start_elf_SOURCES = mips/start-hack.S iris.raw
|
|||||||
mips/start-hack.S: mips/start.S iris.raw
|
mips/start-hack.S: mips/start.S iris.raw
|
||||||
cp $< $@
|
cp $< $@
|
||||||
|
|
||||||
mips_board_sdram_setup_elf_DEPENDENCIES = mips/board/sdram-setup.ld
|
mips_board_stage1_elf_DEPENDENCIES = mips/board/stage1.ld
|
||||||
mips_board_sdram_setup_elf_CPPFLAGS = -fno-inline -Iinclude -Imips -Imips/board -mips32
|
mips_board_stage1_elf_CPPFLAGS = -fno-inline -Iinclude -Imips -Imips/board -mips32
|
||||||
mips_board_sdram_setup_elf_CXXFLAGS = -O5 -Wno-unused-parameter -fno-strict-aliasing -fno-builtin -ggdb3 -fno-exceptions -fno-common
|
mips_board_stage1_elf_CXXFLAGS = -O5 -Wno-unused-parameter -fno-strict-aliasing -fno-builtin -ggdb3 -fno-exceptions -fno-common
|
||||||
mips_board_sdram_setup_elf_LDFLAGS = -Wl,--omagic -Wl,-T -Wl,mips/board/sdram-setup.ld -nostdlib
|
mips_board_stage1_elf_LDFLAGS = -Wl,--omagic -Wl,-T -Wl,mips/board/stage1.ld -nostdlib
|
||||||
mips_board_sdram_setup_elf_SOURCES = mips/board/sdram-setup.cc
|
mips_board_stage1_elf_SOURCES = mips/board/stage1.cc
|
||||||
|
|
||||||
program_targets = \
|
program_targets = \
|
||||||
userspace/bootinit.elf \
|
userspace/bootinit.elf \
|
||||||
@ -175,7 +175,7 @@ server:
|
|||||||
$(MAKE) -C native
|
$(MAKE) -C native
|
||||||
|
|
||||||
# This target is meaningless for SD boot mode.
|
# This target is meaningless for SD boot mode.
|
||||||
test: mips/start.raw mips/start.elf server mips/board/sdram-setup.raw fs/init.config fs/font.dat
|
test: mips/start.raw mips/start.elf server mips/board/stage1.raw fs/init.config fs/font.dat
|
||||||
echo shutdown | nc localhost 5050 || true
|
echo shutdown | nc localhost 5050 || true
|
||||||
native/usb-server
|
native/usb-server
|
||||||
echo 'reboot $(start_load) 0x$(shell /bin/sh -c '$(OBJDUMP) -t mips/start.elf | grep __start$$ | cut -b1-8') mips/start.raw' | nc localhost 5050
|
echo 'reboot $(start_load) 0x$(shell /bin/sh -c '$(OBJDUMP) -t mips/start.elf | grep __start$$ | cut -b1-8') mips/start.raw' | nc localhost 5050
|
||||||
@ -217,5 +217,5 @@ debug:
|
|||||||
cat $(SERIAL)
|
cat $(SERIAL)
|
||||||
|
|
||||||
autoclean: maintainer-clean
|
autoclean: maintainer-clean
|
||||||
$(MAKE) -C native autoclean
|
test ! -f native/Makefile || $(MAKE) -C native autoclean
|
||||||
rm -rf aclocal.m4 configure depcomp fs install-sh iris.raw iris-sd.tar Makefile.in missing $(iris_sources) $(boot_sources) $(sources) $(headers) mips/start-hack.S mips/start.raw mips/start.raw.gz userspace/data/charset.data iris.tar.gz mips/board/sdram-setup.cc mips/board/sdram-setup.raw mips/board/sdram-setup.elf userspace/boot/crt0.cc
|
rm -rf aclocal.m4 configure compile depcomp fs install-sh iris.raw iris-sd.tar Makefile.in missing $(iris_sources) $(boot_sources) $(sources) $(headers) mips/start-hack.S mips/start.raw mips/start.raw.gz userspace/data/charset.data iris.tar.gz mips/board/stage1.cc mips/board/stage1.elf mips/board/stage1.raw mips/board/stage1.elf userspace/boot/crt0.cc
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
AC_INIT([iris], [0.2], [wijnen@debian.org])
|
AC_INIT([iris], [0.2], [wijnen@debian.org])
|
||||||
AM_INIT_AUTOMAKE()
|
AM_INIT_AUTOMAKE
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
AM_PROG_AS
|
AM_PROG_AS
|
||||||
|
|
||||||
|
@ -359,6 +359,7 @@ namespace Iris:
|
|||||||
write (encode[d])
|
write (encode[d])
|
||||||
num -= d * power
|
num -= d * power
|
||||||
power /= base
|
power /= base
|
||||||
|
#ifndef __NATIVE__
|
||||||
void printf (char const *f, ...):
|
void printf (char const *f, ...):
|
||||||
unsigned *last = (unsigned *)&f
|
unsigned *last = (unsigned *)&f
|
||||||
while *f:
|
while *f:
|
||||||
@ -393,6 +394,7 @@ namespace Iris:
|
|||||||
else:
|
else:
|
||||||
write (*f)
|
write (*f)
|
||||||
++f
|
++f
|
||||||
|
#endif
|
||||||
|
|
||||||
// Numerical setting, such as a display backlight.
|
// Numerical setting, such as a display backlight.
|
||||||
struct Setting : public Device:
|
struct Setting : public Device:
|
||||||
|
@ -611,6 +611,7 @@ namespace Iris:
|
|||||||
Iris::Num start ()
|
Iris::Num start ()
|
||||||
|
|
||||||
#ifndef __KERNEL__
|
#ifndef __KERNEL__
|
||||||
|
#ifndef __NATIVE__
|
||||||
#if 1
|
#if 1
|
||||||
// Use a define instead of an inline function, because this is better visible in disassembly, even when not optimizing.
|
// Use a define instead of an inline function, because this is better visible in disassembly, even when not optimizing.
|
||||||
#define kdebug_char(_c) do { unsigned _d = (_c); __asm__ volatile ("move $a0, $zero\nlw $a1, %0\nbreak" :: "m"(_d) : "a0", "a1", "memory"); } while (0)
|
#define kdebug_char(_c) do { unsigned _d = (_c); __asm__ volatile ("move $a0, $zero\nlw $a1, %0\nbreak" :: "m"(_d) : "a0", "a1", "memory"); } while (0)
|
||||||
@ -684,6 +685,11 @@ namespace Iris:
|
|||||||
else:
|
else:
|
||||||
kdebug_char (*f)
|
kdebug_char (*f)
|
||||||
++f
|
++f
|
||||||
|
#else
|
||||||
#endif
|
namespace Iris:
|
||||||
|
inline void panic(unsigned code, char const *message = NULL):
|
||||||
|
inline void debug_num (unsigned num, unsigned base):
|
||||||
|
inline void debug (const char *f, ...):
|
||||||
|
#endif // !defined(__NATIVE__)
|
||||||
|
#endif // !defined(__KERNEL__)
|
||||||
#endif
|
#endif
|
||||||
|
@ -27,7 +27,7 @@ asm volatile (".section .rodata\n"
|
|||||||
".globl stage1\n"
|
".globl stage1\n"
|
||||||
".globl stage1_end\n"
|
".globl stage1_end\n"
|
||||||
"stage1:\n"
|
"stage1:\n"
|
||||||
".incbin \"mips/nanonote/sdram-setup.raw\"\n"
|
".incbin \"mips/nanonote/stage1.raw\"\n"
|
||||||
"stage1_end:\n"
|
"stage1_end:\n"
|
||||||
".section .text")
|
".section .text")
|
||||||
extern char stage1[1]
|
extern char stage1[1]
|
||||||
|
@ -7,24 +7,17 @@ MEMORY
|
|||||||
|
|
||||||
SECTIONS
|
SECTIONS
|
||||||
{
|
{
|
||||||
. = ALIGN(4);
|
/* Start with the part containing the interrupt and exception code. */
|
||||||
|
.text : { mips/board/mips_board_stage1_elf-stage1.o(.text*) } > ram
|
||||||
.text : { *(.text*) } > ram
|
.text : { *(.text*) } > ram
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.rodata : { *(.rodata*) *(.note*) } > ram
|
.rodata : { *(.rodata*) *(.note*) } > ram
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.sdata : { *(.sdata*) } > ram
|
.sdata : { *(.sdata*) } > ram
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.data : { *(.data*) *(.scommon*) *(.reginfo*) } > ram
|
.data : { *(.data*) *(.scommon*) *(.reginfo*) } > ram
|
||||||
|
|
||||||
_gp = ABSOLUTE(.); /* Base of small data */
|
_gp = ABSOLUTE(.);
|
||||||
|
|
||||||
.got : { *(.got*) } > ram
|
.got : { *(.got*) } > ram
|
||||||
|
|
||||||
. = ALIGN(4);
|
|
||||||
.sbss : { *(.sbss*) } > ram
|
.sbss : { *(.sbss*) } > ram
|
||||||
.bss : { *(.bss*) } > ram
|
.bss : { *(.bss*) } > ram
|
||||||
. = ALIGN (4);
|
|
||||||
}
|
}
|
@ -20,7 +20,7 @@ AUTOMAKE_OPTIONS = foreign
|
|||||||
bin_PROGRAMS = usb-server
|
bin_PROGRAMS = usb-server
|
||||||
|
|
||||||
usb_server_SOURCES = usb-server.cc
|
usb_server_SOURCES = usb-server.cc
|
||||||
usb_server_CPPFLAGS = $(SHEVEK_CFLAGS) -DSTAGE1_FILE=\"mips/nanonote/sdram-setup.raw\" -I../include -DCOPYRIGHT_YEARS=\"2009-2012\" -DCOPYRIGHT_AUTHOR=\"Bas\ Wijnen\" -DCOPYRIGHT_EMAIL=\"wijnen@debian.org\"
|
usb_server_CPPFLAGS = $(SHEVEK_CFLAGS) -DSTAGE1_FILE=\"mips/nanonote/stage1.raw\" -I../include -DCOPYRIGHT_YEARS=\"2009-2012\" -DCOPYRIGHT_AUTHOR=\"Bas\ Wijnen\" -DCOPYRIGHT_EMAIL=\"wijnen@debian.org\" -D__NATIVE__
|
||||||
usb_server_LDFLAGS = $(SHEVEK_LIBS) -lusb
|
usb_server_LDFLAGS = $(SHEVEK_LIBS) -lusb
|
||||||
|
|
||||||
PYPP = /usr/bin/pypp
|
PYPP = /usr/bin/pypp
|
||||||
|
Loading…
x
Reference in New Issue
Block a user