From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 7155069296107847680 X-Received: by 2002:a05:600c:154e:b0:3b4:bf17:32fc with SMTP id f14-20020a05600c154e00b003b4bf1732fcmr16206279wmg.70.1665919389017; Sun, 16 Oct 2022 04:23:09 -0700 (PDT) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a7b:c458:0:b0:3c6:c1ff:1fd with SMTP id l24-20020a7bc458000000b003c6c1ff01fdls6498014wmi.2.-pod-canary-gmail; Sun, 16 Oct 2022 04:23:07 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6JZY9K3I2ZEbvmBF15NYJzd6HVgWE6U9b6ELtL9+4Z7sz0lPTqrNemPzQTv0i88sj1JN5U X-Received: by 2002:a1c:ed11:0:b0:3b4:d3e1:bec with SMTP id l17-20020a1ced11000000b003b4d3e10becmr4041800wmh.196.1665919387747; Sun, 16 Oct 2022 04:23:07 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1665919387; cv=pass; d=google.com; s=arc-20160816; b=o5l8n6uM8hHug0vBhpTTs10JkPFJ9IYFCC08LgwlkoERbpeNe7EElr3OD7curgZcGM kUwjM/Xz2IJVChTzho2NEMI0YXS0RC1Q7w2l+ReDOb5RTttj3RkkBL0HpT4MVTfX7VQk 2MdQ8M3LNi0GBqKrgKINjcNaa0LnojpVbVGT2XVu1XPqo2nKe72zjFpArV5c6l2Cuvwi wh4VmTjKzFdVL2QHDlSl47pfFqhhbGMSzepV1iGxgyWqM11Jy6KKSBqzTNUnq2GsBs3P lv8/WEmiYvPMbYmN18L2dWo5boiQDxfE0MMx0rTjVk0gEVUtd71CX+OfugYGcihNkbBX TIRA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:cc:to:content-language:subject:from :user-agent:mime-version:date:message-id:dkim-signature; bh=vGdkaqA+u3JNfywRdER+XpcR62PViee2IUHn+bAsG6A=; b=ZyGcHTwRzfdyMxKvXgfRZdltHJFhxil1AgRHSIyOxbDgPNMJzOXqyUck9VBW7r08nm YHS95JTruDYD4I2crgeseT0QWdjRQlMGSWBaceajpDUosLhcsO4mbIkzcDbVVYOsudbc woIOdz2O6uzFEz4Bi71sigtpvIAtwwRM1thUSWK485eSJ9ZAEagsJOITgPUVt/jiv8tD 8Mb0VyWkK5n5shbfVe09f8DoPYmT9oK6+H0uF1cXh5HTDiqE/opaqrbI5ACTcqfx/5po IL7ch8p7Fb2UHjcJFgRU+rQE2BrvqVKAfSnso4jWSvcCWBi0F5x+3wCdw2KBKcJnbUSp 5BZg== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=T5uBS+Zn; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of jan.kiszka@siemens.com designates 40.107.20.48 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Return-Path: Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2048.outbound.protection.outlook.com. [40.107.20.48]) by gmr-mx.google.com with ESMTPS id l4-20020a7bc444000000b003c4ecff4e2bsi336336wmi.1.2022.10.16.04.23.07 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 16 Oct 2022 04:23:07 -0700 (PDT) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 40.107.20.48 as permitted sender) client-ip=40.107.20.48; Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@siemens.com header.s=selector2 header.b=T5uBS+Zn; arc=pass (i=1 spf=pass spfdomain=siemens.com dmarc=pass fromdomain=siemens.com); spf=pass (google.com: domain of jan.kiszka@siemens.com designates 40.107.20.48 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZE0QLXmsAU7kQjnqj2jA7GlPEP+6APHkMUytfm2+jCwjG4f5rlHzArJsoc8OZSKe2KnhpV5RnJovcC78uonwX6/d6K9tu2VNRZ4cOy9h7K6vE0Axkxn/a7nlXey4IOrpzQBQirPnbMmyVr2GzFOc8ItM1ZIjptAmm1iYONPVGxEwRLQC2K3BX8Hrr18ge+O7aBsj5XUBrRgpuzR6vP2LiT2NNgESN7zC7tFtDJMJmThta51pDVmRGqWdCPyBvaZcIOUOzCea9U/5SH2d6YKhMRjus1N/GkHEIq7QEjbYw+Qi+L/RIlWm9Mq52GJHmo1HvirS/XDRCPh/8zg2s3QSfQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=vGdkaqA+u3JNfywRdER+XpcR62PViee2IUHn+bAsG6A=; b=dNEhYyL9oFMF72xFb/RvhUknlPUk7b26K2cvBnCYAdBt3Y+Jb60YqaCU1poF+W7DJ/Aq4nuj33TKgdLttQP7d7Gaw9zD1UBVULTX7n92Szlbcsck96P08a75IOZE3BPqb83bLoFu2fdePl3uPf/DlPwEb0UM81uJKP2A3ag+B4zTN9Ng8MG3nEfCJzvG04eUE0q4vTzKi64vWnhLthWNGNNAunIbJb3frOQxU9MHWS53EOTKPn8cE2s+Eh6dIT9izO337Ma0txMR+wrKyx17ceXFn+YI1aSofN2466Bw8SpiwiO73HRCVwLUmgyhJ25UXGrLRPhbOiVTjkRUSXzHXg== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass (sender ip is 194.138.21.76) smtp.rcpttodomain=googlegroups.com smtp.mailfrom=siemens.com; dmarc=pass (p=none sp=none pct=100) action=none header.from=siemens.com; dkim=none (message not signed); arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=siemens.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=vGdkaqA+u3JNfywRdER+XpcR62PViee2IUHn+bAsG6A=; b=T5uBS+Zn8RaIRWhp2nIqlJ1rl3cC3LijymKQtMdPpwbs0HyI8CHKpJzn1wq1MQguDZQf4wVFEvtxRTsA8lMHomhS1wMEcy7DaBjhDdOti6lIihobuVGHXg/nDZHaxDAWesOKsiYvq0Rzuy0B8Nl6yzG1j+YiZPAGqQDx+0KyCY5MGXSohbWe9PoIZSZF/vHboHhW0FEwHfwM20ei0D9b1E+g2uVYEAy37vOJ7QQJlgw6q70J0cjpq8JBYtA60wUioQG6utEPK8ucAWFNPsKdMQRVxjrqXi5fNkWTReQKmUzXIAmDRHb3UVD3RFyxrCMf7UpiiPedOO/fnwhLB1GepQ== Received: from FR3P281CA0027.DEUP281.PROD.OUTLOOK.COM (2603:10a6:d10:1c::14) by DB9PR10MB7339.EURPRD10.PROD.OUTLOOK.COM (2603:10a6:10:45d::17) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.29; Sun, 16 Oct 2022 11:23:06 +0000 Received: from VE1EUR01FT029.eop-EUR01.prod.protection.outlook.com (2603:10a6:d10:1c:cafe::7c) by FR3P281CA0027.outlook.office365.com (2603:10a6:d10:1c::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.6 via Frontend Transport; Sun, 16 Oct 2022 11:23:06 +0000 X-MS-Exchange-Authentication-Results: spf=pass (sender IP is 194.138.21.76) smtp.mailfrom=siemens.com; dkim=none (message not signed) header.d=none;dmarc=pass action=none header.from=siemens.com; Received-SPF: Pass (protection.outlook.com: domain of siemens.com designates 194.138.21.76 as permitted sender) receiver=protection.outlook.com; client-ip=194.138.21.76; helo=hybrid.siemens.com; pr=C Received: from hybrid.siemens.com (194.138.21.76) by VE1EUR01FT029.mail.protection.outlook.com (10.152.2.224) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5723.20 via Frontend Transport; Sun, 16 Oct 2022 11:23:06 +0000 Received: from DEMCHDC89XA.ad011.siemens.net (139.25.226.103) by DEMCHDC8VSA.ad011.siemens.net (194.138.21.76) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.2.1118.12; Sun, 16 Oct 2022 13:23:06 +0200 Received: from [139.21.18.154] (139.21.18.154) by DEMCHDC89XA.ad011.siemens.net (139.25.226.103) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.1.2507.12; Sun, 16 Oct 2022 13:23:05 +0200 Message-ID: Date: Sun, 16 Oct 2022 13:22:52 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.3.0 From: Jan Kiszka Subject: [PATCH] wic: Fix non-existing initrd case Content-Language: en-US To: isar-users CC: Henning Schild Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit Return-Path: jan.kiszka@siemens.com X-Originating-IP: [139.21.18.154] X-ClientProxiedBy: DEMCHDC8WBA.ad011.siemens.net (139.25.226.105) To DEMCHDC89XA.ad011.siemens.net (139.25.226.103) X-TM-AS-Product-Ver: SMEX-14.0.0.3080-8.6.1018-26680.007 X-TM-AS-Result: No-10--7.592800-8.000000 X-TMASE-MatchedRID: k5wM/XNuONbT7NDWrMzVFRb+/Q1vzLdAp4zUg4v75Ffece0aRiX9Wjcy 5Kr1d07ToxCLfriDzzhIIMqfCNGpDnxs7qFZ9FbOzIkaYtLuij2Cs4Ek/zrSXYTBkzbkEx2zrFP 4l9ANsI+pTkI0HK8zpRAVN9JgMiUE0BpcSFb1f16Rk6XtYogiau9c69BWUTGwC24oEZ6SpSkj80 Za3RRg8OOBL7YX6zwmN147eWkH84tWkGMh8yF0Tg/wqzwpLJCFeiSXZ7J6jQI= X-TM-AS-User-Approved-Sender: No X-TM-AS-User-Blocked-Sender: No X-TMASE-Result: 10--7.592800-8.000000 X-TMASE-Version: SMEX-14.0.0.3080-8.6.1018-26680.007 X-TM-SNTS-SMTP: BF77580F6987C0AA94DA172AE83A2E7D691B16E43772A1D121C71C72E99C84B72000:8 X-EOPAttributedMessage: 0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: VE1EUR01FT029:EE_|DB9PR10MB7339:EE_ X-MS-Office365-Filtering-Correlation-Id: 9a3fdd0c-9b0d-425b-a747-08daaf68cc47 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: C6VbNmq8ydQXEfDcJcDTBCoN1qk4UB5JlZFOJbWumGjE07dOX+de89UJrxZR/E0ipIBXD3TSp21MyWerw5X/PuML+n+YXwQwX4krDWuPKahFxgSLv7yPU4WSHg+yz7TXkoCGSyCsLRbKyXiNnCR3GvOeUAuMwIN94qWOoT1c/sXeaVPa+hyYpISbZPdwYO8PKfJp/38GurCrffuXIij5ISebXQ8mtPYYN7ZqlzeCYs/gIo5YcyDxZRvIfbptdw+q+MsZbIwGE8iqRCCkiCyEFsE82EO8bpR0bBk4+nq6dA0DAElyR0zowFjeCkrZYdGjFmFNbsVYvCv3n/ZWWB62CJsZucYHekJsVqC4sg0gkUNr3C8ZMYThOSm3Lr8XqQtpNag4UWEPkTE2K5pEx3UKyiQdUPUhfsFgt4EHVqZoMjMhNwa/laWL6QGEGGfPSaM799btw5Ep+krwcEzKgUJ83HiUT9EaG7MtV530cMnUCj4BeMDqW7SNbCuW5IlxD2tqkoPN+5yMQMcWQFwQ2N1+xRP4LMWSAKIf/bEzlQhHaCRK75JOxnQ5a+5H9udlLrbzqK0RhlqjnZT640I6EKD2AOaZwUxCkb6N579rreDyXmsxKf45UTzCqMoPXwADPPY6GY+i5Nh8VBdbMHSzvncQrITFS8BQBQ7LGlhp6kydBu6U4w73scX3W2hk3lz8pz8GMYrCqqBBRcvqAMQjLMcwo0Fyu9VmX4NmNZ6CvWeKzl4WPMGP5iV+/biDuU/EBad6Ez0tcgZ1vQaRc6ZoGjs3dNl87GIK0nHv2JGwedYIFXME4NnYPwNTnENggnx8hXe5jl5KISM8kz4p2kjp6PVtJRDTV3dg8GZAO4DC0EKUgn0i0wGSbEjDy3o+smekCIpWkLEVU6b6SkBfbRWvNCiAQw== X-Forefront-Antispam-Report: CIP:194.138.21.76;CTRY:DE;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:hybrid.siemens.com;PTR:InfoDomainNonexistent;CAT:NONE;SFS:(13230022)(4636009)(39860400002)(396003)(346002)(136003)(376002)(451199015)(36840700001)(46966006)(40470700004)(82740400003)(478600001)(81166007)(31696002)(86362001)(356005)(40460700003)(41300700001)(26005)(2616005)(70206006)(956004)(70586007)(8676002)(4326008)(6706004)(34020700004)(6666004)(107886003)(82960400001)(186003)(47076005)(2906002)(316002)(36860700001)(5660300002)(6916009)(16526019)(83380400001)(8936002)(44832011)(336012)(16576012)(31686004)(36756003)(40480700001)(82310400005)(3940600001)(36900700001)(43740500002);DIR:OUT;SFP:1101; X-OriginatorOrg: siemens.com X-MS-Exchange-CrossTenant-OriginalArrivalTime: 16 Oct 2022 11:23:06.4504 (UTC) X-MS-Exchange-CrossTenant-Network-Message-Id: 9a3fdd0c-9b0d-425b-a747-08daaf68cc47 X-MS-Exchange-CrossTenant-Id: 38ae3bcd-9579-4fd4-adda-b42e1495d55a X-MS-Exchange-CrossTenant-OriginalAttributedTenantConnectingIp: TenantId=38ae3bcd-9579-4fd4-adda-b42e1495d55a;Ip=[194.138.21.76];Helo=[hybrid.siemens.com] X-MS-Exchange-CrossTenant-AuthSource: VE1EUR01FT029.eop-EUR01.prod.protection.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Anonymous X-MS-Exchange-CrossTenant-FromEntityHeader: HybridOnPrem X-MS-Exchange-Transport-CrossTenantHeadersStamped: DB9PR10MB7339 X-TUID: z+zsMId5FvU5 From: Jan Kiszka An initrd is optional, and most callers of isar_get_filenames are taking this into acount already. Adjust the last one and stop bailing out from the helper if there is no initrd file. Signed-off-by: Jan Kiszka --- meta/scripts/lib/wic/plugins/isarpluginbase.py | 2 +- .../scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/meta/scripts/lib/wic/plugins/isarpluginbase.py b/meta/scripts/lib/wic/plugins/isarpluginbase.py index 68af2208..99e552e0 100644 --- a/meta/scripts/lib/wic/plugins/isarpluginbase.py +++ b/meta/scripts/lib/wic/plugins/isarpluginbase.py @@ -36,6 +36,6 @@ def isar_get_filenames(rootfs_dir): if not os.path.isfile(os.path.join(rootfs_dir, "boot", kernel)): raise WicError("kernel %s not found" % (os.path.join(rootfs_dir, "boot", kernel))) if not os.path.isfile(os.path.join(rootfs_dir, "boot", initrd)): - raise WicError("initrd %s not found" % (os.path.join(rootfs_dir, "boot", initrd))) + initrd = None return kernel, initrd diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py index 7fb0f2a8..43f4bec4 100644 --- a/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py +++ b/meta/scripts/lib/wic/plugins/source/bootimg-pcbios-isar.py @@ -141,9 +141,11 @@ class BootimgPcbiosIsarPlugin(SourcePlugin): syslinux_conf += "APPEND label=boot root=%s %s\n" % \ (creator.rootdev, bootloader.append) - # we are using an initrd, smuggle it in - syslinux_conf = syslinux_conf.replace(" root=%s " % (creator.rootdev), - " root=%s initrd=%s " % (creator.rootdev, initrd)) + # if we are using an initrd, smuggle it in + if initrd: + syslinux_conf = syslinux_conf.replace( + " root=%s " % (creator.rootdev), + " root=%s initrd=%s " % (creator.rootdev, initrd)) logger.debug("Writing syslinux config %s/hdd/boot/syslinux.cfg", cr_workdir) -- 2.35.3