Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 69E12C433F5 for ; Wed, 23 Feb 2022 19:02:54 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 06CC160FC4; Wed, 23 Feb 2022 19:02:54 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 6RBMLnQw7a01; Wed, 23 Feb 2022 19:02:53 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 1E79D60FC2; Wed, 23 Feb 2022 19:02:52 +0000 (UTC) Received: from smtp4.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 2EF8C1BF5F5 for ; Wed, 23 Feb 2022 19:02:50 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp4.osuosl.org (Postfix) with ESMTP id 16C3A415FD for ; Wed, 23 Feb 2022 19:02:50 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp4.osuosl.org ([127.0.0.1]) by localhost (smtp4.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id lYudR10UuDQR for ; Wed, 23 Feb 2022 19:02:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.8.0 Received: from serv15.avernis.de (serv15.avernis.de [176.9.89.163]) by smtp4.osuosl.org (Postfix) with ESMTPS id 7D1C8415FB for ; Wed, 23 Feb 2022 19:02:48 +0000 (UTC) Received: from webmail.serv15.avernis.de (ip6-localhost [IPv6:::1]) by serv15.avernis.de (Postfix) with ESMTPSA id 332FACD2261B; Wed, 23 Feb 2022 20:02:46 +0100 (CET) MIME-Version: 1.0 Date: Wed, 23 Feb 2022 19:02:46 +0000 From: Andreas Ziegler To: William Tambe In-Reply-To: References: <256f0da3b8d983a84ea84de250c56bb0@umbiko.net> Message-ID: <5ecd33a2418e1a181df7444064c8050b@umbiko.net> X-Sender: br015@umbiko.net X-Virus-Scanned: clamav-milter 0.103.5 at serv15.avernis.de X-Virus-Status: Clean Subject: Re: [Buildroot] STAGING_DIR does not contain executables found in TARGET_DIR X-BeenThere: buildroot@buildroot.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Buildroot Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: buildroot-bounces@buildroot.org Sender: "buildroot" On 2022-02-23 18:29, William Tambe wrote: > On Wed, Feb 23, 2022 at 5:30 AM Andreas Ziegler > wrote: >> >> Hi William, >> >> On 2022-02-23 07:11, William Tambe wrote: >> >> > Please help determining why STAGING_DIR does not contain executables >> > found in TARGET_DIR ? >> > >> > I am expecting to find debug version of all executables in TARGET_DIR, >> > but executables such as /bin/busybox are missing from STAGING_DIR . >> >> If you look at your packages' definition (.mk) files, you will find a >> few with *_INSTALL_STAGING = YES. This is responsible for the >> (additional) installation in STAGING_DIR. The reason for this is that >> some packages need to provide information during the build process, >> that >> is not needed later for operation on the target. To save space on the >> target system, a two-stage approach is used. >> >> Example: your configuration includes zlib-ng: the library itself is >> present both in STAGING_DIR and in TARGET_DIR, header and >> ldconfig-related files will be found in STAGING_DIR only. On the >> other >> hand, Busybox is not referenced by other packages (it does not export >> any interfaces), so it does not have an installation in STAGING_DIR. >> > > Is there a temporary hack I could use to have a `bin/busybox` in > STAGING_DIR ? You might try to just enable BUSYBOX_INSTALL_STAGING = YES, but it will probably also need definition of BUSYBOX_INSTALL_STAGING_CMDS. Another option would be a post-install hook: define BUSYBOX_INSTALL_STAGING $(INSTALL) -m 0755 &(@D)/busybox_unstripped $(STAGING_DIR)/bin/busybox endef BUSYBOX_POST_INSTALL_TARGET_HOOKS += BUSYBOX_INSTALL_STAGING >> Your target binaries will be stripped of symbols, unless you prevent >> this via BR2_STRIP_EXCLUDE_{FILE, DIRS} ... >> >> Remote debugging has less impact on your target installation. For this >> you would need BR2_PACKAGE_HOST_GDB and BR2_PACKAGE_GDB_SERVER [1]. >> >> Kind regards, >> Andreas >> >> > I am using 2021.08.3 >> > >> > Full config is as follow >> > ``` >> > BR2_pu32=y >> > BR2_ENABLE_DEBUG=y >> > BR2_DEBUG_3=y >> > BR2_STATIC_LIBS=y >> > BR2_FORTIFY_SOURCE_NONE=y >> > BR2_TOOLCHAIN_EXTERNAL=y >> > BR2_TOOLCHAIN_EXTERNAL_PATH="/opt/pu32-toolchain/" >> > BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="$(ARCH)-elf" >> > BR2_TOOLCHAIN_EXTERNAL_HEADERS_5_5=y >> > BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y >> > # BR2_TOOLCHAIN_EXTERNAL_HAS_SSP is not set >> > # BR2_TOOLCHAIN_EXTERNAL_INET_RPC is not set >> > BR2_TOOLCHAIN_EXTERNAL_CXX=y >> > BR2_TARGET_GENERIC_ISSUE="" >> > BR2_ROOTFS_MERGED_USR=y >> > BR2_TARGET_GENERIC_ROOT_PASSWD="root" >> > BR2_SYSTEM_BIN_SH_BASH=y >> > BR2_TARGET_GENERIC_GETTY_TERM="linux" >> > BR2_TARGET_GENERIC_GETTY_OPTIONS="-n -l /bin/-bash" >> > BR2_PACKAGE_BUSYBOX_SHOW_OTHERS=y >> > BR2_PACKAGE_GDB=y >> > BR2_PACKAGE_ZLIB=y >> > BR2_PACKAGE_ZLIB_NG=y >> > BR2_PACKAGE_DHCP=y >> > BR2_PACKAGE_DHCP_CLIENT=y >> > BR2_PACKAGE_IPROUTE2=y >> > BR2_PACKAGE_LRZSZ=y >> > BR2_PACKAGE_SOCAT=y >> > BR2_PACKAGE_HTOP=y >> > BR2_PACKAGE_NANO=y >> > # BR2_PACKAGE_NANO_TINY is not set >> > BR2_TARGET_ROOTFS_EXT2=y >> > BR2_TARGET_ROOTFS_EXT2_4=y >> > BR2_TARGET_ROOTFS_EXT2_SIZE="64M" >> > # BR2_TARGET_ROOTFS_TAR is not set >> > ``` >> >> [1] >> https://sourceware.org/gdb/current/onlinedocs/gdb/Server.html#Server _______________________________________________ buildroot mailing list buildroot@buildroot.org https://lists.buildroot.org/mailman/listinfo/buildroot