- add a unique build number

git-svn-id: http://svn.lfbs.rwth-aachen.de/svn/scc/trunk/MetalSVM@227 315a16e6-25f9-4109-90ae-ca3045a26c18
This commit is contained in:
stefan 2010-11-04 08:27:53 +00:00
parent 8b725cd6d8
commit 141c2c194e
2 changed files with 10 additions and 2 deletions

View file

@ -19,7 +19,7 @@ export AR = ar
export ARFLAGS = rsv
export RM = rm -rf
LD = ld
LDFLAGS = -T link.ld -z max-page-size=4096
LDFLAGS = -T link.ld -z max-page-size=4096 --defsym __BUILD_DATE=$(shell date +'%Y%m%d') --defsym __BUILD_TIME=$(shell date +'%H%M%S') --defsym __BUILD_VERSION=$(shell svnversion -cn ../ | sed -e "s/.*://" -e "s/\([0-9]*\).*/\1/" | grep "[0-9]")
default:
for i in $(SUBDIRS); do $(MAKE) -C $$i default; done

View file

@ -45,8 +45,16 @@
#endif
extern int test_init(void);
/*
* Note that linker symbols are not variables, they have no memory allocated for
* maintaining a value, rather their address is their value.
*/
extern const void kernel_start;
extern const void kernel_end;
extern char __BUILD_DATE;
extern char __BUILD_TIME;
extern char __BUILD_VERSION;
static void list_fs(vfs_node_t* node, uint32_t depth)
{
@ -135,7 +143,7 @@ int main(void)
tid_t pc_id;
#endif
kprintf("This is MetalSVM %s\n", METALSVM_VERSION);
kprintf("This is MetalSVM %s Build %u, %u, %u\n", METALSVM_VERSION, &__BUILD_VERSION, &__BUILD_DATE, &__BUILD_TIME);
system_init();
irq_init();