more changes ....

This commit is contained in:
brl 2018-01-18 18:22:23 -05:00
parent 011d639baf
commit 4d9c72371c
29 changed files with 409 additions and 3940 deletions

View File

@ -2,9 +2,13 @@ DISTRO = "citadel-distro"
DISTRO_NAME = "Subgraph OS Citadel"
DISTRO_VERSION = "1.0"
CITADEL_DEFAULT_DISTRO_FEATURES = "largefile systemd wifi usrmerge"
DISTRO_FEATURES ?= "${DISTRO_FEATURES_DEFAULT} ${DISTRO_FEATURES_LIBC} ${CITADEL_DEFAULT_DISTRO_FEATURES}"
CITADEL_DEFAULT_DISTRO_FEATURES = "acl alsa argp bluetooth ext2 largefile systemd usbhost wifi xattr pci x11 usrmerge wayland opengl pam"
DISTRO_FEATURES ?= "${DISTRO_FEATURES_LIBC} ${CITADEL_DEFAULT_DISTRO_FEATURES}"
GNOME_RELEASE ?= "stable"
require conf/distro/include/gnome-${GNOME_RELEASE}-packages.inc
HOSTTOOLS_NONFATAL += "inkscape"
#
# Use systemd for system initialization
#
@ -18,7 +22,7 @@ PREFERRED_PROVIDER_virtual/kernel = "linux-citadel"
PACKAGE_CLASSES ?= "package_deb"
INITRAMFS_IMAGE_BUNDLE = "1"
INITRAMFS_IMAGE = "citadel-initramfs"
INITRAMFS_IMAGE = "citadel-initramfs-image"
NOISO = "1"
EFI_PROVIDER = "systemd-boot"

View File

@ -0,0 +1,52 @@
# 3.26.2
PREFERRED_VERSION_adwaita-icon-theme = "3.26.0"
PREFERRED_VERSION_at-spi2-atk = "2.26.1"
PREFERRED_VERSION_at-spi2-core = "2.26.2"
PREFERRED_VERSION_atk = "2.26.1"
PREFERRED_VERSION_caribou = "0.4.21"
PREFERRED_VERSION_clutter = "1.26.2"
PREFERRED_VERSION_clutter-gtk = "1.8.4"
PREFERRED_VERSION_cogl = "1.22.2"
PREFERRED_VERSION_dconf = "0.26.1"
PREFERRED_VERSION_gcr = "3.20.0"
PREFERRED_VERSION_gdk-pixbuf = "2.36.11"
PREFERRED_VERSION_gdm = "3.26.2"
PREFERRED_VERSION_geocode-glib = "3.25.4.1"
PREFERRED_VERSION_gjs = "1.50.2"
PREFERRED_VERSION_glib = "2.54.2"
PREFERRED_VERSION_glib-networking = "2.54.1"
PREFERRED_VERSION_gnome-backgrounds = "3.26.2"
PREFERRED_VERSION_gnome-bluetooth = "3.26.1"
PREFERRED_VERSION_gnome-color-manager = "3.26.0"
PREFERRED_VERSION_gnome-control-center = "3.26.1"
PREFERRED_VERSION_gnome-desktop = "3.26.2"
PREFERRED_VERSION_gnome-keyring = "3.20.1"
PREFERRED_VERSION_gnome-menus = "3.13.3"
PREFERRED_VERSION_gnome-session = "3.26.1"
PREFERRED_VERSION_gnome-settings-daemon = "3.26.1"
PREFERRED_VERSION_gnome-shell = "3.26.1"
PREFERRED_VERSION_gnome-system-monitor = "3.26.0"
PREFERRED_VERSION_gnome-terminal = "3.26.2"
PREFERRED_VERSION_gnome-themes-standard = "3.22.3"
PREFERRED_VERSION_gsettings-desktop-schemas = "3.24.1"
PREFERRED_VERSION_gtk+3 = "3.22.26"
PREFERRED_VERSION_libcroco = "0.6.12"
PREFERRED_VERSION_libgee = "0.20.0"
PREFERRED_VERSION_libgtop = "2.38.0"
PREFERRED_VERSION_libgweather = "3.26.0"
PREFERRED_VERSION_libnotify = "0.7.7"
PREFERRED_VERSION_librsvg = "2.40.19"
PREFERRED_VERSION_libsecret = "0.18.5"
PREFERRED_VERSION_libsoup = "2.60.2"
PREFERRED_VERSION_mutter = "3.26.1"
PREFERRED_VERSION_nautilus = "3.26.0"
PREFERRED_VERSION_networkmanager = "1.8.4"
PREFERRED_VERSION_network-manager-applet = "1.8.4"
PREFERRED_VERSION_pango = "1.40.13"
PREFERRED_VERSION_pygobject = "3.26.1"
PREFERRED_VERSION_vala = "0.38.2"
PREFERRED_VERSION_vte = "0.50.2"
PREFERRED_VERSION_yelp = "3.26.0"
PREFERRED_VERSION_yelp-xsl = "3.20.1"
PREFERRED_VERSION_zenity = "3.24.0"

View File

@ -0,0 +1,49 @@
# 3.27.3
PREFERRED_VERSION_adwaita-icon-theme = "3.26.1"
PREFERRED_VERSION_atk = "2.27.1"
PREFERRED_VERSION_caribou = "0.4.21"
PREFERRED_VERSION_clutter = "1.26.2"
PREFERRED_VERSION_clutter-gtk = "1.8.4"
PREFERRED_VERSION_cogl = "1.22.2"
PREFERRED_VERSION_dconf = "0.27.1"
PREFERRED_VERSION_gcr = "3.20.0"
PREFERRED_VERSION_gdk-pixbuf = "2.36.11"
PREFERRED_VERSION_gdm = "3.27.3"
PREFERRED_VERSION_geocode-glib = "3.25.4.1"
PREFERRED_VERSION_gjs = "1.51.3"
PREFERRED_VERSION_glib = "2.55.0"
PREFERRED_VERSION_glib-networking = "2.55.2"
PREFERRED_VERSION_gnome-backgrounds = "3.26.2"
PREFERRED_VERSION_gnome-bluetooth = "3.26.1"
PREFERRED_VERSION_gnome-color-manager = "3.26.0"
PREFERRED_VERSION_gnome-control-center = "3.26.2"
PREFERRED_VERSION_gnome-desktop = "3.27.2"
PREFERRED_VERSION_gnome-keyring = "3.27.2"
PREFERRED_VERSION_gnome-menus = "3.13.3"
PREFERRED_VERSION_gnome-session = "3.27.3"
PREFERRED_VERSION_gnome-settings-daemon = "3.26.2"
PREFERRED_VERSION_gnome-shell = "3.27.1"
PREFERRED_VERSION_gnome-system-monitor = "3.27.2"
PREFERRED_VERSION_gnome-terminal = "3.27.3"
PREFERRED_VERSION_gnome-themes-standard = "3.22.3"
PREFERRED_VERSION_gsettings-desktop-schemas = "3.27.1"
PREFERRED_VERSION_gtk+3 = "3.22.26"
PREFERRED_VERSION_libcroco = "0.6.12"
PREFERRED_VERSION_libgee = "0.20.0"
PREFERRED_VERSION_libgtop = "2.38.0"
PREFERRED_VERSION_libgweather = "3.27.1"
PREFERRED_VERSION_libnotify = "0.7.7"
PREFERRED_VERSION_librsvg = "2.41.2"
PREFERRED_VERSION_libsecret = "0.18.5"
PREFERRED_VERSION_libsoup = "2.61.1"
PREFERRED_VERSION_mutter = "3.27.1"
PREFERRED_VERSION_networkmanager = "1.10.2"
PREFERRED_VERSION_network-manager-applet = "1.8.6"
PREFERRED_VERSION_pango = "1.40.14"
PREFERRED_VERSION_pygobject = "3.27.1"
PREFERRED_VERSION_vala = "0.39.2"
PREFERRED_VERSION_vte = "0.50.2"
PREFERRED_VERSION_yelp = "3.27.1"
PREFERRED_VERSION_yelp-xsl = "3.27.1"
PREFERRED_VERSION_zenity = "3.26.0"

View File

@ -0,0 +1 @@
require gnome-3.27.3.inc

View File

@ -0,0 +1,2 @@
require gnome-3.26.2.inc

View File

@ -26,6 +26,7 @@ DISTRO ?= "citadel-distro"
MACHINE ?= "intel-corei7-64"
DEPLOY_DIR_IMAGE = "${TOPDIR}/images"
#
#
# Where to place downloads

View File

@ -2,4 +2,25 @@
SUMMARY = "Subgraph OS Citadel image builder"
LICENSE = "MIT"
SYSTEMD_DEFAULT_TARGET = "graphical.target"
require citadel-image-base.bb
ROOTFS_POSTPROCESS_COMMAND += "set_citadel_user_password; "
#IMAGE_FSTYPES += "ext2"
IMAGE_FSTYPES = "ext2"
IMAGE_INSTALL += "\
packagegroup-citadel-desktop \
"
set_blank_user_password() {
sed -i 's%^citadel:!:%citadel::%' ${IMAGE_ROOTFS}/etc/shadow
}
set_citadel_user_password() {
# crypt("citadel", "aa")
sed -i 's%^citadel:!:%citadel:aadg8rGtZzOY6:%' ${IMAGE_ROOTFS}/etc/shadow
}

View File

@ -1,16 +1,22 @@
DESCRIPTION = "Image for rootfs"
PACKAGE_INSTALL = "\
initramfs-framework-base \
initramfs-module-udev \
initramfs-module-setup-live \
${VIRTUAL-RUNTIME_base-utils} \
udev \
base-files \
base-passwd \
${ROOTFS_BOOTSTRAP_INSTALL} \
busybox \
kbd \
keymaps \
systemd-initrd \
systemd-initrd-analyze \
util-linux \
linux-firmware-i915 \
kernel-module-arc4 \
kernel-module-ansi-cprng \
kernel-module-apple-bl \
kernel-module-apple-gmux \
kernel-module-applesmc \
kernel-module-appletouch \
kernel-module-bcm5974 \
kernel-module-ccm \
kernel-module-cmac \
kernel-module-crc32-pclmul \
@ -20,8 +26,8 @@ PACKAGE_INSTALL = "\
kernel-module-ehci-platform \
kernel-module-ghash-clmulni-intel \
kernel-module-hid-a4tech \
kernel-module-hid-alps \
kernel-module-hid-apple \
kernel-module-hid-alps \
kernel-module-hid-asus \
kernel-module-hid-aureal \
kernel-module-hid-belkin \
@ -78,14 +84,17 @@ PACKAGE_INSTALL = "\
kernel-module-serio-raw \
kernel-module-snd \
kernel-module-soundcore \
kernel-module-usb-storage \
kernel-module-wmi \
kernel-module-xhci-plat-hcd \
setcolors \
citadel-initramfs \
liberation-fonts \
plymouth \
"
IMAGE_FEATURES = ""
export IMAGE_BASENAME = "citadel-initramfs"
SYSTEMD_DEFAULT_TARGET = "initrd.target"
#IMAGE_FEATURES = ""
#IMAGE_FEATURES_append = " empty-root-password"
export IMAGE_BASENAME = "citadel-initramfs-image"
IMAGE_LINGUAS = ""
LICENSE = "MIT"

View File

@ -14,6 +14,7 @@ RDEPENDS_${PN} = "\
util-linux \
net-tools \
iputils \
which \
parted \
bash \
bash-completion \
@ -26,10 +27,16 @@ RDEPENDS_${PN} = "\
polkit \
wpa-supplicant \
networkmanager \
openssh-sshd \
kernel-modules \
packagegroup-firmware \
vim \
vifm \
setcolors \
citadel-user \
tzdata \
tzdata-americas \
tzdata-asia \
tzdata-europe \
tzdata-posix \
glibc-charmap-utf-8 \
lvm2 \
"

View File

@ -0,0 +1,68 @@
inherit packagegroup
RDEPENDS_${PN} = "\
atk \
at-spi2-atk \
sound-theme-freedesktop \
adwaita-icon-theme \
adwaita-icon-theme-hires \
adwaita-icon-theme-symbolic \
adwaita-icon-theme-symbolic-hires \
adwaita-icon-theme-cursors \
hicolor-icon-theme \
iso-codes \
libgudev \
caribou \
networkmanager \
network-manager-applet \
clutter-1.0 \
gnome-desktop \
gnome-bluetooth \
gnome-control-center \
gnome-settings-daemon \
gnome-backgrounds \
gnome-tweak-tool \
gnome-terminal \
libgnome-desktop \
libxkbcommon \
xkeyboard-config \
libusb1 \
dbus-glib \
gtk+3 \
libnotify \
libgweather \
startup-notification \
ttf-bitstream-vera \
gconf \
gcr \
dconf \
ibus \
libsecret \
libwacom \
libcroco \
librsvg \
librsvg-gtk \
zenity \
accountsservice \
upower \
mutter \
gjs \
libpam \
gnome-keyring \
colord \
colord-plugins \
gnome-session \
gnome-shell \
gdm \
plymouth \
shared-mime-info \
pulseaudio-server \
glib-2.0-utils \
adapta-gtk-theme \
paper-icon-theme \
ttf-roboto \
citadel-desktop-gsettings \
nautilus \
systemd-analyze \
"

View File

@ -1,4 +1,4 @@
part /boot --source bootimg-efi --sourceparams="loader=systemd-boot" --size=64 --fstype=vfat --label boot --active --align 1024 --use-uuid
part / --source rootfs --fstype=ext4 --label rootfs --align 1024 --use-uuid
part /storage --fstype=ext4 --label storage --size=16 --use-uuid
bootloader --ptable gpt --timeout=5 --append="console=ttyS0,115200 console=tty0"
bootloader --ptable gpt --timeout=5 --append="add_efi_memmap intel_iommu=igfx_off cryptomgr.notests rcupdate.rcu_expedited=1 rcu_nocbs=0-64 tsc=reliable no_timer_check noreplace-smp i915.fastboot=1 quiet splash"

View File

@ -1,7 +1,6 @@
https://github.com/openembedded/meta-openembedded/tree/master/meta-oe/recipes-extended/mozjs
https://github.com/openembedded/meta-openembedded/tree/master/meta-oe/recipes-extended/polkit

View File

@ -1,32 +0,0 @@
From f36c9476d2816e0d3e61c9e13c22ed73883cb54a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Mon, 24 Apr 2017 12:13:43 -0700
Subject: [PATCH] compare the first character of string to be null or not
Fixes
error: ISO C++ forbids comparison between pointer and integer [-fpermissive]
| if (value[0] == '\0')
| ^~~~
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
js/src/shell/jsoptparse.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/js/src/shell/jsoptparse.cpp b/js/src/shell/jsoptparse.cpp
index b49d0a5..612aa00 100644
--- a/js/src/shell/jsoptparse.cpp
+++ b/js/src/shell/jsoptparse.cpp
@@ -243,7 +243,7 @@ OptionParser::extractValue(size_t argc, char **argv, size_t *i, char **value)
char *eq = strchr(argv[*i], '=');
if (eq) {
*value = eq + 1;
- if (value[0] == '\0')
+ if (value[0][0] == '\0')
return error("A value is required for option %.*s", eq - argv[*i], argv[*i]);
return Okay;
}
--
2.12.2

View File

@ -1,35 +0,0 @@
From 0a61b0b98c152f10404ccbdeeac583a486638a7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20M=C3=BCller?= <schnitzeltony@googlemail.com>
Date: Thu, 6 Jun 2013 18:36:01 +0200
Subject: [PATCH] js.pc.in: do not include RequiredDefines.h for depending
packages
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
in our cross environment the would fail with:
| cc1: fatal error: /usr/include/js-17.0/js/RequiredDefines.h: No such file or directory
and currently it only defines __STDC_LIMIT_MACROS
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Andreas Müller <schnitzeltony@googlemail.com>
---
js.pc.in | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/js.pc.in b/js.pc.in
index 13d761d..a95a7bd 100644
--- a/js.pc.in
+++ b/js.pc.in
@@ -8,4 +8,4 @@ Description: The Mozilla library for JavaScript
Version: @MOZILLA_VERSION@
Requires.private: @NSPR_PKGCONF_CHECK@
Libs: -L${libdir} -l@LIBRARY_NAME@
-Cflags: -include ${includedir}/@MODULE@/js/RequiredDefines.h -I${includedir}/@MODULE@
+Cflags: -I${includedir}/@MODULE@
--
1.7.6.5

View File

@ -1,36 +0,0 @@
From da3929a96d9c74e11bf37d128890e18fcb745365 Mon Sep 17 00:00:00 2001
From: Lei Maohui <leimaohui@cn.fujitsu.com>
Date: Mon, 26 Jan 2015 08:53:19 +0900
Subject: [PATCH] mozjs17.0.0: fix the compile bug of powerpc
To fix the bug as following
error: cannot convert '__va_list_tag**' to '__va_list_tag (*)[1]' for
argument '5' to 'JSBool TryArgumentFormatter(JSContext*, const char**,
JSBool, jsval**, __va_list_tag (*)[1])'
Signed-off-by: Lei Maohui <leimaohui@cn.fujitsu.com>
---
jscpucfg.h | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/jscpucfg.h b/jscpucfg.h
index dfb1c14..8683491 100644
--- a/jscpucfg.h
+++ b/jscpucfg.h
@@ -47,6 +47,12 @@
#elif defined(JS_HAVE_ENDIAN_H)
# include <endian.h>
+#if defined(_POWER) || defined(__powerpc__) || \
+ defined(__ppc__)
+# define HAVE_VA_LIST_AS_ARRAY 1
+# endif
+
+
# if defined(__BYTE_ORDER)
# if __BYTE_ORDER == __LITTLE_ENDIAN
# define IS_LITTLE_ENDIAN 1
--
1.8.4.2

View File

@ -1,75 +0,0 @@
From d4a15ad82292ff6d772dcc631df98754d20be31b Mon Sep 17 00:00:00 2001
From: Colin Walters <walters@verbum.org>
Date: Tue, 18 Mar 2014 11:46:05 -0400
Subject: [PATCH 2/5] Move JS_BYTES_PER_WORD out of config.h
Instead define it in terms of the already extant GNU C extension
__SIZEOF_POINTER__. This avoids multiarch conflicts when 32 and 64
bit packages of js are co-installed.
---
Upstream-status: Pending
js/src/configure.in | 9 ---------
js/src/js-config.h.in | 1 -
js/src/jstypes.h | 12 ++++++++++++
3 files changed, 12 insertions(+), 10 deletions(-)
diff --git a/js/src/configure.in b/js/src/configure.in
index 15605b2..64c7606 100644
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -2345,15 +2345,6 @@ else
AC_MSG_RESULT(no)
fi
-MOZ_SIZE_OF_TYPE(JS_BYTES_PER_WORD, void*, 4 8)
-if test "$moz_cv_size_of_JS_BYTES_PER_WORD" -eq "4"; then
- AC_DEFINE(JS_BITS_PER_WORD_LOG2, 5)
-elif test "$moz_cv_size_of_JS_BYTES_PER_WORD" -eq "8"; then
- AC_DEFINE(JS_BITS_PER_WORD_LOG2, 6)
-else
- AC_MSG_ERROR([Unexpected JS_BYTES_PER_WORD])
-fi
-
MOZ_ALIGN_OF_TYPE(JS_ALIGN_OF_POINTER, void*, 2 4 8 16)
MOZ_SIZE_OF_TYPE(JS_BYTES_PER_DOUBLE, double, 6 8 10 12 14)
diff --git a/js/src/js-config.h.in b/js/src/js-config.h.in
index 6889e00..4775420 100644
--- a/js/src/js-config.h.in
+++ b/js/src/js-config.h.in
@@ -56,7 +56,6 @@
#undef JS_INT32_TYPE
#undef JS_INT64_TYPE
#undef JS_INTPTR_TYPE
-#undef JS_BYTES_PER_WORD
/* Some mozilla code uses JS-friend APIs that depend on JS_METHODJIT being
correct. */
diff --git a/js/src/jstypes.h b/js/src/jstypes.h
index d0cf183..3e7928f 100644
--- a/js/src/jstypes.h
+++ b/js/src/jstypes.h
@@ -24,6 +24,18 @@
#include "mozilla/Util.h"
#include "js-config.h"
+#ifndef JS_BYTES_PER_WORD
+#define JS_BYTES_PER_WORD __SIZEOF_POINTER__
+#endif
+#ifndef JS_BITS_PER_WORD_LOG2
+#if JS_BYTES_PER_WORD == 8
+#define JS_BITS_PER_WORD_LOG2 6
+#elif JS_BYTES_PER_WORD == 4
+#define JS_BITS_PER_WORD_LOG2 5
+#else
+#error Unhandled JS_BYTES_PER_WORD
+#endif
+#endif
/***********************************************************************
** MACROS: JS_EXTERN_API
--
1.9.3

View File

@ -1,76 +0,0 @@
From 15e710e331d36eb279852b5cd1ba37a9a6005217 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen.kooi@linaro.org>
Date: Mon, 2 Mar 2015 19:08:22 +0800
Subject: [PATCH 3/5] Add AArch64 support
---
Upstream-status: Pending
js/src/assembler/jit/ExecutableAllocator.h | 6 ++++++
js/src/assembler/wtf/Platform.h | 4 ++++
js/src/configure.in | 4 ++++
mfbt/double-conversion/utils.h | 1 +
4 files changed, 15 insertions(+)
diff --git a/js/src/assembler/jit/ExecutableAllocator.h b/js/src/assembler/jit/ExecutableAllocator.h
index c071c33..90764c3 100644
--- a/js/src/assembler/jit/ExecutableAllocator.h
+++ b/js/src/assembler/jit/ExecutableAllocator.h
@@ -382,6 +382,12 @@ public:
{
reprotectRegion(start, size, Executable);
}
+#elif WTF_CPU_AARCH64 && WTF_PLATFORM_LINUX
+ static void cacheFlush(void* code, size_t size)
+ {
+ intptr_t end = reinterpret_cast<intptr_t>(code) + size;
+ __builtin___clear_cache(reinterpret_cast<char*>(code), reinterpret_cast<char*>(end));
+ }
#else
static void makeWritable(void*, size_t) {}
static void makeExecutable(void*, size_t) {}
diff --git a/js/src/assembler/wtf/Platform.h b/js/src/assembler/wtf/Platform.h
index 0c84896..e8763a7 100644
--- a/js/src/assembler/wtf/Platform.h
+++ b/js/src/assembler/wtf/Platform.h
@@ -325,6 +325,10 @@
#define WTF_THUMB_ARCH_VERSION 0
#endif
+/* CPU(AArch64) - 64-bit ARM */
+#if defined(__aarch64__)
+#define WTF_CPU_AARCH64 1
+#endif
/* WTF_CPU_ARMV5_OR_LOWER - ARM instruction set v5 or earlier */
/* On ARMv5 and below the natural alignment is required.
diff --git a/js/src/configure.in b/js/src/configure.in
index 64c7606..0673aca 100644
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -1121,6 +1121,10 @@ arm*)
CPU_ARCH=arm
;;
+aarch64)
+ CPU_ARCH=aarch64
+ ;;
+
mips|mipsel)
CPU_ARCH="mips"
;;
diff --git a/mfbt/double-conversion/utils.h b/mfbt/double-conversion/utils.h
index 0eec2d9..fe26dab 100644
--- a/mfbt/double-conversion/utils.h
+++ b/mfbt/double-conversion/utils.h
@@ -58,6 +58,7 @@
defined(__mips__) || defined(__powerpc__) || \
defined(__sparc__) || defined(__sparc) || defined(__s390__) || \
defined(__SH4__) || defined(__alpha__) || \
+ defined(__aarch64__) || \
defined(_MIPS_ARCH_MIPS32R2)
#define DOUBLE_CONVERSION_CORRECT_DOUBLE_OPERATIONS 1
#elif defined(_M_IX86) || defined(__i386__) || defined(__i386)
--
1.9.3

View File

@ -1,103 +0,0 @@
From 0128c5a9eeee0d3fc0deb9129dd20eb79338c8f4 Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen.kooi@linaro.org>
Date: Mon, 2 Mar 2015 19:08:59 +0800
Subject: [PATCH 4/5] mozbug746112-no-decommit-on-large-pages
---
Upstream-status: Pending
js/src/gc/Heap.h | 15 ++++++++++-----
js/src/jsgc.cpp | 15 ++++++++++++---
2 files changed, 22 insertions(+), 8 deletions(-)
diff --git a/js/src/gc/Heap.h b/js/src/gc/Heap.h
index b8f8c78..1cfd269 100644
--- a/js/src/gc/Heap.h
+++ b/js/src/gc/Heap.h
@@ -103,26 +103,31 @@ struct Cell
};
/*
- * Page size is 4096 by default, except for SPARC, where it is 8192.
+ * Page size must be static to support our arena pointer optimizations, so we
+ * are forced to support each platform with non-4096 pages as a special case.
+ * Note: The freelist supports a maximum arena shift of 15.
* Note: Do not use JS_CPU_SPARC here, this header is used outside JS.
* Bug 692267: Move page size definition to gc/Memory.h and include it
* directly once jsgc.h is no longer an installed header.
*/
#if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9))
const size_t PageShift = 13;
+const size_t ArenaShift = PageShift;
+#elif defined(__powerpc__)
+const size_t PageShift = 16;
+const size_t ArenaShift = 12;
#else
const size_t PageShift = 12;
+const size_t ArenaShift = PageShift;
#endif
const size_t PageSize = size_t(1) << PageShift;
+const size_t ArenaSize = size_t(1) << ArenaShift;
+const size_t ArenaMask = ArenaSize - 1;
const size_t ChunkShift = 20;
const size_t ChunkSize = size_t(1) << ChunkShift;
const size_t ChunkMask = ChunkSize - 1;
-const size_t ArenaShift = PageShift;
-const size_t ArenaSize = PageSize;
-const size_t ArenaMask = ArenaSize - 1;
-
/*
* This is the maximum number of arenas we allow in the FreeCommitted state
* before we trigger a GC_SHRINK to release free arenas to the OS.
diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp
index b3caf05..a258d2d 100644
--- a/js/src/jsgc.cpp
+++ b/js/src/jsgc.cpp
@@ -251,6 +251,13 @@ static const int BackgroundPhaseLength[] = {
sizeof(BackgroundPhaseStrings) / sizeof(AllocKind)
};
+/* Unused memory decommiting requires the arena size match the page size. */
+static bool
+DecommitEnabled()
+{
+ return PageSize == ArenaSize;
+}
+
#ifdef DEBUG
void
ArenaHeader::checkSynchronizedWithFreeList() const
@@ -742,7 +749,8 @@ Chunk::fetchNextDecommittedArena()
decommittedArenas.unset(offset);
Arena *arena = &arenas[offset];
- MarkPagesInUse(arena, ArenaSize);
+ if (DecommitEnabled())
+ MarkPagesInUse(arena, ArenaSize);
arena->aheader.setAsNotAllocated();
return &arena->aheader;
@@ -2731,7 +2739,7 @@ DecommitArenasFromAvailableList(JSRuntime *rt, Chunk **availableListHeadp)
chunk->removeFromAvailableList();
size_t arenaIndex = Chunk::arenaIndex(aheader->arenaAddress());
- bool ok;
+ bool ok = true;
{
/*
* If the main thread waits for the decommit to finish, skip
@@ -2741,7 +2749,8 @@ DecommitArenasFromAvailableList(JSRuntime *rt, Chunk **availableListHeadp)
Maybe<AutoUnlockGC> maybeUnlock;
if (!rt->isHeapBusy())
maybeUnlock.construct(rt);
- ok = MarkPagesUnused(aheader->getArena(), ArenaSize);
+ if (DecommitEnabled())
+ ok = MarkPagesUnused(aheader->getArena(), ArenaSize);
}
if (ok) {
--
1.9.3

View File

@ -1,44 +0,0 @@
From 9c42920c2b635a399bd1f93833efdeb1696f17ee Mon Sep 17 00:00:00 2001
From: Koen Kooi <koen.kooi@linaro.org>
Date: Mon, 2 Mar 2015 19:09:57 +0800
Subject: [PATCH 5/5] aarch64-64k-page
---
Upstream-status: Pending
js/src/gc/Heap.h | 2 +-
js/src/gc/Memory.cpp | 3 +++
2 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/js/src/gc/Heap.h b/js/src/gc/Heap.h
index 1cfd269..f4dbcda 100644
--- a/js/src/gc/Heap.h
+++ b/js/src/gc/Heap.h
@@ -113,7 +113,7 @@ struct Cell
#if defined(SOLARIS) && (defined(__sparc) || defined(__sparcv9))
const size_t PageShift = 13;
const size_t ArenaShift = PageShift;
-#elif defined(__powerpc__)
+#elif defined(__powerpc__) || defined(__aarch64__)
const size_t PageShift = 16;
const size_t ArenaShift = 12;
#else
diff --git a/js/src/gc/Memory.cpp b/js/src/gc/Memory.cpp
index 5b386a2..e5ad018 100644
--- a/js/src/gc/Memory.cpp
+++ b/js/src/gc/Memory.cpp
@@ -302,8 +302,11 @@ GetPageFaultCount()
void
InitMemorySubsystem()
{
+ /* aarch64 may have 64KB or 4KB pages */
+#ifndef __aarch64__
if (size_t(sysconf(_SC_PAGESIZE)) != PageSize)
MOZ_CRASH();
+#endif
}
void *
--
1.9.3

View File

@ -1,46 +0,0 @@
From a452138a1dd274bfad381a701729783360dc86fb Mon Sep 17 00:00:00 2001
From: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
Date: Tue, 5 Jan 2016 22:04:17 +0100
Subject: [PATCH] fix cross compilation on i586 targets
Remove offending -Wl,-rpath-link that may cause host libraries to be picked
during linking. The patch applies a fix to configure.in. So as not to
regenerate configure, similar fix is applied there.
Upstream-Status: Inappropriate [embedded specific]
Signed-off-by: Maciej Borzecki <maciej.borzecki@open-rnd.pl>
---
js/src/configure | 2 +-
js/src/configure.in | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/js/src/configure b/js/src/configure
index d019b0fdba44233596541de94307010d85a8e32e..5aa40f757a3dbb7d6887175046f44212c15c2eac 100755
--- a/js/src/configure
+++ b/js/src/configure
@@ -5555,7 +5555,7 @@ TARGET_MD_ARCH=unix
DIRENT_INO=d_ino
MOZ_USER_DIR=".mozilla"
-MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
+MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin'
MOZ_COMPONENT_NSPR_LIBS='-L$(LIBXUL_DIST)/bin $(NSPR_LIBS)'
diff --git a/js/src/configure.in b/js/src/configure.in
index 0673aca12f6d83035549ade2a4a83906bf91f0f0..39b22724f9535ac1a6dba04658c91e4ef667fc47 100644
--- a/js/src/configure.in
+++ b/js/src/configure.in
@@ -919,7 +919,7 @@ TARGET_MD_ARCH=unix
DIRENT_INO=d_ino
MOZ_USER_DIR=".mozilla"
-MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin -Wl,-rpath-link,$(prefix)/lib'
+MOZ_FIX_LINK_PATHS='-Wl,-rpath-link,$(LIBXUL_DIST)/bin'
MOZ_COMPONENT_NSPR_LIBS='-L$(LIBXUL_DIST)/bin $(NSPR_LIBS)'
--
2.5.0

View File

@ -1,115 +0,0 @@
From a0c0f32299419359b44ac0f880c1ea9073ae51e1 Mon Sep 17 00:00:00 2001
From: Zheng Xu <zheng.xu@linaro.org>
Date: Fri, 2 Sep 2016 17:40:05 +0800
Subject: [PATCH] Bug 1143022 - Manually mmap on arm64 to ensure high 17 bits
are clear. r=ehoogeveen
There might be 48-bit VA on arm64 depending on kernel configuration.
Manually mmap heap memory to align with the assumption made by JS engine.
Change-Id: Ic5d2b2fe4b758b3c87cc0688348af7e71a991146
Upstream-status: Backport
---
js/src/gc/Memory.cpp | 73 ++++++++++++++++++++++++++++++++++++++++++++++++++--
1 file changed, 71 insertions(+), 2 deletions(-)
diff --git a/js/src/gc/Memory.cpp b/js/src/gc/Memory.cpp
index 5b386a2..38101cf 100644
--- a/js/src/gc/Memory.cpp
+++ b/js/src/gc/Memory.cpp
@@ -306,6 +306,75 @@ InitMemorySubsystem()
MOZ_CRASH();
}
+static inline void *
+MapMemory(size_t length, int prot, int flags, int fd, off_t offset)
+{
+#if defined(__ia64__)
+ /*
+ * The JS engine assumes that all allocated pointers have their high 17 bits clear,
+ * which ia64's mmap doesn't support directly. However, we can emulate it by passing
+ * mmap an "addr" parameter with those bits clear. The mmap will return that address,
+ * or the nearest available memory above that address, providing a near-guarantee
+ * that those bits are clear. If they are not, we return NULL below to indicate
+ * out-of-memory.
+ *
+ * The addr is chosen as 0x0000070000000000, which still allows about 120TB of virtual
+ * address space.
+ *
+ * See Bug 589735 for more information.
+ */
+ void *region = mmap((void*)0x0000070000000000, length, prot, flags, fd, offset);
+ if (region == MAP_FAILED)
+ return MAP_FAILED;
+ /*
+ * If the allocated memory doesn't have its upper 17 bits clear, consider it
+ * as out of memory.
+ */
+ if ((uintptr_t(region) + (length - 1)) & 0xffff800000000000) {
+ JS_ALWAYS_TRUE(0 == munmap(region, length));
+ return MAP_FAILED;
+ }
+ return region;
+#elif defined(__aarch64__)
+ /*
+ * There might be similar virtual address issue on arm64 which depends on
+ * hardware and kernel configurations. But the work around is slightly
+ * different due to the different mmap behavior.
+ *
+ * TODO: Merge with the above code block if this implementation works for
+ * ia64 and sparc64.
+ */
+ const uintptr_t start = UINT64_C(0x0000070000000000);
+ const uintptr_t end = UINT64_C(0x0000800000000000);
+ const uintptr_t step = ChunkSize;
+ /*
+ * Optimization options if there are too many retries in practice:
+ * 1. Examine /proc/self/maps to find an available address. This file is
+ * not always available, however. In addition, even if we examine
+ * /proc/self/maps, we may still need to retry several times due to
+ * racing with other threads.
+ * 2. Use a global/static variable with lock to track the addresses we have
+ * allocated or tried.
+ */
+ uintptr_t hint;
+ void* region = MAP_FAILED;
+ for (hint = start; region == MAP_FAILED && hint + length <= end; hint += step) {
+ region = mmap((void*)hint, length, prot, flags, fd, offset);
+ if (region != MAP_FAILED) {
+ if ((uintptr_t(region) + (length - 1)) & 0xffff800000000000) {
+ if (munmap(region, length)) {
+ MOZ_ASSERT(errno == ENOMEM);
+ }
+ region = MAP_FAILED;
+ }
+ }
+ }
+ return region == MAP_FAILED ? NULL : region;
+#else
+ return mmap(NULL, length, prot, flags, fd, offset);
+#endif
+}
+
void *
MapAlignedPages(size_t size, size_t alignment)
{
@@ -319,12 +388,12 @@ MapAlignedPages(size_t size, size_t alignment)
/* Special case: If we want page alignment, no further work is needed. */
if (alignment == PageSize) {
- return mmap(NULL, size, prot, flags, -1, 0);
+ return MapMemory(size, prot, flags, -1, 0);
}
/* Overallocate and unmap the region's edges. */
size_t reqSize = Min(size + 2 * alignment, 2 * size);
- void *region = mmap(NULL, reqSize, prot, flags, -1, 0);
+ void *region = MapMemory(reqSize, prot, flags, -1, 0);
if (region == MAP_FAILED)
return NULL;
--
1.9.1

View File

@ -1,18 +0,0 @@
fix the compile error of powerpc64
Upstream-status: Accepted
fix the following error
|error: 'jsuword' does not name a type
--- a/js/src/jsval.hold 2015-04-24 01:15:06.692970731 -0500
+++ b/js/src/jsval.h 2015-04-24 01:15:41.792969478 -0500
@@ -304,7 +304,6 @@
int32_t i32;
uint32_t u32;
JSWhyMagic why;
- jsuword word;
} payload;
} s;
double asDouble;

View File

@ -1,20 +0,0 @@
fix the compile error do to perl update
Upstream-status: Inappropriate
Signed-of-by: Armin Kuster <akuster808@gmail.com>
Index: src/config/milestone.pl
===================================================================
--- src.orig/config/milestone.pl
+++ src/config/milestone.pl
@@ -55,7 +55,7 @@ $MILESTONE_FILE = "$TOPSRCDIR/config/mi
#
my $milestone = Moz::Milestone::getOfficialMilestone($MILESTONE_FILE);
-if (defined(@TEMPLATE_FILE)) {
+if (@TEMPLATE_FILE) {
my $TFILE;
foreach $TFILE (@TEMPLATE_FILE) {

View File

@ -1,82 +0,0 @@
SUMMARY = "SpiderMonkey is Mozilla's JavaScript engine written in C/C++"
HOMEPAGE = "http://www.mozilla.org/js/"
LICENSE = "MPL-2.0"
LIC_FILES_CHKSUM = "file://../../LICENSE;md5=815ca599c9df247a0c7f619bab123dad"
SRC_URI = "http://ftp.mozilla.org/pub/mozilla.org/js/${BPN}${PV}.tar.gz \
file://0001-mozjs17.0.0-fix-the-compile-bug-of-powerpc.patch \
file://0001-js.pc.in-do-not-include-RequiredDefines.h-for-depend.patch \
file://0002-Move-JS_BYTES_PER_WORD-out-of-config.h.patch;patchdir=../../ \
file://0003-Add-AArch64-support.patch;patchdir=../../ \
file://0004-mozbug746112-no-decommit-on-large-pages.patch;patchdir=../../ \
file://0005-aarch64-64k-page.patch;patchdir=../../ \
file://0001-regenerate-configure.patch;patchdir=../../ \
file://fix-the-compile-error-of-powerpc64.patch;patchdir=../../ \
file://fix_milestone_compile_issue.patch \
file://0010-fix-cross-compilation-on-i586-targets.patch;patchdir=../../ \
file://Manually_mmap_heap_memory_esr17.patch;patchdir=../../ \
file://0001-compare-the-first-character-of-string-to-be-null-or-.patch;patchdir=../../ \
"
SRC_URI[md5sum] = "20b6f8f1140ef6e47daa3b16965c9202"
SRC_URI[sha256sum] = "321e964fe9386785d3bf80870640f2fa1c683e32fe988eeb201b04471c172fba"
S = "${WORKDIR}/${BPN}${PV}/js/src"
inherit autotools pkgconfig perlnative pythonnative
DEPENDS += "nspr zlib"
# Host specific flags need to be defined, otherwise target flags will be passed to the host
export HOST_CFLAGS = "${BUILD_CFLAGS}"
export HOST_CXXFLAGS = "${BUILD_CXXFLAGS}"
export HOST_LDFLAGS = "${BUILD_LDFLAGS}"
# nspr's package-config is ignored so set libs manually
EXTRA_OECONF = " \
--target=${TARGET_SYS} \
--host=${BUILD_SYS} \
--build=${BUILD_SYS} \
--prefix=${prefix} \
--libdir=${libdir} \
--with-nspr-libs='-lplds4 -lplc4 -lnspr4' \
--enable-threadsafe \
--disable-static \
"
EXTRA_OECONF_append_armv4 = " \
--disable-methodjit \
"
PACKAGECONFIG ??= "${@bb.utils.filter('DISTRO_FEATURES', 'x11', d)}"
PACKAGECONFIG[x11] = "--with-x --x-includes=${STAGING_INCDIR} --x-libraries=${STAGING_LIBDIR},--without-x,virtual/libx11"
# mozjs requires autoreconf 2.13
do_configure() {
export HOST_CFLAGS="${BUILD_CFLAGS}"
export HOST_CXXFLAGS="${BUILD_CPPFLAGS}"
export HOST_LDFLAGS="${BUILD_LDFLAGS}"
( cd ${S}
gnu-configize --force
mv config.guess config.sub build/autoconf )
${S}/configure ${EXTRA_OECONF}
}
# patch.bbclass will try to apply the patches already present and fail, so clean them out
do_unpack() {
tar -xvf ${DL_DIR}/mozjs17.0.0.tar.gz -C ${WORKDIR}/
rm -rf ${WORKDIR}/${BPN}${PV}/patches
}
PACKAGES =+ "lib${BPN}"
FILES_lib${BPN} += "${libdir}/lib*.so"
FILES_${PN}-dev += "${bindir}/js17-config"
# Fails to build with thumb-1 (qemuarm)
#| {standard input}: Assembler messages:
#| {standard input}:2172: Error: shifts in CMP/MOV instructions are only supported in unified syntax -- `mov r2,r1,LSR#20'
#| {standard input}:2173: Error: unshifted register required -- `bic r2,r2,#(1<<11)'
#| {standard input}:2174: Error: unshifted register required -- `orr r1,r1,#(1<<20)'
#| {standard input}:2176: Error: instruction not supported in Thumb16 mode -- `subs r2,r2,#0x300'
#| {standard input}:2178: Error: instruction not supported in Thumb16 mode -- `subs r5,r2,#52'
ARM_INSTRUCTION_SET = "arm"

View File

@ -5,7 +5,7 @@ LICENSE = "LGPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=155db86cdbafa7532b41f390409283eb \
file://src/polkit/polkit.h;beginline=1;endline=20;md5=0a8630b0133176d0504c87a0ded39db4"
DEPENDS = "expat glib-2.0 intltool-native mozjs"
DEPENDS = "expat glib-2.0 intltool-native mozjs paxctl-native"
inherit autotools gtk-doc pkgconfig useradd systemd gobject-introspection
@ -17,7 +17,7 @@ PACKAGECONFIG = "${@bb.utils.filter('DISTRO_FEATURES', 'pam', d)} \
PACKAGECONFIG[pam] = "--with-authfw=pam,--with-authfw=shadow,libpam,libpam"
PACKAGECONFIG[systemd] = "--enable-libsystemd-login=yes --with-systemdsystemunitdir=${systemd_unitdir}/system/,--enable-libsystemd-login=no --with-systemdsystemunitdir=,systemd"
# there is no --enable/--disable option for consolekit and it's not picked by shlibs, so add it to RDEPENDS
PACKAGECONFIG[consolekit] = ",,,consolekit"
#PACKAGECONFIG[consolekit] = ",,,consolekit"
PAM_SRC_URI = "file://polkit-1_pam.patch"
SRC_URI = "http://www.freedesktop.org/software/polkit/releases/polkit-${PV}.tar.gz \
@ -33,6 +33,10 @@ do_compile_prepend () {
export GIR_EXTRA_LIBS_PATH="${B}/src/polkit/.libs"
}
do_install_append() {
paxctl -cmr ${D}${libdir}/polkit-1/polkitd
}
PACKAGES =+ "${PN}-examples"
FILES_${PN}_append = " \
@ -49,3 +53,4 @@ USERADD_PARAM_${PN} = "--system --no-create-home --user-group --home-dir ${sysco
SYSTEMD_SERVICE_${PN} = "${BPN}.service"
SYSTEMD_AUTO_ENABLE = "disable"
BBCLASSEXTEND="native"

View File

@ -0,0 +1,22 @@
SUMMARY = "Common macros for building GNOME applications"
HOMEPAGE = "http://www.gnome.org/"
BUGTRACKER = "https://bugzilla.gnome.org/"
LICENSE = "GPLv2+"
LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263"
SECTION = "x11/gnome"
inherit gnomebase allarch
SRC_URI = "${GNOME_MIRROR}/${GNOMEBN}/${@gnome_verdir("${PV}")}/${GNOMEBN}-${PV}.tar.${GNOME_COMPRESS_TYPE};name=archive"
SRC_URI[archive.md5sum] = "933258d9c23e218eb6eec9cc1951b053"
SRC_URI[archive.sha256sum] = "22569e370ae755e04527b76328befc4c73b62bfd4a572499fde116b8318af8cf"
EXTRA_OECONF = "--with-autoconf-archive"
EXTRA_AUTORECONF = ""
DEPENDS = ""
FILES_${PN} += "${datadir}/aclocal"
FILES_${PN}-dev = ""
BBCLASSEXTEND = "native"

147
scripts/install_image Executable file
View File

@ -0,0 +1,147 @@
#!/bin/bash
# tips here https://github.com/systemd/systemd/issues/6381
set -u
set -e
#set -x
SCRIPT=$(realpath ${BASH_SOURCE})
IMAGES=$(realpath $(dirname ${SCRIPT})/../build/images/)
image_file() {
local fname=$(readlink -f ${IMAGES}/${1})
if [[ ! -f ${fname} ]]; then
>&2 printf "File ${fname} does not exist\n"
exit 1
fi
printf $fname
}
EFIBOOT=$(image_file systemd-bootx64.efi)
KERNEL=$(image_file bzImage)
ROOTFS=$(image_file citadel-image-intel-corei7-64.ext2)
UUID="683a17fc-4457-42cc-a946-cde67195a101"
KERNEL_CMDLINE="add_efi_memmap intel_iommu=off cryptomgr.notests rcupdate.rcu_expedited=1 rcu_nocbs=0-64 tsc=reliable no_timer_check noreplace-smp i915.fastboot=1 quiet splash"
MOUNT_PATH=/tmp/citadel-boot-mount
TARGET=/dev/sdb
TARGET_BOOT=${TARGET}1
TARGET_LVM=${TARGET}2
PARTED="parted -a optimal ${TARGET}"
is_mounted() {
echo "is mounted $1"
for mnt in $(awk '{print $1}' < /proc/self/mounts); do
[[ $mnt == $1 ]] && return 0
done
return 1
}
unmount_partition() {
echo "unmount partition $1"
if ! is_mounted $1 ; then
printf "$1 is not mounted\n"
return
fi
}
unmount_device() {
echo "unmount device"
for p in ${TARGET}*; do
is_mounted $p && unmount_partition $p
done
echo "done unmount device"
}
remove_volume() {
local vg
# find volume group name
vg=$(pvs --noheadings -o vg_name ${1})
# echo to strip whitespace
[[ -n $(echo -n ${vg}) ]] && vgremove ${vg}
pvremove ${1}
}
remove_volumes() {
echo "remove volumes"
for p in ${TARGET}*; do
pvs ${p} && remove_volume ${p}
done
return 0
}
partition_device() {
${PARTED} -s mklabel gpt
${PARTED} mkpart boot fat32 0% 512MiB
${PARTED} set 1 boot on
${PARTED} mkpart data ext4 512MiB 100%
${PARTED} set 2 lvm on
mkfs.vfat -F 32 ${TARGET_BOOT}
}
setup_luks() {
printf "subgraph" | cryptsetup -q --uuid=${UUID} luksFormat ${TARGET_LVM} -
printf "subgraph" | cryptsetup open --type luks --key-file - ${TARGET_LVM} e1
}
setup_lvm() {
pvcreate -ff /dev/mapper/e1
vgcreate --yes citadel /dev/mapper/e1
#pvcreate -ff ${TARGET_LVM}
#vgcreate --yes citadel ${TARGET_LVM}
lvcreate --yes --size 2g --name rootfsA citadel
lvcreate --yes --size 2g --name rootfsB citadel
lvcreate --yes --extents 100%VG --name storage citadel
mkfs.ext4 /dev/mapper/citadel-storage
}
make_loader_conf() {
echo "default bootA"
echo "timeout 5"
}
make_boot_conf() {
echo "title Subgraph OS (Airwolf Edition) [Root Partition ${1}]"
echo "linux /bzImage"
echo "options LABEL=Boot root=/dev/mapper/citadel-rootfs${1} ${KERNEL_CMDLINE}"
}
setup_efi() {
mkdir -p ${MOUNT_PATH}
mount ${TARGET_BOOT} ${MOUNT_PATH}
mkdir -p ${MOUNT_PATH}/EFI/BOOT
mkdir -p ${MOUNT_PATH}/loader/entries
cp ${EFIBOOT} ${MOUNT_PATH}/EFI/BOOT/bootx64.efi
cp ${KERNEL} ${MOUNT_PATH}/bzImage
make_loader_conf > ${MOUNT_PATH}/loader/loader.conf
make_boot_conf 'A' > ${MOUNT_PATH}/loader/entries/bootA.conf
make_boot_conf 'B' > ${MOUNT_PATH}/loader/entries/bootB.conf
umount ${MOUNT_PATH}
rmdir ${MOUNT_PATH}
}
write_root() {
echo "writing rootfsA"
dd if=${ROOTFS} of=/dev/mapper/citadel-rootfsA bs=4M status=progress
sync
}
blkdeactivate -v ${TARGET}
unmount_device
remove_volumes
partition_device
setup_luks
setup_lvm
setup_efi
write_root
vgchange -a n citadel
cryptsetup close e1

View File

@ -13,6 +13,8 @@ if [ -z "$ZSH_NAME" ] && [ "$0" = "$THIS_SCRIPT" ]; then
exit 1
fi
PS1="[(build) \W]$ "
TEMPLATECONF=../meta-citadel-distro/conf
. poky/oe-init-build-env