1.划分logo分区,打包脚本更改

2.内核读取flash分区
3.解码bmp并且显示
This commit is contained in:
2025-02-10 15:29:49 +08:00
parent 7b580c14d6
commit c635d7d119
9 changed files with 274 additions and 722 deletions

View File

@@ -765,6 +765,35 @@ function make_data_res()
cd - > /dev/null
}
function make_logo_res()
{
cd ${ROOT_DIR}/image
#指定分区名字,需要与新增的分区名相同
local APP_PART_NAME=logo
cp $1 sys_partition_tmp_app.fex
sed -i '/^[ \t]*downloadfile/d' sys_partition_tmp_app.fex
/bin/busybox unix2dos sys_partition_tmp_app.fex
script sys_partition_tmp_app.fex > /dev/null
update_mbr sys_partition_tmp_app.bin 1 sunxi_mbr_tmp_app.fex > /dev/null
#指定下载镜像名字需要与新增的分区的downloadfile相同
local APP_PART_DOWNLOAD_FILE=logo.fex
#将被打包的文件
local APP_PART_FILE_PATH=${TINA_CONFIG_DIR}/${PACK_BOARD}/logo/logo.bmp
echo "logo file-----------${APP_PART_FILE_PATH}----"
local APP_PART_SIZE_IN_SECTOR=`parser_mbr sunxi_mbr_tmp_app.fex get_size_by_name ${APP_PART_NAME}` # 获取分区大小
if [ x${APP_PART_DOWNLOAD_FILE} != x'' -a x${APP_PART_SIZE_IN_SECTOR} != x'' ]; then
echo "APP_PART_DOWNLOAD_FILE = ${ROOT_DIR}/image/${APP_PART_DOWNLOAD_FILE}"
rm -f ${ROOT_DIR}/image/${APP_PART_DOWNLOAD_FILE}
cp ${APP_PART_FILE_PATH} ${ROOT_DIR}/image/${APP_PART_DOWNLOAD_FILE}
else
printf "no logo resource partitions\n"
fi
cd - > /dev/null
}
function make_boottone_fex()
{
local BOOTTONE_FILE_PATH=${TINA_CONFIG_DIR}/${PACK_BOARD}/configs/boottone_res
@@ -1082,6 +1111,7 @@ function do_prepare()
make_user_res ${ROOT_DIR}/image/sys_partition_nor.fex
make_app_res ${ROOT_DIR}/image/sys_partition_nor.fex
make_data_res ${ROOT_DIR}/image/sys_partition_nor.fex
make_logo_res ${ROOT_DIR}/image/sys_partition_nor.fex
update_mbr_to_sys_config ${ROOT_DIR}/image/sys_partition_nor.fex
else
make_user_res ${ROOT_DIR}/image/sys_partition.fex
@@ -2297,6 +2327,7 @@ function do_mkbootimg_add_dtb()
source ${PACK_TOPDIR}/scripts/.hooks/pre-pack
do_prepare
echo "!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!"
do_ini_to_dts
mkdtbo
do_common