From f5de28749287a678a9b67396ce54d089c97b3fc9 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Sun, 8 May 2011 02:06:18 +0100 Subject: [PATCH] modified to add version.h, and ther rest of the places, to use this variable --- lk/app/aboot/aboot.c | 11 ++++++++--- lk/include/version.h | 7 +++++++ lk/target/htcleo/init.c | 7 ++++++- lk/target/htcleo/rules.mk | 4 ++-- 4 files changed, 23 insertions(+), 6 deletions(-) create mode 100644 lk/include/version.h diff --git a/lk/app/aboot/aboot.c b/lk/app/aboot/aboot.c index cb99e12..abd464e 100644 --- a/lk/app/aboot/aboot.c +++ b/lk/app/aboot/aboot.c @@ -46,10 +46,11 @@ #include "recovery.h" #include "bootimg.h" #include "fastboot.h" +#include "version.h" #define EXPAND(NAME) #NAME #define TARGET(NAME) EXPAND(NAME) -#define DEFAULT_CMDLINE "clk=1.4"; +#define DEFAULT_CMDLINE ""; #ifdef MEMBASE #define EMMC_BOOT_IMG_HEADER_ADDR (0xFF000+(MEMBASE)) @@ -289,10 +290,12 @@ unified_boot: if(hdr->cmdline[0]) { cmdline = (char*) hdr->cmdline; - strcat(cmdline," clk=1.4"); } else { cmdline = DEFAULT_CMDLINE; } + strcat(cmdline," clk="); + strcat(cmdline,cLK_version); + dprintf(INFO, "cmdline = '%s'\n", cmdline); dprintf(INFO, "\nBooting Linux\n"); @@ -382,10 +385,12 @@ continue_boot: if(hdr->cmdline[0]) { cmdline = (char*) hdr->cmdline; - strcat(cmdline," clk=1.4"); } else { cmdline = DEFAULT_CMDLINE; } + strcat(cmdline," clk="); + strcat(cmdline,cLK_version); + dprintf(INFO, "cmdline = '%s'\n", cmdline); /* TODO: create/pass atags to kernel */ diff --git a/lk/include/version.h b/lk/include/version.h new file mode 100644 index 0000000..1722713 --- /dev/null +++ b/lk/include/version.h @@ -0,0 +1,7 @@ +#ifndef __VERSION_H +#define __VERSION_H + +static const char *cLK_version = "1.4.0.1"; + +#endif + diff --git a/lk/target/htcleo/init.c b/lk/target/htcleo/init.c index 892c614..a0ea61d 100644 --- a/lk/target/htcleo/init.c +++ b/lk/target/htcleo/init.c @@ -13,6 +13,8 @@ #include #include +#include "version.h" + #define LINUX_MACHTYPE 2524 #define HTCLEO_FLASH_OFFSET 0x219 @@ -148,7 +150,10 @@ void target_init(void) } void display_lk_version() { - _dputs("cedesmith's LK (CLK) v1.4\n"); + char *version = "cedesmith's LK (CLK) v"; + strcat(version,cLK_version); + strcat(version,"\n"); + _dputs(version); } struct fbcon_config* fbcon_display(void); void htcleo_fastboot_init() diff --git a/lk/target/htcleo/rules.mk b/lk/target/htcleo/rules.mk index 7b7482c..330c5a9 100644 --- a/lk/target/htcleo/rules.mk +++ b/lk/target/htcleo/rules.mk @@ -5,9 +5,9 @@ INCLUDES += -I$(LOCAL_DIR)/include -I$(LK_TOP_DIR)/platform/msm_shared PLATFORM := qsd8k #define system partition size (in MB), if not defined my custom (from magldr) layout is used. see init.c -DEFINES += SYSTEM_PARTITION_SIZE=400 +DEFINES += SYSTEM_PARTITION_SIZE=250 #DEFINES += SYSTEM_PARTITION_SIZE=400 -DEFINES += CACHE_PARTITION_SIZE=44 +DEFINES += CACHE_PARTITION_SIZE=5 #cedesmith note: MEMBASE requires edit in platform/qsd8k/rules.mk # maximum partition size will be about 340mb ( MEMBASE-SCRATCH_ADDR)