runx: update to v1.0

bumping runX to the 1.0 tag

  - drop patches that are part of the release
  - bump kernel to v5.4.104 to work with our gcc10
  - tweak initrd install to use externally provided busybox

Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Bruce Ashfield 2021-03-26 11:11:13 -04:00
parent 690761393c
commit 438ed8b506
7 changed files with 87 additions and 1703 deletions

View File

@ -0,0 +1,55 @@
From 4a128a3d1bc3b069ac12d3d61f79bc001340a8b7 Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@gmail.com>
Date: Fri, 26 Mar 2021 10:55:49 -0400
Subject: [PATCH] make-initrd: allow externally provided busybox
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
---
initrd/make-initrd | 24 ++++++++++++++++++++----
1 file changed, 20 insertions(+), 4 deletions(-)
diff --git a/initrd/make-initrd b/initrd/make-initrd
index 21170e8..939f71d 100755
--- a/initrd/make-initrd
+++ b/initrd/make-initrd
@@ -35,6 +35,8 @@ then
cp $busybox_src_config .config
make -j "$(getconf _NPROCESSORS_ONLN)"
export busybox="$busybox_image"
+else
+ echo "busybox: using externally provided binary"
fi
@@ -48,10 +50,24 @@ mkdir -p $tmpdir/lib
mkdir -p $tmpdir/var
mkdir -p $tmpdir/mnt
cp "$busybox" $tmpdir/bin/busybox
-for i in `cat "$base"/applet-list`
-do
- ln -s /bin/busybox $tmpdir/bin/$i
-done
+
+if [ -n "$CROSS_COMPILE" ]; then
+ echo "cross compiling, busybox --install emulation"
+ if [ -n "$QEMU_USER" ]; then
+ $QEMU_USER $tmpdir/bin/busybox --install $tmpdir/bin
+ else
+ echo "QEMU_USER is not defined, default binary symlinks will be available"
+ for i in `cat "$base"/applet-list`
+ do
+ ln -s /bin/busybox $tmpdir/bin/$i
+ done
+ fi
+else
+ for i in `cat "$base"/applet-list`
+ do
+ ln -s /bin/busybox $tmpdir/bin/$i
+ done
+fi
mkdir -p $tmpdir/etc/init.d
cp $init $tmpdir/etc/init.d/rcS
--
2.19.1

View File

@ -1,39 +0,0 @@
From d8bd5749e6fc6e0c86a8720044ec78167bab3569 Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@xilinx.com>
Date: Mon, 16 Dec 2019 22:03:14 -0800
Subject: [PATCH] make-initrd: cross install tweaks
Signed-off-by: Bruce Ashfield <bruce.ashfield@xilinx.com>
---
kernel/make-initrd | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
Index: git/initrd/make-initrd
===================================================================
--- git.orig/initrd/make-initrd
+++ git/initrd/make-initrd
@@ -23,8 +23,22 @@
mkdir -p $tmpdir/lib
mkdir -p $tmpdir/var
mkdir -p $tmpdir/mnt
-cp "$busybox" $tmpdir/bin/busybox
-$tmpdir/bin/busybox --install $tmpdir/bin
+
+
+if [ -z "$BUSYBOX" ]; then
+ BUSYBOX=`which busybox`
+fi
+cp $BUSYBOX $tmpdir/bin
+if [ -n "$CROSS_COMPILE" ]; then
+ echo "cross compiling, busybox --install emulation"
+ if [ -n "$QEMU_USER" ]; then
+ $QEMU_USER $tmpdir/bin/busybox --install $tmpdir/bin
+ else
+ echo "QEMU_USER is not defined, no binary symlinks will be available"
+ fi
+else
+ $tmpdir/bin/busybox --install $tmpdir/bin
+fi
mkdir -p $tmpdir/etc/init.d
cp $init $tmpdir/etc/init.d/rcS

View File

@ -0,0 +1,26 @@
From 9d9bb1883e3be291df737e159c93ffcab9e55b3a Mon Sep 17 00:00:00 2001
From: Bruce Ashfield <bruce.ashfield@gmail.com>
Date: Fri, 26 Mar 2021 10:15:24 -0400
Subject: [PATCH] make-kernel: bump to v5.4.104 for gcc10+ fixes
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
---
kernel/make-kernel | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/kernel/make-kernel b/kernel/make-kernel
index 4e80b3c..a679096 100755
--- a/kernel/make-kernel
+++ b/kernel/make-kernel
@@ -17,7 +17,7 @@ kernel_srcdir=$kernel_stuffdir/src
kernel_builddir=$kernel_stuffdir/build
kernel_out=$kernel_outpath/kernel
-kernel_version=5.4
+kernel_version=5.4.104
kernel_name=linux-$kernel_version
kernel_tarball="$kernel_name".tar.xz
kernel_url=https://www.kernel.org/pub/linux/kernel/v5.x/"$kernel_tarball"
--
2.19.1

View File

@ -1,35 +0,0 @@
From 1cf4ff2137252c63687f54e09626850cfab6e9f9 Mon Sep 17 00:00:00 2001
From: Rob Woolley <Rob.Woolley@windriver.com>
Date: Thu, 17 Sep 2020 19:41:06 -0700
Subject: [PATCH] runX: add bounded / looping timeout
On slower machines, we may need a longer timeout before giving
up.
Signed-off-by: Rob Woolley <Rob.Woolley@windriver.com>
---
git/runX | 8 +++++++-
1 file changed, 7 insertions(+), 1 deletion(-)
diff --git a/runX b/runX
index 492cb4c..70c95e1 100755
--- a/runX
+++ b/runX
@@ -119,7 +119,13 @@ then
daemonize $workpath/serial_start \
"$containerid" \
"$crundir"/console_pty
- sleep .1
+ for n in 5 4 3 2 1; do
+ if [ ! -l "$crundir"/console_pty ]; then
+ break;
+ else
+ sleep .1;
+ fi;
+ done
daemonize $workpath/serial_fd_handler \
"$guestconsole" \
"$crundir"/console_pty
--
2.17.1

View File

@ -1,348 +0,0 @@
From d6df537fe5098c0e9f50deecab85b2102049030a Mon Sep 17 00:00:00 2001
From: Stefano Stabellini <sstabellini@kernel.org>
Date: Mon, 21 Sep 2020 13:15:53 -0700
Subject: [PATCH 2/2] don't call busybox --install
Busybox --install is very convenient but has the problem that it only
works for native builds. If busybox is of a different arch compared to
the target, it cannot be run at build time.
Solve the problem by install busybox, and creating links to it, by hand.
Signed-off-by: Stefano Stabellini <stefano.stabellini@xilinx.com>
---
initrd/applet-list | 308 +++++++++++++++++++++++++++++++++++++++++++++
initrd/make-initrd | 5 +-
2 files changed, 312 insertions(+), 1 deletion(-)
create mode 100644 initrd/applet-list
Index: git/initrd/applet-list
===================================================================
--- /dev/null 1970-01-01 00:00:00.000000000 +0000
+++ git/initrd/applet-list 2020-09-21 18:29:35.560281087 -0700
@@ -0,0 +1,308 @@
+ipneigh
+tee
+mpstat
+lzop
+ip
+inotifyd
+rdate
+nslookup
+switch_root
+sendmail
+slattach
+sum
+od
+less
+vlock
+cmp
+dnsdomainname
+renice
+fsync
+unlzop
+xxd
+stat
+flock
+fbset
+bzip2
+fdisk
+fallocate
+deallocvt
+cat
+mkdir
+traceroute
+dc
+loadfont
+nohup
+wc
+ping6
+login
+ifdown
+shred
+false
+pwd
+uname
+hd
+hdparm
+expand
+lspci
+shuf
+time
+tunctl
+sha3sum
+sed
+ed
+makemime
+factor
+ls
+volname
+stty
+truncate
+nproc
+openvt
+hexdump
+mountpoint
+nl
+more
+wget
+traceroute6
+linuxrc
+fbsplash
+pstree
+kill
+df
+uptime
+split
+arch
+getty
+syslogd
+cpio
+unexpand
+sha512sum
+sha256sum
+clear
+rdev
+md5sum
+egrep
+lzma
+rmdir
+tail
+netstat
+mkswap
+pkill
+fstrim
+bzcat
+chmod
+mount
+paste
+rev
+fsck
+ping
+ifup
+mesg
+gzip
+setconsole
+printenv
+swapoff
+unxz
+sort
+chpasswd
+true
+linux32
+blkid
+env
+dd
+fatattr
+bc
+[[
+mkfifo
+route
+xz
+setkeycodes
+install
+mkpasswd
+awk
+rm
+nsenter
+which
+sh
+ln
+fdflush
+test
+ttysize
+fuser
+base64
+run-parts
+ntpd
+mv
+printf
+nanddump
+zcat
+basename
+xzcat
+unlzma
+ipcs
+ash
+tar
+iplink
+sysctl
+crontab
+chown
+watchdog
+partprobe
+ifconfig
+chvt
+readahead
+add-shell
+ipaddr
+link
+getopt
+reboot
+blkdiscard
+pscan
+nandwrite
+cksum
+iostat
+deluser
+du
+tty
+iprule
+setserial
+eject
+unix2dos
+free
+conspy
+pivot_root
+setfont
+kbd_mode
+strings
+groups
+ionice
+swapon
+smemcap
+brctl
+yes
+cal
+bbconfig
+uudecode
+logger
+watch
+[
+udhcpc
+acpid
+echo
+setsid
+expr
+readlink
+linux64
+sync
+uuencode
+insmod
+rmmod
+raidautorun
+nbd-client
+ipcrm
+modinfo
+adjtimex
+unzip
+cp
+killall
+delgroup
+blockdev
+halt
+modprobe
+showkey
+setlogcons
+whois
+lsof
+vi
+grep
+sha1sum
+ps
+timeout
+crond
+hwclock
+unlink
+touch
+losetup
+iptunnel
+fold
+id
+chroot
+rfkill
+mdev
+lzcat
+microcom
+chgrp
+date
+udhcpc6
+init
+su
+head
+remove-shell
+reset
+realpath
+xargs
+cut
+poweroff
+killall5
+addgroup
+logread
+resize
+pipe_progress
+findfs
+dumpkmap
+reformime
+fdformat
+arping
+nologin
+lsmod
+mkdosfs
+klogd
+dirname
+umount
+setpriv
+cryptpw
+usleep
+pgrep
+hostname
+powertop
+dos2unix
+iproute
+ether-wake
+nice
+vconfig
+gunzip
+hostid
+top
+tr
+sleep
+mkfs.vfat
+comm
+lzopcat
+depmod
+arp
+mktemp
+uniq
+dumpleases
+adduser
+mknod
+dmesg
+nmeter
+lsusb
+find
+unshare
+nameif
+whoami
+ifenslave
+pwdx
+loadkmap
+pmap
+ipcalc
+tac
+bunzip2
+beep
+pidof
+nc
+fgrep
+readprofile
+seq
+diff
Index: git/initrd/make-initrd
===================================================================
--- git.orig/initrd/make-initrd 2020-09-21 18:29:35.564281091 -0700
+++ git/initrd/make-initrd 2020-09-21 18:30:42.528356223 -0700
@@ -58,7 +58,11 @@
if [ -n "$QEMU_USER" ]; then
$QEMU_USER $tmpdir/bin/busybox --install $tmpdir/bin
else
- echo "QEMU_USER is not defined, no binary symlinks will be available"
+ echo "QEMU_USER is not defined, default binary symlinks will be available"
+ for i in `cat "$base"/applet-list`
+ do
+ ln -s /bin/busybox $tmpdir/bin/$i
+ done
fi
else
$tmpdir/bin/busybox --install $tmpdir/bin

View File

@ -2,7 +2,7 @@ HOMEPAGE = "https://github.com/lf-edge/runx"
SUMMARY = "runx stuff"
DESCRIPTION = "Xen Runtime for OCI"
SRCREV_runx = "f24efd33fb18469e9cfe4d1bfe8e2c90ec8c4e93"
SRCREV_runx = "edc9350a79ede0365066c9743080e3dc6430d602"
KERNEL_SRC_VER="linux-5.4"
KERNEL_URL_VER="v5.x"
@ -11,12 +11,8 @@ SRC_URI = "\
git://github.com/lf-edge/runx;nobranch=1;name=runx \
https://www.kernel.org/pub/linux/kernel/${KERNEL_URL_VER}/${KERNEL_SRC_VER}.tar.xz;destsuffix=git/kernel/build \
file://0001-make-kernel-cross-compilation-tweaks.patch \
file://0001-make-initrd-cross-install-tweaks.patch \
file://0001-runX-add-bounded-looping-timeout.patch \
"
SRC_URI += "file://0001-Add-busybox-cross-build-for-arm64.patch \
file://0002-don-t-call-busybox-install.patch \
file://0001-make-kernel-bump-to-v5.4.104-for-gcc10-fixes.patch \
file://0001-make-initrd-allow-externally-provided-busybox.patch \
"
SRC_URI[md5sum] = "ce9b2d974d27408a61c53a30d3f98fb9"
@ -26,7 +22,7 @@ LICENSE = "Apache-2.0"
LIC_FILES_CHKSUM = "file://LICENSE;md5=945fc9aa694796a6337395cc291ddd8c"
S = "${WORKDIR}/git"
PV = "0.1-git${SRCREV_runx}"
PV = "v1.0-git${SRCREV_runx}"
inherit features_check
REQUIRED_DISTRO_FEATURES = "vmsep"
@ -42,6 +38,7 @@ DEPENDS += "resolvconf"
# for the kernel build phase
DEPENDS += "openssl-native coreutils-native util-linux-native xz-native bc-native"
DEPENDS += "elfutils-native"
DEPENDS += "qemu-native bison-native"
RDEPENDS_${PN} += " jq bash"
@ -91,6 +88,7 @@ do_compile() {
cp ${STAGING_DIR_HOST}/bin/busybox.nosuid ${WORKDIR}/busybox
export QEMU_USER="`which qemu-${HOST_ARCH}` -L ${STAGING_BASELIBDIR}/.."
export BUSYBOX="${WORKDIR}/busybox"
export busybox="${WORKDIR}/busybox"
export CROSS_COMPILE="${TARGET_PREFIX}"
else
bbnote "runx: using internal busybox"