Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Align initramfs with Alchemy-generated one #46

Merged
merged 3 commits into from
Oct 21, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion recipes-crypto/cryptsetup/cryptsetup_%.bbappend
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
# prevent udev as default dev manager being installed as dependency
PACKAGECONFIG:remove = "udev"
PACKAGECONFIG:remove = "ssh-token udev blkid gcrypt gcrypt-pbkdf2 "
1 change: 1 addition & 0 deletions recipes-pv/busybox/busybox_1.36~pv.1.bb
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ REPENDS:append = "\
SRC_URI = " \
git://gitlab.com/pantacor/busybox.git;protocol=https;branch=pv/1_35_stable \
file://defconfig \
file://trim.cfg \
file://pantavisor.cfg \
file://debug.patch \
"
Expand Down
108 changes: 108 additions & 0 deletions recipes-pv/busybox/files/pantavisor.cfg
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
# originally added
CONFIG_ASH_ECHO=y
CONFIG_ASH_PRINTF=y
CONFIG_ASH_TEST=y
Expand All @@ -22,3 +23,110 @@ CONFIG_FEATURE_MDEV_LOAD_FIRMWARE=y
CONFIG_FEATURE_FANCY_HEAD=y
CONFIG_FEATURE_FIND_TYPE=y
CONFIG_TR=y

# added from alchemy
CONFIG_INSTALL_NO_USR=y
CONFIG_FEATURE_REVERSE_SEARCH=y
CONFIG_FEATURE_EDITING_WINCH=y
CONFIG_ZCAT=y
CONFIG_BZCAT=y
CONFIG_LZCAT=y
CONFIG_XZCAT=y
CONFIG_FEATURE_PRESERVE_HARDLINKS=y
CONFIG_FEATURE_CATN=y
CONFIG_FEATURE_CATV=y
CONFIG_FEATURE_DATE_ISOFMT=y
CONFIG_FEATURE_DATE_COMPAT=y
CONFIG_FEATURE_DD_THIRD_STATUS_LINE=y
CONFIG_FEATURE_DF_FANCY=y
CONFIG_FACTOR=y
CONFIG_NL=y
CONFIG_NOHUP=y
CONFIG_NPROC=y
CONFIG_PASTE=y
CONFIG_PRINTENV=y
CONFIG_SHRED=y
CONFIG_STAT=y
CONFIG_FEATURE_STAT_FORMAT=y
CONFIG_FEATURE_STAT_FILESYSTEM=y
CONFIG_TEST2=y
CONFIG_FEATURE_TEST_64=y
CONFIG_FEATURE_TOUCH_SUSV3=y
CONFIG_BB_ARCH=y
CONFIG_FGCONSOLE=y
CONFIG_SETLOGCONS=y
CONFIG_FEATURE_VI_DOT_CMD=y
CONFIG_FEATURE_VI_READONLY=y
CONFIG_FEATURE_VI_SETOPTS=y
CONFIG_FEATURE_VI_SET=y
CONFIG_FEATURE_VI_ASK_TERMINAL=y
CONFIG_FEATURE_FIND_MTIME=y
CONFIG_FEATURE_FIND_ATIME=y
CONFIG_FEATURE_FIND_CTIME=y
CONFIG_FEATURE_FIND_MMIN=y
CONFIG_FEATURE_FIND_AMIN=y
CONFIG_FEATURE_FIND_CMIN=y
CONFIG_FEATURE_FIND_EXECUTABLE=y
CONFIG_FEATURE_FIND_XDEV=y
CONFIG_FEATURE_FIND_INUM=y
CONFIG_FEATURE_FIND_EXEC_PLUS=y
CONFIG_FEATURE_FIND_GROUP=y
CONFIG_FEATURE_FIND_PAREN=y
CONFIG_FEATURE_FIND_DELETE=y
CONFIG_FEATURE_FIND_EMPTY=y
CONFIG_FEATURE_FIND_REGEX=y
CONFIG_FEATURE_FIND_LINKS=y
CONFIG_HALT=y
CONFIG_DEPMOD=y
CONFIG_MODINFO=y
CONFIG_FEATURE_GPT_LABEL=y
CONFIG_XXD=y
CONFIG_FEATURE_MOUNT_FAKE=y
CONFIG_FEATURE_MOUNT_VERBOSE=y
CONFIG_FEATURE_MOUNT_LABEL=y
CONFIG_FEATURE_MOUNT_CIFS=y
CONFIG_FEATURE_UMOUNT_ALL=y
CONFIG_FEATURE_VOLUMEID_CRAMFS=y
CONFIG_FEATURE_VOLUMEID_HFS=y
CONFIG_FEATURE_VOLUMEID_ISO9660=y
CONFIG_FEATURE_VOLUMEID_JFS=y
CONFIG_FEATURE_VOLUMEID_LINUXRAID=y
CONFIG_FEATURE_VOLUMEID_LINUXSWAP=y
CONFIG_FEATURE_VOLUMEID_LUKS=y
CONFIG_FEATURE_VOLUMEID_NTFS=y
CONFIG_FEATURE_VOLUMEID_OCFS2=y
CONFIG_FEATURE_VOLUMEID_REISERFS=y
CONFIG_FEATURE_VOLUMEID_ROMFS=y
CONFIG_FEATURE_VOLUMEID_SYSV=y
CONFIG_FEATURE_VOLUMEID_UBIFS=y
CONFIG_FEATURE_VOLUMEID_UDF=y
CONFIG_FEATURE_VOLUMEID_XFS=y
CONFIG_BC=y
CONFIG_FEATURE_DC_BIG=y
CONFIG_FEATURE_BC_INTERACTIVE=y
CONFIG_FEATURE_BC_LONG_OPTIONS=y
CONFIG_FEATURE_LESS_REGEXP=y
CONFIG_READAHEAD=y
CONFIG_UBIATTACH=y
CONFIG_UBIDETACH=y
CONFIG_UBIMKVOL=y
CONFIG_UBIRMVOL=y
CONFIG_UBIRSVOL=y
CONFIG_UBIUPDATEVOL=y
CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
CONFIG_TELNETD=y
CONFIG_FEATURE_TELNETD_STANDALONE=y
CONFIG_FEATURE_TELNETD_INETD_WAIT=y
CONFIG_FEATURE_SHOW_THREADS=y
CONFIG_IOSTAT=y
CONFIG_KILLALL5=y
CONFIG_FEATURE_TOP_SMP_CPU=y
CONFIG_FEATURE_TOP_DECIMALS=y
CONFIG_FEATURE_TOP_SMP_PROCESS=y
CONFIG_FEATURE_TOPMEM=y
CONFIG_ASH_RANDOM_SUPPORT=y
CONFIG_ASH_HELP=y
CONFIG_ASH_GETOPTS=y
CONFIG_ASH_CMDCMD=y
CONFIG_FEATURE_SH_MATH_64=y
CONFIG_FEATURE_SH_MATH_BASE=y
191 changes: 191 additions & 0 deletions recipes-pv/busybox/files/trim.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,191 @@
# removed from alchemy
CONFIG_SHOW_USAGE=n
CONFIG_FEATURE_COMPRESS_USAGE=n
CONFIG_FEATURE_DEVPTS=n
CONFIG_FEATURE_PIDFILE=n
CONFIG_BUSYBOX=n
CONFIG_FEATURE_SHOW_SCRIPT=n
CONFIG_FEATURE_SUID=n
CONFIG_FEATURE_SUID_CONFIG=n
CONFIG_FEATURE_SUID_CONFIG_QUIET=n
CONFIG_FEATURE_RTMINMAX=n
CONFIG_FEATURE_RTMINMAX_USE_LIBC_DEFINITIONS=n
CONFIG_FEATURE_NON_POSIX_CP=n
CONFIG_FEATURE_USE_SENDFILE=n
CONFIG_MONOTONIC_SYSCALL=n
CONFIG_IOCTL_HEX2STR_ERROR=n
CONFIG_FEATURE_EDITING_SAVEHISTORY=n
CONFIG_FEATURE_EDITING_FANCY_PROMPT=n
CONFIG_UNICODE_SUPPORT=n
CONFIG_FEATURE_CHECK_UNICODE_IN_ENV=n
CONFIG_UNICODE_COMBINING_WCHARS=n
CONFIG_UNICODE_WIDE_WCHARS=n
CONFIG_FEATURE_SEAMLESS_XZ=n
CONFIG_FEATURE_SEAMLESS_BZ2=n
CONFIG_AR=n
CONFIG_GUNZIP=n
CONFIG_BUNZIP2=n
CONFIG_XZ=n
CONFIG_CPIO=n
CONFIG_TAR=n
CONFIG_FEATURE_TAR_CREATE=n
CONFIG_FEATURE_TAR_AUTODETECT=n
CONFIG_UNZIP=n
CONFIG_FEATURE_VERBOSE=n
CONFIG_CHGRP=n
CONFIG_CUT=n
CONFIG_FEATURE_CUT_REGEX=n
CONFIG_FEATURE_SKIP_ROOTFS=n
CONFIG_ECHO=n
CONFIG_ENV=n
CONFIG_EXPR=n
CONFIG_FALSE=n
CONFIG_ID=n
CONFIG_GROUPS=n
CONFIG_LOGNAME=n
CONFIG_FEATURE_LS_COLOR=n
CONFIG_MD5SUM=n
CONFIG_SHA1SUM=n
CONFIG_SHA256SUM=n
CONFIG_SHA3SUM=n
CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=n
CONFIG_PRINTF=n
CONFIG_READLINK=n
CONFIG_FEATURE_READLINK_FOLLOW=n
CONFIG_REALPATH=n
CONFIG_RMDIR=n
CONFIG_FEATURE_SORT_BIG=n
CONFIG_TEE=n
CONFIG_TEST=n
CONFIG_USLEEP=n
CONFIG_WC=n
CONFIG_YES=n
CONFIG_DUMPKMAP=n
CONFIG_LOADFONT=n
CONFIG_LOADKMAP=n
CONFIG_RUN_PARTS=n
CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS=n
CONFIG_START_STOP_DAEMON=n
CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS=n
CONFIG_FEATURE_START_STOP_DAEMON_FANCY=n
CONFIG_NUKE=n
CONFIG_FEATURE_AWK_GNU_EXTENSIONS=n
CONFIG_CMP=n
CONFIG_PATCH=n
CONFIG_FEATURE_VI_8BIT=n
CONFIG_XARGS=n
CONFIG_INIT=n
CONFIG_LINUXRC=n
CONFIG_FEATURE_USE_INITTAB=n
CONFIG_FEATURE_INIT_QUIET=n
CONFIG_FEATURE_INIT_MODIFY_CMDLINE=n
CONFIG_FEATURE_SHADOWPASSWDS=n
CONFIG_USE_BB_CRYPT=n
CONFIG_ADDGROUP=n
CONFIG_ADDUSER=n
CONFIG_MKPASSWD=n
CONFIG_DELUSER=n
CONFIG_DELGROUP=n
CONFIG_LOGIN=n
CONFIG_PASSWD=n
CONFIG_SU=n
CONFIG_SULOGIN=n
CONFIG_VLOCK=n
CONFIG_CHATTR=n
CONFIG_FSCK=n
CONFIG_LSMOD=n
CONFIG_RMMOD=n
CONFIG_FEATURE_CHECK_TAINTED_MODULE=n
CONFIG_FEATURE_MODUTILS_ALIAS=n
CONFIG_FEATURE_MODUTILS_SYMBOLS=n
CONFIG_BLKDISCARD=n
CONFIG_BLKID=n
CONFIG_FEATURE_BLKID_TYPE=n
CONFIG_FATATTR=n
CONFIG_FBSET=n
CONFIG_FEATURE_FBSET_FANCY=n
CONFIG_FEATURE_FBSET_READMODE=n
CONFIG_FLOCK=n
CONFIG_FSCK_MINIX=n
CONFIG_FSTRIM=n
CONFIG_GETOPT=n
CONFIG_FEATURE_GETOPT_LONG=n
CONFIG_HWCLOCK=n
CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS=n
CONFIG_MKFS_EXT2=n
CONFIG_MKFS_MINIX=n
CONFIG_FEATURE_MINIX2=n
CONFIG_RDATE=n
CONFIG_RENICE=n
CONFIG_REV=n
CONFIG_SETSID=n
CONFIG_FEATURE_SWAPON_DISCARD=n
CONFIG_SWITCH_ROOT=n
CONFIG_UNSHARE=n
CONFIG_FEATURE_VOLUMEID_LFS=n
CONFIG_HDPARM=n
CONFIG_I2CGET=n
CONFIG_I2CSET=n
CONFIG_I2CDUMP=n
CONFIG_I2CDETECT=n
CONFIG_FEATURE_LESS_BRACKETS=n
CONFIG_FEATURE_LESS_FLAGS=n
CONFIG_MICROCOM=n
CONFIG_STRINGS=n
CONFIG_TIME=n
CONFIG_FEATURE_HWIB=n
CONFIG_FTPGET=n
CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS=n
CONFIG_HOSTNAME=n
CONFIG_FEATURE_IFUPDOWN_MAPPING=n
CONFIG_IP=n
CONFIG_IPNEIGH=n
CONFIG_FEATURE_IP_ADDRESS=n
CONFIG_FEATURE_IP_LINK=n
CONFIG_FEATURE_IP_ROUTE=n
CONFIG_FEATURE_IP_TUNNEL=n
CONFIG_FEATURE_IP_NEIGH=n
CONFIG_NC=n
CONFIG_NETSTAT=n
CONFIG_NSLOOKUP=n
CONFIG_FEATURE_NSLOOKUP_BIG=n
CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS=n
CONFIG_PING=n
CONFIG_FEATURE_FANCY_PING=n
CONFIG_ROUTE=n
CONFIG_FEATURE_TELNET_AUTOLOGIN=n
CONFIG_TFTP=n
CONFIG_FEATURE_TFTP_HPA_COMPAT=n
CONFIG_FEATURE_TFTP_GET=n
CONFIG_FEATURE_TFTP_PUT=n
CONFIG_WGET=n
CONFIG_FEATURE_WGET_LONG_OPTIONS=n
CONFIG_FEATURE_WGET_STATUSBAR=n
CONFIG_FEATURE_WGET_FTP=n
CONFIG_FEATURE_WGET_AUTHENTICATION=n
CONFIG_FEATURE_WGET_TIMEOUT=n
CONFIG_FEATURE_WGET_HTTPS=n
CONFIG_FEATURE_WGET_OPENSSL=n
CONFIG_DUMPLEASES=n
CONFIG_UDHCPC=n
CONFIG_FEATURE_UDHCPC_ARPING=n
CONFIG_FEATURE_UDHCPC_SANITIZEOPT=n
CONFIG_FEATURE_FAST_TOP=n
CONFIG_FREE=n
CONFIG_FUSER=n
CONFIG_LSOF=n
CONFIG_BB_SYSCTL=n
CONFIG_UPTIME=n
CONFIG_WATCH=n
CONFIG_KLOGD=n
CONFIG_FEATURE_KLOGD_KLOGCTL=n
CONFIG_LOGGER=n
CONFIG_LOGREAD=n
CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING=n
CONFIG_SYSLOGD=n
CONFIG_FEATURE_ROTATE_LOGFILE=n
CONFIG_FEATURE_REMOTE_LOG=n
CONFIG_FEATURE_SYSLOGD_DUP=n
CONFIG_FEATURE_SYSLOGD_CFG=n
CONFIG_FEATURE_IPC_SYSLOG=n
CONFIG_FEATURE_KMSG_SYSLOG=n
17 changes: 2 additions & 15 deletions recipes-pv/dropbear/dropbear-pv_git.bb
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,8 @@ inherit autotools

CVE_PRODUCT = "dropbear_ssh"

SBINCOMMANDS = "dropbear dropbearkey dropbearconvert"
BINCOMMANDS = "dbclient ssh scp"
EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS} ${BINCOMMANDS}"'
SBINCOMMANDS = "dropbear"
EXTRA_OEMAKE = 'MULTI=1 SCPPROGRESS=1 PROGRAMS="${SBINCOMMANDS}"'

# This option appends to CFLAGS and LDFLAGS from OE
# This is causing [textrel] QA warning
Expand All @@ -40,18 +39,11 @@ EXTRA_OECONF:append:libc-musl = " --disable-wtmp --disable-lastlog"
do_install() {
install -d ${D}${sysconfdir} \
${D}${sysconfdir}/dropbear \
${D}${bindir} \
${D}${sbindir} \
${D}${localstatedir}

install -m 0755 dropbearmulti ${D}${sbindir}/

for i in ${BINCOMMANDS}
do
# ssh and scp symlinks are created by update-alternatives
if [ $i = ssh ] || [ $i = scp ]; then continue; fi
ln -s ${sbindir}/dropbearmulti ${D}${bindir}/$i
done
for i in ${SBINCOMMANDS}
do
ln -s ./dropbearmulti ${D}${sbindir}/$i
Expand All @@ -61,8 +53,3 @@ do_install() {
inherit update-alternatives

ALTERNATIVE_PRIORITY = "20"
ALTERNATIVE:${PN} = "${@bb.utils.filter('BINCOMMANDS', 'scp ssh', d)}"

ALTERNATIVE_TARGET = "${sbindir}/dropbearmulti"

FILES:${PN} += "${bindir}"
10 changes: 9 additions & 1 deletion recipes-pv/images/pantavisor-initramfs.bb
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,14 @@ VIRTUAL-RUNTIME_dev_manager ?= "busybox-mdev"
VIRTUAL-RUNTIME_init_manager = "pantavisor"
VIRTUAL-RUNTIME_pantavisor_config ??= "pantavisor-default-config"

PACKAGE_INSTALL = "pantavisor ${VIRTUAL-RUNTIME_pantavisor_config} dropbear-pv busybox base-passwd kmod ${ROOTFS_BOOTSTRAP_INSTALL}"
PACKAGE_INSTALL = "pantavisor \
${VIRTUAL-RUNTIME_pantavisor_config} \
dropbear-pv \
busybox \
base-passwd \
rng-tools \
${@bb.utils.contains('PANTAVISOR_FEATURES', 'automod', 'kmod', '', d)} \
${ROOTFS_BOOTSTRAP_INSTALL}"

IMAGE_TYPES_MASKED += " pvbspit pvrexportit"

Expand Down Expand Up @@ -49,6 +56,7 @@ ROOTFS_POSTINSTALL_COMMAND += "do_finish_rootfs"

do_finish_rootfs() {
ln -sfr ${IMAGE_ROOTFS}/usr/bin/pantavisor ${IMAGE_ROOTFS}/sbin/init
rm -rf ${IMAGE_ROOTFS}/usr/lib/opkg
}

unset do_fetch[noexec]
Expand Down
7 changes: 7 additions & 0 deletions recipes-pv/rng-tools/rng-tools_%.bbappend
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
EXTRA_OECONF += " \
--without-nistbeacon \
--without-pkcs11 \
--without-rtlsdr \
"

PACKAGECONFIG:remove = "libjitterentropy"