kumquat-buildroot/package/abootimg/abootimg.mk

35 lines
946 B
Makefile
Raw Normal View History

abootimg: new package This tool might be useful on Android devices modded with Buildroot. Indeed it allows to modify Android Boot Image partition directly from running rootfs and so let the user free to keep Android stuff on his device (mainly bootloader) while testing/using Buildroot kernel/rootfs. For example, one can modify kernel cmdline on Boot Image partition and tell Android bootloader to launch kernel with a given rootfs fitted with BR instead of Android's one. Build-tested with ./utils/test-pkg -p abootimg -c config.abootimg -a with config.abootimg containing: BR2_USE_MMU=y BR2_PACKAGE_ABOOTIMG=y BR2_PACKAGE_UTIL_LINUX=y BR2_PACKAGE_UTIL_LINUX_LIBBLKID=y armv5-ctng-linux-gnueabi [ 1/47]: OK armv7-ctng-linux-gnueabihf [ 2/47]: OK br-aarch64-glibc [ 3/47]: OK br-arcle-hs38 [ 4/47]: OK br-arm-basic [ 5/47]: OK br-arm-cortex-a9-glibc [ 6/47]: OK br-arm-cortex-a9-musl [ 7/47]: OK br-arm-cortex-m4-full [ 8/47]: SKIPPED br-arm-full [ 9/47]: OK br-arm-full-nothread [10/47]: OK br-arm-full-static [11/47]: OK br-bfin-full [12/47]: SKIPPED br-i386-pentium4-full [13/47]: OK br-i386-pentium-mmx-musl [14/47]: OK br-m68k-5208-full [15/47]: SKIPPED br-m68k-68040-full [16/47]: OK br-microblazeel-full [17/47]: OK br-mips32r6-el-hf-glibc [18/47]: OK br-mips64-n64-full [19/47]: OK br-mips64r6-el-hf-glibc [20/47]: OK br-mipsel-o32-full [21/47]: OK br-nios2-glibc [22/47]: OK br-openrisc-uclibc [23/47]: OK br-powerpc-603e-basic-cpp [24/47]: OK br-powerpc64le-power8-glibc [25/47]: OK br-powerpc64-power7-glibc [26/47]: OK br-powerpc-e500mc-full [27/47]: OK br-sh4-full [28/47]: OK br-sparc64-glibc [29/47]: OK br-sparc-uclibc [30/47]: OK br-x86-64-core2-full [31/47]: OK br-x86-64-musl [32/47]: OK br-xtensa-full [33/47]: OK i686-ctng-linux-gnu [34/47]: OK linaro-aarch64 [35/47]: OK linaro-arm [36/47]: OK mips64el-ctng_n32-linux-gnu [37/47]: OK mips64el-ctng_n64-linux-gnu [38/47]: OK powerpc-ctng_e500v2-linux-gnuspe [39/47]: OK sourcery-arm-armv4t [40/47]: OK sourcery-arm [41/47]: OK sourcery-arm-thumb2 [42/47]: OK sourcery-mips64 [43/47]: OK sourcery-mips [44/47]: OK sourcery-nios2 [45/47]: OK sourcery-x86-64 [46/47]: OK x86_64-ctng_locales-linux-gnu [47/47]: OK 47 builds, 3 skipped, 0 build failed, 0 legal-info failed Signed-off-by: Julien BOIBESSOT <julien.boibessot@armadeus.com> [Thomas: fix license.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-04 14:54:09 +02:00
################################################################################
#
# abootimg
#
################################################################################
ABOOTIMG_VERSION = 1ebeb393252ab5aeed62e34bc439b6728444f06e
ABOOTIMG_SITE = https://gitlab.com/ajs124/abootimg.git
ABOOTIMG_SITE_METHOD = git
abootimg: new package This tool might be useful on Android devices modded with Buildroot. Indeed it allows to modify Android Boot Image partition directly from running rootfs and so let the user free to keep Android stuff on his device (mainly bootloader) while testing/using Buildroot kernel/rootfs. For example, one can modify kernel cmdline on Boot Image partition and tell Android bootloader to launch kernel with a given rootfs fitted with BR instead of Android's one. Build-tested with ./utils/test-pkg -p abootimg -c config.abootimg -a with config.abootimg containing: BR2_USE_MMU=y BR2_PACKAGE_ABOOTIMG=y BR2_PACKAGE_UTIL_LINUX=y BR2_PACKAGE_UTIL_LINUX_LIBBLKID=y armv5-ctng-linux-gnueabi [ 1/47]: OK armv7-ctng-linux-gnueabihf [ 2/47]: OK br-aarch64-glibc [ 3/47]: OK br-arcle-hs38 [ 4/47]: OK br-arm-basic [ 5/47]: OK br-arm-cortex-a9-glibc [ 6/47]: OK br-arm-cortex-a9-musl [ 7/47]: OK br-arm-cortex-m4-full [ 8/47]: SKIPPED br-arm-full [ 9/47]: OK br-arm-full-nothread [10/47]: OK br-arm-full-static [11/47]: OK br-bfin-full [12/47]: SKIPPED br-i386-pentium4-full [13/47]: OK br-i386-pentium-mmx-musl [14/47]: OK br-m68k-5208-full [15/47]: SKIPPED br-m68k-68040-full [16/47]: OK br-microblazeel-full [17/47]: OK br-mips32r6-el-hf-glibc [18/47]: OK br-mips64-n64-full [19/47]: OK br-mips64r6-el-hf-glibc [20/47]: OK br-mipsel-o32-full [21/47]: OK br-nios2-glibc [22/47]: OK br-openrisc-uclibc [23/47]: OK br-powerpc-603e-basic-cpp [24/47]: OK br-powerpc64le-power8-glibc [25/47]: OK br-powerpc64-power7-glibc [26/47]: OK br-powerpc-e500mc-full [27/47]: OK br-sh4-full [28/47]: OK br-sparc64-glibc [29/47]: OK br-sparc-uclibc [30/47]: OK br-x86-64-core2-full [31/47]: OK br-x86-64-musl [32/47]: OK br-xtensa-full [33/47]: OK i686-ctng-linux-gnu [34/47]: OK linaro-aarch64 [35/47]: OK linaro-arm [36/47]: OK mips64el-ctng_n32-linux-gnu [37/47]: OK mips64el-ctng_n64-linux-gnu [38/47]: OK powerpc-ctng_e500v2-linux-gnuspe [39/47]: OK sourcery-arm-armv4t [40/47]: OK sourcery-arm [41/47]: OK sourcery-arm-thumb2 [42/47]: OK sourcery-mips64 [43/47]: OK sourcery-mips [44/47]: OK sourcery-nios2 [45/47]: OK sourcery-x86-64 [46/47]: OK x86_64-ctng_locales-linux-gnu [47/47]: OK 47 builds, 3 skipped, 0 build failed, 0 legal-info failed Signed-off-by: Julien BOIBESSOT <julien.boibessot@armadeus.com> [Thomas: fix license.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-04 14:54:09 +02:00
ABOOTIMG_LICENSE = GPL-2.0+
ABOOTIMG_LICENSE_FILES = LICENSE
# depends on libblkid from util-linux
ABOOTIMG_DEPENDENCIES = util-linux
HOST_ABOOTIMG_DEPENDENCIES = host-util-linux
abootimg: new package This tool might be useful on Android devices modded with Buildroot. Indeed it allows to modify Android Boot Image partition directly from running rootfs and so let the user free to keep Android stuff on his device (mainly bootloader) while testing/using Buildroot kernel/rootfs. For example, one can modify kernel cmdline on Boot Image partition and tell Android bootloader to launch kernel with a given rootfs fitted with BR instead of Android's one. Build-tested with ./utils/test-pkg -p abootimg -c config.abootimg -a with config.abootimg containing: BR2_USE_MMU=y BR2_PACKAGE_ABOOTIMG=y BR2_PACKAGE_UTIL_LINUX=y BR2_PACKAGE_UTIL_LINUX_LIBBLKID=y armv5-ctng-linux-gnueabi [ 1/47]: OK armv7-ctng-linux-gnueabihf [ 2/47]: OK br-aarch64-glibc [ 3/47]: OK br-arcle-hs38 [ 4/47]: OK br-arm-basic [ 5/47]: OK br-arm-cortex-a9-glibc [ 6/47]: OK br-arm-cortex-a9-musl [ 7/47]: OK br-arm-cortex-m4-full [ 8/47]: SKIPPED br-arm-full [ 9/47]: OK br-arm-full-nothread [10/47]: OK br-arm-full-static [11/47]: OK br-bfin-full [12/47]: SKIPPED br-i386-pentium4-full [13/47]: OK br-i386-pentium-mmx-musl [14/47]: OK br-m68k-5208-full [15/47]: SKIPPED br-m68k-68040-full [16/47]: OK br-microblazeel-full [17/47]: OK br-mips32r6-el-hf-glibc [18/47]: OK br-mips64-n64-full [19/47]: OK br-mips64r6-el-hf-glibc [20/47]: OK br-mipsel-o32-full [21/47]: OK br-nios2-glibc [22/47]: OK br-openrisc-uclibc [23/47]: OK br-powerpc-603e-basic-cpp [24/47]: OK br-powerpc64le-power8-glibc [25/47]: OK br-powerpc64-power7-glibc [26/47]: OK br-powerpc-e500mc-full [27/47]: OK br-sh4-full [28/47]: OK br-sparc64-glibc [29/47]: OK br-sparc-uclibc [30/47]: OK br-x86-64-core2-full [31/47]: OK br-x86-64-musl [32/47]: OK br-xtensa-full [33/47]: OK i686-ctng-linux-gnu [34/47]: OK linaro-aarch64 [35/47]: OK linaro-arm [36/47]: OK mips64el-ctng_n32-linux-gnu [37/47]: OK mips64el-ctng_n64-linux-gnu [38/47]: OK powerpc-ctng_e500v2-linux-gnuspe [39/47]: OK sourcery-arm-armv4t [40/47]: OK sourcery-arm [41/47]: OK sourcery-arm-thumb2 [42/47]: OK sourcery-mips64 [43/47]: OK sourcery-mips [44/47]: OK sourcery-nios2 [45/47]: OK sourcery-x86-64 [46/47]: OK x86_64-ctng_locales-linux-gnu [47/47]: OK 47 builds, 3 skipped, 0 build failed, 0 legal-info failed Signed-off-by: Julien BOIBESSOT <julien.boibessot@armadeus.com> [Thomas: fix license.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-04 14:54:09 +02:00
define ABOOTIMG_BUILD_CMDS
$(TARGET_MAKE_ENV) $(MAKE) $(TARGET_CONFIGURE_OPTS) -C $(@D)
endef
define ABOOTIMG_INSTALL_TARGET_CMDS
$(INSTALL) -m 0755 $(@D)/abootimg $(TARGET_DIR)/usr/bin/abootimg
endef
define HOST_ABOOTIMG_BUILD_CMDS
$(MAKE) $(HOST_CONFIGURE_OPTS) -C $(@D)
endef
define HOST_ABOOTIMG_INSTALL_CMDS
pacakge: drop remnants of $(HOST_DIR)/usr It's been ages (5 years at the next release) that we've not installed host packages in $(HOST_DIR)/usr, but we still have a few packages that reference it or install things in there. Drop all of those in one fell swoop. The run-time test still succeeds, and the following defconfig, which should exercise all touched packages [*], does build: BR2_x86_i686=y BR2_TOOLCHAIN_EXTERNAL=y BR2_INIT_NONE=y BR2_SYSTEM_BIN_SH_NONE=y # BR2_PACKAGE_BUSYBOX is not set BR2_PACKAGE_GAWK=y BR2_PACKAGE_GETTEXT=y BR2_PACKAGE_ABOOTIMG=y BR2_PACKAGE_DBUS_PYTHON=y BR2_PACKAGE_OLA=y BR2_PACKAGE_JIMTCL=y BR2_PACKAGE_LUA=y # BR2_PACKAGE_LUA_32BITS is not set BR2_PACKAGE_ARGPARSE=y BR2_PACKAGE_PERL=y BR2_PACKAGE_PHP=y BR2_PACKAGE_PHP_APCU=y BR2_PACKAGE_PHP_LUA=y BR2_PACKAGE_PHP_PAM=y BR2_PACKAGE_PHP_PECL_DBUS=y BR2_PACKAGE_PYTHON3=y BR2_PACKAGE_PYTHON_CRYPTOGRAPHY=y BR2_PACKAGE_PYTHON_PLY=y BR2_PACKAGE_PYTHON_PYBIND=y BR2_PACKAGE_LIBVA=y BR2_PACKAGE_BIND=y BR2_PACKAGE_BIND_SERVER=y BR2_PACKAGE_BIND_TOOLS=y BR2_PACKAGE_APPARMOR=y BR2_PACKAGE_APPARMOR_BINUTILS=y BR2_PACKAGE_APPARMOR_UTILS=y BR2_PACKAGE_APPARMOR_UTILS_EXTRA=y BR2_PACKAGE_APPARMOR_PROFILES=y BR2_PACKAGE_REFPOLICY=y BR2_PACKAGE_URANDOM_SCRIPTS=y BR2_PACKAGE_BASH=y # embiggen-disk to exercise go BR2_PACKAGE_EMBIGGEN_DISK=y BR2_TARGET_GRUB2=y BR2_TARGET_GRUB2_I386_PC=y BR2_TARGET_GRUB2_I386_EFI=y [*] exceptions: - zfs was not tested: it needs a kernel to be built; - compiler-rt was not tsted: it needs llvm to be built, that takes ages, and other packages already reference the correct location for llvm-config, so it was assumed that is OK. Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr> Cc: Angelo Compagnucci <angelo.compagnucci@gmail.com> Cc: Anisse Astier <anisse@astier.eu> Cc: Antoine Tenart <atenart@kernel.org> Cc: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be> Cc: Asaf Kahlon <asafka7@gmail.com> Cc: Bernd Kuhls <bernd.kuhls@t-online.de> Cc: Christian Stewart <christian@paral.in> Cc: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar> Cc: Francois Perrad <francois.perrad@gadz.org> Cc: Guillaume William Brs <guillaume.bressaix@gmail.com> Cc: Hervé Codina <herve.codina@bootlin.com> Cc: James Hilliard <james.hilliard1@gmail.com> Cc: José Luis Salvador Rufo <salvador.joseluis@gmail.com> Cc: Julien Boibessot <julien.boibessot@armadeus.com> Cc: Julien Olivain <ju.o@free.fr> Cc: Matt Weber <matthew.weber@collins.com> Cc: Nicolas Carrier <nicolas.carrier@orolia.com> Cc: Peter Korsgaard <peter@korsgaard.com> Cc: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Cc: Vadim Kochan <vadim4j@gmail.com> Cc: Yegor Yefremov <yegorslists@googlemail.com> Reviewed-by: Romain Naour <romain.naour@smile.fr> --- Changes v1 -> v2: - fix new instance that have crept in (Romain)
2022-07-16 23:04:49 +02:00
$(INSTALL) -m 0755 $(@D)/abootimg $(HOST_DIR)/bin/abootimg
endef
abootimg: new package This tool might be useful on Android devices modded with Buildroot. Indeed it allows to modify Android Boot Image partition directly from running rootfs and so let the user free to keep Android stuff on his device (mainly bootloader) while testing/using Buildroot kernel/rootfs. For example, one can modify kernel cmdline on Boot Image partition and tell Android bootloader to launch kernel with a given rootfs fitted with BR instead of Android's one. Build-tested with ./utils/test-pkg -p abootimg -c config.abootimg -a with config.abootimg containing: BR2_USE_MMU=y BR2_PACKAGE_ABOOTIMG=y BR2_PACKAGE_UTIL_LINUX=y BR2_PACKAGE_UTIL_LINUX_LIBBLKID=y armv5-ctng-linux-gnueabi [ 1/47]: OK armv7-ctng-linux-gnueabihf [ 2/47]: OK br-aarch64-glibc [ 3/47]: OK br-arcle-hs38 [ 4/47]: OK br-arm-basic [ 5/47]: OK br-arm-cortex-a9-glibc [ 6/47]: OK br-arm-cortex-a9-musl [ 7/47]: OK br-arm-cortex-m4-full [ 8/47]: SKIPPED br-arm-full [ 9/47]: OK br-arm-full-nothread [10/47]: OK br-arm-full-static [11/47]: OK br-bfin-full [12/47]: SKIPPED br-i386-pentium4-full [13/47]: OK br-i386-pentium-mmx-musl [14/47]: OK br-m68k-5208-full [15/47]: SKIPPED br-m68k-68040-full [16/47]: OK br-microblazeel-full [17/47]: OK br-mips32r6-el-hf-glibc [18/47]: OK br-mips64-n64-full [19/47]: OK br-mips64r6-el-hf-glibc [20/47]: OK br-mipsel-o32-full [21/47]: OK br-nios2-glibc [22/47]: OK br-openrisc-uclibc [23/47]: OK br-powerpc-603e-basic-cpp [24/47]: OK br-powerpc64le-power8-glibc [25/47]: OK br-powerpc64-power7-glibc [26/47]: OK br-powerpc-e500mc-full [27/47]: OK br-sh4-full [28/47]: OK br-sparc64-glibc [29/47]: OK br-sparc-uclibc [30/47]: OK br-x86-64-core2-full [31/47]: OK br-x86-64-musl [32/47]: OK br-xtensa-full [33/47]: OK i686-ctng-linux-gnu [34/47]: OK linaro-aarch64 [35/47]: OK linaro-arm [36/47]: OK mips64el-ctng_n32-linux-gnu [37/47]: OK mips64el-ctng_n64-linux-gnu [38/47]: OK powerpc-ctng_e500v2-linux-gnuspe [39/47]: OK sourcery-arm-armv4t [40/47]: OK sourcery-arm [41/47]: OK sourcery-arm-thumb2 [42/47]: OK sourcery-mips64 [43/47]: OK sourcery-mips [44/47]: OK sourcery-nios2 [45/47]: OK sourcery-x86-64 [46/47]: OK x86_64-ctng_locales-linux-gnu [47/47]: OK 47 builds, 3 skipped, 0 build failed, 0 legal-info failed Signed-off-by: Julien BOIBESSOT <julien.boibessot@armadeus.com> [Thomas: fix license.] Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
2018-04-04 14:54:09 +02:00
$(eval $(generic-package))
$(eval $(host-generic-package))