From patchwork Sun Jan 13 21:49:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tomasz Maciej Nowak X-Patchwork-Id: 1024165 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=o2.pl Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; unprotected) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="H8jTCSkX"; dkim-atps=neutral Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43d9Gd22xnz9s9h for ; Mon, 14 Jan 2019 08:48:57 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Subject:MIME-Version:Message-Id:Date:To :From:Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=4TnWv+mUOa5pcK0v+EfV7VynMCsWy2mBA+Sqm0f4nuk=; b=H8jTCSkXKXvtU9 iCJz6j0+y3j+Ib96oLeuCLgWGNhjgjeanyK/iSJGY79QQyoSOCq/YGx5fpziJ06AyoeskHIItBfCY j23tgStaW+wIbY4xv7AXPieY0BUYpJjoYU+7WKCulMmDacsg9aincgdaQuDgOXs8SKmkPPndumY1V 59htjmc0Wied6JyuIR3L/GJWs4HFLKWv4LAeaWOXwY7XFK3PUR0g+ip4T+buIPGP6XLKft/uKY2Hi GBOj6wgfGbVXEbTQBp2lXwEESZlnvQRr7950PWClITbYwQPQ5bpSUwH61C68RbOrgojsjBFa64tvS qpBDaNo9wBq7uv0WKG+w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gincd-0001LQ-Nm; Sun, 13 Jan 2019 21:48:47 +0000 Received: from mx-out.tlen.pl ([193.222.135.140]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gincO-00018e-7e for openwrt-devel@lists.openwrt.org; Sun, 13 Jan 2019 21:48:35 +0000 Received: (wp-smtpd smtp.tlen.pl 30198 invoked from network); 13 Jan 2019 22:48:28 +0100 Received: from 131.ip-164-132-48.eu (HELO localhost.localdomain) (tomek_n@o2.pl@[164.132.48.131]) (envelope-sender ) by smtp.tlen.pl (WP-SMTPD) with ECDHE-RSA-AES256-GCM-SHA384 encrypted SMTP for ; 13 Jan 2019 22:48:28 +0100 From: Tomasz Maciej Nowak To: openwrt-devel@lists.openwrt.org Date: Sun, 13 Jan 2019 22:49:09 +0100 Message-Id: <20190113214915.14059-1-tomek_n@o2.pl> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 X-WP-MailID: 3a004e10a26df13d51aee9e57434c17e X-WP-AV: skaner antywirusowy Poczty o2 X-WP-SPAM: NO 000000A [MTP0] X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20190113_134832_435460_83D7F9FD X-CRM114-Status: UNSURE ( 7.81 ) X-CRM114-Notice: Please train this message. X-Spam-Score: 0.0 (/) X-Spam-Report: SpamAssassin version 3.4.2 on bombadil.infradead.org summary: Content analysis details: (0.0 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 SPF_PASS SPF: sender matches SPF record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider (tomek_n[at]o2.pl) Subject: [OpenWrt-Devel] [RFC 0/6] x86: switch to generic image generation code and X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This is aftermath of partially failed series [1]. When I was searching for ways to upgrade of bootloader on existing OpenWrt installations, I noticed that it'll be difficult to add this feature within existing code creating x86 target images. I decided to switch this code to generic one, wich is used in most of the OpenWrt targets. Both of the chages are rather intrusive hence te RFC tag. Please voice Your concerns and opinions. https://patchwork.ozlabs.org/cover/1000625 Tomasz Maciej Nowak (6): x86/grub2: move grub2 image creation to grub2 package x86: switch image generation to new code x86: remove obsolete profiles x86: geode: shrink amount of default packages x86/grub2: add bootloader upgrade on sysupgrade grub2: add preinit hook for bootloader upgrade config/Config-images.in | 22 +- include/image.mk | 1 - package/boot/grub2/Makefile | 79 ++++++- .../boot/grub2/files/81_upgrade_bootloader | 20 ++ .../boot/grub2/files}/grub-early.cfg | 0 target/linux/x86/64/profiles/000-Generic.mk | 15 -- target/linux/x86/64/target.mk | 2 +- target/linux/x86/Makefile | 4 +- .../x86/base-files/lib/upgrade/platform.sh | 27 ++- .../linux/x86/generic/profiles/000-Generic.mk | 18 -- target/linux/x86/generic/target.mk | 2 +- .../linux/x86/geode/profiles/000-Generic.mk | 20 -- target/linux/x86/geode/profiles/100-Geos.mk | 19 -- target/linux/x86/geode/target.mk | 14 +- target/linux/x86/image/64.mk | 5 + target/linux/x86/image/Makefile | 199 +++++++----------- target/linux/x86/image/generic.mk | 8 + target/linux/x86/image/geode.mk | 16 ++ target/linux/x86/image/grub-iso.cfg | 2 +- .../linux/x86/image/{grub.cfg => grub-pc.cfg} | 4 +- target/linux/x86/image/legacy.mk | 8 + .../linux/x86/legacy/profiles/000-Generic.mk | 18 -- target/linux/x86/legacy/target.mk | 1 + 23 files changed, 255 insertions(+), 249 deletions(-) create mode 100644 package/boot/grub2/files/81_upgrade_bootloader rename {target/linux/x86/image => package/boot/grub2/files}/grub-early.cfg (100%) delete mode 100644 target/linux/x86/64/profiles/000-Generic.mk delete mode 100644 target/linux/x86/generic/profiles/000-Generic.mk delete mode 100644 target/linux/x86/geode/profiles/000-Generic.mk delete mode 100644 target/linux/x86/geode/profiles/100-Geos.mk create mode 100644 target/linux/x86/image/64.mk create mode 100644 target/linux/x86/image/generic.mk create mode 100644 target/linux/x86/image/geode.mk rename target/linux/x86/image/{grub.cfg => grub-pc.cfg} (57%) create mode 100644 target/linux/x86/image/legacy.mk delete mode 100644 target/linux/x86/legacy/profiles/000-Generic.mk