From 189f1f656ec07c1f9626ed0d16ed367bc064180a Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Tue, 7 Mar 2023 12:44:47 -0600 Subject: [PATCH] wip: build u-boot with Portage --- .gitmodules | 4 - Makefile | 10 -- build.packages | 1 + .../target/etc/portage/package.use/u-boot | 1 + .../etc/portage/savedconfig/sys-boot/u-boot | 100 ++++++++++++++++++ portage/repos/aimee-os/metadata/layout.conf | 1 + portage/repos/aimee-os/profiles/repo_name | 1 + .../repos/aimee-os/sys-boot/u-boot/Manifest | 11 ++ ...cm283x-don-t-explicitly-disable-init.patch | 0 ...FIG_OF_BOARD-instead-of-CONFIG_EMBED.patch | 0 ...cm283x-allow-to-spawn-any-PL011-UART.patch | 0 .../0002-rpi-add-NVMe-to-boot-order.patch | 0 ...ect-the-prps-per-page-calculation-me.patch | 0 ...ke-driver-compatible-with-downstream.patch | 0 ...prove-readability-of-nvme_setup_prps.patch | 0 ...se-pointer-for-CPU-addressed-buffers.patch | 0 ...irtual-addresses-into-the-bus-s-addr.patch | 0 .../sys-boot/u-boot/u-boot-2023.01.ebuild | 71 +++++++++++++ post-build.sh | 1 + setup-local-repo.sh | 7 ++ u-boot | 1 - u-boot.config | 37 ------- 22 files changed, 194 insertions(+), 52 deletions(-) create mode 100644 portage/config/target/etc/portage/package.use/u-boot create mode 100644 portage/config/target/etc/portage/savedconfig/sys-boot/u-boot create mode 100644 portage/repos/aimee-os/metadata/layout.conf create mode 100644 portage/repos/aimee-os/profiles/repo_name create mode 100644 portage/repos/aimee-os/sys-boot/u-boot/Manifest rename {patches/uboot => portage/repos/aimee-os/sys-boot/u-boot/files}/0001-drivers-bcm283x-don-t-explicitly-disable-init.patch (100%) rename {patches/uboot => portage/repos/aimee-os/sys-boot/u-boot/files}/0001-rpi-Use-CONFIG_OF_BOARD-instead-of-CONFIG_EMBED.patch (100%) rename {patches/uboot => portage/repos/aimee-os/sys-boot/u-boot/files}/0002-drivers-bcm283x-allow-to-spawn-any-PL011-UART.patch (100%) rename {patches/uboot => portage/repos/aimee-os/sys-boot/u-boot/files}/0002-rpi-add-NVMe-to-boot-order.patch (100%) rename {patches/uboot => portage/repos/aimee-os/sys-boot/u-boot/files}/0003-Revert-nvme-Correct-the-prps-per-page-calculation-me.patch (100%) rename {patches/uboot => portage/repos/aimee-os/sys-boot/u-boot/files}/0004-usb-xhci-brcm-Make-driver-compatible-with-downstream.patch (100%) rename {patches/uboot => portage/repos/aimee-os/sys-boot/u-boot/files}/0005-nvme-improve-readability-of-nvme_setup_prps.patch (100%) rename {patches/uboot => portage/repos/aimee-os/sys-boot/u-boot/files}/0006-nvme-Use-pointer-for-CPU-addressed-buffers.patch (100%) rename {patches/uboot => portage/repos/aimee-os/sys-boot/u-boot/files}/0007-nvme-translate-virtual-addresses-into-the-bus-s-addr.patch (100%) create mode 100644 portage/repos/aimee-os/sys-boot/u-boot/u-boot-2023.01.ebuild delete mode 160000 u-boot delete mode 100644 u-boot.config diff --git a/.gitmodules b/.gitmodules index 6bb60f3..e69de29 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,4 +0,0 @@ -[submodule "u-boot"] - path = u-boot - url = https://source.denx.de/u-boot/u-boot.git - branch = v2023.01 diff --git a/Makefile b/Makefile index 95845a8..84276f9 100644 --- a/Makefile +++ b/Makefile @@ -69,18 +69,10 @@ $(O)/efi-part/EFI/BOOT/BOOTAA64.efi: \ grub: $(O)/efi-part/EFI/BOOT/BOOTAA64.efi -$(O)/efi-part/u-boot.bin: \ - build-uboot.sh \ - u-boot.config - ./build-uboot.sh "$(O)" - -uboot: $(O)/efi-part/u-boot.bin - $(IMAGESDIR)/sdcard.img: \ genimage.cfg \ genimage.sh \ post-build.sh \ - $(O)/efi-part/u-boot.bin \ $(O)/efi-part/EFI/BOOT/BOOTAA64.efi ./post-build.sh "$(O)" ./genimage.sh "$(O)" "$(IMAGESDIR)" @@ -98,7 +90,6 @@ $(IMAGESDIR)/update.tar.zstd: \ ./build-update.sh "$(IMAGESDIR)" clean: - git -C u-boot clean -fdx && git -C u-boot checkout -- . rm -rf $(O)/linux $(O)/output $(IMAGESDIR) $(O)/tmp rm -f $(O)/.prepared $(O)/.host-tools @@ -109,5 +100,4 @@ clean: prepare \ sdcard.img \ squashfs \ - uboot \ update.tar diff --git a/build.packages b/build.packages index 6888dc1..a5650ea 100644 --- a/build.packages +++ b/build.packages @@ -1,2 +1,3 @@ sys-boot/grub sys-boot/raspberrypi-firmware +sys-boot/u-boot diff --git a/portage/config/target/etc/portage/package.use/u-boot b/portage/config/target/etc/portage/package.use/u-boot new file mode 100644 index 0000000..3b9df8b --- /dev/null +++ b/portage/config/target/etc/portage/package.use/u-boot @@ -0,0 +1 @@ +sys-boot/u-boot savedconfig diff --git a/portage/config/target/etc/portage/savedconfig/sys-boot/u-boot b/portage/config/target/etc/portage/savedconfig/sys-boot/u-boot new file mode 100644 index 0000000..fc7053b --- /dev/null +++ b/portage/config/target/etc/portage/savedconfig/sys-boot/u-boot @@ -0,0 +1,100 @@ +CONFIG_ARM=y +CONFIG_ARCH_BCM283X=y +CONFIG_TEXT_BASE=0x00080000 +CONFIG_TARGET_RPI_4=y +CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y +CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x7fffe30 +CONFIG_ENV_SIZE=0x4000 +CONFIG_DEFAULT_DEVICE_TREE="bcm2711-rpi-4-b" +CONFIG_SYS_PROMPT="U-Boot> " +CONFIG_DM_RESET=y +CONFIG_SYS_LOAD_ADDR=0x1000000 +CONFIG_DISTRO_DEFAULTS=y +CONFIG_OF_BOARD_SETUP=y +CONFIG_USE_PREBOOT=y +CONFIG_PREBOOT="pci enum; usb start;" +# CONFIG_DISPLAY_CPUINFO is not set +# CONFIG_DISPLAY_BOARDINFO is not set +CONFIG_MISC_INIT_R=y +CONFIG_FDT_SIMPLEFB=y +CONFIG_SYS_PBSIZE=1049 +CONFIG_CMD_DFU=y +CONFIG_CMD_GPIO=y +CONFIG_CMD_MMC=y +CONFIG_CMD_PCI=y +CONFIG_CMD_USB=y +CONFIG_CMD_FS_UUID=y +CONFIG_ENV_FAT_DEVICE_AND_PART="0:1" +CONFIG_SYS_RELOC_GD_ENV_ADDR=y +CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y +CONFIG_TFTP_TSIZE=y +CONFIG_DM_DMA=y +CONFIG_DFU_MMC=y +CONFIG_SYS_DFU_DATA_BUF_SIZE=0x100000 +CONFIG_SYS_DFU_MAX_FILE_SIZE=0x200000 +CONFIG_BCM2835_GPIO=y +CONFIG_MMC_SDHCI=y +CONFIG_MMC_SDHCI_SDMA=y +CONFIG_MMC_SDHCI_BCM2835=y +CONFIG_BCMGENET=y +CONFIG_PCI=y +CONFIG_PCI_BRCMSTB=y +CONFIG_PINCTRL=y +# CONFIG_PINCTRL_GENERIC is not set +CONFIG_DM_RNG=y +CONFIG_RNG_IPROC200=y +# CONFIG_REQUIRE_SERIAL_CONSOLE is not set +CONFIG_SYSINFO=y +CONFIG_SYSINFO_SMBIOS=y +CONFIG_USB=y +CONFIG_DM_USB_GADGET=y +CONFIG_USB_XHCI_HCD=y +CONFIG_USB_XHCI_PCI=y +CONFIG_USB_KEYBOARD=y +CONFIG_USB_GADGET=y +CONFIG_USB_GADGET_MANUFACTURER="FSL" +CONFIG_USB_GADGET_VENDOR_NUM=0x0525 +CONFIG_USB_GADGET_PRODUCT_NUM=0xa4a5 +CONFIG_USB_GADGET_DWC2_OTG=y +CONFIG_USB_GADGET_DOWNLOAD=y +CONFIG_VIDEO=y +# CONFIG_VIDEO_BPP8 is not set +# CONFIG_VIDEO_BPP16 is not set +CONFIG_SYS_WHITE_ON_BLACK=y +CONFIG_VIDEO_BCM2835=y +CONFIG_CONSOLE_SCROLL_LINES=10 +CONFIG_PHYS_TO_BUS=y +CONFIG_OF_LIBFDT_OVERLAY=y + +# CONFIG_LOCALVERSION_AUTO is not set +CONFIG_BOOTDELAY=-2 +# CONFIG_ISO_PARTITION is not set +CONFIG_EFI_PARTITION=y +CONFIG_FS_EXT4=y +CONFIG_FS_FAT=y +# CONFIG_ENV_IS_IN_FAT is not set +# CONFIG_ENV_IS_IN_EXT4 is not set +CONFIG_ENV_IS_NOWHERE=y +CONFIG_CMD_SETEXPR=y +CONFIG_CMD_FILEENV=y +CONFIG_CMD_SQUASHFS=y +CONFIG_LZO=y + +# CONFIG_DOS_PARTITION is not set +CONFIG_USB_STORAGE=y +CONFIG_USB_FUNCTION_MASS_STORAGE=y +CONFIG_USB_EHCI_HCD=y +CONFIG_USB_EHCI_GENERIC=y +CONFIG_USB_OHCI_HCD=y + +CONFIG_USB_XHCI_BRCM=y + +CONFIG_NVME_PCI=y +CONFIG_CMD_NVME=y +CONFIG_NVME=y +CONFIG_CMD_USB_MASS_STORAGE=y + +CONFIG_CMD_BOOTEFI=y +CONFIG_EFI_LOADER=y + +CONFIG_LMB_MAX_REGIONS=16 diff --git a/portage/repos/aimee-os/metadata/layout.conf b/portage/repos/aimee-os/metadata/layout.conf new file mode 100644 index 0000000..d43e61c --- /dev/null +++ b/portage/repos/aimee-os/metadata/layout.conf @@ -0,0 +1 @@ +masters = gentoo diff --git a/portage/repos/aimee-os/profiles/repo_name b/portage/repos/aimee-os/profiles/repo_name new file mode 100644 index 0000000..a9c9302 --- /dev/null +++ b/portage/repos/aimee-os/profiles/repo_name @@ -0,0 +1 @@ +aimee-os diff --git a/portage/repos/aimee-os/sys-boot/u-boot/Manifest b/portage/repos/aimee-os/sys-boot/u-boot/Manifest new file mode 100644 index 0000000..0fb1ec9 --- /dev/null +++ b/portage/repos/aimee-os/sys-boot/u-boot/Manifest @@ -0,0 +1,11 @@ +AUX 0001-drivers-bcm283x-don-t-explicitly-disable-init.patch 1684 BLAKE2B 801bf1c6b0b5e678d2e23689edb6612af3b2acd89f21b926a36f98ca600083603b8ee53c7ad8f11dc706db67819437910ce7ba9d7406c5763b25c88cd620a338 SHA512 f39fe500ca17dfd7f32d0eb986cfd110b225edcf01c6d235a2af1d9d5fcb8c1922a5db89dc683bb1e259bd9675beecc07948543c5ab98d1ee6e5d7693b86060a +AUX 0001-rpi-Use-CONFIG_OF_BOARD-instead-of-CONFIG_EMBED.patch 2621 BLAKE2B ac8792433c3ebde967b083d12855faa21ed4fca5a0095bd38c4b597714430f77bfa81b70b8e26535fcf64650590d60510de5c4e18760d56d1ecb9ab692a44ac8 SHA512 18340a67637873179317a16a565c5b34490bd4dbf6dabac7c2ee5947349977fed6dd71253af55233c3e2912ddec6a15e17a29440b0e009b267c93deb28bc7713 +AUX 0002-drivers-bcm283x-allow-to-spawn-any-PL011-UART.patch 2228 BLAKE2B efb42405ecc011973d5f8417bb7a82618d1d24917f0bd246d908ac8abd0bee6ed062ff2d77caa485cdbc02959de5c1cc7ca1943055708a8f6ab8ff34751e1aa1 SHA512 283ec38a092c370306037324a67b40141398e6102ba04b64304f2998870e0f1aa86891894c749789eb59454b8972d094771b5a8ca7ae3747760de246812c5c2c +AUX 0002-rpi-add-NVMe-to-boot-order.patch 1290 BLAKE2B a5e911e07b7b6723845d004bd5513db9cfebe73b7de2c7e4073d0725f6e3159b7b72381f859e357abf4f28421609fb18ad8fcc669d3b94db124771a36df51497 SHA512 f3d8351235b74f234aed5893523b36a355c1afcb92ee0f481c552c83c418856e450b6cf2c7c7ad4ab40fe41d0561f0e283da403b5245e76649f1fa996f88b6fa +AUX 0003-Revert-nvme-Correct-the-prps-per-page-calculation-me.patch 1610 BLAKE2B 1a5530178fef080472e1355adf6eccc92e6ced11aba0fc3f2042f16bf7a8b0a1cdb236723b93c95d30431cef03a595258355a0d20489f9533f47e0c541d0f232 SHA512 bda4d59519caa41dd7133d39740a39ce8d01197e16738b8af4ebc8fea096a3f73f88a11763a2a7938ed181819a0f7c442d1d14211f1d8cee9ecdb2c5f6eeb4f9 +AUX 0004-usb-xhci-brcm-Make-driver-compatible-with-downstream.patch 1172 BLAKE2B 98589d6c4062e6cdc17522cd98d8c5ddcd0bdb953b0dc5a8c997f960da397a6174ab748afda5f64cfc2ad4c6ffeb65e76f9e346b2ae0a2466593968f06f32857 SHA512 1b92eabeb731f4c7ae8b2401942994b0515a673f4583a4333deb5ebac0981ac34c744c68e195dbad7a7cd92d6efe1a180446509cf3fe72ad443b094c5e74ed8e +AUX 0005-nvme-improve-readability-of-nvme_setup_prps.patch 1757 BLAKE2B 152cb9ea9662f7271b7cf3226825e825cc0d6420ed2ef77b7a8186b25b5eccf92edac32823d1f79afea3307269897c68d3899fd9b018cf11109c2739af7fccc3 SHA512 2192379f650ce1b43be1df43c06ae031f7bdbaeeecab1a195ca0f254d9e00bb7ed03256b90a5e5edc80c37bca449d0648a3a90d2d73faaec0561465f728e2b59 +AUX 0006-nvme-Use-pointer-for-CPU-addressed-buffers.patch 9077 BLAKE2B b28afb568d791bed8c93f222b62677d87629d803747bb52cba74fff50752aaa4522b0fcdece58148d9da77a7da6a547dc4d47cfc9ae5fe7de0fbe6d7a0a9a497 SHA512 a84424877cc858b7596fe4f263a48e94fca7075c2c9a10d28fe1e569ca4e893af2ba3536c26d93ce15d8792d27a6c8779ef9669730414e6cc0de7af672dd31c2 +AUX 0007-nvme-translate-virtual-addresses-into-the-bus-s-addr.patch 6480 BLAKE2B 6d7fec7096bf239f08a5e7e7ac5f8c58dcd72829b37d2f3e8b2e96c173a43449f538148cece64c5f48da68826eeec0c1db7a8ac6cc254a853a3cdf04d7431b95 SHA512 fecba2572d5f1dd7e941efdecb935a734ef1385af9b9300d84decd9bf91c4387b500fa08f655af62d33d085907353972f613ec97b3dd96ed18cac4811d5210a1 +DIST u-boot-2023.01.tar.bz2 18560442 BLAKE2B 9412da6c7c8da8be64e470347d150ea2ba9a33b84f463c8ff3109e3db6c2dbcf13c8ab2e02bf3a2c412ff57c91987da922e4dde6a26e317e7b9e65101f7a6d62 SHA512 417a28267eb7875820d08fafc7316f164663609378637539e71648b0b9b7d28796b6c381717f31b0ab6472805fefd32628ef7d1b2e7b9f3c51c8ad122993f679 +EBUILD u-boot-2023.01.ebuild 1762 BLAKE2B c0fba3aec8bfd26da6d32014bb38a2e5e8235f8ded6a7681f6cc1f5557b5437b5da6366740141465265b174832f38b6e669bd0bf956d241652acf69076596a71 SHA512 fa2b82ab1ea4fdc71ad9a5022433da137aad1722e02f18d7be0ff67d7130570a2783e4cac0f1fc1851537325750b9584d48ee4d99f01908a179fb58c0eb0724f diff --git a/patches/uboot/0001-drivers-bcm283x-don-t-explicitly-disable-init.patch b/portage/repos/aimee-os/sys-boot/u-boot/files/0001-drivers-bcm283x-don-t-explicitly-disable-init.patch similarity index 100% rename from patches/uboot/0001-drivers-bcm283x-don-t-explicitly-disable-init.patch rename to portage/repos/aimee-os/sys-boot/u-boot/files/0001-drivers-bcm283x-don-t-explicitly-disable-init.patch diff --git a/patches/uboot/0001-rpi-Use-CONFIG_OF_BOARD-instead-of-CONFIG_EMBED.patch b/portage/repos/aimee-os/sys-boot/u-boot/files/0001-rpi-Use-CONFIG_OF_BOARD-instead-of-CONFIG_EMBED.patch similarity index 100% rename from patches/uboot/0001-rpi-Use-CONFIG_OF_BOARD-instead-of-CONFIG_EMBED.patch rename to portage/repos/aimee-os/sys-boot/u-boot/files/0001-rpi-Use-CONFIG_OF_BOARD-instead-of-CONFIG_EMBED.patch diff --git a/patches/uboot/0002-drivers-bcm283x-allow-to-spawn-any-PL011-UART.patch b/portage/repos/aimee-os/sys-boot/u-boot/files/0002-drivers-bcm283x-allow-to-spawn-any-PL011-UART.patch similarity index 100% rename from patches/uboot/0002-drivers-bcm283x-allow-to-spawn-any-PL011-UART.patch rename to portage/repos/aimee-os/sys-boot/u-boot/files/0002-drivers-bcm283x-allow-to-spawn-any-PL011-UART.patch diff --git a/patches/uboot/0002-rpi-add-NVMe-to-boot-order.patch b/portage/repos/aimee-os/sys-boot/u-boot/files/0002-rpi-add-NVMe-to-boot-order.patch similarity index 100% rename from patches/uboot/0002-rpi-add-NVMe-to-boot-order.patch rename to portage/repos/aimee-os/sys-boot/u-boot/files/0002-rpi-add-NVMe-to-boot-order.patch diff --git a/patches/uboot/0003-Revert-nvme-Correct-the-prps-per-page-calculation-me.patch b/portage/repos/aimee-os/sys-boot/u-boot/files/0003-Revert-nvme-Correct-the-prps-per-page-calculation-me.patch similarity index 100% rename from patches/uboot/0003-Revert-nvme-Correct-the-prps-per-page-calculation-me.patch rename to portage/repos/aimee-os/sys-boot/u-boot/files/0003-Revert-nvme-Correct-the-prps-per-page-calculation-me.patch diff --git a/patches/uboot/0004-usb-xhci-brcm-Make-driver-compatible-with-downstream.patch b/portage/repos/aimee-os/sys-boot/u-boot/files/0004-usb-xhci-brcm-Make-driver-compatible-with-downstream.patch similarity index 100% rename from patches/uboot/0004-usb-xhci-brcm-Make-driver-compatible-with-downstream.patch rename to portage/repos/aimee-os/sys-boot/u-boot/files/0004-usb-xhci-brcm-Make-driver-compatible-with-downstream.patch diff --git a/patches/uboot/0005-nvme-improve-readability-of-nvme_setup_prps.patch b/portage/repos/aimee-os/sys-boot/u-boot/files/0005-nvme-improve-readability-of-nvme_setup_prps.patch similarity index 100% rename from patches/uboot/0005-nvme-improve-readability-of-nvme_setup_prps.patch rename to portage/repos/aimee-os/sys-boot/u-boot/files/0005-nvme-improve-readability-of-nvme_setup_prps.patch diff --git a/patches/uboot/0006-nvme-Use-pointer-for-CPU-addressed-buffers.patch b/portage/repos/aimee-os/sys-boot/u-boot/files/0006-nvme-Use-pointer-for-CPU-addressed-buffers.patch similarity index 100% rename from patches/uboot/0006-nvme-Use-pointer-for-CPU-addressed-buffers.patch rename to portage/repos/aimee-os/sys-boot/u-boot/files/0006-nvme-Use-pointer-for-CPU-addressed-buffers.patch diff --git a/patches/uboot/0007-nvme-translate-virtual-addresses-into-the-bus-s-addr.patch b/portage/repos/aimee-os/sys-boot/u-boot/files/0007-nvme-translate-virtual-addresses-into-the-bus-s-addr.patch similarity index 100% rename from patches/uboot/0007-nvme-translate-virtual-addresses-into-the-bus-s-addr.patch rename to portage/repos/aimee-os/sys-boot/u-boot/files/0007-nvme-translate-virtual-addresses-into-the-bus-s-addr.patch diff --git a/portage/repos/aimee-os/sys-boot/u-boot/u-boot-2023.01.ebuild b/portage/repos/aimee-os/sys-boot/u-boot/u-boot-2023.01.ebuild new file mode 100644 index 0000000..a6c84b8 --- /dev/null +++ b/portage/repos/aimee-os/sys-boot/u-boot/u-boot-2023.01.ebuild @@ -0,0 +1,71 @@ +# Copyright 1999-2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit savedconfig toolchain-funcs + +MY_P="u-boot-${PV/_/-}" +DESCRIPTION="Das U-Boot firmware" +HOMEPAGE="http://www.denx.de/wiki/U-Boot" +SRC_URI="https://ftp.denx.de/pub/u-boot/${MY_P}.tar.bz2" +S="${WORKDIR}/${MY_P}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~arm64" + +PATCHES=( + "${FILESDIR}"/0001-drivers-bcm283x-don-t-explicitly-disable-init.patch + "${FILESDIR}"/0001-rpi-Use-CONFIG_OF_BOARD-instead-of-CONFIG_EMBED.patch + "${FILESDIR}"/0002-drivers-bcm283x-allow-to-spawn-any-PL011-UART.patch + "${FILESDIR}"/0002-rpi-add-NVMe-to-boot-order.patch + "${FILESDIR}"/0003-Revert-nvme-Correct-the-prps-per-page-calculation-me.patch + "${FILESDIR}"/0004-usb-xhci-brcm-Make-driver-compatible-with-downstream.patch + "${FILESDIR}"/0005-nvme-improve-readability-of-nvme_setup_prps.patch + "${FILESDIR}"/0006-nvme-Use-pointer-for-CPU-addressed-buffers.patch + "${FILESDIR}"/0007-nvme-translate-virtual-addresses-into-the-bus-s-addr.patch +) + +src_configure() { + restore_config .config + if [ -f .config ]; then + emake -j1 olddefconfig + else + # TODO Build images for other boards based on USE flags + emake -j1 rpi_4_defconfig + fi + + tc-export AR BUILD_CC CC LD OBJCOPY PKG_CONFIG + tc-export_build_env +} + +src_compile() { + unset KBUILD_OUTPUT KBUILD_SRC + + local myemakeargs=( + V=1 + AR="${AR}" + CC="${CC}" + HOSTCC="${BUILD_CC}" + HOSTCFLAGS="${BUILD_CFLAGS} ${BUILD_CPPFLAGS}"' $(HOSTCPPFLAGS)' + HOSTLDFLAGS="${BUILD_LDFLAGS}" + LD="${LD}" + OBJCOPY="${OBJCOPY}" + ) + + emake "${myemakeargs[@]}" \ + NO_SDL=1 \ + HOSTSTRIP=: \ + STRIP=: \ + CONFIG_ENV_OVERWRITE=y +} + +src_test() { :; } + +src_install() { + save_config .config + + insinto /usr/share/${PN} + doins u-boot.bin +} diff --git a/post-build.sh b/post-build.sh index 3e58b47..893d6e9 100755 --- a/post-build.sh +++ b/post-build.sh @@ -9,5 +9,6 @@ cp -uv \ /usr/${target}/boot/*.bin \ /usr/${target}/boot/*.dat \ /usr/${target}/boot/*.elf \ + /usr/${target}/usr/share/u-boot/u-boot.bin \ config.txt \ "$1"/efi-part/ diff --git a/setup-local-repo.sh b/setup-local-repo.sh index 4bff544..02b3d55 100755 --- a/setup-local-repo.sh +++ b/setup-local-repo.sh @@ -6,6 +6,13 @@ set -e . ./config mkdir -p portage/config/target/etc/portage/repos.conf + +cat > portage/config/target/etc/portage/repos.conf/aimee-os.conf < portage/config/target/etc/portage/repos.conf/x-portage.conf <