mirror of
git://projects.qi-hardware.com/xburst-tools.git
synced 2024-11-01 12:33:07 +02:00
add-build-stamps.patch
Add git-based versioning Signed-off-by: Andy Green <andy@openmoko.com>
This commit is contained in:
parent
072c9da010
commit
7143408081
@ -16,10 +16,16 @@
|
|||||||
|
|
||||||
include config.mk
|
include config.mk
|
||||||
|
|
||||||
|
BUILD_DATE := $(shell date)
|
||||||
|
BUILD_HOST := $(shell hostname)
|
||||||
|
BUILD_BRANCH := $(shell git branch | grep ^\* | cut -d' ' -f2)
|
||||||
|
BUILD_HEAD := $(shell git show --pretty=oneline | head -n1 | cut -d' ' -f1 | cut -b1-16)
|
||||||
|
BUILD_VERSION := ${BUILD_BRANCH}_${BUILD_HEAD}
|
||||||
|
|
||||||
LDS = src/kboot-stage1.lds
|
LDS = src/kboot-stage1.lds
|
||||||
INCLUDE = include
|
INCLUDE = include
|
||||||
IMAGE_DIR = image
|
IMAGE_DIR = image
|
||||||
CFLAGS = -Wall -Werror -I $(INCLUDE) -g -c
|
CFLAGS = -Wall -Werror -I $(INCLUDE) -g -c -DBUILD_HOST="${BUILD_HOST}" -DBUILD_VERSION="${BUILD_VERSION}" -DBUILD_DATE="${BUILD_DATE}"
|
||||||
LDFLAGS =
|
LDFLAGS =
|
||||||
#START = start.o lowlevel_init.o
|
#START = start.o lowlevel_init.o
|
||||||
S_SRCS = src/start.S src/lowlevel_init.S
|
S_SRCS = src/start.S src/lowlevel_init.S
|
||||||
|
@ -23,7 +23,7 @@
|
|||||||
#include "blink_led.h"
|
#include "blink_led.h"
|
||||||
#include "kboot.h"
|
#include "kboot.h"
|
||||||
|
|
||||||
#define DEBUG_CONSOLE_UART 2
|
#define DEBUG_CONSOLE_UART UART2
|
||||||
|
|
||||||
void serial_init (const int ubrdiv_val,const int uart)
|
void serial_init (const int ubrdiv_val,const int uart)
|
||||||
{
|
{
|
||||||
|
@ -36,22 +36,25 @@ unsigned char buf[]={
|
|||||||
unsigned char buf[2*1024];
|
unsigned char buf[2*1024];
|
||||||
|
|
||||||
#define ADDR ((volatile unsigned *)&buf)
|
#define ADDR ((volatile unsigned *)&buf)
|
||||||
|
#define stringify(x) #x
|
||||||
|
|
||||||
int start_kboot(void)
|
int start_kboot(void)
|
||||||
{
|
{
|
||||||
port_init();
|
port_init();
|
||||||
serial_init(0x11,UART2);
|
serial_init(0x11, UART2);
|
||||||
while(1){
|
|
||||||
serial_putc (UART2,'2');
|
while(1) {
|
||||||
|
serial_putc(2, 'x');
|
||||||
|
serial_putc(2, 'x');
|
||||||
|
serial_putc(2, 'x');
|
||||||
|
printk("Openmoko KBOOT "stringify(BUILD_HOST)" "stringify(BUILD_VERSION)" "stringify(BUILD_DATE)"\n");
|
||||||
blue_on(1);
|
blue_on(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
/*2. test nand flash */
|
/*2. test nand flash */
|
||||||
if(nand_read_ll(buf, 0x000, sizeof(buf))==-1) {
|
if(nand_read_ll(buf, 0x000, sizeof(buf))==-1)
|
||||||
while(1) {
|
while(1)
|
||||||
blink_led();
|
blink_led();
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
asm volatile("mov pc, %0\n"
|
asm volatile("mov pc, %0\n"
|
||||||
: /* output */
|
: /* output */
|
||||||
|
Loading…
Reference in New Issue
Block a user