From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6906006289225089024 X-Received: by 2002:a17:907:961e:: with SMTP id gb30mr5049137ejc.197.1607929889752; Sun, 13 Dec 2020 23:11:29 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a50:8a9b:: with SMTP id j27ls4830381edj.3.gmail; Sun, 13 Dec 2020 23:11:28 -0800 (PST) X-Google-Smtp-Source: ABdhPJze/PlF0LSt4bwCs7Z/17uAP/1V4yANdmP5XHuV8ox/EHK9qsV523RYsP3GCxuFKk0kJwwO X-Received: by 2002:a05:6402:2066:: with SMTP id bd6mr23469919edb.211.1607929888748; Sun, 13 Dec 2020 23:11:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607929888; cv=none; d=google.com; s=arc-20160816; b=VZRRcXLIghPrJmPu7pHV+lZuY7Nhdh58RLxiSrzvX41/Tq1WV6SXNWta2bD6EQEF9M 9S3y4WobdOrHXuGCJi4ydhUvWTBTJrU/UGkpaJi0dueRRhBA7bYYI58x6Hcf+wszwknp Sfpp9dRerXB0noc5mvyfqdsPZukTEGUeGPwGAlSXc1BtgjUBMJczgxSAtSjTVKUUugEt mo9pF5ammeFKLfrlTnoqK4mp7JVj1mn00fcxq4KJL586wHeuslUoVyZbDx87/IcR16G+ bzMoodSq3fiwtbuasfx92+InjczP21a2jT9b+Qz2OjI4ImJIdGRdcKfODmXjaa0SgdYv MKFA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from; bh=+1QyxB9VF3L3LDP0FkRFZiIRGU3nsl0yUQtgusgjXHE=; b=HPVejhE1FxiWcSxjdFu15IMVI/aMJB7B1/2Re12N3XULYCtfJLRgkmmOq+ujYyA/Cl LDswzBWKHdE/tLavAgywQ7ssoBVQBnRHFvCEq2hFQHoQyIg2CmAWRoB1QWh+Gj0/EyxV r8Xtlk7rBKmTwiBCwDiUeMKiYvzNGAnZe1JDi0LuaeGJMQbAL9yZtqJK0sYXo4Eozt2E CJtMridLTAMWTBksMhoBhsqGbYRN+r1qG8G6pWdaVj7YZ5rqY7+Jz2wffAMpaIrawBSZ LpVNLHJG/hXLED7c/TbDfJgC7ROqbqzPWQHQAbNX3WkQD3PqfxzO4o7/GoUYJkJ2TWQo thTw== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 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 goliath.siemens.de (goliath.siemens.de. [192.35.17.28]) by gmr-mx.google.com with ESMTPS id e5si363388edk.0.2020.12.13.23.11.28 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 13 Dec 2020 23:11:28 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) client-ip=192.35.17.28; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 192.35.17.28 as permitted sender) smtp.mailfrom=jan.kiszka@siemens.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=siemens.com Received: from mail2.sbs.de (mail2.sbs.de [192.129.41.66]) by goliath.siemens.de (8.15.2/8.15.2) with ESMTPS id 0BE7BSLG023072 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 14 Dec 2020 08:11:28 +0100 Received: from md1f2u6c.ad001.siemens.net ([167.87.38.225]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 0BE7BRXa030825; Mon, 14 Dec 2020 08:11:28 +0100 From: Jan Kiszka To: isar-users Cc: Henning Schild Subject: [PATCH 3/6] wic: bootimg-efi-isar: Add support for Ubuntu Date: Mon, 14 Dec 2020 08:11:24 +0100 Message-Id: <57c2d3cf997a0355af0dd04eb6b2924ac7920f43.1607929886.git.jan.kiszka@siemens.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: References: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TUID: UB3TBsjLDKKh From: Jan Kiszka Ubuntu places the kernel and initrd links under /boot. Account for that. Signed-off-by: Jan Kiszka --- meta/classes/wic-img.bbclass | 2 +- .../scripts/lib/wic/plugins/source/bootimg-efi-isar.py | 10 +++++++--- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/meta/classes/wic-img.bbclass b/meta/classes/wic-img.bbclass index bbf5dd8a..dedd2bf0 100644 --- a/meta/classes/wic-img.bbclass +++ b/meta/classes/wic-img.bbclass @@ -99,7 +99,7 @@ WICVARS += "\ KERNEL_NAME KERNEL_FILE" # Isar specific vars used in our plugins -WICVARS += "KERNEL_IMAGE INITRD_IMAGE DISTRO_ARCH" +WICVARS += "KERNEL_IMAGE INITRD_IMAGE DISTRO DISTRO_ARCH" python do_rootfs_wicenv () { wicvars = d.getVar('WICVARS', True) diff --git a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py index 2285d2ef..67efa52e 100644 --- a/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py +++ b/meta/scripts/lib/wic/plugins/source/bootimg-efi-isar.py @@ -65,6 +65,10 @@ class BootimgEFIPlugin(SourcePlugin): # Create grub configuration using parameters from wks file bootloader = creator.ks.bootloader + kernel_initrd_path = "/" + if get_bitbake_var("DISTRO").startswith("ubuntu"): + kernel_initrd_path = "/boot/" + grubefi_conf = "serial --unit=0 --speed=115200 --word=8 --parity=no --stop=1\n" grubefi_conf += "terminal_input --append serial\n" grubefi_conf += "terminal_output --append serial\n" @@ -77,9 +81,9 @@ class BootimgEFIPlugin(SourcePlugin): grubefi_conf += "set root=$bootdisk',gpt%d'\n" % part.realnum grubefi_conf += "\n" grubefi_conf += "menuentry 'boot'{\n" - grubefi_conf += " linux /vmlinuz root=%s rootwait %s\n" \ - % (creator.rootdev, bootloader.append or "") - grubefi_conf += " initrd /initrd.img\n" + grubefi_conf += " linux %svmlinuz root=%s rootwait %s\n" \ + % (kernel_initrd_path, creator.rootdev, bootloader.append or "") + grubefi_conf += " initrd %sinitrd.img\n" % kernel_initrd_path grubefi_conf += "}\n" logger.debug("Writing grubefi config %s/hdd/boot/EFI/BOOT/grub.cfg", -- 2.26.2