kumquat-buildroot/board/orangepi/common/post-build.sh
Sergey Kuzminov c0312f71cc configs/orangepi_zero_defconfig: switch to extlinux
Changes:
* Exclude FAT partition, it is no longer needed for U-Boot.
* Switch the rootfs partition from MBR to GPT for partition-uuid to work.
* Switch to extlinux, this is convenient for debugging.
* Create common scenarios for multiple boards to create an SD image:
  board/orangepi/common. Currently only orangepi_zero makes use of the
  common infrastructure.

Signed-off-by: Sergey Kuzminov <kuzminov.sergey81@gmail.com>
Reviewed-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
Tested-by: Giulio Benetti <giulio.benetti@benettiengineering.com>
[Arnout: remove rootfs size = 63M and remount rw]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
2022-02-12 23:09:09 +01:00

35 lines
793 B
Bash
Executable File

#!/bin/sh
linux_image()
{
if grep -Eq "^BR2_LINUX_KERNEL_UIMAGE=y$" ${BR2_CONFIG}; then
echo "uImage"
elif grep -Eq "^BR2_LINUX_KERNEL_IMAGE=y$" ${BR2_CONFIG}; then
echo "Image"
elif grep -Eq "^BR2_LINUX_KERNEL_IMAGEGZ=y$" ${BR2_CONFIG}; then
echo "Image.gz"
else
echo "zImage"
fi
}
generic_getty()
{
if grep -Eq "^BR2_TARGET_GENERIC_GETTY=y$" ${BR2_CONFIG}; then
echo ""
else
echo "s/\s*console=\S*//"
fi
}
PARTUUID="$($HOST_DIR/bin/uuidgen)"
install -d "$TARGET_DIR/boot/extlinux/"
sed -e "$(generic_getty)" \
-e "s/%LINUXIMAGE%/$(linux_image)/g" \
-e "s/%PARTUUID%/$PARTUUID/g" \
"board/orangepi/common/extlinux.conf" > "$TARGET_DIR/boot/extlinux/extlinux.conf"
sed "s/%PARTUUID%/$PARTUUID/g" "board/orangepi/common/genimage.cfg" > "$BINARIES_DIR/genimage.cfg"