Update u-boot pack for sun50iw6 legacy branch
This commit is contained in:
parent
27d29671f4
commit
43a35d8fd0
File diff suppressed because it is too large
Load Diff
|
|
@ -6,3 +6,6 @@ item=monitor, monitor.fex
|
|||
item=scp, scp.fex
|
||||
item=soc-cfg, config.fex
|
||||
item=dtb, sunxi.fex
|
||||
;item=board-cfg, board.fex
|
||||
;item=board-fex, board_config.fex
|
||||
;item=esm-img, esm.fex
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
test
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
sunxi.fex
|
||||
1880
external/packages/pack-uboot/sun50iw6/bin/sys_config/sys_config_orangepi3.fex
vendored
Executable file
1880
external/packages/pack-uboot/sun50iw6/bin/sys_config/sys_config_orangepi3.fex
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1911
external/packages/pack-uboot/sun50iw6/bin/sys_config/sys_config_orangepilite2.fex
vendored
Executable file
1911
external/packages/pack-uboot/sun50iw6/bin/sys_config/sys_config_orangepilite2.fex
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1868
external/packages/pack-uboot/sun50iw6/bin/sys_config/sys_config_orangepioneplus.fex
vendored
Executable file
1868
external/packages/pack-uboot/sun50iw6/bin/sys_config/sys_config_orangepioneplus.fex
vendored
Executable file
File diff suppressed because it is too large
Load Diff
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
|
|
@ -241,7 +241,7 @@ compile_uboot()
|
|||
if [[ $PACK_UBOOT == "yes" ]];then
|
||||
pack_uboot
|
||||
cp ${SRC}/.tmp/packout/{boot0_sdcard.fex,boot_package.fex} "${SRC}/.tmp/${uboot_name}/usr/lib/${uboot_name}/"
|
||||
cp ${SRC}/.tmp/packout/${BOARD}-u-boot.dts "${SRC}/.tmp/${uboot_name}/usr/lib/u-boot/"
|
||||
cp ${SRC}/.tmp/packout/dts/${BOARD}-u-boot.dts "${SRC}/.tmp/${uboot_name}/usr/lib/u-boot/"
|
||||
cd "${ubootdir}" || exit
|
||||
fi
|
||||
|
||||
|
|
|
|||
|
|
@ -4,121 +4,49 @@
|
|||
|
||||
function do_prepare()
|
||||
{
|
||||
if [[ $BOARDFAMILY == "sun50iw6" ]]; then
|
||||
|
||||
configs_file_list=(
|
||||
${FILE}/*.fex
|
||||
${FILE}/boot_package.cfg
|
||||
)
|
||||
|
||||
boot_file_list=(
|
||||
${BOOTDIR}/boot0_sdcard_${CHIP}.bin:${PACK_OUT}/boot0_sdcard.fex
|
||||
${BOOTDIR}/u-boot-${CHIP}.bin:${PACK_OUT}/u-boot.fex
|
||||
${FILE}/scp.bin:${PACK_OUT}/scp.fex
|
||||
${FILE}/bl31.bin:${PACK_OUT}/monitor.fex
|
||||
${SYS_CONFIG}:${PACK_OUT}/sys_config.fex
|
||||
)
|
||||
|
||||
for file in ${configs_file_list[@]} ; do
|
||||
cp -f $file ${PACK_OUT}/ 2> /dev/null
|
||||
done
|
||||
|
||||
for file in ${boot_file_list[@]} ; do
|
||||
cp -rf `echo $file | awk -F: '{print $1}'` \
|
||||
`echo $file | awk -F: '{print $2}'` 2>/dev/null
|
||||
done
|
||||
|
||||
else
|
||||
|
||||
export PATH=$EXTER/packages/pack-uboot/${BOARDFAMILY}/tools/:$PATH
|
||||
|
||||
cp ${EXTER}/packages/pack-uboot/${BOARDFAMILY}/bin/* .
|
||||
cp ${BOOTSOURCEDIR}/u-boot.bin u-boot.fex
|
||||
[[ $BOARDFAMILY != sun50iw9 ]] && cp ${BOOTSOURCEDIR}/boot0_sdcard.bin boot0_sdcard.fex
|
||||
|
||||
fi
|
||||
cp ${EXTER}/packages/pack-uboot/${BOARDFAMILY}/bin/* . -r
|
||||
cp sys_config/sys_config_${BOARD}.fex sys_config.fex
|
||||
}
|
||||
|
||||
function do_ini_to_dts()
|
||||
{
|
||||
if [[ $BOARDFAMILY == "sun50iw6" ]]; then
|
||||
|
||||
local DTC_SRC_PATH=${LINUXSOURCEDIR}/arch/${ARCHITECTURE}/boot/dts/sunxi/
|
||||
local DTC_INI_FILE_BASE=${SYS_CONFIG}
|
||||
local DTC_INI_FILE=${DEST}/sys_config_fix.fex
|
||||
|
||||
cp $DTC_INI_FILE_BASE $DTC_INI_FILE
|
||||
sed -i "s/\(\[dram\)_para\(\]\)/\1\2/g" $DTC_INI_FILE
|
||||
sed -i "s/\(\[nand[0-9]\)_para\(\]\)/\1\2/g" $DTC_INI_FILE
|
||||
DTC_SRC_FILE=${EXTER}/chips/${CHIP}/pack/bin/dtc_src_file
|
||||
|
||||
dtc_alph -O dtb -o ${DEST}/sunxi.dtb \
|
||||
-b 0 \
|
||||
-i $DTC_SRC_PATH \
|
||||
-F $DTC_INI_FILE \
|
||||
$DTC_SRC_FILE 1>/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
pack_error "Conver script to dts failed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
else
|
||||
if [[ $BOARDFAMILY =~ sun50iw6|sun50iw9 ]]; then
|
||||
|
||||
local DTC_COMPILER=$EXTER/packages/pack-uboot/${BOARDFAMILY}/tools/dtc
|
||||
|
||||
[[ ! -f $DTC_COMPILER ]] && exit_with_error "Script_to_dts: Can not find dtc compiler."
|
||||
#Disbale noisy checks
|
||||
local DTC_FLAGS="-W no-unit_address_vs_reg"
|
||||
|
||||
$DTC_COMPILER -p 2048 -W no-unit_address_vs_reg -@ -O dtb -o ${BOARD}-u-boot.dtb -b 0 ${BOARD}-u-boot.dts
|
||||
$DTC_COMPILER -p 2048 ${DTC_FLAGS} -@ -O dtb -o ${BOARD}-u-boot.dtb -b 0 dts/${BOARD}-u-boot.dts >/dev/null 2>&1
|
||||
|
||||
[[ $? -ne 0 ]] && exit_with_error "Conver script to dts failed."
|
||||
[[ $? -ne 0 ]] && exit_with_error "dtb: Conver script to dts failed."
|
||||
|
||||
# It'is used for debug dtb
|
||||
$DTC_COMPILER -W no-unit_address_vs_reg -I dtb -O dts -o .${BOARD}-u-boot.dts ${BOARD}-u-boot.dtb 1>/dev/null 2>&1
|
||||
|
||||
$DTC_COMPILER ${DTC_FLAGS} -I dtb -O dts -o .${BOARD}-u-boot.dts ${BOARD}-u-boot.dtb >/dev/null 2>&1
|
||||
fi
|
||||
}
|
||||
|
||||
function do_common()
|
||||
{
|
||||
if [[ $BOARDFAMILY == "sun50iw9" ]]; then
|
||||
|
||||
busybox unix2dos sys_config.fex
|
||||
script sys_config.fex >/dev/null
|
||||
|
||||
cp ${PACKOUT_DIR}/${BOARD}-u-boot.dtb sunxi.fex
|
||||
update_dtb sunxi.fex 4096
|
||||
update_dtb sunxi.fex 4096 >/dev/null
|
||||
|
||||
if [[ $BOARDFAMILY == "sun50iw6" ]]; then
|
||||
cp -f sys_config.bin config.fex
|
||||
update_scp scp.fex sunxi.fex > /dev/null 2>&1
|
||||
fi
|
||||
|
||||
update_boot0 boot0_sdcard.fex sys_config.bin SDMMC_CARD > /dev/null
|
||||
update_uboot -no_merge u-boot.fex sys_config.bin > /dev/null
|
||||
|
||||
[[ $? -ne 0 ]] && exit_with_error "update u-boot run error"
|
||||
|
||||
#pack boot package
|
||||
busybox unix2dos boot_package.cfg
|
||||
dragonsecboot -pack boot_package.cfg > /dev/null
|
||||
|
||||
[[ $? -ne 0 ]] && exit_with_error "dragon pack error"
|
||||
else
|
||||
|
||||
unix2dos sys_config.fex 2>/dev/null
|
||||
script sys_config.fex > /dev/null
|
||||
cp sys_config.bin config.fex 2>/dev/null
|
||||
|
||||
cp ${DEST}/sunxi.dtb sunxi.fex
|
||||
update_uboot_fdt u-boot.fex sunxi.fex u-boot.fex >/dev/null
|
||||
update_scp scp.fex sunxi.fex >/dev/null
|
||||
|
||||
# Those files for Nand or Card
|
||||
update_boot0 boot0_sdcard.fex sys_config.bin SDMMC_CARD > /dev/null
|
||||
update_uboot u-boot.fex sys_config.bin > /dev/null
|
||||
|
||||
unix2dos boot_package.cfg 2>/dev/null
|
||||
dragonsecboot -pack boot_package.cfg 1>/dev/null 2>&1
|
||||
|
||||
#Here, will check if need to used multi config.fex or not
|
||||
update_uboot_v2 u-boot.fex sys_config.bin ${LINUXFAMILY} 1>/dev/null 2>&1
|
||||
|
||||
fi
|
||||
}
|
||||
|
||||
do_pack_a64()
|
||||
|
|
@ -127,25 +55,25 @@ do_pack_a64()
|
|||
cp -avf $BOOTDIR/u-boot-sun50iw1p1.bin ${PACK_OUT}/u-boot.bin > /dev/null
|
||||
|
||||
# Build binary device tree
|
||||
dtc -Odtb -o A64.dtb A64.dts 1>/dev/null 2>&1
|
||||
dtc -Odtb -o A64.dtb A64.dts >/dev/null 2>&1
|
||||
|
||||
# Build sys_config.bin
|
||||
unix2dos sys_config.fex 1>/dev/null 2>&1
|
||||
script sys_config.fex 1>/dev/null 2>&1
|
||||
unix2dos sys_config.fex >/dev/null 2>&1
|
||||
script sys_config.fex >/dev/null 2>&1
|
||||
|
||||
# Merge u-boot.bin infile outfile mode [secmonitor | secos | scp]
|
||||
merge_uboot u-boot.bin bl31.bin u-boot-merged.bin secmonitor 1>/dev/null 2>&1
|
||||
merge_uboot u-boot-merged.bin scp.bin u-boot-merged2.bin scp 1>/dev/null 2>&1
|
||||
merge_uboot u-boot.bin bl31.bin u-boot-merged.bin secmonitor >/dev/null 2>&1
|
||||
merge_uboot u-boot-merged.bin scp.bin u-boot-merged2.bin scp >/dev/null 2>&1
|
||||
|
||||
# Merge uboot and dtb
|
||||
update_uboot_fdt u-boot-merged2.bin A64.dtb u-boot-with-dtb.bin 1>/dev/null 2>&1
|
||||
update_uboot_fdt u-boot-merged2.bin A64.dtb u-boot-with-dtb.bin >/dev/null 2>&1
|
||||
|
||||
# Merge uboot and sys_config.fex
|
||||
update_uboot u-boot-with-dtb.bin sys_config.bin 1>/dev/null 2>&1
|
||||
update_uboot u-boot-with-dtb.bin sys_config.bin >/dev/null 2>&1
|
||||
|
||||
cp ${PACK_OUT}/boot0.bin ${UBOOT_BIN}/boot0_sdcard_${CHIP}.bin 1>/dev/null 2>&1
|
||||
cp ${PACK_OUT}/u-boot-with-dtb.bin ${UBOOT_BIN}/u-boot-${CHIP}.bin 1>/dev/null 2>&1
|
||||
cp ${PACK_OUT}/A64.dtb ${UBOOT_BIN}/ 1>/dev/null 2>&1
|
||||
cp ${PACK_OUT}/boot0.bin ${UBOOT_BIN}/boot0_sdcard_${CHIP}.bin >/dev/null 2>&1
|
||||
cp ${PACK_OUT}/u-boot-with-dtb.bin ${UBOOT_BIN}/u-boot-${CHIP}.bin >/dev/null 2>&1
|
||||
cp ${PACK_OUT}/A64.dtb ${UBOOT_BIN}/ >/dev/null 2>&1
|
||||
}
|
||||
|
||||
do_pack_h3()
|
||||
|
|
@ -156,8 +84,8 @@ do_pack_h3()
|
|||
cp $SYS_CONFIG ${PACK_OUT}/sys_config.fex
|
||||
|
||||
fex2bin sys_config.fex sys_config.bin
|
||||
update_boot0 boot0_sdcard_${CHIP}.bin sys_config.bin SDMMC_CARD 1>/dev/null 2>&1
|
||||
update_uboot u-boot-${CHIP}.bin sys_config.bin 1>/dev/null 2>&1
|
||||
update_boot0 boot0_sdcard_${CHIP}.bin sys_config.bin SDMMC_CARD >/dev/null 2>&1
|
||||
update_uboot u-boot-${CHIP}.bin sys_config.bin >/dev/null 2>&1
|
||||
|
||||
cp boot0_sdcard_${CHIP}.bin $UBOOT_BIN/boot0_sdcard_${CHIP}.bin
|
||||
cp u-boot-${CHIP}.bin $UBOOT_BIN/u-boot-${CHIP}.bin
|
||||
|
|
@ -168,9 +96,6 @@ do_pack_h3()
|
|||
pack_uboot()
|
||||
{
|
||||
PACKOUT_DIR=$SRC/.tmp/packout
|
||||
|
||||
rm -rf ${PACKOUT_DIR}
|
||||
mkdir -p ${PACKOUT_DIR}
|
||||
cd ${PACKOUT_DIR}
|
||||
|
||||
do_prepare
|
||||
|
|
|
|||
Loading…
Reference in New Issue