From: Chanho Park Date: Tue, 1 Dec 2015 12:21:19 +0000 (+0900) Subject: artik: common: enable factory_info command X-Git-Tag: submit/tizen/20160318.071304~24 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=82ddad2908a3494feee3eb6385c59402b9041877;p=profile%2Fcommon%2Fplatform%2Fkernel%2Fu-boot-artik.git artik: common: enable factory_info command This patch enables the factory_info command which is to retrieve some factory information such as board S/N. The default location to store the data is early offset of eMMC because we don't use the location for any other purpose. "run factory_load" command will load the information from eMMC and configure them into environment variables. "ethaddr" is ethernet mac address and it will be passed to kernel. "bd_addr" is bluetooth address and it also be passed to kernel. Change-Id: Ifa5660c3e765be84d00732593ca2005a5fc9f749 Signed-off-by: Chanho Park --- diff --git a/include/configs/artik_common.h b/include/configs/artik_common.h index ecf5d0a4b..cf2391623 100644 --- a/include/configs/artik_common.h +++ b/include/configs/artik_common.h @@ -125,6 +125,10 @@ #define CONFIG_BOARD_EARLY_INIT_F #define CONFIG_BOARD_LATE_INIT +/* FACTORY_INFO */ +#define CONFIG_FACTORY_INFO +#define CONFIG_FACTORY_INFO_BUF_ADDR (0x48000000) + /* FASTBOOT */ #define CONFIG_FASTBOOT #define CFG_FASTBOOT_SDMMCBSP @@ -272,6 +276,7 @@ "partitions=" PARTS_DEFAULT \ "partitions_android=" PARTS_ANDROID \ "partitions_tizen=" PARTS_TIZEN \ + "emmc_dev=0\0" \ "rootdev=" __stringify(CONFIG_ROOT_DEV) "\0" \ "rootpart=" __stringify(CONFIG_ROOT_PART) "\0" \ "bootpart=" __stringify(CONFIG_BOOT_PART) "\0" \ @@ -284,6 +289,8 @@ "initrd_file=uInitrd\0" \ "initrd_addr=43000000\0" \ "sdrecovery=sdfuse format; sdfuse flashall 3\0" \ + "factory_load=factory_info load mmc ${emmc_dev} 0x80 0x8\0" \ + "factory_save=factory_info save mmc ${emmc_dev} 0x80 0x8\0" \ "boot_cmd=fatload mmc 0:1 $kernel_addr $kernel_file;" \ "fatload mmc 0:1 $fdtaddr $fdtfile;" \ "bootz $kernel_addr - $fdtaddr\0" \ @@ -302,9 +309,10 @@ "mmc rescan; fastboot\0" \ "recoveryboot=run sdrecovery; setenv recoverymode recovery;" \ "run ramfsboot\0" \ - "ramfsboot=setenv bootargs ${console} " \ + "ramfsboot=run factory_load; setenv bootargs ${console} " \ "root=/dev/mmcblk${rootdev}p${rootpart} ${root_rw} " \ - "rootfstype=ext4 ${opts} ${recoverymode};" \ + "rootfstype=ext4 ${opts} ${recoverymode} " \ + "asix.macaddr=${ethaddr} bd_addr=${bd_addr};" \ "run boot_cmd_initrd\0" \ "mmcboot=setenv bootargs ${console} " \ "root=/dev/mmcblk${rootdev}p${rootpart} ${root_rw} " \