diff --git a/Config.in b/Config.in index e69de29..d6622ff 100644 --- a/Config.in +++ b/Config.in @@ -0,0 +1,30 @@ +config AIMEEOS + bool "Aimee OS" + depends on BR2_INIT_SYSTEMD + select BR2_TARGET_ROOTFS_SQUASHFS + select BR2_TARGET_ROOTFS_SQUASHFS4_GZIP + select BR2_LINUX_KERNEL_INSTALL_TARGET + select BR2_PACKAGE_SYSTEMD_EFI + select BR2_PACKAGE_SYSTEMD_COREDUMP + select BR2_PACKAGE_SYSTEMD_SYSUSERS + select BR2_PACKAGE_COREUTILS + select BR2_PACKAGE_TAR + select BR2_PACKAGE_ZSTD + select BR2_TARGET_GRUB2 + select BR2_PACKAGE_HOST_ZSTD + help + Enable all Aimee OS features. + +comment "Aimee OS needs systemd" + depends on !BR2_INIT_SYSTEMD + +config AIMEEOS_RPI + bool "Aimee OS Raspberry Pi support" + depends on AIMEEOS + select BR2_TARGET_UBOOT + select BR2_TARGET_GRUB2_ARM_EFI + select BR2_PACKAGE_HOST_DOSFSTOOLS + select BR2_PACKAGE_HOST_GENIMAGE + select BR2_PACKAGE_HOST_MTOOLS + help + Support running Aimee OS on Rasperry Pi devices diff --git a/board/raspberrypi3/cmdline.txt b/board/raspberrypi3/cmdline.txt new file mode 100644 index 0000000..e69de29 diff --git a/board/raspberrypi3/config.txt b/board/raspberrypi3/config.txt new file mode 100644 index 0000000..9f1371c --- /dev/null +++ b/board/raspberrypi3/config.txt @@ -0,0 +1,6 @@ +start_file=start.elf +fixup_file=fixup.dat + +kernel=u-boot.bin + +disable_overscan=1 diff --git a/board/raspberrypi3/genimage.cfg b/board/raspberrypi3/genimage.cfg new file mode 100644 index 0000000..03c3863 --- /dev/null +++ b/board/raspberrypi3/genimage.cfg @@ -0,0 +1,41 @@ +# vim: set sw=4 ts=4 sts=4 : + +image firmware.img { + vfat { + } + + srcpath = "efi-part" + size = 64M +} + +image sdcard.img { + hdimage { + partition-table-type = hybrid + align = 1M + } + + partition "EFI System Partition" { + partition-type = 0xC + partition-type-uuid = "U" + bootable = true + image = "firmware.img" + } + + partition rootfs-a { + partition-type-uuid = "L" + image = "rootfs.squashfs" + size = 512M + } + + partition rootfs-b { + partition-type-uuid = "L" + size = 512M + } + + partition aimeeos-data { + partition-type-uuid = "L" + autoresize = true + } + + size = 4G +} diff --git a/board/raspberrypi3/post-image.sh b/board/raspberrypi3/post-image.sh new file mode 100755 index 0000000..a004cf3 --- /dev/null +++ b/board/raspberrypi3/post-image.sh @@ -0,0 +1,26 @@ +#!/bin/sh + +set -e + +BOARD_DIR=$(dirname "$0") +GRUBENV="${BINARIES_DIR}"/efi-part/EFI/BOOT/grubenv + +genimage_tmp=$(mktemp -d) +trap 'rm -rf "${genimage_tmp}"' EXIT + +cp -alf "${BINARIES_DIR}"/u-boot.bin "${BINARIES_DIR}"/efi-part/ +cp -alf "${BINARIES_DIR}"/*.dtb "${BINARIES_DIR}"/efi-part/ +cp -alf "${BINARIES_DIR}"/rpi-firmware/* "${BINARIES_DIR}"/efi-part/ + +mkdir -p "${genimage_tmp}"/rootfs "${genimage_tmp}"/tmp + +cd "${BINARIES_DIR}" +genimage \ + --rootpath "${genimage_tmp}/rootfs" \ + --tmppath "${genimage_tmp}/tmp" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${BOARD_DIR}"/genimage.cfg + +grub-editenv "${GRUBENV}" set default=0 +grub-editenv "${GRUBENV}" set timeout=3 diff --git a/boot/grub2/gen-grub-cfg.sh b/boot/grub2/gen-grub-cfg.sh new file mode 100755 index 0000000..03c13dc --- /dev/null +++ b/boot/grub2/gen-grub-cfg.sh @@ -0,0 +1,12 @@ +#!/bin/sh +# vim: set sw=4 ts=4 sts=4 et : + +vers=${BR2_EXTERNAL_AIMEEOS_VERSION} +br2_vers=${BR2_VERSION_FULL} + +cat > "${TARGET_DIR}"/boot/grub.cfg <