From patchwork Fri Sep 5 21:23:13 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 23 Return-Path: X-Original-To: u-boot-concept@u-boot.org Delivered-To: u-boot-concept@u-boot.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757107421; bh=tjMX0MCImw4t81abpc8BHPqAVGihl8pzpCk7PpASqbc=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=dJRaR4yZNaruOvdZUbTJHP2vMwglIzYta2VhlLQ5s+eifTxd1EsE+l8fdMoMRGT7o Q5l9eUEiWVOCUq+DOdBJ2IPccsh5z3Qv8iT1k8w6f37rRLAr+oR6q5Xk3RLekvTQTM mQHuZOJou/KDH/Q39ZgjJ72Q1XeNJr+0afaxxQ4e92ovCIAeHvBt9CAZR5caXp95Mn k6S66SU0IZStV83ca0pk83OWdWlAaJ5lP1u6c4LFCS8GThJQPEf/ReYj3ig7WZfU/j Qctt4bK4wW3EUeQUlDt3cXYnx6Pt6qKvlXy210j0KJiH3QXax/6uVO/usMCVgGv1fW tGDudN5aQl2NA== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 9A878679BF for ; Fri, 5 Sep 2025 15:23:41 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10024) with ESMTP id tOwbUcT2O4I8 for ; Fri, 5 Sep 2025 15:23:41 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757107421; bh=tjMX0MCImw4t81abpc8BHPqAVGihl8pzpCk7PpASqbc=; h=From:To:Date:CC:Subject:List-Id:List-Archive:List-Help:List-Owner: List-Post:List-Subscribe:List-Unsubscribe:From; b=dJRaR4yZNaruOvdZUbTJHP2vMwglIzYta2VhlLQ5s+eifTxd1EsE+l8fdMoMRGT7o Q5l9eUEiWVOCUq+DOdBJ2IPccsh5z3Qv8iT1k8w6f37rRLAr+oR6q5Xk3RLekvTQTM mQHuZOJou/KDH/Q39ZgjJ72Q1XeNJr+0afaxxQ4e92ovCIAeHvBt9CAZR5caXp95Mn k6S66SU0IZStV83ca0pk83OWdWlAaJ5lP1u6c4LFCS8GThJQPEf/ReYj3ig7WZfU/j Qctt4bK4wW3EUeQUlDt3cXYnx6Pt6qKvlXy210j0KJiH3QXax/6uVO/usMCVgGv1fW tGDudN5aQl2NA== Received: from mail.u-boot.org (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 85DC667900 for ; Fri, 5 Sep 2025 15:23:41 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757107420; bh=kXWwJKkodS2vXVfeTmFH+piyhaM2+HQdbilLsnmJmPQ=; h=From:To:Cc:Subject:Date:From; b=JUJJ27yNGre9bASqHW5lGPf5yg9W/txnC0YehexvzdF5w2Zyo638pJFZ+mtwaC5l9 Z5AWw3/ngVDSA9UtdSKufCIOvRt1EkoDC55IhQX9N/hz12+cy0PQXnQQocgFkiSPTM IuF45MJGPcbtrTxlKrX8zp5uBw/EMor9ajFDOIRUi0hrrssNl448KCkWRyJ4Bcw6et oAmmJaprhtqD3NnWGizqME0nFiK0WDwkJtLrp7+rNhIhGgsFECmxgmwZCPE8lGWYDO fgoAR06BnK1+NqRr1UHbLux32G41jSoHC2ZXoig4jD5ua4SogvEFlUIiIeG5KuEqOP jaDFuHOxm8X5Q== Received: from localhost (localhost [127.0.0.1]) by mail.u-boot.org (Postfix) with ESMTP id 178AE6794B; Fri, 5 Sep 2025 15:23:40 -0600 (MDT) X-Virus-Scanned: Debian amavis at Received: from mail.u-boot.org ([127.0.0.1]) by localhost (mail.u-boot.org [127.0.0.1]) (amavis, port 10026) with ESMTP id 1lFWv_4x3kuo; Fri, 5 Sep 2025 15:23:40 -0600 (MDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=u-boot.org; s=default; t=1757107419; bh=hFqqjjJ+lhFYv3Cp2nqKzqINyrSxMJ7zAgHAQVvtXAo=; h=From:To:Cc:Subject:Date:From; b=KUODwFBFuYMJRXBjIEWZf6PEMzZyoQxvrnD2BhtsbyWZH2p0w5rgrJFB2VAFqGeui PhL5kGAX6wfbG4Yt4YHmQwAZ/WXMJHft0otGXzh6bXughRut9dQ7ppX412XCc8l6Da Pi3WYpQXSIuAVBRr0BZfybaxBeCkpe8zUXunFbifOirJg0hriH92qGcCB0+Lt7ZGUT Gtt05r9AeNNX2upjDidcpN4/w9CHWNe7CB8aVK0HkkfLucEZQZTbaTRinoGMfm7g3U L4l2yN4vdTBRnLDsyen3cCyB5D6eFH5K05p7NG3ejU920qAT8IFmDYB7d0dfrxad7P DbIk6ulp4QJyQ== Received: from u-boot.org (unknown [73.34.74.121]) by mail.u-boot.org (Postfix) with ESMTPSA id 9193867900; Fri, 5 Sep 2025 15:23:39 -0600 (MDT) From: Simon Glass To: U-Boot Concept Date: Fri, 5 Sep 2025 15:23:13 -0600 Message-ID: <20250905212330.354827-1-sjg@u-boot.org> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Message-ID-Hash: K2B6XGGZS5BDXRT2GRQDY2IHA65XGPPF X-Message-ID-Hash: K2B6XGGZS5BDXRT2GRQDY2IHA65XGPPF X-MailFrom: sjg@u-boot.org X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; loop; banned-address; emergency; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: Simon Glass X-Mailman-Version: 3.3.10 Precedence: list Subject: [Concept] [PATCH 00/10] ulib: Provide examples for building outside the tree List-Id: Discussion and patches related to U-Boot Concept Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: From: Simon Glass The ulib tests are built within the U-Boot build system, so make use of various settings which are provided. When using ulib outside the U-Boot tree (and outside its build environment), things are a little more tricky. This series provides a few simple examples to illustrate how to make it work. An example Makefile is provided as well. The same Makefile is used from CI just to ensure that it continues to work as expected. Simon Glass (10): CI: Tidy up the template for the 'make check' items sandbox: Make use of PLATFORM_LIBS for ulib_test Kconfig: Split the EXAMPLES option into its own file Kconfig: Provide an option for the standalone directory sandbox: Avoid use of ulong in os.h examples: Allow compilation of examples on sandbox sandbox: Enable building examples ulib: Provide an example of how to build with ulib CI: ulib: Test building examples separately doc: ulib: Provide some documentation on the ulib examples .gitlab-ci.yml | 26 +++++++++++++- Kconfig | 2 ++ Makefile | 19 +++++++++- configs/sandbox_defconfig | 1 + doc/develop/ulib.rst | 3 ++ examples/Kconfig | 19 ++++++++++ examples/Makefile | 2 +- examples/ulib/Makefile | 73 ++++++++++++++++++++++++++++++++++++++ examples/ulib/README | 74 +++++++++++++++++++++++++++++++++++++++ examples/ulib/demo.c | 61 ++++++++++++++++++++++++++++++++ examples/ulib/static.lds | 19 ++++++++++ include/os.h | 2 +- legacy_api/Kconfig | 8 ----- 13 files changed, 297 insertions(+), 12 deletions(-) create mode 100644 examples/Kconfig create mode 100644 examples/ulib/Makefile create mode 100644 examples/ulib/README create mode 100644 examples/ulib/demo.c create mode 100644 examples/ulib/static.lds