From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from shymkent.ilbers.de ([unix socket]) by shymkent (Cyrus 2.5.10-Debian-2.5.10-3+deb9u2) with LMTPA; Wed, 08 Jan 2025 08:46:30 +0100 X-Sieve: CMU Sieve 2.4 Received: from mail-wr1-f58.google.com (mail-wr1-f58.google.com [209.85.221.58]) by shymkent.ilbers.de (8.15.2/8.15.2/Debian-8+deb9u1) with ESMTPS id 5087kTlB018840 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 8 Jan 2025 08:46:29 +0100 Received: by mail-wr1-f58.google.com with SMTP id ffacd0b85a97d-385ed79291esf247718f8f.0 for ; Tue, 07 Jan 2025 23:46:29 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1736322384; cv=pass; d=google.com; s=arc-20240605; b=k7P1te0OO02n84ssPN6WkbD9nH3Str4ed/vdPbWiTSYAxkWTaCVaWmxfXPz8LQ/qHz c7LgDiSZAZMq+oMQ/g4JlpA5IXAU7BenE7S+rTrueDAYAR1doNrvMMADFY9Wavy/bs73 YTgdR7X9c5d2WdW60aZ5egKzqRroOjiqWhFRqgBCckx/dAqdn9d9GSHv6OAXEzvGsxFg xiU8SroRG9L1N9hfkOLsTalccFWtfQo1M67kGbAlhYipTGIi941z0JxYeM9cX67Dp+Ak LyPfiKOUpCz3F7aU19P5Yt/jbbYJuhIfIorN5cVHKmSOZUwmdAcvwY1NxV/Mlkj9Wt2x yttA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:mime-version :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:to:from:sender:dkim-signature; bh=f17ajLkGUI0/Q/ARZ/HygEkJb1pLmt61VrCjTgP7+u8=; fh=9XixPsblVQxAM6AASwW3M2JrM1xZCQgJ3OQ9dGrcSPc=; b=dACBFFXeH3HdwM+qLl3P0Cm2iL4gfLKKLaeDNHqs7nX2LYVw7LyzbmrLDlhLImdFrU nZTV68mQ6aMWarzn34QsrrOhyRFQ/RC4vt81IhvaJb2zhSFxAWAUxo+GVHp8SIN9pKV7 8jQ0VR+6g47yoQEVPO2z+nFuadI7NC1WZb+fmJJOlf62Fr1Q+EmnsSKVsMMHGJOhBDQR Fzr2cCQ2UQCPrCmF8ChT7MzaudFjZO9N1Us3glV1wQbbWj4N+jWd2y4IkpALeUrp+W1M KeznmnTUUdBO52k627Ad2KTtYD3OiyMOjSZ9w5FbfWiByOgZjp3i88nT5q8oIYzgaN/l OX8Q==; darn=ilbers.de ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@kumkeo.de header.s=bcsel2403 header.b=yh0g5yuK; spf=pass (google.com: domain of ulrich.teichert@kumkeo.de designates 91.102.8.55 as permitted sender) smtp.mailfrom=ulrich.teichert@kumkeo.de DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1736322384; x=1736927184; darn=ilbers.de; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:from:sender:from:to:cc :subject:date:message-id:reply-to; bh=f17ajLkGUI0/Q/ARZ/HygEkJb1pLmt61VrCjTgP7+u8=; b=ICAHJCL7dsMVmyeu0bt6F5T6fFxyfbQ8zJPh2nO70+n5m3UPkrJR/FBwIitKYHN6b9 2MSruCOL7n/9glEWyUVV5vMowX+6nsToeFwRoiw/1BDtYeuxfd58w0bjjt/qjI6gPDef nrhRWEY6MEUSMRTpT8D8fQSn/2a3uZ7jMDCO7iZjk/uk1E2xezPklQMfkj5cCDkgYdCd HQ4GI82zaEfID9+z74ld1PLIwZGr2eu4NVIJpyVEffBHWTmgZD17SM74W3P30glS5dB1 pj7axXuPW0ITrycTJ9l1SvhwZaBSaGbdu4mCowl+JbmICBu1MH4vkGy3p3hZPSL/5T7i jjlw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1736322384; x=1736927184; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :content-transfer-encoding:content-language:accept-language :in-reply-to:references:message-id:date:thread-index:thread-topic :subject:to:from:x-beenthere:x-gm-message-state:sender:from:to:cc :subject:date:message-id:reply-to; bh=f17ajLkGUI0/Q/ARZ/HygEkJb1pLmt61VrCjTgP7+u8=; b=MU7goXnMR0SHURrLhe56dcakSytJPG0P7bNf8NDnB9Wcym5ZpDlY/B999zgdKZxJGz d1kNJocwK747v4UL16FTt7OAek2nyNovBOfmYuGQjA9iM2LOsKkuXHQ6sXpzKbxdPHzd NBzCBT7/JlwW2kaXb51L31VRq0Yv7825M+eexhZqx8OM4wmf4I9Ute8pltqjzNVCOHrs TFaRGZqhigbGzT/Sg1Ej3whHV7JBdCavM990qMW8DnTompun+QH+NQUzEeWDhW0tSTey 1FbUbT3SkY1LuKUTKbraVkrj5ZI7OoYEINFUXSWv6NswJ86gk35FLW8AfvH4lHEoaqDl w+3A== Sender: isar-users@googlegroups.com X-Forwarded-Encrypted: i=2; AJvYcCWBxP/CcnXCTw10fGCoH4IbJ9jRhBQkLgZbdzl3852Ixw3+sidgfMeoJJMrkI2TN5VcCAhF@ilbers.de X-Gm-Message-State: AOJu0YyXfElZlK+ZV5+vJT+aG8lHe5+w/G/vw3ONI5fVcPsKFQ6rN2pN n1kT22j2OC/jxY31+0hqpLfjxLrbOU4I1eiAcFGD3uRdqkj0Jy2R X-Google-Smtp-Source: AGHT+IEVgu/Vof1A49Rhr7Gq39GI+pWSzccDgivy/0uGs3RklYtqNFBqspbKsdVYKtvJMw8lIcE9ZQ== X-Received: by 2002:a5d:5889:0:b0:386:4570:ee3d with SMTP id ffacd0b85a97d-38a85f4ef53mr1441607f8f.24.1736322383332; Tue, 07 Jan 2025 23:46:23 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:adf:e307:0:b0:382:47d1:570c with SMTP id ffacd0b85a97d-38a19fbc5bels1954198f8f.2.-pod-prod-00-eu; Tue, 07 Jan 2025 23:46:21 -0800 (PST) X-Forwarded-Encrypted: i=2; AJvYcCVHlItXQ0jzoLzxoaMA1HHnuwcOedqXo993B9XLSUZVk/i44PUk7fVBkzG7QLpqsnV5UbTMMIEzdzbo@googlegroups.com X-Received: by 2002:a05:6000:1faf:b0:385:e8e7:d09a with SMTP id ffacd0b85a97d-38a85e1f0afmr1657167f8f.2.1736322381144; Tue, 07 Jan 2025 23:46:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1736322381; cv=none; d=google.com; s=arc-20240605; b=c+1maV/Ejnqq1xMxBu4mGuYajo2VuV25U6AEKBTk8lJWDO0kRSMoOk8VDXTbI5XVC7 3zgV+E4KDh7HeVW8GRMrP0/k8kdH0NEviL8CsevCgSFKf6nqBLdF2k8SznzgoFU+e/wr Qg9eY0YlwKw17WWBJMue8v5XFBZGoDW3oCR4giJ2E1KtaNJT0Oiez/h8ELu8dQxayLR0 KBwYGTX2nCmJq8egFO08RZ8m9FxEH5Sq+Ec/yWkGb7VV7/YoXvD74EVxho73r+eVkjHt OAykLONvgvdMMyxE/W2E/RQKpP6ovVIPE4iQPnboUIBZvINhpS6q93/ry4vIaNiAsYkY wTWA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=dkim-signature:mime-version:content-transfer-encoding :content-language:accept-language:in-reply-to:references:message-id :date:thread-index:thread-topic:subject:to:from; bh=dSyPl5u2I/kiCG+n4XALIAdo4BHSnT7zyUiWTx0kfy4=; fh=V9jB6soHA/lRywQTeusxrrog21CPfvwFwIm2bMAZJYA=; b=gfT06JFB66/TSapeSxPmbjJuQ+ikXiZ4gfFY2EPIzBFSBQ2lXE72o5hYkZvj63GUSN 7Zgbic0ouYOZajMvaWjc8swuW7Z/ZtHD5NnBHw/sGOdFZncfoL1Zp050H3zB3onZcJBo lkEc3Xzm0wA8xeaPxIDZ/TABkXrOSDK+K0YXlTWc8DoNZOCW0huVGFaMhsxzRM9RiA28 qys+kd67QenhIa6edzOUQ8TratCzpn+6a5swenBlbAZ0OiodUbU5XyNt3sxYaF7E/qru 41nUKXoLBLpxJdiq76QdUnv9GTdLBRZRQQLkLPYXTH5RmBg0JxOSxZusaxHgxJDPSZQS +5Lg==; dara=google.com ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@kumkeo.de header.s=bcsel2403 header.b=yh0g5yuK; spf=pass (google.com: domain of ulrich.teichert@kumkeo.de designates 91.102.8.55 as permitted sender) smtp.mailfrom=ulrich.teichert@kumkeo.de Received: from mgw400.mail.berlinercloud.net (mgw400.mail.berlinercloud.net. [91.102.8.55]) by gmr-mx.google.com with ESMTPS id ffacd0b85a97d-38a1c82d909si1112739f8f.1.2025.01.07.23.46.21 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Jan 2025 23:46:21 -0800 (PST) Received-SPF: pass (google.com: domain of ulrich.teichert@kumkeo.de designates 91.102.8.55 as permitted sender) client-ip=91.102.8.55; X-TM-AS-ERS: 172.19.2.115-127.9.0.1 X-TM-AS-SMTP: 1.0 bWd3MzYwLm1haWwuYmVybGluZXJjbG91ZC5uZXQ= dWxyaWNoLnRlaWNoZ XJ0QGt1bWtlby5kZQ== X-DDEI-TLS-USAGE: Used Received: from mgw360.mail.berlinercloud.net (unknown [172.19.2.115]) by mgw400.mail.berlinercloud.net (Postfix) with ESMTPS; Wed, 8 Jan 2025 08:46:20 +0100 (CET) X-DDEI-TLS-USAGE: Used Received: from mail.kumkeo.de (unknown [172.19.2.2]) by mgw360.mail.berlinercloud.net (Postfix) with ESMTPS; Wed, 8 Jan 2025 08:46:20 +0100 (CET) Received: from kumex2.kumkeo.de (172.18.20.16) by kumex2.kumkeo.de (172.18.20.16) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.44; Wed, 8 Jan 2025 08:46:17 +0100 Received: from kumex2.kumkeo.de ([fe80::6572:2554:d711:1795]) by kumex2.kumkeo.de ([fe80::6572:2554:d711:1795%3]) with mapi id 15.01.2507.044; Wed, 8 Jan 2025 08:46:17 +0100 From: Ulrich Teichert To: Jan Kiszka , "isar-users@googlegroups.com" Subject: AW: Re: wic plugins, any documentation? Thread-Topic: Re: wic plugins, any documentation? Thread-Index: AQHbYRs4dnjF1aCQdk+gKFnVn+8/WbMLeTCAgAEAEVc= Date: Wed, 8 Jan 2025 07:46:17 +0000 Message-ID: References: <1167664383e9461a817771e1cdcd48e4@kumkeo.de>,<601d6d45-c47f-47e3-acad-28547eb7413e@siemens.com> In-Reply-To: <601d6d45-c47f-47e3-acad-28547eb7413e@siemens.com> Accept-Language: de-DE, en-US Content-Language: de-DE X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [185.228.242.37] x-tm-as-product-ver: SMEX-14.0.0.3223-9.1.2019-28910.006 x-tm-as-result: No-10--12.060800-8.000000 x-tm-as-user-approved-sender: No x-tm-as-user-blocked-sender: No x-tm-snts-smtp: CDEA7B058BB3BA94F3C3B724BA668C0E5B14564E6F26215CBFE7842AD693FDA82000:9 x-c2processedorg: c2164c60-77f9-4731-9233-294e5719f64e Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-DDEI-PROCESSED-RESULT: Safe X-TMASE-Version: DDEI-5.1-9.1.1004-28910.006 X-TMASE-Result: 10--11.779200-10.000000 X-TMASE-MatchedRID: hkJiwzpyxRtJJDuM6qazTqJVTu7sjgg1eF+F9LT9kRLiFxcREnURUrrS Q1e/t8FzMhVWNXhwRgqr+j+4oEDyyLzZbVU4OYk5nmYvjdGoUIw8ARZA5WQCauCbuVI7hVbLPzy fKfkc7AGkV52mAIXFpS1KtRlVMLIXZlGwrNw2yNaB381iZ59HqI5UafLmrvaGx8BJ7uScK23u7r iizwLPIe33HBFn8NUkXwDKK536p/J9fVx/eCbMOuY6WKvKEZZTrvmcharXeRVgPgeggVwCFm/RD AZTdSI3F9ryxoQYHt/FtYuDam42iw3NgVL679KbFwooSeuNnY4kXy0US052q3ROxyHvZdJs2l4M /dzaxYyX81JAaXNO9qM2AS1zeD/wlKuQnIa86B/knMSTG9lH+MnlJe2gk8vI2jYOydnA1Ibcy1e Bge37SzNn0ytsQ3ZDe1vGQLhjcdHCGcKEJ1R9Z5N65fjGjYMQSh4WkDzxuv6OYcolvJCWkATVQi JaEytT/XVOP8FVfqKu+xmJ/t0CV4FsgU5t/cgZgxsfzkNRlfLI+J/9cwnC0hIe1e0XhI6F9xS3m VzWUuCRTpSQiv9X7bRBGWsEXd5lShNb1j3Vf2uDCJutETrHctdvusNz7IpQUKNJoPoNEjMjA1GB aK4H1g== X-TMASE-SNAP-Result: 1.821001.0001-0-1-22:0,33:0,34:0-0 X-TMASE-INERTIA: 0-0;;;; X-TMASE-XGENCLOUD: c1404f92-8d1e-4b91-8112-5bcd3f8e812c-0-0-200-0 X-Original-Sender: ulrich.teichert@kumkeo.de X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@kumkeo.de header.s=bcsel2403 header.b=yh0g5yuK; spf=pass (google.com: domain of ulrich.teichert@kumkeo.de designates 91.102.8.55 as permitted sender) smtp.mailfrom=ulrich.teichert@kumkeo.de Precedence: list Mailing-list: list isar-users@googlegroups.com; contact isar-users+owners@googlegroups.com List-ID: X-Spam-Checked-In-Group: isar-users@googlegroups.com X-Google-Group-Id: 914930254986 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , X-Spam-Status: No, score=-4.6 required=5.0 tests=DKIMWL_WL_MED,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,RCVD_IN_DNSWL_BLOCKED,RCVD_IN_MSPIKE_H2, RCVD_IN_RP_CERTIFIED,RCVD_IN_RP_RNBL,RCVD_IN_RP_SAFE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.2 X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on shymkent.ilbers.de X-TUID: c6O9m4OTIV3E Hi Jan, >> I'm trying to write a wic plugin to generate a bootable partition for a = Xilinix zynqmp >> board. I've managed building the necessary infrastructure (bootgen) and = have the >> contents available for the python script. As far as I can tell all gets = assembled correctly, >> but it doesn't show up in the FAT partition (mounted as /boot on the tar= get). >Hmm, I created images for zynqmp before but didn't need that back then: > >https://github.com/siemens/jailhouse-images/blob/master/wic/ultra96.wks > >What does your plugin have to do differently? Perhaps it got too complicated - it's my first dip into wic: part /boot --source bootgen-partition --sourceparams "fsbl=3D/usr/lib/boot-= firmware/fsbl_a53.elf,pmu=3D/usr/lib/boot-firmware/pmufw.elf,armtfw=3D/usr/= lib/arm-trusted-firmware/zynqmp/bl31.elf,uboot_dir=3D/usr/lib/boot-firmware= /u-boot" --ondisk mmcblk0 --fstype=3Dvfat --label boot --active --align 409= 6 --size 100M part / --source rootfs --ondisk mmcblk0 --fstype=3Dext4 --mkfs-extraopts "-= T default" --label root --align 4096 --exclude-path=3Dboot --size 1G bootloader In the python script the extra source params are used to generate a BOOT.bi= n: import logging import os import types from importlib.machinery import SourceFileLoader from wic import WicError from wic.plugins.source.rootfs import RootfsPlugin from wic.misc import get_bitbake_var, exec_cmd logger =3D logging.getLogger('wic') class BootgenPlugin(RootfsPlugin): """ Create a boot.bin with bootgen, contents are at least the FSBL, the PMU and an U-BOOT FIT image on a FAT partition. """ name =3D 'bootgen-partition' @classmethod def do_prepare_partition(cls, part, source_params, creator, cr_workdir, oe_builddir, bootimg_dir, kernel_dir, rootfs_d= ir, native_sysroot): """ Called to do the actual content population for a partition i.e. it 'prepares' the partition to be incorporated into the image. """ logger.debug("bootgen-partition: do_prepare_partition: part: %s", p= art) # check for options which have to be set if source_params.get('fsbl', None) is None: raise WicError("bootgen-partition: fsbl source_param must be se= t.") if source_params.get('pmu', None) is None: raise WicError("bootgen-partition: pmu source_param must be set= .") if source_params.get('armtfw', None) is None: raise WicError("bootgen-partition: armtfw source_param must be = set.") if source_params.get('uboot_dir', None) is None: raise WicError("bootgen-partition: uboot_dir source_param must = be set.") # Prologue from RootfsPlugin.do_prepare_partition, retrieves the # rootfs directory if part.rootfs_dir is None: if not 'ROOTFS_DIR' in rootfs_dir: raise WicError("Couldn't find --rootfs-dir, exiting") rootfs_dir =3D rootfs_dir['ROOTFS_DIR'] else: if part.rootfs_dir in rootfs_dir: rootfs_dir =3D rootfs_dir[part.rootfs_dir] elif part.rootfs_dir: rootfs_dir =3D part.rootfs_dir else: raise WicError("Couldn't find --rootfs-dir=3D%s connection = or " "it is not a valid path, exiting" % part.roo= tfs_dir) if os.path.isdir(rootfs_dir): real_rootfs_dir =3D rootfs_dir else: image_rootfs_dir =3D get_bitbake_var("IMAGE_ROOTFS", rootfs_dir= ) if not os.path.isdir(image_rootfs_dir): raise WicError("No valid artifact IMAGE_ROOTFS from image " "named %s has been found at %s, exiting." % (rootfs_dir, image_rootfs_dir)) real_rootfs_dir =3D image_rootfs_dir root_dev =3D creator.rootdev if not root_dev: root_dev =3D source_params.get("root", None) if not root_dev: raise WicError("root not defined, exiting.") root_dev =3D root_dev.replace(":", "=3D") logger.warn("bootgen: root dev: %s, root fs: %s, build in %s, booti= mg_dir: %s", root_dev, real_rootfs_dir, cr_workdir, bootimg_dir) # copy all parts cp_cmd =3D "cp -a %s%s %s" % (real_rootfs_dir, source_params.get('f= sbl'), cr_workdir) exec_cmd(cp_cmd) cp_cmd =3D "cp -a %s%s %s" % (real_rootfs_dir, source_params.get('p= mu'), cr_workdir) exec_cmd(cp_cmd) cp_cmd =3D "cp -a %s%s %s" % (real_rootfs_dir, source_params.get('a= rmtfw'), cr_workdir) exec_cmd(cp_cmd) cp_cmd =3D "cp -a %s%s/u-boot.elf %s" % (real_rootfs_dir, source_pa= rams.get('uboot_dir'), cr_workdir) exec_cmd(cp_cmd) cp_cmd =3D "cp -a %s%s/uboot-env.txt %s" % (real_rootfs_dir, source= _params.get('uboot_dir'), cr_workdir) exec_cmd(cp_cmd) cp_cmd =3D "cp -a %s%s/boot.bif %s" % (real_rootfs_dir, source_para= ms.get('uboot_dir'), cr_workdir) exec_cmd(cp_cmd) bootgen_cmd =3D "cd %s && bootgen -arch zynqmp -image boot.bif -o B= OOT.bin" % (cr_workdir) exec_cmd(bootgen_cmd, True) # we need to create the VFAT image bootimg =3D "%s/boot.img" % cr_workdir label =3D part.label if part.label else "boot" dosfs_cmd =3D "mkfs.fat -n %s -i %s -C %s %d" % \ (label, part.fsuuid, bootimg, part.size) exec_cmd(dosfs_cmd) du_cmd =3D "du -Lbks %s" % bootimg out =3D exec_cmd(du_cmd) bootimg_size =3D out.split()[0] part.size =3D int(bootimg_size) part.source_file =3D bootimg >> Is there a documentation available for wic plugins which I've missed? If= not, would it >> be a mistake for my plugin to derive from the RootfsPlugin? In which way= the plugin >> controls where the content ends up in the target partition? >We are taking wic from upstream OE, and I'm not aware of any generated >doc from what wic has inline. But you could browse it, e.g. here: > >https://github.com/ilbers/isar/blob/master/scripts/lib/wic/pluginbase.py Yes, I have seen that, but this only talks about the plugin entry points wh= ich are called but not about where the output of the plugin is expected. Perhaps I am miss= ing something essential here.... TIA, Uli Sch=C3=B6ne Gr=C3=BC=C3=9Fe / Kind regards Dipl.-Inform. Ulrich Teichert Senior Software Developer Phone +49 431 375938-0 _____________________________________ e.bs kumkeo GmbH --=20 You received this message because you are subscribed to the Google Groups "= isar-users" group. To unsubscribe from this group and stop receiving emails from it, send an e= mail to isar-users+unsubscribe@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/isar-users/= fbec2c09dd134f8484820974e4de2db9%40kumkeo.de.