From 36a72dc6170b37d36179a74a2eb30251b92005a9 Mon Sep 17 00:00:00 2001 From: xunmod <116288337+xunmod@users.noreply.github.com> Date: Thu, 11 Apr 2024 00:35:56 +0800 Subject: [PATCH] Reduce system to 512M, add package.sh --- BoardConfig.mk | 2 +- package.sh | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+), 1 deletion(-) create mode 100755 package.sh diff --git a/BoardConfig.mk b/BoardConfig.mk index c0152dc..b6cb212 100644 --- a/BoardConfig.mk +++ b/BoardConfig.mk @@ -18,7 +18,7 @@ INSTALLED_KERNEL_TARGET := kernel BOARD_KERNEL_CMDLINE := TARGET_USERIMAGES_USE_EXT4 := true BOARD_FLASH_BLOCK_SIZE := 4096 -BOARD_SYSTEMIMAGE_PARTITION_SIZE := 1073741824 # 1024M +BOARD_SYSTEMIMAGE_PARTITION_SIZE := 536870912 # 512M BOARD_BOOTIMAGE_PARTITION_SIZE := 16777216 # 16M BOARD_RECOVERYIMAGE_PARTITION_SIZE := 33554432 # 32M #BOARD_CACHEIMAGE_FILE_SYSTEM_TYPE := ext4 diff --git a/package.sh b/package.sh new file mode 100755 index 0000000..29a2e08 --- /dev/null +++ b/package.sh @@ -0,0 +1,56 @@ +#!/bin/bash + +cd $PACKAGE + +chip=sun8iw6p1 +platform=android +board=f1 +debug=uart0 +sigmode=none +securemode=none + +usage() +{ + printf "Usage: pack [-cCHIP] [-pPLATFORM] [-bBOARD] [-d] [-s] [-v] [-h] + -c CHIP (default: $chip) + -p PLATFORM (default: $platform) + -b BOARD (default: $board) + -d pack firmware with debug info output to card0 + -s pack firmware with signature + -v pack firmware with secureboot + -h print this help message +" +} + +while getopts "c:p:b:dsvh" arg +do + case $arg in + c) + chip=$OPTARG + ;; + p) + platform=$OPTARG + ;; + b) + board=$OPTARG + ;; + d) + debug=card0 + ;; + s) + sigmode=sig + ;; + v) + securemode=secure + ;; + h) + usage + exit 0 + ;; + ?) + exit 1 + ;; + esac +done + +./pack -c $chip -p $platform -b $board -d $debug -s $sigmode -v $securemode