1: Add ota package tools. 2: Recovery system partition size.
This commit is contained in:
parent
15d0e98371
commit
e866258a2f
|
@ -14,7 +14,7 @@
|
||||||
#define MBR_PAGE_SIZE (512)
|
#define MBR_PAGE_SIZE (512)
|
||||||
#define MD5_CHKSUM_LEN (16)
|
#define MD5_CHKSUM_LEN (16)
|
||||||
|
|
||||||
#define OTA_PARAMS_TAG ("OTA163")
|
#define OTA_PARAMS_TAG ("OTA163\0")
|
||||||
#define MD5_STR_LEN (32 + 4)
|
#define MD5_STR_LEN (32 + 4)
|
||||||
|
|
||||||
#define OTA_PARTITION_DEV ("sunxi_flash")
|
#define OTA_PARTITION_DEV ("sunxi_flash")
|
||||||
|
@ -100,6 +100,7 @@ static void ota_print_params(POTA_PARAMS pInfo)
|
||||||
printf("boot_size: %u\n", pInfo->bootfileSize);
|
printf("boot_size: %u\n", pInfo->bootfileSize);
|
||||||
printf("rootfs_ver: %s\n", pInfo->rootfsChksum);
|
printf("rootfs_ver: %s\n", pInfo->rootfsChksum);
|
||||||
printf("rootfs_size: %u\n", pInfo->rootfsfileSize);
|
printf("rootfs_size: %u\n", pInfo->rootfsfileSize);
|
||||||
|
printf("params_chksum: %s\n", pInfo->paramsChksum);
|
||||||
}
|
}
|
||||||
|
|
||||||
static int ota_load_boot_partition(POTA_PARAMS pInfo, int len)
|
static int ota_load_boot_partition(POTA_PARAMS pInfo, int len)
|
||||||
|
|
|
@ -0,0 +1,47 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
OTA_PKG_NAME_VER=`cat $TINA_BUILD_TOP/lichee/linux-4.9/.version`
|
||||||
|
OTA_PKG_NAME=../tina_$OTA_PLAT_ota_$OTA_PKG_NAME_VER.tar.gz
|
||||||
|
OTA_TEMP_DIR=$TINA_BUILD_TOP/out/$TARGET_BOARD/ota
|
||||||
|
OTA_TOOLS_FILE=$TINA_BUILD_TOP/out/$TARGET_BOARD/tina_r311_tools_*.tar.gz
|
||||||
|
OTA_PACKAGE_FILE=$TINA_BUILD_TOP/out/$TARGET_BOARD/tina_r311_ota_*.tar.gz
|
||||||
|
|
||||||
|
echo "Step 1: Cleanup last resources......"
|
||||||
|
|
||||||
|
if [ "$TINA_BUILD_TOP" == "" ]; then
|
||||||
|
echo "please run lunch command first"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$TARGET_BOARD" == "" ]; then
|
||||||
|
echo "please run lunch command first"
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
|
[ -f $OTA_TOOLS_FILE ] && rm $OTA_TOOLS_FILE
|
||||||
|
[ -f $OTA_PACKAGE_FILE ] && rm $OTA_PACKAGE_FILE
|
||||||
|
|
||||||
|
echo "Step 2: Create prebuild tools packages......"
|
||||||
|
cd $TINA_BUILD_TOP/prebuilt/
|
||||||
|
tar -cvzf $TINA_BUILD_TOP/out/$TARGET_BOARD/tina_r311_tools_$OTA_PKG_NAME_VER.tar.gz ./r311/ > /dev/null
|
||||||
|
|
||||||
|
echo "Step 3: Create Work Directory......"
|
||||||
|
|
||||||
|
mkdir -p $OTA_TEMP_DIR
|
||||||
|
cd $OTA_TEMP_DIR
|
||||||
|
|
||||||
|
echo "Step 4: Copy Images......"
|
||||||
|
rm * -rf
|
||||||
|
cp ../boot.img ./
|
||||||
|
cp ../rootfs.img ./
|
||||||
|
|
||||||
|
echo "Step 5: Create MD5 Checksum File......"
|
||||||
|
md5sum * > ota.md5
|
||||||
|
|
||||||
|
echo "Step 6: Create OTA Packages......"
|
||||||
|
[ -f $OTA_PKG_NAME ] && rm $OTA_PKG_NAME
|
||||||
|
|
||||||
|
tar -cvzf ../tina_r311_ota_$OTA_PKG_NAME_VER.tar.gz ./* > /dev/null
|
||||||
|
|
||||||
|
echo "Step 7: Cleanup temp resource......"
|
||||||
|
rm -rf OTA_TEMP_DIR
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
@ -53,7 +53,7 @@ size = 512
|
||||||
|
|
||||||
[partition]
|
[partition]
|
||||||
name = rootfs
|
name = rootfs
|
||||||
size = 131072
|
size = 65536
|
||||||
downloadfile = "rootfs.fex"
|
downloadfile = "rootfs.fex"
|
||||||
user_type = 0x8000
|
user_type = 0x8000
|
||||||
|
|
||||||
|
|
|
@ -157,7 +157,7 @@ CONFIG_KERNEL_PRINTK_TIME=y
|
||||||
#
|
#
|
||||||
# Package build options
|
# Package build options
|
||||||
#
|
#
|
||||||
CONFIG_DEBUG=y
|
# CONFIG_DEBUG is not set
|
||||||
# CONFIG_IPV6 is not set
|
# CONFIG_IPV6 is not set
|
||||||
CONFIG_PKG_BUILD_PARALLEL=y
|
CONFIG_PKG_BUILD_PARALLEL=y
|
||||||
CONFIG_PKG_BUILD_USE_JOBSERVER=y
|
CONFIG_PKG_BUILD_USE_JOBSERVER=y
|
||||||
|
@ -165,9 +165,9 @@ CONFIG_PKG_BUILD_USE_JOBSERVER=y
|
||||||
#
|
#
|
||||||
# Stripping options
|
# Stripping options
|
||||||
#
|
#
|
||||||
CONFIG_NO_STRIP=y
|
# CONFIG_NO_STRIP is not set
|
||||||
# CONFIG_USE_STRIP is not set
|
# CONFIG_USE_STRIP is not set
|
||||||
# CONFIG_USE_SSTRIP is not set
|
CONFIG_USE_SSTRIP=y
|
||||||
# CONFIG_STRIP_KERNEL_EXPORTS is not set
|
# CONFIG_STRIP_KERNEL_EXPORTS is not set
|
||||||
# CONFIG_USE_MKLIBS is not set
|
# CONFIG_USE_MKLIBS is not set
|
||||||
# CONFIG_USE_UCLIBCXX is not set
|
# CONFIG_USE_UCLIBCXX is not set
|
||||||
|
@ -2626,25 +2626,25 @@ CONFIG_PACKAGE_zlib=y
|
||||||
#
|
#
|
||||||
# Translations
|
# Translations
|
||||||
#
|
#
|
||||||
# CONFIG_LUCI_LANG_uk is not set
|
|
||||||
# CONFIG_LUCI_LANG_hu is not set
|
# CONFIG_LUCI_LANG_hu is not set
|
||||||
# CONFIG_LUCI_LANG_pt is not set
|
# CONFIG_LUCI_LANG_pt is not set
|
||||||
# CONFIG_LUCI_LANG_ro is not set
|
|
||||||
# CONFIG_LUCI_LANG_en is not set
|
|
||||||
# CONFIG_LUCI_LANG_el is not set
|
|
||||||
# CONFIG_LUCI_LANG_sk is not set
|
# CONFIG_LUCI_LANG_sk is not set
|
||||||
# CONFIG_LUCI_LANG_ja is not set
|
# CONFIG_LUCI_LANG_no is not set
|
||||||
|
# CONFIG_LUCI_LANG_en is not set
|
||||||
|
# CONFIG_LUCI_LANG_pl is not set
|
||||||
|
# CONFIG_LUCI_LANG_uk is not set
|
||||||
|
# CONFIG_LUCI_LANG_ru is not set
|
||||||
# CONFIG_LUCI_LANG_vi is not set
|
# CONFIG_LUCI_LANG_vi is not set
|
||||||
# CONFIG_LUCI_LANG_he is not set
|
# CONFIG_LUCI_LANG_he is not set
|
||||||
# CONFIG_LUCI_LANG_no is not set
|
# CONFIG_LUCI_LANG_ro is not set
|
||||||
# CONFIG_LUCI_LANG_ms is not set
|
# CONFIG_LUCI_LANG_ms is not set
|
||||||
# CONFIG_LUCI_LANG_pl is not set
|
|
||||||
# CONFIG_LUCI_LANG_zh-cn is not set
|
# CONFIG_LUCI_LANG_zh-cn is not set
|
||||||
# CONFIG_LUCI_LANG_de is not set
|
# CONFIG_LUCI_LANG_de is not set
|
||||||
# CONFIG_LUCI_LANG_zh-tw is not set
|
# CONFIG_LUCI_LANG_zh-tw is not set
|
||||||
# CONFIG_LUCI_LANG_tr is not set
|
# CONFIG_LUCI_LANG_tr is not set
|
||||||
# CONFIG_LUCI_LANG_sv is not set
|
# CONFIG_LUCI_LANG_sv is not set
|
||||||
# CONFIG_LUCI_LANG_ru is not set
|
# CONFIG_LUCI_LANG_ja is not set
|
||||||
|
# CONFIG_LUCI_LANG_el is not set
|
||||||
# CONFIG_LUCI_LANG_ca is not set
|
# CONFIG_LUCI_LANG_ca is not set
|
||||||
# CONFIG_LUCI_LANG_es is not set
|
# CONFIG_LUCI_LANG_es is not set
|
||||||
# CONFIG_LUCI_LANG_pt-br is not set
|
# CONFIG_LUCI_LANG_pt-br is not set
|
||||||
|
|
Loading…
Reference in New Issue