Merge pull request #300 from fewtarius/dev

Bug fixes
This commit is contained in:
fewtarius 2022-08-01 17:54:42 -04:00 committed by GitHub
commit 3b3fc838e0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 44 additions and 28 deletions

View file

@ -217,8 +217,8 @@ default_options_file = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID,
# mount iso9660 with 'ro' to prevent mount read-only warning
default_options_iso9660 = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID, ro, utf8
default_options_udf = nosuid, noexec, nodev, noatime, uid=$UID, gid=$GID
default_options_vfat = nosuid, nodev, noatime, umask=0000, uid=$UID, gid=$GID, utf8, codepage=936
default_options_exfat = nosuid, nodev, noatime, utf8, nonempty, codepage=437
default_options_vfat = nosuid, nodev, noatime, uid=$UID, gid=$GID, utf8
default_options_exfat = nosuid, nodev, noatime, utf8, nonempty
default_options_msdos = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID
default_options_umsdos = nosuid, noexec, nodev, noatime, fmask=0133, dmask=0022, uid=$UID, gid=$GID
default_options_ntfs = nosuid, noexec, nodev, noatime, big_writes, fmask=0133, uid=$UID, gid=$GID, utf8

View file

@ -7,13 +7,15 @@ source ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/options
if [ -n "${PKG_DATAFILE}" -a -n "${PKG_LOADER}" ]; then
echo "loader: Make idbloader.img from ${PKG_DATAFILE}:${PKG_LOADER}..."
if [ "${PKG_SOC}" = "rk356x" ]
then
tools/mkimage -n ${PKG_SOC} -T rksd -d ${PKG_DATAFILE}:${PKG_LOADER} -C bzip2 idbloader.img
else
tools/mkimage -n ${PKG_SOC} -T rksd -d "${PKG_DATAFILE}" -C bzip2 idbloader.img
cat "${PKG_LOADER}" >> idbloader.img
fi
case "${PKG_SOC}" in
rk356x|rk3399)
tools/mkimage -n ${PKG_SOC} -T rksd -d ${PKG_DATAFILE}:${PKG_LOADER} -C bzip2 idbloader.img
;;
*)
tools/mkimage -n ${PKG_SOC} -T rksd -d "${PKG_DATAFILE}" -C bzip2 idbloader.img
cat "${PKG_LOADER}" >> idbloader.img
;;
esac
fi
cp -av idbloader.img ${INSTALL}/usr/share/bootloader
@ -22,15 +24,17 @@ if [ ! -n "${PKG_LOAD_ADDR}" ]; then
PKG_LOAD_ADDR="0x00200000"
fi
if [ "${PKG_SOC}" = "rk356x" ]
then
echo "uboot: copy fit uboot image to ${INSTALL}/usr/share/bootloader..."
cp -av uboot.img ${INSTALL}/usr/share/bootloader
else
echo "uboot: build loader image uboot.img at ${PKG_LOAD_ADDR}..."
${PKG_RKBIN}/tools/loaderimage --pack --uboot u-boot-dtb.bin uboot.img ${PKG_LOAD_ADDR} ||:
cp -av uboot.img ${INSTALL}/usr/share/bootloader
fi
case "${PKG_SOC}" in
rk356x)
echo "uboot: copy uboot image to ${INSTALL}/usr/share/bootloader..."
cp -av uboot.img ${INSTALL}/usr/share/bootloader
;;
*)
echo "uboot: build loader image uboot.img at ${PKG_LOAD_ADDR}..."
${PKG_RKBIN}/tools/loaderimage --pack --uboot u-boot-dtb.bin uboot.img ${PKG_LOAD_ADDR} ||:
cp -av uboot.img ${INSTALL}/usr/share/bootloader
;;
esac
if [ -n "${PKG_BL31}" ]; then
echo "trust: create trust.ini..."

View file

@ -4,13 +4,14 @@
source ${PROJECT_DIR}/${PROJECT}/devices/${DEVICE}/options
if [ "${PKG_SOC}" = "rk356x" ] || [ "${PKG_SOC}" = "rk3399" ]
then
IDBSEEK="bs=512 seek=64"
else
# Fix me.
IDBSEEK="bs=32k seek=1"
fi
case "${PKG_SOC}" in
rk356x|rk3399)
IDBSEEK="bs=512 seek=64"
;;
*)
IDBSEEK="bs=32k seek=1"
;;
esac
if [ -f "${RELEASE_DIR}/3rdparty/bootloader/idbloader.img" ]; then
echo "image: burn idbloader.img to image... (${PKG_SOC},${IDBSEEK})"

View file

@ -14,6 +14,9 @@ if [ -n "${UBOOT_CONFIG}" ]; then
if [ -f ${BOOTLOADER_DIR}/trust.img ]; then
cp -a ${BOOTLOADER_DIR}/trust.img ${RELEASE_DIR}/3rdparty/bootloader
fi
if [ -f ${BOOTLOADER_DIR}/resource.img ]; then
cp -a ${BOOTLOADER_DIR}/resource.img ${RELEASE_DIR}/3rdparty/bootloader
fi
fi
if [ -f ${INSTALL}/usr/share/bootloader/logo.bmp ]; then

View file

@ -30,6 +30,8 @@
KERNEL_TARGET="Image"
BOOTLOADER="u-boot"
PARTITION_TABLE="gpt"
UBOOT_LABEL="uboot"
TRUST_LABEL="resource"
DEVICE_DTB="rk3566-rg353p-linux"
UBOOT_DTB="rk3566"
UBOOT_CONFIG="rk3568_defconfig"

View file

@ -30,6 +30,8 @@
KERNEL_TARGET="Image"
BOOTLOADER="u-boot"
PARTITION_TABLE="gpt"
UBOOT_LABEL="uboot"
TRUST_LABEL="resource"
DEVICE_DTB="rk3566-rg503-linux"
UBOOT_DTB="rk3566"
UBOOT_CONFIG="rk3568_defconfig"

View file

@ -59,12 +59,13 @@ dd if=/dev/zero of="${DISK}" bs=1M count="${DISK_SIZE}" conv=fsync >"${SAVE_ERRO
echo "image: creating partition table (${PARTITION_TABLE})..."
parted -s "${DISK}" mklabel ${PARTITION_TABLE}
sync
if [ "${PARTITION_TABLE}" = "gpt" ] && [ "${BOOTLOADER}" = "u-boot" ]
then
echo "image: creating SPL partition(s)."
parted -s "${DISK}" unit s mkpart uboot 16384 24575 >/dev/null 2>&1
parted -s "${DISK}" unit s mkpart resource 24576 32767 >/dev/null 2>&1
parted -s "${DISK}" unit s mkpart ${UBOOT_LABEL} 16384 24575 >/dev/null 2>&1
parted -s "${DISK}" unit s mkpart ${TRUST_LABEL} 24576 32767 >/dev/null 2>&1
fi
# create part1
@ -76,8 +77,8 @@ if [ "${PARTITION_TABLE}" = "gpt" ]; then
else
echo "image: Create primary partition."
parted -s "${DISK}" -a min unit s mkpart primary fat32 ${SYSTEM_PART_START} ${SYSTEM_PART_END}
parted -s "${DISK}" set 1 boot on
fi
parted -s "${DISK}" set 1 boot on
sync
# create part2

View file

@ -39,6 +39,9 @@ then
echo "Extracting ${DISTRO}-${DEVICE}.${ARCH}-${OS_VERSION}.img"
gunzip ${DISTRO}-${DEVICE}.${ARCH}-${OS_VERSION}.img.gz 2>/dev/null
echo "Wiping ${SDDEVICE} partition data"
sudo wipefs -a ${SDDEVICE} 2>/dev/null
echo "Writing ${DISTRO}-${DEVICE}.${ARCH}-${OS_VERSION}.img to ${SDDEVICE}"
sudo dd if=${DISTRO}-${DEVICE}.${ARCH}-${OS_VERSION}.img of=/dev/${SDDEVICE} bs=1M
sync