Fix RG552 boot.

This commit is contained in:
fewtarius 2022-05-31 08:45:33 -04:00
parent bcb487ebe2
commit 51d40ae6f4
No known key found for this signature in database
GPG key ID: F4AE55305D1B8C1A
2 changed files with 13 additions and 5 deletions

View file

@ -496,11 +496,11 @@ load_splash() {
fi fi
if [ -n "$SPLASHIMAGE" -a -f "$SPLASHIMAGE" ]; then if [ -n "$SPLASHIMAGE" -a -f "$SPLASHIMAGE" ]; then
if [ "${SPLASH_LOADER}" = "plymouth" ] if [ "${SPLASH_LOADER}" = "imagemagick" ]
then then
ply-image ${SPLASHIMAGE} > /dev/null 2>&1 convert "${SPLASHIMAGE}" -background black -gravity center bgra:/dev/fb0
else else
convert "${SPLASHIMAGE}" -background black -gravity center bgra:/dev/fb0 > /dev/null 2>&1 ply-image ${SPLASHIMAGE} > /dev/null 2>&1
fi fi
fi fi

View file

@ -71,18 +71,26 @@ fi
echo "image: creating part1..." echo "image: creating part1..."
SYSTEM_PART_END=$(( ${SYSTEM_PART_START} + (${SYSTEM_SIZE} * 1024 * 1024 / 512) - 1 )) SYSTEM_PART_END=$(( ${SYSTEM_PART_START} + (${SYSTEM_SIZE} * 1024 * 1024 / 512) - 1 ))
if [ "${PARTITION_TABLE}" = "gpt" ]; then if [ "${PARTITION_TABLE}" = "gpt" ]; then
echo "image: Create boot partition."
parted -s "${DISK}" -a min unit s mkpart boot fat32 ${SYSTEM_PART_START} ${SYSTEM_PART_END} parted -s "${DISK}" -a min unit s mkpart boot fat32 ${SYSTEM_PART_START} ${SYSTEM_PART_END}
else 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}" -a min unit s mkpart primary fat32 ${SYSTEM_PART_START} ${SYSTEM_PART_END}
fi fi
parted -s "${DISK}" set 1 boot on parted -s "${DISK}" set 1 boot on
sync sync
# create part2 # create part2
echo "image: creating system partition..." echo "image: creating part2..."
STORAGE_PART_START=$(( ${SYSTEM_PART_END} + 1 )) STORAGE_PART_START=$(( ${SYSTEM_PART_END} + 1 ))
STORAGE_PART_END=$(( ${STORAGE_PART_START} + (${STORAGE_SIZE} * 1024 * 1024 / 512) - 1 )) STORAGE_PART_END=$(( ${STORAGE_PART_START} + (${STORAGE_SIZE} * 1024 * 1024 / 512) - 1 ))
parted -s "${DISK}" -a min unit s mkpart primary ext4 ${STORAGE_PART_START} ${STORAGE_PART_END} if [ "${DISK_LABEL}" = "gpt" ]; then
echo "image: Create storage partition."
parted -s "${DISK}" -a min unit s mkpart storage ext4 ${STORAGE_PART_START} ${STORAGE_PART_END}
else
echo "image: Create primary partition."
parted -s "${DISK}" -a min unit s mkpart primary ext4 ${STORAGE_PART_START} ${STORAGE_PART_END}
fi
sync sync
# create filesystem on part1 # create filesystem on part1