From da9afd2d423ff0a6cd209afe1e4231eb68909e7e Mon Sep 17 00:00:00 2001 From: so4neet Date: Mon, 27 Jul 2026 22:09:14 -0500 Subject: [PATCH] Inital bootable defconfig and build script for AM6264SIP --- README.md | 5 +++++ build.sh | 29 +++++++++++++++++++++++++++++ configs/genimage.cfg | 28 ++++++++++++++++++++++++++++ configs/lira_flip_defconfig | 31 +++++++++++++++++++++++++++++++ 4 files changed, 93 insertions(+) create mode 100644 README.md create mode 100755 build.sh create mode 100644 configs/genimage.cfg create mode 100644 configs/lira_flip_defconfig diff --git a/README.md b/README.md new file mode 100644 index 0000000..482442d --- /dev/null +++ b/README.md @@ -0,0 +1,5 @@ +# Flip OS Base + +This is the OS for Flip. + +`build.sh` Fetches the required modules and builds the OS. diff --git a/build.sh b/build.sh new file mode 100755 index 0000000..3a1fee1 --- /dev/null +++ b/build.sh @@ -0,0 +1,29 @@ +#!/usr/bin/env bash + +if ! [ "$(ls -A buildroot)" ]; then + echo "Cloning Buildroot..." + git clone https://gitlab.com/buildroot.org/buildroot -b 2026.05.x buildroot +fi + +cd buildroot +make defconfig BR2_DEFCONFIG=../configs/lira_flip_defconfig +make +if [ $? == 0 ]; then + echo "Building Image..." + cd output/images + mkdir ../../../img_tmp + cp tiboot3.bin ../../../img_tmp/tiboot3.bin + cp tispl.bin ../../../img_tmp/tispl.bin + cp u-boot.bin ../../../img_tmp/u-boot.bin + cp rootfs.btrfs ../../../img_tmp/rootfs.btrfs + cd ../../../img_tmp + genimage --rootpath "../buildroot/output/target" --tmppath "genimage.tmp" --inputpath "." --outputpath "../img" --config ../configs/genimage.cfg + if ! [ $? == 0 ]; then + echo "Failed Building Image." + fi; + cd .. + rm -rf img_tmp +else + echo "Failed Building OS." +fi +echo "Done" diff --git a/configs/genimage.cfg b/configs/genimage.cfg new file mode 100644 index 0000000..ece64df --- /dev/null +++ b/configs/genimage.cfg @@ -0,0 +1,28 @@ +image boot.vfat { + vfat { + files = { + "tiboot3.bin", + "tispl.bin", + "u-boot.bin" + } + } + size = 64M +} + +image flip_os.img { + hdimage { + partition-table-type = "mbr" + } + + partition boot { + partition-type = 0x0C + bootable = "true" + image = "boot.vfat" + offset = 1M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.btrfs" + } +} diff --git a/configs/lira_flip_defconfig b/configs/lira_flip_defconfig new file mode 100644 index 0000000..7a20905 --- /dev/null +++ b/configs/lira_flip_defconfig @@ -0,0 +1,31 @@ +BR2_aarch64=y +BR2_TARGET_GENERIC_HOSTNAME="Lira Flip" +BR2_TARGET_GENERIC_ISSUE="Lira OS" +BR2_ROOTFS_MERGED_USR=y +BR2_ROOTFS_MERGED_BIN=y +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y +BR2_TARGET_ROOTFS_BTRFS=y +BR2_TARGET_ROOTFS_BTRFS_LABEL="lira_root" +BR2_TARGET_ARM_TRUSTED_FIRMWARE=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_LATEST_LTS_2_12_VERSION=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_PLATFORM="k3" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_TARGET_BOARD="lite" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_BL31_UBOOT=y +BR2_TARGET_ARM_TRUSTED_FIRMWARE_ADDITIONAL_VARIABLES="K3_PM_SYSTEM_SUSPEND=1" +BR2_TARGET_ARM_TRUSTED_FIRMWARE_NEEDS_DTC=y +BR2_TARGET_TI_K3_R5_LOADER=y +BR2_TARGET_TI_K3_R5_LOADER_BOARD_DEFCONFIG="arm62x_evm_r5" +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_CUSTOM_VERSION=y +BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2026.07" +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="am62x_evm_a53" +BR2_TARGET_UBOOT_NEEDS_DTC=y +BR2_TARGET_UBOOT_NEEDS_OPENSSL=y +BR2_TARGET_UBOOT_NEEDS_GNUTLS=y +BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y +BR2_TARGET_UBOOT_USE_BINMAN=y +BR2_TARGET_UBOOT_SPL=y +BR2_TARGET_UBOOT_SPL_NAME="tispl.bin" +BR2_PACKAGE_HOST_LIBP11=y