From mboxrd@z Thu Jan 1 00:00:00 1970 X-GM-THRID: 6906006289225089024 X-Received: by 2002:aed:20c2:: with SMTP id 60mr29652695qtb.280.1607949001151; Mon, 14 Dec 2020 04:30:01 -0800 (PST) X-BeenThere: isar-users@googlegroups.com Received: by 2002:a37:7a83:: with SMTP id v125ls7879615qkc.5.gmail; Mon, 14 Dec 2020 04:30:00 -0800 (PST) X-Google-Smtp-Source: ABdhPJxv36ZBdV4pM+bZ/Mc+bdP9JWzQNgT7QSnyrfSxoIJd9N1/C1SWzdZdO/w1EfHy4pFLMNup X-Received: by 2002:a37:7bc1:: with SMTP id w184mr32979620qkc.190.1607948891186; Mon, 14 Dec 2020 04:28:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1607948891; cv=none; d=google.com; s=arc-20160816; b=UfW6R8aaAZio3Z5FST1NarQPs9jM5CuD7Ia0AOkzCw2rySJDLc+d2z2pM/PfziN4vj VvA6GcXO57N3gsEYjEBldsNowE3sxj7XRwTJ8UhKpwLwVgpcJaj9aFHweBX3XUl7R/u7 GbtuaJwijR35Pr/gDQ8mxjwiQqkYGyUizwWmti6n+f3dkYFcMGhOpYsWYKbBlRB8O896 uyX/VsnVRDcrLk6DxbadKVgfZNPwYJkMgyOPYntn5qKtFjxJUO4ayJMVrOdaCJhWrHgS GmO2N3J6v2mw5LE8mGezVQlVBVLuNfl9/XzeNyGkzXT/hcTx/YkaiFqvheDvOXTAsz8A uZ1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:content-language:in-reply-to:mime-version :user-agent:date:message-id:from:references:cc:to:subject; bh=79v1BFC/MaLz7NlPo8F02Qv1Z3A7KJQmOLSMk43brBc=; b=i56JNMWmk0N57pDjc2Cd2LUzYmJSE3Z6Ka/XX0HzbVXzs1CvIVUBajMJ1Knd/Kq87h Se27lRgz6G9mzDmoa8bZyJxhq4z9egHltaTsdIkHJdUTnnX6ziD3V9UmiUkzz8taSDVU t60mVGkb1oGzrdNXwY9KEuAgUhdYsviwq39mr3D0xsXFLaQzpAUey/2surPIKpPqW/7J BxvHStVSwN+dicWPxli0NWSxKw1yPtif9EYIYpJcM81paxfvbaCReswkP3ofQC0xDjyC nYUptsy8r5nAE8rOmZnV9DgS+9CwjIqtwjGDJRXgzoDhrpG9J98pjIeW4KEmFl4XmryM Ulqg== ARC-Authentication-Results: i=1; gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 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 lizzard.sbs.de (lizzard.sbs.de. [194.138.37.39]) by gmr-mx.google.com with ESMTPS id f21si1179424qtx.5.2020.12.14.04.28.10 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 14 Dec 2020 04:28:11 -0800 (PST) Received-SPF: pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 as permitted sender) client-ip=194.138.37.39; Authentication-Results: gmr-mx.google.com; spf=pass (google.com: domain of jan.kiszka@siemens.com designates 194.138.37.39 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 lizzard.sbs.de (8.15.2/8.15.2) with ESMTPS id 0BECS9BY027910 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK) for ; Mon, 14 Dec 2020 13:28:09 +0100 Received: from [167.87.38.225] ([167.87.38.225]) by mail2.sbs.de (8.15.2/8.15.2) with ESMTP id 0BECS9PB002034; Mon, 14 Dec 2020 13:28:09 +0100 Subject: Re: [PATCH 3/6] wic: bootimg-efi-isar: Add support for Ubuntu To: Henning Schild Cc: isar-users References: <57c2d3cf997a0355af0dd04eb6b2924ac7920f43.1607929886.git.jan.kiszka@siemens.com> <20201214131331.31aac0a9@md1za8fc.ad001.siemens.net> From: Jan Kiszka Message-ID: <42202a39-4db9-2255-d340-64ca3195ede7@siemens.com> Date: Mon, 14 Dec 2020 13:28:09 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.5.0 MIME-Version: 1.0 In-Reply-To: <20201214131331.31aac0a9@md1za8fc.ad001.siemens.net> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-TUID: CkUbgXRyZtwt On 14.12.20 13:13, Henning Schild wrote: > Did you check the custom kernel case? Do we not have pre/post install > scripting in place which deals with symlinks? Or is this scripting just > part of the distro? Yes, see https://github.com/siemens/meta-iot2050/commits/jan/ubuntu. Jan > > Henning > > Am Mon, 14 Dec 2020 08:11:24 +0100 > schrieb Jan Kiszka : > >> 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", > -- Siemens AG, T RDA IOT Corporate Competence Center Embedded Linux