Skip to content
This repository was archived by the owner on Jan 8, 2025. It is now read-only.

Commit

Permalink
[armemu] fix the armemu build by adding timer routine and default con…
Browse files Browse the repository at this point in the history
…fig file
  • Loading branch information
travisg authored and Ajay Dudani committed Jul 28, 2011
1 parent 5eaef67 commit e74d63d
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 1 deletion.
12 changes: 11 additions & 1 deletion platform/armemu/timer.c
Original file line number Diff line number Diff line change
Expand Up @@ -48,13 +48,23 @@ status_t platform_set_periodic_timer(platform_timer_callback callback, void *arg
return NO_ERROR;
}

bigtime_t current_time_hires(void)
{
bigtime_t time;
*REG(SYSINFO_TIME_LATCH) = 1;
time = *REG(SYSINFO_TIME_SECS) * 1000000ULL;
time += *REG(SYSINFO_TIME_USECS);

return time;
}

time_t current_time(void)
{
time_t time;
*REG(SYSINFO_TIME_LATCH) = 1;
time = *REG(SYSINFO_TIME_SECS) * 1000;
time += *REG(SYSINFO_TIME_USECS) / 1000;

return time;
}

Expand Down
14 changes: 14 additions & 0 deletions target/armemu/armemu.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[cpu]
core = arm926ejs

# the rom file is loaded at address 0x0
[rom]
file = lk.bin

[system]
display = no
console = yes
network = no

[network]
device = /dev/tap0
5 changes: 5 additions & 0 deletions target/armemu/rules.mk
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,8 @@ LOCAL_DIR := $(GET_LOCAL_DIR)

PLATFORM := armemu

$(BUILDDIR)/armemu.conf: $(LOCAL_DIR)/armemu.conf
cp $< $@

EXTRA_BUILDDEPS += $(BUILDDIR)/armemu.conf
GENERATED += $(BUILDDIR)/armemu.conf

0 comments on commit e74d63d

Please sign in to comment.