diff --git a/BUSYBOX/64h.config b/BUSYBOX/64h.config new file mode 100644 index 00000000..32854774 --- /dev/null +++ b/BUSYBOX/64h.config @@ -0,0 +1,1166 @@ +# +# Automatically generated make config: don't edit +# Busybox version: 1.32.0 +# Fri Aug 7 05:44:56 2020 +# +CONFIG_HAVE_DOT_CONFIG=y + +# +# Settings +# +# CONFIG_DESKTOP is not set +# CONFIG_EXTRA_COMPAT is not set +# CONFIG_FEDORA_COMPAT is not set +# CONFIG_INCLUDE_SUSv2 is not set +# CONFIG_LONG_OPTS is not set +# CONFIG_SHOW_USAGE is not set +# CONFIG_FEATURE_VERBOSE_USAGE is not set +# CONFIG_FEATURE_COMPRESS_USAGE is not set +# CONFIG_LFS is not set +# CONFIG_PAM is not set +# CONFIG_FEATURE_DEVPTS is not set +# CONFIG_FEATURE_UTMP is not set +# CONFIG_FEATURE_WTMP is not set +# CONFIG_FEATURE_PIDFILE is not set +CONFIG_PID_FILE_PATH="" +# CONFIG_BUSYBOX is not set +# CONFIG_FEATURE_SHOW_SCRIPT is not set +# CONFIG_FEATURE_INSTALLER is not set +# CONFIG_INSTALL_NO_USR is not set +# CONFIG_FEATURE_SUID is not set +# CONFIG_FEATURE_SUID_CONFIG is not set +# CONFIG_FEATURE_SUID_CONFIG_QUIET is not set +# CONFIG_FEATURE_PREFER_APPLETS is not set +CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe" +# CONFIG_SELINUX is not set +# CONFIG_FEATURE_CLEAN_UP is not set +# CONFIG_FEATURE_SYSLOG_INFO is not set +# CONFIG_FEATURE_SYSLOG is not set +# CONFIG_PLATFORM_LINUX is not set + +# +# Build Options +# +CONFIG_STATIC=y +# CONFIG_PIE is not set +# CONFIG_NOMMU is not set +# CONFIG_BUILD_LIBBUSYBOX is not set +# CONFIG_FEATURE_LIBBUSYBOX_STATIC is not set +# CONFIG_FEATURE_INDIVIDUAL is not set +# CONFIG_FEATURE_SHARED_BUSYBOX is not set +CONFIG_CROSS_COMPILER_PREFIX="" +CONFIG_SYSROOT="" +CONFIG_EXTRA_CFLAGS="" +CONFIG_EXTRA_LDFLAGS="" +CONFIG_EXTRA_LDLIBS="" +# CONFIG_USE_PORTABLE_CODE is not set +# CONFIG_STACK_OPTIMIZATION_386 is not set + +# +# Installation Options ("make install" behavior) +# +CONFIG_INSTALL_APPLET_SYMLINKS=y +# CONFIG_INSTALL_APPLET_HARDLINKS is not set +# CONFIG_INSTALL_APPLET_SCRIPT_WRAPPERS is not set +# CONFIG_INSTALL_APPLET_DONT is not set +# CONFIG_INSTALL_SH_APPLET_SYMLINK is not set +# CONFIG_INSTALL_SH_APPLET_HARDLINK is not set +# CONFIG_INSTALL_SH_APPLET_SCRIPT_WRAPPER is not set +CONFIG_PREFIX="./_install" + +# +# Debugging Options +# +# CONFIG_DEBUG is not set +# CONFIG_DEBUG_PESSIMIZE is not set +# CONFIG_DEBUG_SANITIZE is not set +# CONFIG_UNIT_TEST is not set +# CONFIG_WERROR is not set +# CONFIG_WARN_SIMPLE_MSG is not set +CONFIG_NO_DEBUG_LIB=y +# CONFIG_DMALLOC is not set +# CONFIG_EFENCE is not set + +# +# Library Tuning +# +# CONFIG_FEATURE_USE_BSS_TAIL is not set +# CONFIG_FLOAT_DURATION is not set +# CONFIG_FEATURE_RTMINMAX is not set +# CONFIG_FEATURE_RTMINMAX_USE_LIBC_DEFINITIONS is not set +CONFIG_FEATURE_BUFFERS_USE_MALLOC=y +# CONFIG_FEATURE_BUFFERS_GO_ON_STACK is not set +# CONFIG_FEATURE_BUFFERS_GO_IN_BSS is not set +CONFIG_PASSWORD_MINLEN=6 +CONFIG_MD5_SMALL=1 +CONFIG_SHA3_SMALL=1 +# CONFIG_FEATURE_FAST_TOP is not set +# CONFIG_FEATURE_ETC_NETWORKS is not set +# CONFIG_FEATURE_ETC_SERVICES is not set +# CONFIG_FEATURE_EDITING is not set +CONFIG_FEATURE_EDITING_MAX_LEN=0 +# CONFIG_FEATURE_EDITING_VI is not set +CONFIG_FEATURE_EDITING_HISTORY=0 +# CONFIG_FEATURE_EDITING_SAVEHISTORY is not set +# CONFIG_FEATURE_EDITING_SAVE_ON_EXIT is not set +# CONFIG_FEATURE_REVERSE_SEARCH is not set +# CONFIG_FEATURE_TAB_COMPLETION is not set +# CONFIG_FEATURE_USERNAME_COMPLETION is not set +# CONFIG_FEATURE_EDITING_FANCY_PROMPT is not set +# CONFIG_FEATURE_EDITING_WINCH is not set +# CONFIG_FEATURE_EDITING_ASK_TERMINAL is not set +# CONFIG_LOCALE_SUPPORT is not set +# CONFIG_UNICODE_SUPPORT is not set +# CONFIG_UNICODE_USING_LOCALE is not set +# CONFIG_FEATURE_CHECK_UNICODE_IN_ENV is not set +CONFIG_SUBST_WCHAR=0 +CONFIG_LAST_SUPPORTED_WCHAR=0 +# CONFIG_UNICODE_COMBINING_WCHARS is not set +# CONFIG_UNICODE_WIDE_WCHARS is not set +# CONFIG_UNICODE_BIDI_SUPPORT is not set +# CONFIG_UNICODE_NEUTRAL_TABLE is not set +# CONFIG_UNICODE_PRESERVE_BROKEN is not set +# CONFIG_FEATURE_NON_POSIX_CP is not set +# CONFIG_FEATURE_VERBOSE_CP_MESSAGE is not set +# CONFIG_FEATURE_USE_SENDFILE is not set +CONFIG_FEATURE_COPYBUF_KB=4 +# CONFIG_FEATURE_SKIP_ROOTFS is not set +# CONFIG_MONOTONIC_SYSCALL is not set +# CONFIG_IOCTL_HEX2STR_ERROR is not set +# CONFIG_FEATURE_HWIB is not set + +# +# Applets +# + +# +# Archival Utilities +# +# CONFIG_FEATURE_SEAMLESS_XZ is not set +# CONFIG_FEATURE_SEAMLESS_LZMA is not set +# CONFIG_FEATURE_SEAMLESS_BZ2 is not set +# CONFIG_FEATURE_SEAMLESS_GZ is not set +# CONFIG_FEATURE_SEAMLESS_Z is not set +# CONFIG_AR is not set +# CONFIG_FEATURE_AR_LONG_FILENAMES is not set +# CONFIG_FEATURE_AR_CREATE is not set +# CONFIG_UNCOMPRESS is not set +# CONFIG_GUNZIP is not set +# CONFIG_ZCAT is not set +# CONFIG_FEATURE_GUNZIP_LONG_OPTIONS is not set +# CONFIG_BUNZIP2 is not set +# CONFIG_BZCAT is not set +# CONFIG_UNLZMA is not set +# CONFIG_LZCAT is not set +# CONFIG_LZMA is not set +# CONFIG_UNXZ is not set +# CONFIG_XZCAT is not set +# CONFIG_XZ is not set +# CONFIG_BZIP2 is not set +CONFIG_BZIP2_SMALL=0 +# CONFIG_FEATURE_BZIP2_DECOMPRESS is not set +# CONFIG_CPIO is not set +# CONFIG_FEATURE_CPIO_O is not set +# CONFIG_FEATURE_CPIO_P is not set +# CONFIG_DPKG is not set +# CONFIG_DPKG_DEB is not set +# CONFIG_GZIP is not set +# CONFIG_FEATURE_GZIP_LONG_OPTIONS is not set +CONFIG_GZIP_FAST=0 +# CONFIG_FEATURE_GZIP_LEVELS is not set +# CONFIG_FEATURE_GZIP_DECOMPRESS is not set +# CONFIG_LZOP is not set +# CONFIG_UNLZOP is not set +# CONFIG_LZOPCAT is not set +# CONFIG_LZOP_COMPR_HIGH is not set +# CONFIG_RPM is not set +# CONFIG_RPM2CPIO is not set +# CONFIG_TAR is not set +# CONFIG_FEATURE_TAR_LONG_OPTIONS is not set +# CONFIG_FEATURE_TAR_CREATE is not set +# CONFIG_FEATURE_TAR_AUTODETECT is not set +# CONFIG_FEATURE_TAR_FROM is not set +# CONFIG_FEATURE_TAR_OLDGNU_COMPATIBILITY is not set +# CONFIG_FEATURE_TAR_OLDSUN_COMPATIBILITY is not set +# CONFIG_FEATURE_TAR_GNU_EXTENSIONS is not set +# CONFIG_FEATURE_TAR_TO_COMMAND is not set +# CONFIG_FEATURE_TAR_UNAME_GNAME is not set +# CONFIG_FEATURE_TAR_NOPRESERVE_TIME is not set +# CONFIG_FEATURE_TAR_SELINUX is not set +# CONFIG_UNZIP is not set +# CONFIG_FEATURE_UNZIP_CDF is not set +# CONFIG_FEATURE_UNZIP_BZIP2 is not set +# CONFIG_FEATURE_UNZIP_LZMA is not set +# CONFIG_FEATURE_UNZIP_XZ is not set +# CONFIG_FEATURE_LZMA_FAST is not set + +# +# Coreutils +# +# CONFIG_BASENAME is not set +# CONFIG_CAT is not set +# CONFIG_FEATURE_CATN is not set +# CONFIG_FEATURE_CATV is not set +# CONFIG_CHGRP is not set +# CONFIG_CHMOD is not set +# CONFIG_CHOWN is not set +# CONFIG_FEATURE_CHOWN_LONG_OPTIONS is not set +# CONFIG_CHROOT is not set +# CONFIG_CKSUM is not set +# CONFIG_COMM is not set +# CONFIG_CP is not set +# CONFIG_FEATURE_CP_LONG_OPTIONS is not set +# CONFIG_FEATURE_CP_REFLINK is not set +# CONFIG_CUT is not set +# CONFIG_DATE is not set +# CONFIG_FEATURE_DATE_ISOFMT is not set +# CONFIG_FEATURE_DATE_NANO is not set +# CONFIG_FEATURE_DATE_COMPAT is not set +# CONFIG_DD is not set +# CONFIG_FEATURE_DD_SIGNAL_HANDLING is not set +# CONFIG_FEATURE_DD_THIRD_STATUS_LINE is not set +# CONFIG_FEATURE_DD_IBS_OBS is not set +# CONFIG_FEATURE_DD_STATUS is not set +# CONFIG_DF is not set +# CONFIG_FEATURE_DF_FANCY is not set +# CONFIG_DIRNAME is not set +# CONFIG_DOS2UNIX is not set +# CONFIG_UNIX2DOS is not set +# CONFIG_DU is not set +# CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K is not set +# CONFIG_ECHO is not set +CONFIG_FEATURE_FANCY_ECHO=y +# CONFIG_ENV is not set +# CONFIG_EXPAND is not set +# CONFIG_UNEXPAND is not set +# CONFIG_EXPR is not set +# CONFIG_EXPR_MATH_SUPPORT_64 is not set +# CONFIG_FACTOR is not set +# CONFIG_FALSE is not set +# CONFIG_FOLD is not set +# CONFIG_HEAD is not set +# CONFIG_FEATURE_FANCY_HEAD is not set +# CONFIG_HOSTID is not set +# CONFIG_ID is not set +# CONFIG_GROUPS is not set +# CONFIG_INSTALL is not set +# CONFIG_FEATURE_INSTALL_LONG_OPTIONS is not set +# CONFIG_LINK is not set +# CONFIG_LN is not set +# CONFIG_LOGNAME is not set +# CONFIG_LS is not set +# CONFIG_FEATURE_LS_FILETYPES is not set +# CONFIG_FEATURE_LS_FOLLOWLINKS is not set +# CONFIG_FEATURE_LS_RECURSIVE is not set +# CONFIG_FEATURE_LS_WIDTH is not set +# CONFIG_FEATURE_LS_SORTFILES is not set +# CONFIG_FEATURE_LS_TIMESTAMPS is not set +# CONFIG_FEATURE_LS_USERNAME is not set +# CONFIG_FEATURE_LS_COLOR is not set +# CONFIG_FEATURE_LS_COLOR_IS_DEFAULT is not set +# CONFIG_MD5SUM is not set +# CONFIG_SHA1SUM is not set +# CONFIG_SHA256SUM is not set +# CONFIG_SHA512SUM is not set +# CONFIG_SHA3SUM is not set +# CONFIG_FEATURE_MD5_SHA1_SUM_CHECK is not set +# CONFIG_MKDIR is not set +# CONFIG_MKFIFO is not set +# CONFIG_MKNOD is not set +# CONFIG_MKTEMP is not set +# CONFIG_MV is not set +# CONFIG_NICE is not set +# CONFIG_NL is not set +# CONFIG_NOHUP is not set +# CONFIG_NPROC is not set +# CONFIG_OD is not set +# CONFIG_PASTE is not set +# CONFIG_PRINTENV is not set +# CONFIG_PRINTF is not set +# CONFIG_PWD is not set +# CONFIG_READLINK is not set +# CONFIG_FEATURE_READLINK_FOLLOW is not set +# CONFIG_REALPATH is not set +# CONFIG_RM is not set +# CONFIG_RMDIR is not set +# CONFIG_SEQ is not set +# CONFIG_SHRED is not set +# CONFIG_SHUF is not set +# CONFIG_SLEEP is not set +# CONFIG_FEATURE_FANCY_SLEEP is not set +# CONFIG_SORT is not set +# CONFIG_FEATURE_SORT_BIG is not set +# CONFIG_FEATURE_SORT_OPTIMIZE_MEMORY is not set +# CONFIG_SPLIT is not set +# CONFIG_FEATURE_SPLIT_FANCY is not set +# CONFIG_STAT is not set +# CONFIG_FEATURE_STAT_FORMAT is not set +# CONFIG_FEATURE_STAT_FILESYSTEM is not set +# CONFIG_STTY is not set +# CONFIG_SUM is not set +# CONFIG_SYNC is not set +# CONFIG_FEATURE_SYNC_FANCY is not set +# CONFIG_FSYNC is not set +# CONFIG_TAC is not set +# CONFIG_TAIL is not set +# CONFIG_FEATURE_FANCY_TAIL is not set +# CONFIG_TEE is not set +# CONFIG_FEATURE_TEE_USE_BLOCK_IO is not set +# CONFIG_TEST is not set +# CONFIG_TEST1 is not set +# CONFIG_TEST2 is not set +CONFIG_FEATURE_TEST_64=y +# CONFIG_TIMEOUT is not set +# CONFIG_TOUCH is not set +# CONFIG_FEATURE_TOUCH_NODEREF is not set +# CONFIG_FEATURE_TOUCH_SUSV3 is not set +# CONFIG_TR is not set +# CONFIG_FEATURE_TR_CLASSES is not set +# CONFIG_FEATURE_TR_EQUIV is not set +# CONFIG_TRUE is not set +# CONFIG_TRUNCATE is not set +# CONFIG_TTY is not set +# CONFIG_UNAME is not set +CONFIG_UNAME_OSNAME="" +# CONFIG_BB_ARCH is not set +# CONFIG_UNIQ is not set +# CONFIG_UNLINK is not set +# CONFIG_USLEEP is not set +# CONFIG_UUDECODE is not set +# CONFIG_BASE64 is not set +# CONFIG_UUENCODE is not set +# CONFIG_WC is not set +# CONFIG_FEATURE_WC_LARGE is not set +# CONFIG_WHOAMI is not set +# CONFIG_WHO is not set +# CONFIG_W is not set +# CONFIG_USERS is not set +# CONFIG_YES is not set + +# +# Common options +# +# CONFIG_FEATURE_VERBOSE is not set +# CONFIG_FEATURE_PRESERVE_HARDLINKS is not set +# CONFIG_FEATURE_HUMAN_READABLE is not set + +# +# Console Utilities +# +# CONFIG_CHVT is not set +# CONFIG_CLEAR is not set +# CONFIG_DEALLOCVT is not set +# CONFIG_DUMPKMAP is not set +# CONFIG_FGCONSOLE is not set +# CONFIG_KBD_MODE is not set +# CONFIG_LOADFONT is not set +# CONFIG_SETFONT is not set +# CONFIG_FEATURE_SETFONT_TEXTUAL_MAP is not set +CONFIG_DEFAULT_SETFONT_DIR="" +# CONFIG_FEATURE_LOADFONT_PSF2 is not set +# CONFIG_FEATURE_LOADFONT_RAW is not set +# CONFIG_LOADKMAP is not set +# CONFIG_OPENVT is not set +# CONFIG_RESET is not set +# CONFIG_RESIZE is not set +# CONFIG_FEATURE_RESIZE_PRINT is not set +# CONFIG_SETCONSOLE is not set +# CONFIG_FEATURE_SETCONSOLE_LONG_OPTIONS is not set +# CONFIG_SETKEYCODES is not set +# CONFIG_SETLOGCONS is not set +# CONFIG_SHOWKEY is not set + +# +# Debian Utilities +# +# CONFIG_PIPE_PROGRESS is not set +# CONFIG_RUN_PARTS is not set +# CONFIG_FEATURE_RUN_PARTS_LONG_OPTIONS is not set +# CONFIG_FEATURE_RUN_PARTS_FANCY is not set +# CONFIG_START_STOP_DAEMON is not set +# CONFIG_FEATURE_START_STOP_DAEMON_LONG_OPTIONS is not set +# CONFIG_FEATURE_START_STOP_DAEMON_FANCY is not set +# CONFIG_WHICH is not set + +# +# klibc-utils +# +# CONFIG_MINIPS is not set +# CONFIG_NUKE is not set +# CONFIG_RESUME is not set +# CONFIG_RUN_INIT is not set + +# +# Editors +# +# CONFIG_AWK is not set +# CONFIG_FEATURE_AWK_LIBM is not set +# CONFIG_FEATURE_AWK_GNU_EXTENSIONS is not set +# CONFIG_CMP is not set +# CONFIG_DIFF is not set +# CONFIG_FEATURE_DIFF_LONG_OPTIONS is not set +# CONFIG_FEATURE_DIFF_DIR is not set +# CONFIG_ED is not set +# CONFIG_PATCH is not set +# CONFIG_SED is not set +# CONFIG_VI is not set +CONFIG_FEATURE_VI_MAX_LEN=0 +# CONFIG_FEATURE_VI_8BIT is not set +# CONFIG_FEATURE_VI_COLON is not set +# CONFIG_FEATURE_VI_YANKMARK is not set +# CONFIG_FEATURE_VI_SEARCH is not set +# CONFIG_FEATURE_VI_REGEX_SEARCH is not set +# CONFIG_FEATURE_VI_USE_SIGNALS is not set +# CONFIG_FEATURE_VI_DOT_CMD is not set +# CONFIG_FEATURE_VI_READONLY is not set +# CONFIG_FEATURE_VI_SETOPTS is not set +# CONFIG_FEATURE_VI_SET is not set +# CONFIG_FEATURE_VI_WIN_RESIZE is not set +# CONFIG_FEATURE_VI_ASK_TERMINAL is not set +# CONFIG_FEATURE_VI_UNDO is not set +# CONFIG_FEATURE_VI_UNDO_QUEUE is not set +CONFIG_FEATURE_VI_UNDO_QUEUE_MAX=0 +# CONFIG_FEATURE_ALLOW_EXEC is not set + +# +# Finding Utilities +# +# CONFIG_FIND is not set +# CONFIG_FEATURE_FIND_PRINT0 is not set +# CONFIG_FEATURE_FIND_MTIME is not set +# CONFIG_FEATURE_FIND_MMIN is not set +# CONFIG_FEATURE_FIND_PERM is not set +# CONFIG_FEATURE_FIND_TYPE is not set +# CONFIG_FEATURE_FIND_EXECUTABLE is not set +# CONFIG_FEATURE_FIND_XDEV is not set +# CONFIG_FEATURE_FIND_MAXDEPTH is not set +# CONFIG_FEATURE_FIND_NEWER is not set +# CONFIG_FEATURE_FIND_INUM is not set +# CONFIG_FEATURE_FIND_EXEC is not set +# CONFIG_FEATURE_FIND_EXEC_PLUS is not set +# CONFIG_FEATURE_FIND_USER is not set +# CONFIG_FEATURE_FIND_GROUP is not set +# CONFIG_FEATURE_FIND_NOT is not set +# CONFIG_FEATURE_FIND_DEPTH is not set +# CONFIG_FEATURE_FIND_PAREN is not set +# CONFIG_FEATURE_FIND_SIZE is not set +# CONFIG_FEATURE_FIND_PRUNE is not set +# CONFIG_FEATURE_FIND_QUIT is not set +# CONFIG_FEATURE_FIND_DELETE is not set +# CONFIG_FEATURE_FIND_EMPTY is not set +# CONFIG_FEATURE_FIND_PATH is not set +# CONFIG_FEATURE_FIND_REGEX is not set +# CONFIG_FEATURE_FIND_CONTEXT is not set +# CONFIG_FEATURE_FIND_LINKS is not set +# CONFIG_GREP is not set +# CONFIG_EGREP is not set +# CONFIG_FGREP is not set +# CONFIG_FEATURE_GREP_CONTEXT is not set +# CONFIG_XARGS is not set +# CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION is not set +# CONFIG_FEATURE_XARGS_SUPPORT_QUOTES is not set +# CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT is not set +# CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM is not set +# CONFIG_FEATURE_XARGS_SUPPORT_REPL_STR is not set +# CONFIG_FEATURE_XARGS_SUPPORT_PARALLEL is not set +# CONFIG_FEATURE_XARGS_SUPPORT_ARGS_FILE is not set + +# +# Init Utilities +# +# CONFIG_BOOTCHARTD is not set +# CONFIG_FEATURE_BOOTCHARTD_BLOATED_HEADER is not set +# CONFIG_FEATURE_BOOTCHARTD_CONFIG_FILE is not set +# CONFIG_HALT is not set +# CONFIG_POWEROFF is not set +# CONFIG_REBOOT is not set +# CONFIG_FEATURE_WAIT_FOR_INIT is not set +# CONFIG_FEATURE_CALL_TELINIT is not set +CONFIG_TELINIT_PATH="" +# CONFIG_INIT is not set +# CONFIG_LINUXRC is not set +# CONFIG_FEATURE_USE_INITTAB is not set +# CONFIG_FEATURE_KILL_REMOVED is not set +CONFIG_FEATURE_KILL_DELAY=0 +# CONFIG_FEATURE_INIT_SCTTY is not set +# CONFIG_FEATURE_INIT_SYSLOG is not set +# CONFIG_FEATURE_INIT_QUIET is not set +# CONFIG_FEATURE_INIT_COREDUMPS is not set +CONFIG_INIT_TERMINAL_TYPE="" +# CONFIG_FEATURE_INIT_MODIFY_CMDLINE is not set + +# +# Login/Password Management Utilities +# +# CONFIG_FEATURE_SHADOWPASSWDS is not set +# CONFIG_USE_BB_PWD_GRP is not set +# CONFIG_USE_BB_SHADOW is not set +# CONFIG_USE_BB_CRYPT is not set +# CONFIG_USE_BB_CRYPT_SHA is not set +# CONFIG_ADDGROUP is not set +# CONFIG_FEATURE_ADDUSER_TO_GROUP is not set +# CONFIG_ADD_SHELL is not set +# CONFIG_REMOVE_SHELL is not set +# CONFIG_ADDUSER is not set +# CONFIG_FEATURE_CHECK_NAMES is not set +CONFIG_LAST_ID=0 +CONFIG_FIRST_SYSTEM_ID=0 +CONFIG_LAST_SYSTEM_ID=0 +# CONFIG_CHPASSWD is not set +CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="" +# CONFIG_CRYPTPW is not set +# CONFIG_MKPASSWD is not set +# CONFIG_DELUSER is not set +# CONFIG_DELGROUP is not set +# CONFIG_FEATURE_DEL_USER_FROM_GROUP is not set +# CONFIG_GETTY is not set +# CONFIG_LOGIN is not set +# CONFIG_LOGIN_SESSION_AS_CHILD is not set +# CONFIG_LOGIN_SCRIPTS is not set +# CONFIG_FEATURE_NOLOGIN is not set +# CONFIG_FEATURE_SECURETTY is not set +# CONFIG_PASSWD is not set +# CONFIG_FEATURE_PASSWD_WEAK_CHECK is not set +# CONFIG_SU is not set +# CONFIG_FEATURE_SU_SYSLOG is not set +# CONFIG_FEATURE_SU_CHECKS_SHELLS is not set +# CONFIG_FEATURE_SU_BLANK_PW_NEEDS_SECURE_TTY is not set +# CONFIG_SULOGIN is not set +# CONFIG_VLOCK is not set + +# +# Linux Ext2 FS Progs +# +# CONFIG_CHATTR is not set +# CONFIG_FSCK is not set +# CONFIG_LSATTR is not set +# CONFIG_TUNE2FS is not set + +# +# Linux Module Utilities +# +# CONFIG_MODPROBE_SMALL is not set +# CONFIG_DEPMOD is not set +# CONFIG_INSMOD is not set +# CONFIG_LSMOD is not set +# CONFIG_FEATURE_LSMOD_PRETTY_2_6_OUTPUT is not set +# CONFIG_MODINFO is not set +# CONFIG_MODPROBE is not set +# CONFIG_FEATURE_MODPROBE_BLACKLIST is not set +# CONFIG_RMMOD is not set + +# +# Options common to multiple modutils +# +# CONFIG_FEATURE_CMDLINE_MODULE_OPTIONS is not set +# CONFIG_FEATURE_MODPROBE_SMALL_CHECK_ALREADY_LOADED is not set +# CONFIG_FEATURE_2_4_MODULES is not set +# CONFIG_FEATURE_INSMOD_VERSION_CHECKING is not set +# CONFIG_FEATURE_INSMOD_KSYMOOPS_SYMBOLS is not set +# CONFIG_FEATURE_INSMOD_LOADINKMEM is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP is not set +# CONFIG_FEATURE_INSMOD_LOAD_MAP_FULL is not set +# CONFIG_FEATURE_CHECK_TAINTED_MODULE is not set +# CONFIG_FEATURE_INSMOD_TRY_MMAP is not set +# CONFIG_FEATURE_MODUTILS_ALIAS is not set +# CONFIG_FEATURE_MODUTILS_SYMBOLS is not set +CONFIG_DEFAULT_MODULES_DIR="" +CONFIG_DEFAULT_DEPMOD_FILE="" + +# +# Linux System Utilities +# +# CONFIG_ACPID is not set +# CONFIG_FEATURE_ACPID_COMPAT is not set +# CONFIG_BLKDISCARD is not set +# CONFIG_BLKID is not set +# CONFIG_FEATURE_BLKID_TYPE is not set +# CONFIG_BLOCKDEV is not set +# CONFIG_CAL is not set +# CONFIG_CHRT is not set +# CONFIG_DMESG is not set +# CONFIG_FEATURE_DMESG_PRETTY is not set +# CONFIG_EJECT is not set +# CONFIG_FEATURE_EJECT_SCSI is not set +# CONFIG_FALLOCATE is not set +# CONFIG_FATATTR is not set +# CONFIG_FBSET is not set +# CONFIG_FEATURE_FBSET_FANCY is not set +# CONFIG_FEATURE_FBSET_READMODE is not set +# CONFIG_FDFORMAT is not set +# CONFIG_FDISK is not set +# CONFIG_FDISK_SUPPORT_LARGE_DISKS is not set +# CONFIG_FEATURE_FDISK_WRITABLE is not set +# CONFIG_FEATURE_AIX_LABEL is not set +# CONFIG_FEATURE_SGI_LABEL is not set +# CONFIG_FEATURE_SUN_LABEL is not set +# CONFIG_FEATURE_OSF_LABEL is not set +# CONFIG_FEATURE_GPT_LABEL is not set +# CONFIG_FEATURE_FDISK_ADVANCED is not set +# CONFIG_FINDFS is not set +# CONFIG_FLOCK is not set +# CONFIG_FDFLUSH is not set +# CONFIG_FREERAMDISK is not set +# CONFIG_FSCK_MINIX is not set +# CONFIG_FSFREEZE is not set +# CONFIG_FSTRIM is not set +# CONFIG_GETOPT is not set +# CONFIG_FEATURE_GETOPT_LONG is not set +# CONFIG_HEXDUMP is not set +# CONFIG_FEATURE_HEXDUMP_REVERSE is not set +# CONFIG_HD is not set +# CONFIG_XXD is not set +# CONFIG_HWCLOCK is not set +# CONFIG_FEATURE_HWCLOCK_ADJTIME_FHS is not set +# CONFIG_IONICE is not set +# CONFIG_IPCRM is not set +# CONFIG_IPCS is not set +# CONFIG_LAST is not set +# CONFIG_FEATURE_LAST_FANCY is not set +# CONFIG_LOSETUP is not set +# CONFIG_LSPCI is not set +# CONFIG_LSUSB is not set +# CONFIG_MDEV is not set +# CONFIG_FEATURE_MDEV_CONF is not set +# CONFIG_FEATURE_MDEV_RENAME is not set +# CONFIG_FEATURE_MDEV_RENAME_REGEXP is not set +# CONFIG_FEATURE_MDEV_EXEC is not set +# CONFIG_FEATURE_MDEV_LOAD_FIRMWARE is not set +# CONFIG_FEATURE_MDEV_DAEMON is not set +# CONFIG_MESG is not set +# CONFIG_FEATURE_MESG_ENABLE_ONLY_GROUP is not set +# CONFIG_MKE2FS is not set +# CONFIG_MKFS_EXT2 is not set +# CONFIG_MKFS_MINIX is not set +# CONFIG_FEATURE_MINIX2 is not set +# CONFIG_MKFS_REISER is not set +# CONFIG_MKDOSFS is not set +# CONFIG_MKFS_VFAT is not set +# CONFIG_MKSWAP is not set +# CONFIG_FEATURE_MKSWAP_UUID is not set +# CONFIG_MORE is not set +# CONFIG_MOUNT is not set +# CONFIG_FEATURE_MOUNT_FAKE is not set +# CONFIG_FEATURE_MOUNT_VERBOSE is not set +# CONFIG_FEATURE_MOUNT_HELPERS is not set +# CONFIG_FEATURE_MOUNT_LABEL is not set +# CONFIG_FEATURE_MOUNT_NFS is not set +# CONFIG_FEATURE_MOUNT_CIFS is not set +# CONFIG_FEATURE_MOUNT_FLAGS is not set +# CONFIG_FEATURE_MOUNT_FSTAB is not set +# CONFIG_FEATURE_MOUNT_OTHERTAB is not set +# CONFIG_MOUNTPOINT is not set +# CONFIG_NOLOGIN is not set +# CONFIG_NOLOGIN_DEPENDENCIES is not set +# CONFIG_NSENTER is not set +# CONFIG_PIVOT_ROOT is not set +# CONFIG_RDATE is not set +# CONFIG_RDEV is not set +# CONFIG_READPROFILE is not set +# CONFIG_RENICE is not set +# CONFIG_REV is not set +# CONFIG_RTCWAKE is not set +# CONFIG_SCRIPT is not set +# CONFIG_SCRIPTREPLAY is not set +# CONFIG_SETARCH is not set +# CONFIG_LINUX32 is not set +# CONFIG_LINUX64 is not set +# CONFIG_SETPRIV is not set +# CONFIG_FEATURE_SETPRIV_DUMP is not set +# CONFIG_FEATURE_SETPRIV_CAPABILITIES is not set +# CONFIG_FEATURE_SETPRIV_CAPABILITY_NAMES is not set +# CONFIG_SETSID is not set +# CONFIG_SWAPON is not set +# CONFIG_FEATURE_SWAPON_DISCARD is not set +# CONFIG_FEATURE_SWAPON_PRI is not set +# CONFIG_SWAPOFF is not set +# CONFIG_FEATURE_SWAPONOFF_LABEL is not set +# CONFIG_SWITCH_ROOT is not set +# CONFIG_TASKSET is not set +# CONFIG_FEATURE_TASKSET_FANCY is not set +# CONFIG_FEATURE_TASKSET_CPULIST is not set +# CONFIG_UEVENT is not set +# CONFIG_UMOUNT is not set +# CONFIG_FEATURE_UMOUNT_ALL is not set +# CONFIG_UNSHARE is not set +# CONFIG_WALL is not set +# CONFIG_FEATURE_MOUNT_LOOP is not set +# CONFIG_FEATURE_MOUNT_LOOP_CREATE is not set +# CONFIG_FEATURE_MTAB_SUPPORT is not set +# CONFIG_VOLUMEID is not set +# CONFIG_FEATURE_VOLUMEID_BCACHE is not set +# CONFIG_FEATURE_VOLUMEID_BTRFS is not set +# CONFIG_FEATURE_VOLUMEID_CRAMFS is not set +# CONFIG_FEATURE_VOLUMEID_EXFAT is not set +# CONFIG_FEATURE_VOLUMEID_EXT is not set +# CONFIG_FEATURE_VOLUMEID_F2FS is not set +# CONFIG_FEATURE_VOLUMEID_FAT is not set +# CONFIG_FEATURE_VOLUMEID_HFS is not set +# CONFIG_FEATURE_VOLUMEID_ISO9660 is not set +# CONFIG_FEATURE_VOLUMEID_JFS is not set +# CONFIG_FEATURE_VOLUMEID_LFS is not set +# CONFIG_FEATURE_VOLUMEID_LINUXRAID is not set +# CONFIG_FEATURE_VOLUMEID_LINUXSWAP is not set +# CONFIG_FEATURE_VOLUMEID_LUKS is not set +# CONFIG_FEATURE_VOLUMEID_MINIX is not set +# CONFIG_FEATURE_VOLUMEID_NILFS is not set +# CONFIG_FEATURE_VOLUMEID_NTFS is not set +# CONFIG_FEATURE_VOLUMEID_OCFS2 is not set +# CONFIG_FEATURE_VOLUMEID_REISERFS is not set +# CONFIG_FEATURE_VOLUMEID_ROMFS is not set +# CONFIG_FEATURE_VOLUMEID_SQUASHFS is not set +# CONFIG_FEATURE_VOLUMEID_SYSV is not set +# CONFIG_FEATURE_VOLUMEID_UBIFS is not set +# CONFIG_FEATURE_VOLUMEID_UDF is not set +# CONFIG_FEATURE_VOLUMEID_XFS is not set + +# +# Miscellaneous Utilities +# +# CONFIG_ADJTIMEX is not set +# CONFIG_BBCONFIG is not set +# CONFIG_FEATURE_COMPRESS_BBCONFIG is not set +# CONFIG_BC is not set +# CONFIG_DC is not set +# CONFIG_FEATURE_DC_BIG is not set +# CONFIG_FEATURE_DC_LIBM is not set +# CONFIG_FEATURE_BC_INTERACTIVE is not set +# CONFIG_FEATURE_BC_LONG_OPTIONS is not set +# CONFIG_BEEP is not set +CONFIG_FEATURE_BEEP_FREQ=0 +CONFIG_FEATURE_BEEP_LENGTH_MS=0 +# CONFIG_CHAT is not set +# CONFIG_FEATURE_CHAT_NOFAIL is not set +# CONFIG_FEATURE_CHAT_TTY_HIFI is not set +# CONFIG_FEATURE_CHAT_IMPLICIT_CR is not set +# CONFIG_FEATURE_CHAT_SWALLOW_OPTS is not set +# CONFIG_FEATURE_CHAT_SEND_ESCAPES is not set +# CONFIG_FEATURE_CHAT_VAR_ABORT_LEN is not set +# CONFIG_FEATURE_CHAT_CLR_ABORT is not set +# CONFIG_CONSPY is not set +# CONFIG_CROND is not set +# CONFIG_FEATURE_CROND_D is not set +# CONFIG_FEATURE_CROND_CALL_SENDMAIL is not set +# CONFIG_FEATURE_CROND_SPECIAL_TIMES is not set +CONFIG_FEATURE_CROND_DIR="" +# CONFIG_CRONTAB is not set +# CONFIG_DEVFSD is not set +# CONFIG_DEVFSD_MODLOAD is not set +# CONFIG_DEVFSD_FG_NP is not set +# CONFIG_DEVFSD_VERBOSE is not set +# CONFIG_FEATURE_DEVFS is not set +# CONFIG_DEVMEM is not set +# CONFIG_FBSPLASH is not set +# CONFIG_FLASHCP is not set +# CONFIG_FLASH_ERASEALL is not set +# CONFIG_FLASH_LOCK is not set +# CONFIG_FLASH_UNLOCK is not set +# CONFIG_HDPARM is not set +# CONFIG_FEATURE_HDPARM_GET_IDENTITY is not set +# CONFIG_FEATURE_HDPARM_HDIO_SCAN_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_UNREGISTER_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_DRIVE_RESET is not set +# CONFIG_FEATURE_HDPARM_HDIO_TRISTATE_HWIF is not set +# CONFIG_FEATURE_HDPARM_HDIO_GETSET_DMA is not set +# CONFIG_HEXEDIT is not set +# CONFIG_I2CGET is not set +# CONFIG_I2CSET is not set +# CONFIG_I2CDUMP is not set +# CONFIG_I2CDETECT is not set +# CONFIG_I2CTRANSFER is not set +# CONFIG_INOTIFYD is not set +# CONFIG_LESS is not set +CONFIG_FEATURE_LESS_MAXLINES=0 +# CONFIG_FEATURE_LESS_BRACKETS is not set +# CONFIG_FEATURE_LESS_FLAGS is not set +# CONFIG_FEATURE_LESS_TRUNCATE is not set +# CONFIG_FEATURE_LESS_MARKS is not set +# CONFIG_FEATURE_LESS_REGEXP is not set +# CONFIG_FEATURE_LESS_WINCH is not set +# CONFIG_FEATURE_LESS_ASK_TERMINAL is not set +# CONFIG_FEATURE_LESS_DASHCMD is not set +# CONFIG_FEATURE_LESS_LINENUMS is not set +# CONFIG_FEATURE_LESS_RAW is not set +# CONFIG_FEATURE_LESS_ENV is not set +# CONFIG_LSSCSI is not set +# CONFIG_MAKEDEVS is not set +# CONFIG_FEATURE_MAKEDEVS_LEAF is not set +# CONFIG_FEATURE_MAKEDEVS_TABLE is not set +# CONFIG_MAN is not set +# CONFIG_MICROCOM is not set +# CONFIG_MIM is not set +# CONFIG_MT is not set +# CONFIG_NANDWRITE is not set +# CONFIG_NANDDUMP is not set +# CONFIG_PARTPROBE is not set +# CONFIG_RAIDAUTORUN is not set +# CONFIG_READAHEAD is not set +# CONFIG_RFKILL is not set +# CONFIG_RUNLEVEL is not set +# CONFIG_RX is not set +# CONFIG_SETFATTR is not set +# CONFIG_SETSERIAL is not set +# CONFIG_STRINGS is not set +# CONFIG_TIME is not set +# CONFIG_TS is not set +# CONFIG_TTYSIZE is not set +# CONFIG_UBIRENAME is not set +# CONFIG_UBIATTACH is not set +# CONFIG_UBIDETACH is not set +# CONFIG_UBIMKVOL is not set +# CONFIG_UBIRMVOL is not set +# CONFIG_UBIRSVOL is not set +# CONFIG_UBIUPDATEVOL is not set +# CONFIG_VOLNAME is not set +# CONFIG_WATCHDOG is not set + +# +# Networking Utilities +# +# CONFIG_FEATURE_IPV6 is not set +# CONFIG_FEATURE_UNIX_LOCAL is not set +# CONFIG_FEATURE_PREFER_IPV4_ADDRESS is not set +# CONFIG_VERBOSE_RESOLUTION_ERRORS is not set +# CONFIG_FEATURE_TLS_SHA1 is not set +# CONFIG_ARP is not set +# CONFIG_ARPING is not set +# CONFIG_BRCTL is not set +# CONFIG_FEATURE_BRCTL_FANCY is not set +# CONFIG_FEATURE_BRCTL_SHOW is not set +# CONFIG_DNSD is not set +# CONFIG_ETHER_WAKE is not set +# CONFIG_FTPD is not set +# CONFIG_FEATURE_FTPD_WRITE is not set +# CONFIG_FEATURE_FTPD_ACCEPT_BROKEN_LIST is not set +# CONFIG_FEATURE_FTPD_AUTHENTICATION is not set +# CONFIG_FTPGET is not set +# CONFIG_FTPPUT is not set +# CONFIG_FEATURE_FTPGETPUT_LONG_OPTIONS is not set +# CONFIG_HOSTNAME is not set +# CONFIG_DNSDOMAINNAME is not set +# CONFIG_HTTPD is not set +# CONFIG_FEATURE_HTTPD_RANGES is not set +# CONFIG_FEATURE_HTTPD_SETUID is not set +# CONFIG_FEATURE_HTTPD_BASIC_AUTH is not set +# CONFIG_FEATURE_HTTPD_AUTH_MD5 is not set +# CONFIG_FEATURE_HTTPD_CGI is not set +# CONFIG_FEATURE_HTTPD_CONFIG_WITH_SCRIPT_INTERPR is not set +# CONFIG_FEATURE_HTTPD_SET_REMOTE_PORT_TO_ENV is not set +# CONFIG_FEATURE_HTTPD_ENCODE_URL_STR is not set +# CONFIG_FEATURE_HTTPD_ERROR_PAGES is not set +# CONFIG_FEATURE_HTTPD_PROXY is not set +# CONFIG_FEATURE_HTTPD_GZIP is not set +# CONFIG_IFCONFIG is not set +# CONFIG_FEATURE_IFCONFIG_STATUS is not set +# CONFIG_FEATURE_IFCONFIG_SLIP is not set +# CONFIG_FEATURE_IFCONFIG_MEMSTART_IOADDR_IRQ is not set +# CONFIG_FEATURE_IFCONFIG_HW is not set +# CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS is not set +# CONFIG_IFENSLAVE is not set +# CONFIG_IFPLUGD is not set +# CONFIG_IFUP is not set +# CONFIG_IFDOWN is not set +CONFIG_IFUPDOWN_IFSTATE_PATH="" +# CONFIG_FEATURE_IFUPDOWN_IP is not set +# CONFIG_FEATURE_IFUPDOWN_IPV4 is not set +# CONFIG_FEATURE_IFUPDOWN_IPV6 is not set +# CONFIG_FEATURE_IFUPDOWN_MAPPING is not set +# CONFIG_FEATURE_IFUPDOWN_EXTERNAL_DHCP is not set +# CONFIG_INETD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_ECHO is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DISCARD is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_TIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_DAYTIME is not set +# CONFIG_FEATURE_INETD_SUPPORT_BUILTIN_CHARGEN is not set +# CONFIG_FEATURE_INETD_RPC is not set +# CONFIG_IP is not set +# CONFIG_IPADDR is not set +# CONFIG_IPLINK is not set +# CONFIG_IPROUTE is not set +# CONFIG_IPTUNNEL is not set +# CONFIG_IPRULE is not set +# CONFIG_IPNEIGH is not set +# CONFIG_FEATURE_IP_ADDRESS is not set +# CONFIG_FEATURE_IP_LINK is not set +# CONFIG_FEATURE_IP_ROUTE is not set +CONFIG_FEATURE_IP_ROUTE_DIR="" +# CONFIG_FEATURE_IP_TUNNEL is not set +# CONFIG_FEATURE_IP_RULE is not set +# CONFIG_FEATURE_IP_NEIGH is not set +# CONFIG_FEATURE_IP_RARE_PROTOCOLS is not set +# CONFIG_IPCALC is not set +# CONFIG_FEATURE_IPCALC_LONG_OPTIONS is not set +# CONFIG_FEATURE_IPCALC_FANCY is not set +# CONFIG_FAKEIDENTD is not set +# CONFIG_NAMEIF is not set +# CONFIG_FEATURE_NAMEIF_EXTENDED is not set +# CONFIG_NBDCLIENT is not set +# CONFIG_NC is not set +# CONFIG_NETCAT is not set +# CONFIG_NC_SERVER is not set +# CONFIG_NC_EXTRA is not set +# CONFIG_NC_110_COMPAT is not set +# CONFIG_NETSTAT is not set +# CONFIG_FEATURE_NETSTAT_WIDE is not set +# CONFIG_FEATURE_NETSTAT_PRG is not set +# CONFIG_NSLOOKUP is not set +# CONFIG_FEATURE_NSLOOKUP_BIG is not set +# CONFIG_FEATURE_NSLOOKUP_LONG_OPTIONS is not set +# CONFIG_NTPD is not set +# CONFIG_FEATURE_NTPD_SERVER is not set +# CONFIG_FEATURE_NTPD_CONF is not set +# CONFIG_FEATURE_NTP_AUTH is not set +# CONFIG_PING is not set +# CONFIG_PING6 is not set +# CONFIG_FEATURE_FANCY_PING is not set +# CONFIG_PSCAN is not set +# CONFIG_ROUTE is not set +# CONFIG_SLATTACH is not set +# CONFIG_SSL_CLIENT is not set +# CONFIG_TC is not set +# CONFIG_FEATURE_TC_INGRESS is not set +# CONFIG_TCPSVD is not set +# CONFIG_UDPSVD is not set +# CONFIG_TELNET is not set +# CONFIG_FEATURE_TELNET_TTYPE is not set +# CONFIG_FEATURE_TELNET_AUTOLOGIN is not set +# CONFIG_FEATURE_TELNET_WIDTH is not set +# CONFIG_TELNETD is not set +# CONFIG_FEATURE_TELNETD_STANDALONE is not set +# CONFIG_FEATURE_TELNETD_INETD_WAIT is not set +# CONFIG_TFTP is not set +# CONFIG_FEATURE_TFTP_PROGRESS_BAR is not set +# CONFIG_FEATURE_TFTP_HPA_COMPAT is not set +# CONFIG_TFTPD is not set +# CONFIG_FEATURE_TFTP_GET is not set +# CONFIG_FEATURE_TFTP_PUT is not set +# CONFIG_FEATURE_TFTP_BLOCKSIZE is not set +# CONFIG_TFTP_DEBUG is not set +# CONFIG_TLS is not set +# CONFIG_TRACEROUTE is not set +# CONFIG_TRACEROUTE6 is not set +# CONFIG_FEATURE_TRACEROUTE_VERBOSE is not set +# CONFIG_FEATURE_TRACEROUTE_USE_ICMP is not set +# CONFIG_TUNCTL is not set +# CONFIG_FEATURE_TUNCTL_UG is not set +# CONFIG_VCONFIG is not set +# CONFIG_WGET is not set +# CONFIG_FEATURE_WGET_LONG_OPTIONS is not set +# CONFIG_FEATURE_WGET_STATUSBAR is not set +# CONFIG_FEATURE_WGET_AUTHENTICATION is not set +# CONFIG_FEATURE_WGET_TIMEOUT is not set +# CONFIG_FEATURE_WGET_HTTPS is not set +# CONFIG_FEATURE_WGET_OPENSSL is not set +# CONFIG_WHOIS is not set +# CONFIG_ZCIP is not set +# CONFIG_UDHCPD is not set +# CONFIG_FEATURE_UDHCPD_BASE_IP_ON_MAC is not set +# CONFIG_FEATURE_UDHCPD_WRITE_LEASES_EARLY is not set +CONFIG_DHCPD_LEASES_FILE="" +# CONFIG_DUMPLEASES is not set +# CONFIG_DHCPRELAY is not set +# CONFIG_UDHCPC is not set +# CONFIG_FEATURE_UDHCPC_ARPING is not set +# CONFIG_FEATURE_UDHCPC_SANITIZEOPT is not set +CONFIG_UDHCPC_DEFAULT_SCRIPT="" +# CONFIG_UDHCPC6 is not set +# CONFIG_FEATURE_UDHCPC6_RFC3646 is not set +# CONFIG_FEATURE_UDHCPC6_RFC4704 is not set +# CONFIG_FEATURE_UDHCPC6_RFC4833 is not set +# CONFIG_FEATURE_UDHCPC6_RFC5970 is not set +# CONFIG_FEATURE_UDHCP_PORT is not set +CONFIG_UDHCP_DEBUG=0 +CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=0 +# CONFIG_FEATURE_UDHCP_RFC3397 is not set +# CONFIG_FEATURE_UDHCP_8021Q is not set +CONFIG_IFUPDOWN_UDHCPC_CMD_OPTIONS="" + +# +# Print Utilities +# +# CONFIG_LPD is not set +# CONFIG_LPR is not set +# CONFIG_LPQ is not set + +# +# Mail Utilities +# +# CONFIG_MAKEMIME is not set +# CONFIG_POPMAILDIR is not set +# CONFIG_FEATURE_POPMAILDIR_DELIVERY is not set +# CONFIG_REFORMIME is not set +# CONFIG_FEATURE_REFORMIME_COMPAT is not set +# CONFIG_SENDMAIL is not set +CONFIG_FEATURE_MIME_CHARSET="" + +# +# Process Utilities +# +# CONFIG_FREE is not set +# CONFIG_FUSER is not set +# CONFIG_IOSTAT is not set +# CONFIG_KILL is not set +# CONFIG_KILLALL is not set +# CONFIG_KILLALL5 is not set +# CONFIG_LSOF is not set +# CONFIG_MPSTAT is not set +# CONFIG_NMETER is not set +# CONFIG_PGREP is not set +# CONFIG_PKILL is not set +# CONFIG_PIDOF is not set +# CONFIG_FEATURE_PIDOF_SINGLE is not set +# CONFIG_FEATURE_PIDOF_OMIT is not set +# CONFIG_PMAP is not set +# CONFIG_POWERTOP is not set +# CONFIG_FEATURE_POWERTOP_INTERACTIVE is not set +# CONFIG_PS is not set +# CONFIG_FEATURE_PS_WIDE is not set +# CONFIG_FEATURE_PS_LONG is not set +# CONFIG_FEATURE_PS_TIME is not set +# CONFIG_FEATURE_PS_UNUSUAL_SYSTEMS is not set +# CONFIG_FEATURE_PS_ADDITIONAL_COLUMNS is not set +# CONFIG_PSTREE is not set +# CONFIG_PWDX is not set +# CONFIG_SMEMCAP is not set +# CONFIG_BB_SYSCTL is not set +# CONFIG_TOP is not set +# CONFIG_FEATURE_TOP_INTERACTIVE is not set +# CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE is not set +# CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS is not set +# CONFIG_FEATURE_TOP_SMP_CPU is not set +# CONFIG_FEATURE_TOP_DECIMALS is not set +# CONFIG_FEATURE_TOP_SMP_PROCESS is not set +# CONFIG_FEATURE_TOPMEM is not set +# CONFIG_UPTIME is not set +# CONFIG_FEATURE_UPTIME_UTMP_SUPPORT is not set +# CONFIG_WATCH is not set +# CONFIG_FEATURE_SHOW_THREADS is not set + +# +# Runit Utilities +# +# CONFIG_CHPST is not set +# CONFIG_SETUIDGID is not set +# CONFIG_ENVUIDGID is not set +# CONFIG_ENVDIR is not set +# CONFIG_SOFTLIMIT is not set +# CONFIG_RUNSV is not set +# CONFIG_RUNSVDIR is not set +# CONFIG_FEATURE_RUNSVDIR_LOG is not set +# CONFIG_SV is not set +CONFIG_SV_DEFAULT_SERVICE_DIR="" +# CONFIG_SVC is not set +# CONFIG_SVOK is not set +# CONFIG_SVLOGD is not set +# CONFIG_CHCON is not set +# CONFIG_GETENFORCE is not set +# CONFIG_GETSEBOOL is not set +# CONFIG_LOAD_POLICY is not set +# CONFIG_MATCHPATHCON is not set +# CONFIG_RUNCON is not set +# CONFIG_SELINUXENABLED is not set +# CONFIG_SESTATUS is not set +# CONFIG_SETENFORCE is not set +# CONFIG_SETFILES is not set +# CONFIG_FEATURE_SETFILES_CHECK_OPTION is not set +# CONFIG_RESTORECON is not set +# CONFIG_SETSEBOOL is not set + +# +# Shells +# +CONFIG_SH_IS_ASH=y +# CONFIG_SH_IS_HUSH is not set +# CONFIG_SH_IS_NONE is not set +# CONFIG_BASH_IS_ASH is not set +# CONFIG_BASH_IS_HUSH is not set +CONFIG_BASH_IS_NONE=y +CONFIG_SHELL_ASH=y +CONFIG_ASH=y +CONFIG_ASH_OPTIMIZE_FOR_SIZE=y +CONFIG_ASH_INTERNAL_GLOB=y +CONFIG_ASH_BASH_COMPAT=y +CONFIG_ASH_BASH_SOURCE_CURDIR=y +CONFIG_ASH_BASH_NOT_FOUND_HOOK=y +CONFIG_ASH_JOB_CONTROL=y +CONFIG_ASH_ALIAS=y +CONFIG_ASH_RANDOM_SUPPORT=y +CONFIG_ASH_EXPAND_PRMT=y +CONFIG_ASH_IDLE_TIMEOUT=y +CONFIG_ASH_MAIL=y +CONFIG_ASH_ECHO=y +CONFIG_ASH_PRINTF=y +CONFIG_ASH_TEST=y +CONFIG_ASH_HELP=y +CONFIG_ASH_GETOPTS=y +CONFIG_ASH_CMDCMD=y +CONFIG_CTTYHACK=y +CONFIG_HUSH=y +CONFIG_SHELL_HUSH=y +CONFIG_HUSH_BASH_COMPAT=y +CONFIG_HUSH_BRACE_EXPANSION=y +CONFIG_HUSH_LINENO_VAR=y +CONFIG_HUSH_BASH_SOURCE_CURDIR=y +CONFIG_HUSH_INTERACTIVE=y +# CONFIG_HUSH_SAVEHISTORY is not set +CONFIG_HUSH_JOB=y +CONFIG_HUSH_TICK=y +CONFIG_HUSH_IF=y +CONFIG_HUSH_LOOPS=y +CONFIG_HUSH_CASE=y +CONFIG_HUSH_FUNCTIONS=y +CONFIG_HUSH_LOCAL=y +CONFIG_HUSH_RANDOM_SUPPORT=y +CONFIG_HUSH_MODE_X=y +CONFIG_HUSH_ECHO=y +CONFIG_HUSH_PRINTF=y +CONFIG_HUSH_TEST=y +CONFIG_HUSH_HELP=y +CONFIG_HUSH_EXPORT=y +CONFIG_HUSH_EXPORT_N=y +CONFIG_HUSH_READONLY=y +CONFIG_HUSH_KILL=y +CONFIG_HUSH_WAIT=y +CONFIG_HUSH_COMMAND=y +CONFIG_HUSH_TRAP=y +CONFIG_HUSH_TYPE=y +CONFIG_HUSH_TIMES=y +CONFIG_HUSH_READ=y +CONFIG_HUSH_SET=y +CONFIG_HUSH_UNSET=y +CONFIG_HUSH_ULIMIT=y +CONFIG_HUSH_UMASK=y +CONFIG_HUSH_GETOPTS=y +# CONFIG_HUSH_MEMLEAK is not set + +# +# Options common to all shells +# +CONFIG_FEATURE_SH_MATH=y +CONFIG_FEATURE_SH_MATH_64=y +CONFIG_FEATURE_SH_MATH_BASE=y +CONFIG_FEATURE_SH_EXTRA_QUIET=y +CONFIG_FEATURE_SH_STANDALONE=y +CONFIG_FEATURE_SH_NOFORK=y +# CONFIG_FEATURE_SH_READ_FRAC is not set +# CONFIG_FEATURE_SH_HISTFILESIZE is not set +# CONFIG_FEATURE_SH_EMBEDDED_SCRIPTS is not set + +# +# System Logging Utilities +# +# CONFIG_KLOGD is not set +# CONFIG_FEATURE_KLOGD_KLOGCTL is not set +# CONFIG_LOGGER is not set +# CONFIG_LOGREAD is not set +# CONFIG_FEATURE_LOGREAD_REDUCED_LOCKING is not set +# CONFIG_SYSLOGD is not set +# CONFIG_FEATURE_ROTATE_LOGFILE is not set +# CONFIG_FEATURE_REMOTE_LOG is not set +# CONFIG_FEATURE_SYSLOGD_DUP is not set +# CONFIG_FEATURE_SYSLOGD_CFG is not set +# CONFIG_FEATURE_SYSLOGD_PRECISE_TIMESTAMPS is not set +CONFIG_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0 +# CONFIG_FEATURE_IPC_SYSLOG is not set +CONFIG_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0 +# CONFIG_FEATURE_KMSG_SYSLOG is not set diff --git a/BUSYBOX/chmod/build.sh b/BUSYBOX/chmod/build.sh new file mode 100644 index 00000000..7d23b2a7 --- /dev/null +++ b/BUSYBOX/chmod/build.sh @@ -0,0 +1,18 @@ +#!/bin/sh + +DSTDIR=../../IMG/cpio/ventoy/busybox + +rm -f vtchmod32 vtchmod64 +rm -f $DSTDIR/vtchmod32 $DSTDIR/vtchmod64 + +/opt/diet32/bin/diet gcc -Os -m32 vtchmod.c -o vtchmod32 +/opt/diet64/bin/diet gcc -Os vtchmod.c -o vtchmod64 + +chmod 777 vtchmod32 +chmod 777 vtchmod64 + +cp -a vtchmod32 $DSTDIR/ +cp -a vtchmod64 $DSTDIR/ + + + diff --git a/BUSYBOX/chmod/vtchmod.c b/BUSYBOX/chmod/vtchmod.c new file mode 100644 index 00000000..5a9d833f --- /dev/null +++ b/BUSYBOX/chmod/vtchmod.c @@ -0,0 +1,13 @@ +#include +#include + +int main(int argc, char **argv) +{ + if (argc != 2) + { + return 1; + } + + return chmod(argv[1], 0777); +} + diff --git a/BUSYBOX/chmod/vtchmod32 b/BUSYBOX/chmod/vtchmod32 new file mode 100644 index 00000000..4b66db3c Binary files /dev/null and b/BUSYBOX/chmod/vtchmod32 differ diff --git a/BUSYBOX/chmod/vtchmod64 b/BUSYBOX/chmod/vtchmod64 new file mode 100644 index 00000000..9c799581 Binary files /dev/null and b/BUSYBOX/chmod/vtchmod64 differ diff --git a/DMSETUP/build.txt b/DMSETUP/build.txt index 5e2a8db0..52fa10be 100644 --- a/DMSETUP/build.txt +++ b/DMSETUP/build.txt @@ -28,4 +28,22 @@ build for 32bit, static linked with dietlibc 4. make 5. strip dmsetup/dmsetup -5. get dmsetup/dmsetup as the binary file +6. get dmsetup/dmsetup as the dmsetup32 binary file + + + + + + +======================== Build for 64bit dmsetup ========================= +https://www.uclibc.org/downloads/binaries/0.9.30.1/mini-native-x86_64.tar.bz2 +1. extract device mapper source code +2. extract mini-native-x86_64.tar.bz2 +3. chroot to mini-native-x86_64 +3. ./configure --disable-nls --disable-selinux --disable-shared --enable-static_link +4. make +5. strip dmsetup/dmsetup.static +6. get dmsetup/dmsetup.static as the dmsetup64 binary file + + + diff --git a/DMSETUP/dmsetup b/DMSETUP/dmsetup32 similarity index 100% rename from DMSETUP/dmsetup rename to DMSETUP/dmsetup32 diff --git a/DMSETUP/dmsetup64 b/DMSETUP/dmsetup64 new file mode 100644 index 00000000..1da213e2 Binary files /dev/null and b/DMSETUP/dmsetup64 differ diff --git a/DOC/BuildVentoyFromSource.txt b/DOC/BuildVentoyFromSource.txt index 64ffc842..c67aced8 100644 --- a/DOC/BuildVentoyFromSource.txt +++ b/DOC/BuildVentoyFromSource.txt @@ -127,15 +127,24 @@ cd /home/Ventoy-master/GenUUID sh build.sh -4.15 == Build xzminidec == - cd /home/Ventoy-master/xz-embedded-20130513/userspace +4.15 == Build xzminidec32 == + cd /home/Ventoy-master/Ventoy2Disk/Ventoy2Disk/xz-embedded-20130513/userspace make -f ventoy_makefile strip --strip-all xzminidec - -4.16 == Build iso9660_x64.efi == + +4.16 == Build xzminidec64 == + cd /home/Ventoy-master/Ventoy2Disk/Ventoy2Disk/xz-embedded-20130513/userspace + make -f ventoy_makefile64 + strip --strip-all xzminidec + +4.17 == Build iso9660_x64.efi == This efi driver is from https://github.com/pbatard/efifs Follow all the build instructions in this project. I modified 3 files (the original and modified source are at /home/Ventoy-master/EDK2/efiffs) +4.18 IMG/cpio/ventoy/busybox/64h + https://www.uclibc.org/downloads/binaries/0.9.30.1/mini-native-x86_64.tar.bz2 + https://busybox.net/downloads/busybox-1.32.0.tar.bz2 + use BUSYBOX/64h.config and uclibc to build busybox-1.32 ========================================== @@ -156,7 +165,7 @@ https://busybox.net/downloads/binaries/1.30.0-i686 busybox_INOTIFYD SHA-256: 3532162a8695e91a1ed9ddea28b2cb22259a90e93d5d9c4a517b6c36842c686f -5.4 IMG/cpio/ventoy/busybox/tmpsh +5.4 IMG/cpio/ventoy/busybox/ash https://busybox.net/downloads/binaries/1.27.1-i686 busybox_ASH SHA-256: 44a6274bca580c2758ffc173fc76d18bb855b1fe8dcf70efd9ee75cbd57dee97 diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/lib/syslinux_parse.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/lib/syslinux_parse.c new file mode 100644 index 00000000..0f82b751 --- /dev/null +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/lib/syslinux_parse.c @@ -0,0 +1,1551 @@ +/* + * GRUB -- GRand Unified Bootloader + * Copyright (C) 2013 Free Software Foundation, Inc. + * + * GRUB is free software: you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation, either version 3 of the License, or + * (at your option) any later version. + * + * GRUB is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with GRUB. If not, see . + */ + +#include +#include +#include +#include + +struct syslinux_say +{ + struct syslinux_say *next; + struct syslinux_say *prev; + char msg[0]; +}; + +struct initrd_list +{ + struct initrd_list *next; + char *file; +}; + +struct syslinux_menuentry +{ + struct syslinux_menuentry *next; + struct syslinux_menuentry *prev; + char *label; + char *extlabel; + char *kernel_file; + struct initrd_list *initrds; + struct initrd_list *initrds_last; + char *append; + char *argument; + char *help; + char *comments; + grub_size_t commentslen; + char hotkey; + int make_default; + struct syslinux_say *say; + + enum { KERNEL_NO_KERNEL, KERNEL_LINUX, KERNEL_CHAINLOADER, + KERNEL_BIN, KERNEL_PXE, KERNEL_CHAINLOADER_BPB, + KERNEL_COM32, KERNEL_COM, KERNEL_IMG, KERNEL_CONFIG, LOCALBOOT } + entry_type; +}; + +struct syslinux_menu +{ + struct syslinux_menu *parent; + struct syslinux_menuentry *entries; + char *def; + char *comments; + char *background; + const char *root_read_directory; + const char *root_target_directory; + const char *current_read_directory; + const char *current_target_directory; + const char *filename; + grub_size_t commentslen; + unsigned long timeout; + struct syslinux_say *say; + grub_syslinux_flavour_t flavour; +}; + +struct output_buffer +{ + grub_size_t alloc; + grub_size_t ptr; + char *buf; +}; + +static grub_err_t +syslinux_parse_real (struct syslinux_menu *menu); +static grub_err_t +config_file (struct output_buffer *outbuf, + const char *root, const char *target_root, + const char *cwd, const char *target_cwd, + const char *fname, struct syslinux_menu *parent, + grub_syslinux_flavour_t flav); +static grub_err_t +print_entry (struct output_buffer *outbuf, + struct syslinux_menu *menu, + const char *str); + +static grub_err_t +ensure_space (struct output_buffer *outbuf, grub_size_t len) +{ + grub_size_t newlen; + char *newbuf; + if (len < outbuf->alloc - outbuf->ptr) + return GRUB_ERR_NONE; + newlen = (outbuf->ptr + len + 10) * 2; + newbuf = grub_realloc (outbuf->buf, newlen); + if (!newbuf) + return grub_errno; + outbuf->alloc = newlen; + outbuf->buf = newbuf; + return GRUB_ERR_NONE; +} + +static grub_err_t +print (struct output_buffer *outbuf, const char *str, grub_size_t len) +{ + grub_err_t err; + err = ensure_space (outbuf, len); + if (err) + return err; + grub_memcpy (&outbuf->buf[outbuf->ptr], str, len); + outbuf->ptr += len; + return GRUB_ERR_NONE; +} + +static grub_err_t +add_comment (struct syslinux_menu *menu, const char *comment, int nl) +{ + if (menu->entries) + { + if (menu->entries->commentslen == 0 && *comment == 0) + return GRUB_ERR_NONE; + menu->entries->comments = grub_realloc (menu->entries->comments, + menu->entries->commentslen + + 2 + grub_strlen (comment)); + if (!menu->entries->comments) + return grub_errno; + menu->entries->commentslen + += grub_stpcpy (menu->entries->comments + menu->entries->commentslen, + comment) + - (menu->entries->comments + menu->entries->commentslen); + if (nl) + menu->entries->comments[menu->entries->commentslen++] = '\n'; + menu->entries->comments[menu->entries->commentslen] = '\0'; + } + else + { + if (menu->commentslen == 0 && *comment == 0) + return GRUB_ERR_NONE; + menu->comments = grub_realloc (menu->comments, menu->commentslen + + 2 + grub_strlen (comment)); + if (!menu->comments) + return grub_errno; + menu->commentslen += grub_stpcpy (menu->comments + menu->commentslen, + comment) + - (menu->comments + menu->commentslen); + if (nl) + menu->comments[menu->commentslen++] = '\n'; + menu->comments[menu->commentslen] = '\0'; + } + return GRUB_ERR_NONE; +} + + +#define print_string(x) do { err = print (outbuf, x, sizeof (x) - 1); if (err) return err; } while (0) + +static grub_err_t +print_num (struct output_buffer *outbuf, int n) +{ + char buf[20]; + grub_snprintf (buf, sizeof (buf), "%d", n); + return print (outbuf, buf, grub_strlen (buf)); +} + +static grub_err_t +label (const char *line, struct syslinux_menu *menu) +{ + struct syslinux_menuentry *entry; + + entry = grub_malloc (sizeof (*entry)); + if (!entry) + return grub_errno; + grub_memset (entry, 0, sizeof (*entry)); + entry->label = grub_strdup (line); + if (!entry->label) + { + grub_free (entry); + return grub_errno; + } + entry->next = menu->entries; + entry->prev = NULL; + if (menu->entries) + menu->entries->prev = entry; + menu->entries = entry; + return GRUB_ERR_NONE; +} + +static grub_err_t +kernel (const char *line, struct syslinux_menu *menu) +{ + const char *end = line + grub_strlen (line); + + if (!menu->entries) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label"); + + menu->entries->kernel_file = grub_strdup (line); + if (!menu->entries->kernel_file) + return grub_errno; + + menu->entries->entry_type = KERNEL_LINUX; + + if (end - line >= 2 && grub_strcmp (end - 2, ".0") == 0) + menu->entries->entry_type = KERNEL_PXE; + + if (end - line >= 4 && grub_strcasecmp (end - 4, ".bin") == 0) + menu->entries->entry_type = KERNEL_BIN; + + if (end - line >= 3 && grub_strcasecmp (end - 3, ".bs") == 0) + menu->entries->entry_type = KERNEL_CHAINLOADER; + + if (end - line >= 4 && grub_strcasecmp (end - 4, ".bss") == 0) + menu->entries->entry_type = KERNEL_CHAINLOADER_BPB; + + if (end - line >= 4 && grub_strcasecmp (end - 4, ".c32") == 0) + menu->entries->entry_type = KERNEL_COM32; + + if (end - line >= 4 && grub_strcasecmp (end - 4, ".cbt") == 0) + menu->entries->entry_type = KERNEL_COM; + + if (end - line >= 4 && grub_strcasecmp (end - 4, ".com") == 0) + menu->entries->entry_type = KERNEL_COM; + + if (end - line >= 4 && grub_strcasecmp (end - 4, ".img") == 0) + menu->entries->entry_type = KERNEL_IMG; + + return GRUB_ERR_NONE; +} + +static grub_err_t +cmd_linux (const char *line, struct syslinux_menu *menu) +{ + if (!menu->entries) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label"); + + menu->entries->kernel_file = grub_strdup (line); + if (!menu->entries->kernel_file) + return grub_errno; + menu->entries->entry_type = KERNEL_LINUX; + + return GRUB_ERR_NONE; +} + +static grub_err_t +cmd_boot (const char *line, struct syslinux_menu *menu) +{ + if (!menu->entries) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label"); + + menu->entries->kernel_file = grub_strdup (line); + if (!menu->entries->kernel_file) + return grub_errno; + menu->entries->entry_type = KERNEL_CHAINLOADER; + + return GRUB_ERR_NONE; +} + +static grub_err_t +cmd_bss (const char *line, struct syslinux_menu *menu) +{ + if (!menu->entries) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label"); + + menu->entries->kernel_file = grub_strdup (line); + if (!menu->entries->kernel_file) + return grub_errno; + menu->entries->entry_type = KERNEL_CHAINLOADER_BPB; + + return GRUB_ERR_NONE; +} + +static grub_err_t +cmd_pxe (const char *line, struct syslinux_menu *menu) +{ + if (!menu->entries) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label"); + + menu->entries->kernel_file = grub_strdup (line); + if (!menu->entries->kernel_file) + return grub_errno; + menu->entries->entry_type = KERNEL_PXE; + + return GRUB_ERR_NONE; +} + +static grub_err_t +cmd_fdimage (const char *line, struct syslinux_menu *menu) +{ + if (!menu->entries) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label"); + + menu->entries->kernel_file = grub_strdup (line); + if (!menu->entries->kernel_file) + return grub_errno; + menu->entries->entry_type = KERNEL_IMG; + + return GRUB_ERR_NONE; +} + +static grub_err_t +cmd_comboot (const char *line, struct syslinux_menu *menu) +{ + if (!menu->entries) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label"); + + menu->entries->kernel_file = grub_strdup (line); + if (!menu->entries->kernel_file) + return grub_errno; + menu->entries->entry_type = KERNEL_COM; + + return GRUB_ERR_NONE; +} + +static grub_err_t +cmd_com32 (const char *line, struct syslinux_menu *menu) +{ + if (!menu->entries) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label"); + + menu->entries->kernel_file = grub_strdup (line); + if (!menu->entries->kernel_file) + return grub_errno; + menu->entries->entry_type = KERNEL_COM32; + + return GRUB_ERR_NONE; +} + +static grub_err_t +cmd_config (const char *line, struct syslinux_menu *menu) +{ + const char *space; + if (!menu->entries) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label"); + + for (space = line; *space && !grub_isspace (*space); space++); + menu->entries->kernel_file = grub_strndup (line, space - line); + if (!menu->entries->kernel_file) + return grub_errno; + for (; *space && grub_isspace (*space); space++); + if (*space) + { + menu->entries->argument = grub_strdup (space); + if (!menu->entries->argument) + return grub_errno; + } + menu->entries->entry_type = KERNEL_CONFIG; + + return GRUB_ERR_NONE; +} + +static grub_err_t +cmd_append (const char *line, struct syslinux_menu *menu) +{ + if (!menu->entries) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label"); + + menu->entries->append = grub_strdup (line); + if (!menu->entries->append) + return grub_errno; + + return GRUB_ERR_NONE; +} + +static grub_err_t +cmd_initrd (const char *line, struct syslinux_menu *menu) +{ + struct initrd_list *ninitrd; + const char *comma; + if (!menu->entries) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label"); + + while (*line) + { + for (comma = line; *comma && *comma != ','; comma++); + + ninitrd = grub_malloc (sizeof (*ninitrd)); + if (!ninitrd) + return grub_errno; + ninitrd->file = grub_strndup (line, comma - line); + if (!ninitrd->file) + { + grub_free (ninitrd); + return grub_errno; + } + ninitrd->next = NULL; + if (menu->entries->initrds_last) + menu->entries->initrds_last->next = ninitrd; + else + { + menu->entries->initrds_last = ninitrd; + menu->entries->initrds = ninitrd; + } + + line = comma; + while (*line == ',') + line++; + } + + return GRUB_ERR_NONE; +} + +static grub_err_t +cmd_default (const char *line, struct syslinux_menu *menu) +{ + menu->def = grub_strdup (line); + if (!menu->def) + return grub_errno; + + return GRUB_ERR_NONE; +} + +static grub_err_t +cmd_timeout (const char *line, struct syslinux_menu *menu) +{ + menu->timeout = grub_strtoul (line, NULL, 0); + + return GRUB_ERR_NONE; +} + +static grub_err_t +cmd_menudefault (const char *line __attribute__ ((unused)), + struct syslinux_menu *menu) +{ + if (!menu->entries) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label"); + + menu->entries->make_default = 1; + return GRUB_ERR_NONE; +} + +static grub_err_t +cmd_menubackground (const char *line, + struct syslinux_menu *menu) +{ + menu->background = grub_strdup (line); + return GRUB_ERR_NONE; +} + +static grub_err_t +cmd_localboot (const char *line, + struct syslinux_menu *menu) +{ + if (!menu->entries) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label"); + + menu->entries->kernel_file = grub_strdup (line); + if (!menu->entries->kernel_file) + return grub_errno; + menu->entries->entry_type = LOCALBOOT; + + return GRUB_ERR_NONE; +} + +static grub_err_t +cmd_extlabel (const char *line, struct syslinux_menu *menu) +{ + const char *in; + char *out; + + if (!menu->entries) + return grub_error (GRUB_ERR_BAD_ARGUMENT, "kernel without label"); + + menu->entries->extlabel = grub_malloc (grub_strlen (line) + 1); + if (!menu->entries->extlabel) + return grub_errno; + in = line; + out = menu->entries->extlabel; + while (*in) + { + if (in[0] == '^' && in[1]) + { + menu->entries->hotkey = grub_tolower (in[1]); + in++; + } + *out++ = *in++; + } + *out = 0; + + return GRUB_ERR_NONE; +} + + +static grub_err_t +cmd_say (const char *line, struct syslinux_menu *menu) +{ + struct syslinux_say *nsay; + nsay = grub_malloc (sizeof (*nsay) + grub_strlen (line) + 1); + if (!nsay) + return grub_errno; + nsay->prev = NULL; + if (menu->entries) + { + nsay->next = menu->entries->say; + menu->entries->say = nsay; + } + else + { + nsay->next = menu->say; + menu->say = nsay; + } + + if (nsay->next) + nsay->next->prev = nsay; + + grub_memcpy (nsay->msg, line, grub_strlen (line) + 1); + return GRUB_ERR_NONE; +} + +static char * +get_read_filename (struct syslinux_menu *menu, + const char *filename) +{ + return grub_xasprintf ("%s/%s", + filename[0] == '/' ? menu->root_read_directory + : menu->current_read_directory, filename); +} + +static char * +get_target_filename (struct syslinux_menu *menu, + const char *filename) +{ + return grub_xasprintf ("%s/%s", + filename[0] == '/' ? menu->root_target_directory + : menu->current_target_directory, filename); +} + +static grub_err_t +syslinux_parse (const char *filename, + struct syslinux_menu *menu) +{ + const char *old_filename = menu->filename; + grub_err_t ret; + char *nf; + nf = get_read_filename (menu, filename); + if (!nf) + return grub_errno; + menu->filename = nf; + ret = syslinux_parse_real (menu); + if (ret == GRUB_ERR_FILE_NOT_FOUND + || ret == GRUB_ERR_BAD_FILENAME) + { + grub_errno = ret = GRUB_ERR_NONE; + add_comment (menu, "# File ", 0); + add_comment (menu, nf, 0); + add_comment (menu, " not found", 1); + } + grub_free (nf); + menu->filename = old_filename; + return ret; +} + +struct +{ + const char *name1; + const char *name2; + grub_err_t (*parse) (const char *line, struct syslinux_menu *menu); +} commands[] = { + /* FIXME: support tagname. */ + {"include", NULL, syslinux_parse}, + {"menu", "include", syslinux_parse}, + {"label", NULL, label}, + {"kernel", NULL, kernel}, + {"linux", NULL, cmd_linux}, + {"boot", NULL, cmd_boot}, + {"bss", NULL, cmd_bss}, + {"pxe", NULL, cmd_pxe}, + {"fdimage", NULL, cmd_fdimage}, + {"comboot", NULL, cmd_comboot}, + {"com32", NULL, cmd_com32}, + {"config", NULL, cmd_config}, + {"append", NULL, cmd_append}, + /* FIXME: ipappend not supported. */ + {"localboot", NULL, cmd_localboot}, + {"initrd", NULL, cmd_initrd}, + {"default", NULL, cmd_default}, + {"menu", "label", cmd_extlabel}, + /* FIXME: MENU LABEL not supported. */ + /* FIXME: MENU HIDDEN not supported. */ + /* FIXME: MENU SEPARATOR not supported. */ + /* FIXME: MENU INDENT not supported. */ + /* FIXME: MENU DISABLE not supported. */ + /* FIXME: MENU HIDE not supported. */ + {"menu", "default", cmd_menudefault}, + /* FIXME: MENU PASSWD not supported. */ + /* FIXME: MENU MASTER PASSWD not supported. */ + {"menu", "background", cmd_menubackground}, + /* FIXME: MENU BEGIN not supported. */ + /* FIXME: MENU GOTO not supported. */ + /* FIXME: MENU EXIT not supported. */ + /* FIXME: MENU QUIT not supported. */ + /* FIXME: MENU START not supported. */ + /* FIXME: MENU AUTOBOOT not supported. */ + /* FIXME: MENU TABMSG not supported. */ + /* FIXME: MENU NOTABMSG not supported. */ + /* FIXME: MENU PASSPROMPT not supported. */ + /* FIXME: MENU COLOR not supported. */ + /* FIXME: MENU MSGCOLOR not supported. */ + /* FIXME: MENU WIDTH not supported. */ + /* FIXME: MENU MARGIN not supported. */ + /* FIXME: MENU PASSWORDMARGIN not supported. */ + /* FIXME: MENU ROWS not supported. */ + /* FIXME: MENU TABMSGROW not supported. */ + /* FIXME: MENU CMDLINEROW not supported. */ + /* FIXME: MENU ENDROW not supported. */ + /* FIXME: MENU PASSWORDROW not supported. */ + /* FIXME: MENU TIMEOUTROW not supported. */ + /* FIXME: MENU HELPMSGROW not supported. */ + /* FIXME: MENU HELPMSGENDROW not supported. */ + /* FIXME: MENU HIDDENROW not supported. */ + /* FIXME: MENU HSHIFT not supported. */ + /* FIXME: MENU VSHIFT not supported. */ + {"timeout", NULL, cmd_timeout}, + /* FIXME: TOTALTIMEOUT not supported. */ + /* FIXME: ONTIMEOUT not supported. */ + /* FIXME: ONERROR not supported. */ + /* FIXME: SERIAL not supported. */ + /* FIXME: CONSOLE not supported. */ + /* FIXME: FONT not supported. */ + /* FIXME: KBDMAP not supported. */ + {"say", NULL, cmd_say}, + /* FIXME: DISPLAY not supported. */ + /* FIXME: F* not supported. */ + + /* Commands to control interface behaviour which aren't needed with GRUB. + If they are important in your environment please contact GRUB team. + */ + {"prompt", NULL, NULL}, + {"nocomplete", NULL, NULL}, + {"noescape", NULL, NULL}, + {"implicit", NULL, NULL}, + {"allowoptions", NULL, NULL} +}; + +static grub_err_t +helptext (const char *line, grub_file_t file, struct syslinux_menu *menu) +{ + char *help; + char *buf = NULL; + grub_size_t helplen, alloclen = 0; + + help = grub_strdup (line); + if (!help) + return grub_errno; + helplen = grub_strlen (line); + while ((grub_free (buf), buf = grub_file_getline (file))) + { + char *ptr; + grub_size_t needlen; + for (ptr = buf; *ptr && grub_isspace (*ptr); ptr++); + if (grub_strncasecmp (ptr, "endtext", sizeof ("endtext") - 1) == 0) + { + ptr += sizeof ("endtext") - 1; + for (; *ptr && (grub_isspace (*ptr) || *ptr == '\n' || *ptr == '\r'); + ptr++); + if (!*ptr) + { + menu->entries->help = help; + grub_free (buf); + return GRUB_ERR_NONE; + } + } + needlen = helplen + 1 + grub_strlen (buf); + if (alloclen < needlen) + { + alloclen = 2 * needlen; + help = grub_realloc (help, alloclen); + if (!help) + { + grub_free (buf); + return grub_errno; + } + } + helplen += grub_stpcpy (help + helplen, buf) - (help + helplen); + } + + grub_free (buf); + grub_free (help); + return grub_errno; +} + + +static grub_err_t +syslinux_parse_real (struct syslinux_menu *menu) +{ + grub_file_t file; + char *buf = NULL; + grub_err_t err = GRUB_ERR_NONE; + + file = grub_file_open (menu->filename, GRUB_FILE_TYPE_CONFIG); + if (!file) + return grub_errno; + while ((grub_free (buf), buf = grub_file_getline (file))) + { + const char *ptr1, *ptr2, *ptr3, *ptr4, *ptr5; + char *end; + unsigned i; + end = buf + grub_strlen (buf); + while (end > buf && (end[-1] == '\n' || end[-1] == '\r')) + end--; + *end = 0; + for (ptr1 = buf; *ptr1 && grub_isspace (*ptr1); ptr1++); + if (*ptr1 == '#' || *ptr1 == 0) + { + err = add_comment (menu, ptr1, 1); + if (err) + goto fail; + continue; + } + for (ptr2 = ptr1; !grub_isspace (*ptr2) && *ptr2; ptr2++); + for (ptr3 = ptr2; grub_isspace (*ptr3) && *ptr3; ptr3++); + for (ptr4 = ptr3; !grub_isspace (*ptr4) && *ptr4; ptr4++); + for (ptr5 = ptr4; grub_isspace (*ptr5) && *ptr5; ptr5++); + for (i = 0; i < ARRAY_SIZE(commands); i++) + if (grub_strlen (commands[i].name1) == (grub_size_t) (ptr2 - ptr1) + && grub_strncasecmp (commands[i].name1, ptr1, ptr2 - ptr1) == 0 + && (commands[i].name2 == NULL + || (grub_strlen (commands[i].name2) + == (grub_size_t) (ptr4 - ptr3) + && grub_strncasecmp (commands[i].name2, ptr3, ptr4 - ptr3) + == 0))) + break; + if (i == ARRAY_SIZE(commands)) + { + if (sizeof ("text") - 1 == ptr2 - ptr1 + && grub_strncasecmp ("text", ptr1, ptr2 - ptr1) == 0 + && (sizeof ("help") - 1 == ptr4 - ptr3 + && grub_strncasecmp ("help", ptr3, ptr4 - ptr3) == 0)) + { + if (helptext (ptr5, file, menu)) + return 1; + continue; + } + + add_comment (menu, " # UNSUPPORTED command '", 0); + add_comment (menu, ptr1, 0); + add_comment (menu, "'", 1); + + continue; + } + if (commands[i].parse) + { + err = commands[i].parse (commands[i].name2 + ? ptr5 : ptr3, menu); + if (err) + goto fail; + } + } + fail: + grub_file_close (file); + return err; +} + +static grub_err_t +print_escaped (struct output_buffer *outbuf, + const char *from, const char *to) +{ + const char *ptr; + grub_err_t err; + if (!to) + to = from + grub_strlen (from); + err = ensure_space (outbuf, (to - from) * 4 + 2); + if (err) + return err; + outbuf->buf[outbuf->ptr++] = '\''; + for (ptr = from; *ptr && ptr < to; ptr++) + { + if (*ptr == '\'') + { + outbuf->buf[outbuf->ptr++] = '\''; + outbuf->buf[outbuf->ptr++] = '\\'; + outbuf->buf[outbuf->ptr++] = '\''; + outbuf->buf[outbuf->ptr++] = '\''; + } + else + outbuf->buf[outbuf->ptr++] = *ptr; + } + outbuf->buf[outbuf->ptr++] = '\''; + return GRUB_ERR_NONE; +} + +static grub_err_t +print_file (struct output_buffer *outbuf, + struct syslinux_menu *menu, const char *from, const char *to) +{ + grub_err_t err; + if (!to) + to = from + grub_strlen (from); + err = print_escaped (outbuf, from[0] == '/' + ? menu->root_target_directory + : menu->current_target_directory, NULL); + if (err) + return err; + + err = print (outbuf, "/", 1); + if (err) + return err; + return print_escaped (outbuf, from, to); +} + +/* + * Makefile.am mimics this when generating tests/syslinux/ubuntu10.04_grub.cfg, + * so changes here may need to be reflected there too. + */ +static void +simplify_filename (char *str) +{ + char *iptr, *optr = str; + for (iptr = str; *iptr; iptr++) + { + if (*iptr == '/' && optr != str && optr[-1] == '/') + continue; + if (iptr[0] == '/' && iptr[1] == '.' && iptr[2] == '/') + { + iptr += 2; + continue; + } + if (iptr[0] == '/' && iptr[1] == '.' && iptr[2] == '.' + && iptr[3] == '/') + { + iptr += 3; + while (optr >= str && *optr != '/') + optr--; + if (optr < str) + { + str[0] = '/'; + optr = str; + } + optr++; + continue; + } + *optr++ = *iptr; + } + *optr = '\0'; +} + +static grub_err_t +print_config (struct output_buffer *outbuf, + struct syslinux_menu *menu, + const char *filename, const char *basedir) +{ + struct syslinux_menu *menuptr; + grub_err_t err = GRUB_ERR_NONE; + char *new_cwd = NULL; + char *new_target_cwd = NULL; + char *newname = NULL; + int depth = 0; + + new_cwd = get_read_filename (menu, basedir); + if (!new_cwd) + { + err = grub_errno; + goto out; + } + new_target_cwd = get_target_filename (menu, basedir); + if (!new_target_cwd) + { + err = grub_errno; + goto out; + } + newname = get_read_filename (menu, filename); + if (!newname) + { + err = grub_errno; + goto out; + } + simplify_filename (newname); + + print_string ("#"); + print_file (outbuf, menu, filename, NULL); + print_string (" "); + err = print (outbuf, newname, grub_strlen (newname)); + if (err) + return err; + print_string (":\n"); + + for (menuptr = menu; menuptr; menuptr = menuptr->parent, depth++) + if (grub_strcmp (menuptr->filename, newname) == 0 + || depth > 20) + break; + if (menuptr) + { + print_string (" syslinux_configfile -r "); + print_file (outbuf, menu, "/", NULL); + print_string (" -c "); + print_file (outbuf, menu, basedir, NULL); + print_string (" "); + print_file (outbuf, menu, filename, NULL); + print_string ("\n"); + } + else + { + err = config_file (outbuf, menu->root_read_directory, + menu->root_target_directory, new_cwd, new_target_cwd, + newname, menu, menu->flavour); + if (err == GRUB_ERR_FILE_NOT_FOUND + || err == GRUB_ERR_BAD_FILENAME) + { + grub_errno = err = GRUB_ERR_NONE; + print_string ("# File "); + err = print (outbuf, newname, grub_strlen (newname)); + if (err) + goto out; + print_string (" not found\n"); + } + } + + out: + grub_free (newname); + grub_free (new_cwd); + grub_free (new_target_cwd); + return err; +} + +static grub_err_t +write_entry (struct output_buffer *outbuf, + struct syslinux_menu *menu, + struct syslinux_menuentry *curentry) +{ + grub_err_t err; + if (curentry->comments) + { + err = print (outbuf, curentry->comments, + grub_strlen (curentry->comments)); + if (err) + return err; + } + { + struct syslinux_say *say; + for (say = curentry->say; say && say->next; say = say->next); + for (; say && say->prev; say = say->prev) + { + print_string ("echo "); + if (print_escaped (outbuf, say->msg, NULL)) return grub_errno; + print_string ("\n"); + } + } + + /* FIXME: support help text. */ + switch (curentry->entry_type) + { + case KERNEL_LINUX: + { + const char *ptr; + const char *initrd = NULL, *initrde= NULL; + for (ptr = curentry->append; ptr && *ptr; ptr++) + if ((ptr == curentry->append || grub_isspace (ptr[-1])) + && grub_strncasecmp (ptr, "initrd=", sizeof ("initrd=") - 1) + == 0) + break; + if (ptr && *ptr) + { + initrd = ptr + sizeof ("initrd=") - 1; + for (initrde = initrd; *initrde && !grub_isspace (*initrde); initrde++); + } + print_string (" if test x$ventoy_linux_16 = x1; then " + "linux_suffix=16; else linux_suffix= ; fi\n"); + print_string (" linux$linux_suffix "); + print_file (outbuf, menu, curentry->kernel_file, NULL); + print_string (" "); + if (curentry->append) + { + err = print (outbuf, curentry->append, grub_strlen (curentry->append)); + if (err) + return err; + } + print_string ("\n"); + if (initrd || curentry->initrds) + { + struct initrd_list *lst; + print_string (" initrd$linux_suffix "); + if (initrd) + { + print_file (outbuf, menu, initrd, initrde); + print_string (" "); + } + for (lst = curentry->initrds; lst; lst = lst->next) + { + print_file (outbuf, menu, lst->file, NULL); + print_string (" "); + } + + print_string ("\n"); + } + } + break; + case KERNEL_CHAINLOADER: + print_string (" chainloader "); + print_file (outbuf, menu, curentry->kernel_file, NULL); + print_string ("\n"); + break; + case KERNEL_CHAINLOADER_BPB: + print_string (" chainloader --bpb "); + print_file (outbuf, menu, curentry->kernel_file, NULL); + print_string ("\n"); + break; + case LOCALBOOT: + /* FIXME: support -1. */ + /* FIXME: PXELINUX. */ + { + int n = grub_strtol (curentry->kernel_file, NULL, 0); + if (n >= 0 && n <= 0x02) + { + print_string (" root=fd"); + if (print_num (outbuf, n)) + return grub_errno; + print_string (";\n chainloader +1;\n"); + + break; + } + if (n >= 0x80 && n < 0x8a) + { + print_string (" root=hd"); + if (print_num (outbuf, n - 0x80)) + return grub_errno; + print_string (";\n chainloader +1;\n"); + break; + } + print_string (" # UNSUPPORTED localboot type "); + print_string ("\ntrue;\n"); + if (print_num (outbuf, n)) + return grub_errno; + print_string ("\n"); + break; + } + case KERNEL_COM32: + case KERNEL_COM: + { + char *basename = NULL; + + { + char *ptr; + for (ptr = curentry->kernel_file; *ptr; ptr++) + if (*ptr == '/' || *ptr == '\\') + basename = ptr; + } + if (!basename) + basename = curentry->kernel_file; + else + basename++; + if (grub_strcasecmp (basename, "chain.c32") == 0) + { + char *file = NULL; + int is_fd = -1, devn = 0; + int part = -1; + int swap = 0; + char *ptr; + for (ptr = curentry->append; *ptr; ) + { + while (grub_isspace (*ptr)) + ptr++; + /* FIXME: support mbr: and boot. */ + if (ptr[0] == 'h' && ptr[1] == 'd') + { + is_fd = 0; + devn = grub_strtoul (ptr + 2, &ptr, 0); + continue; + } + if (grub_strncasecmp (ptr, "file=", 5) == 0) + { + file = ptr + 5; + for (ptr = file; *ptr && !grub_isspace (*ptr); ptr++); + if (*ptr) + { + *ptr = 0; + ptr++; + } + continue; + } + if (grub_strncasecmp (ptr, "swap", sizeof ("swap") - 1) == 0) + { + swap = 1; + ptr += sizeof ("swap") - 1; + continue; + } + + if (ptr[0] == 'f' && ptr[1] == 'd') + { + is_fd = 1; + devn = grub_strtoul (ptr + 2, &ptr, 0); + continue; + } + if (grub_isdigit (ptr[0])) + { + part = grub_strtoul (ptr, &ptr, 0); + continue; + } + /* FIXME: isolinux, ntldr, cmldr, *dos, seg, hide + FIXME: sethidden. */ + print_string (" # UNSUPPORTED option "); + if (print (outbuf, ptr, grub_strlen (ptr))) + return 0; + print_string ("\n"); + break; + } + if (is_fd == -1) + { + print_string (" # no drive specified\n"); + break; + } + if (!*ptr) + { + print_string (is_fd ? " root=fd": " root=hd"); + if (print_num (outbuf, devn)) + return grub_errno; + if (part != -1) + { + print_string (","); + if (print_num (outbuf, part + 1)) + return grub_errno; + } + print_string (";\n"); + if (file) + { + print_string (" chainloader "); + print_file (outbuf, menu, file, NULL); + print_string (";\n"); + } + else + print_string (" chainloader +1;\n"); + if (swap) + print_string (" drivemap -s hd0 \"root\";\n"); + } + break; + } + + if (grub_strcasecmp (basename, "mboot.c32") == 0) + { + char *ptr; + int first = 1; + int is_kernel = 1; + for (ptr = curentry->append; *ptr; ) + { + char *ptrr = ptr; + while (*ptr && !grub_isspace (*ptr)) + ptr++; + if (ptrr + 2 == ptr && ptrr[0] == '-' && ptrr[1] == '-') + { + print_string ("\n"); + first = 1; + continue; + } + if (first) + { + if (is_kernel) + print_string (" multiboot "); + else + print_string (" module "); + first = 0; + is_kernel = 0; + if (print_file (outbuf, menu, ptrr, ptr)) + return grub_errno; + continue; + } + if (print_escaped (outbuf, ptrr, ptr)) + return grub_errno; + } + break; + } + + if (grub_strcasecmp (basename, "ifcpu64.c32") == 0) + { + char *lm, *lme, *pae = 0, *paee = 0, *i386s = 0, *i386e = 0; + char *ptr; + ptr = curentry->append; + while (grub_isspace (*ptr)) + ptr++; + lm = ptr; + while (*ptr && !grub_isspace (*ptr)) + ptr++; + lme = ptr; + while (grub_isspace (*ptr)) + ptr++; + if (ptr[0] == '-' && ptr[1] == '-') + { + ptr += 2; + while (grub_isspace (*ptr)) + ptr++; + pae = ptr; + while (*ptr && !grub_isspace (*ptr)) + ptr++; + paee = ptr; + } + while (grub_isspace (*ptr)) + ptr++; + if (ptr[0] == '-' && ptr[1] == '-') + { + ptr += 2; + while (grub_isspace (*ptr)) + ptr++; + i386s = ptr; + while (*ptr && !grub_isspace (*ptr)) + ptr++; + i386e = ptr; + } + *lme = '\0'; + if (paee) + *paee = '\0'; + if (i386e) + *i386e = '\0'; + if (!i386s) + { + i386s = pae; + pae = 0; + } + print_string ("if cpuid --long-mode; then true;\n"); + if (print_entry (outbuf, menu, lm)) + return grub_errno; + if (pae) + { + print_string ("elif cpuid --pae; then true;\n"); + if (print_entry (outbuf, menu, pae)) + return grub_errno; + } + print_string ("else\n"); + if (print_entry (outbuf, menu, i386s)) + return grub_errno; + print_string ("fi\n"); + break; + } + + if (grub_strcasecmp (basename, "reboot.c32") == 0) + { + print_string (" reboot\n"); + break; + } + + if (grub_strcasecmp (basename, "poweroff.com") == 0) + { + print_string (" halt\n"); + break; + } + + if (grub_strcasecmp (basename, "whichsys.c32") == 0) + { + grub_syslinux_flavour_t flavour = GRUB_SYSLINUX_ISOLINUX; + const char *flav[] = + { + [GRUB_SYSLINUX_ISOLINUX] = "iso", + [GRUB_SYSLINUX_PXELINUX] = "pxe", + [GRUB_SYSLINUX_SYSLINUX] = "sys" + }; + char *ptr; + for (ptr = curentry->append; *ptr; ) + { + char *bptr, c; + while (grub_isspace (*ptr)) + ptr++; + if (grub_strncasecmp (ptr, "-iso-", 5) == 0) + { + ptr += sizeof ("-iso-") - 1; + flavour = GRUB_SYSLINUX_ISOLINUX; + continue; + } + if (grub_strncasecmp (ptr, "-pxe-", 5) == 0) + { + ptr += sizeof ("-pxe-") - 1; + flavour = GRUB_SYSLINUX_PXELINUX; + continue; + } + if (grub_strncasecmp (ptr, "-sys-", 5) == 0) + { + ptr += sizeof ("-sys-") - 1; + flavour = GRUB_SYSLINUX_SYSLINUX; + continue; + } + bptr = ptr; + while (*ptr && !grub_isspace (*ptr)) + ptr++; + c = *ptr; + *ptr = '\0'; + if (menu->flavour == GRUB_SYSLINUX_UNKNOWN + && flavour == GRUB_SYSLINUX_ISOLINUX) + { + print_string ("if [ x$syslinux_flavour = xiso -o x$syslinux_flavour = x ]; then true;\n"); + menu->flavour = GRUB_SYSLINUX_ISOLINUX; + print_entry (outbuf, menu, bptr); + menu->flavour = GRUB_SYSLINUX_UNKNOWN; + print_string ("fi\n"); + } + else if (menu->flavour == GRUB_SYSLINUX_UNKNOWN) + { + print_string ("if [ x$syslinux_flavour = x"); + err = print (outbuf, flav[flavour], grub_strlen (flav[flavour])); + if (err) + return err; + print_string (" ]; then true;\n"); + menu->flavour = flavour; + print_entry (outbuf, menu, bptr); + menu->flavour = GRUB_SYSLINUX_UNKNOWN; + print_string ("fi\n"); + } + if (menu->flavour != GRUB_SYSLINUX_UNKNOWN + && menu->flavour == flavour) + print_entry (outbuf, menu, bptr); + *ptr = c; + } + break; + } + + if (grub_strcasecmp (basename, "menu.c32") == 0 || + grub_strcasecmp (basename, "vesamenu.c32") == 0) + { + char *ptr; + char *end; + + ptr = curentry->append; + if (!ptr) + return grub_errno; + + while (*ptr) + { + end = ptr; + for (end = ptr; *end && !grub_isspace (*end); end++); + if (*end) + *end++ = '\0'; + + /* "~" is supposed to be current file, so let's skip it */ + if (grub_strcmp (ptr, "~") != 0) + { + err = print_config (outbuf, menu, ptr, ""); + if (err != GRUB_ERR_NONE) + break; + } + for (ptr = end; *ptr && grub_isspace (*ptr); ptr++); + } + err = GRUB_ERR_NONE; + break; + } + + /* FIXME: gdb, GFXBoot, Hdt, Ifcpu, Ifplop, Kbdmap, + FIXME: Linux, Lua, Meminfo, rosh, Sanbboot */ + + print_string (" # UNSUPPORTED com(32) "); + err = print (outbuf, basename, grub_strlen (basename)); + if (err) + return err; + print_string ("\ntrue;\n"); + break; + } + case KERNEL_CONFIG: + { + const char *ap; + ap = curentry->append; + if (!ap) + ap = curentry->argument; + if (!ap) + ap = ""; + print_config (outbuf, menu, curentry->kernel_file, ap); + } + break; + case KERNEL_NO_KERNEL: + /* FIXME: support this. */ + case KERNEL_BIN: + case KERNEL_PXE: + case KERNEL_IMG: + print_string (" # UNSUPPORTED entry type "); + if (print_num (outbuf, curentry->entry_type)) + return grub_errno; + print_string ("\ntrue;\n"); + break; + } + return GRUB_ERR_NONE; +} + +static grub_err_t +print_entry (struct output_buffer *outbuf, + struct syslinux_menu *menu, + const char *str) +{ + struct syslinux_menuentry *curentry; + for (curentry = menu->entries; curentry; curentry = curentry->next) + if (grub_strcasecmp (curentry->label, str) == 0) + { + grub_err_t err; + err = write_entry (outbuf, menu, curentry); + if (err) + return err; + } + return GRUB_ERR_NONE; +} + +static void +free_menu (struct syslinux_menu *menu) +{ + struct syslinux_say *say, *nsay; + struct syslinux_menuentry *entry, *nentry; + + grub_free (menu->def); + grub_free (menu->comments); + grub_free (menu->background); + for (say = menu->say; say ; say = nsay) + { + nsay = say->next; + grub_free (say); + } + + for (entry = menu->entries; entry ; entry = nentry) + { + nentry = entry->next; + struct initrd_list *initrd, *ninitrd; + + for (initrd = entry->initrds; initrd ; initrd = ninitrd) + { + ninitrd = initrd->next; + grub_free (initrd->file); + grub_free (initrd); + } + + grub_free (entry->comments); + grub_free (entry->kernel_file); + grub_free (entry->label); + grub_free (entry->extlabel); + grub_free (entry->append); + grub_free (entry->help); + grub_free (entry); + } +} + +static grub_err_t +config_file (struct output_buffer *outbuf, + const char *root, const char *target_root, + const char *cwd, const char *target_cwd, + const char *fname, struct syslinux_menu *parent, + grub_syslinux_flavour_t flav) +{ + grub_err_t err; + struct syslinux_menu menu; + struct syslinux_menuentry *curentry, *lentry; + struct syslinux_say *say; + + grub_memset (&menu, 0, sizeof (menu)); + menu.flavour = flav; + menu.root_read_directory = root; + menu.root_target_directory = target_root; + menu.current_read_directory = cwd; + menu.current_target_directory = target_cwd; + + menu.filename = fname; + menu.parent = parent; + err = syslinux_parse_real (&menu); + if (err) + return err; + + for (say = menu.say; say && say->next; say = say->next); + for (; say && say->prev; say = say->prev) + { + print_string ("echo "); + err = print_escaped (outbuf, say->msg, NULL); + if (err) + return err; + print_string ("\n"); + } + + if (menu.background) + { + print_string (" background_image "); + err = print_file (outbuf, &menu, menu.background, NULL); + if (err) + return err; + print_string ("\n"); + } + + if (menu.comments) + { + err = print (outbuf, menu.comments, grub_strlen (menu.comments)); + if (err) + return err; + } + + if (menu.timeout == 0 && menu.entries && menu.def) + { + err = print_entry (outbuf, &menu, menu.def); + if (err) + return err; + } + else if (menu.entries) + { + for (curentry = menu.entries; curentry->next; curentry = curentry->next); + lentry = curentry; + + print_string ("set timeout="); + err = print_num (outbuf, (menu.timeout + 9) / 10); + if (err) + return err; + print_string ("\n"); + + if (menu.def) + { + print_string (" default="); + err = print_escaped (outbuf, menu.def, NULL); + if (err) + return err; + print_string ("\n"); + } + for (curentry = lentry; curentry; curentry = curentry->prev) + { + print_string ("menuentry "); + err = print_escaped (outbuf, + curentry->extlabel ? : curentry->label, NULL); + if (err) + return err; + if (curentry->hotkey) + { + char hk[] = { curentry->hotkey, '\0' }; + print_string (" --hotkey '"); + print_string (hk); + print_string ("'"); + } + print_string (" --id "); + err = print_escaped (outbuf, curentry->label, NULL); + if (err) + return err; + print_string (" {\n"); + + err = write_entry (outbuf, &menu, curentry); + if (err) + return err; + + print_string ("}\n"); + } + } + free_menu (&menu); + return GRUB_ERR_NONE; +} + +char * +grub_syslinux_config_file (const char *base, const char *target_base, + const char *cwd, const char *target_cwd, + const char *fname, grub_syslinux_flavour_t flav) +{ + struct output_buffer outbuf = { 0, 0, 0 }; + grub_err_t err; + err = config_file (&outbuf, base, target_base, cwd, target_cwd, + fname, NULL, flav); + if (err) + return NULL; + err = print (&outbuf, "\0", 1); + if (err) + return NULL; + return outbuf.buf; +} diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c index e10751f9..86ec5d60 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy.c @@ -2498,6 +2498,49 @@ end: return 0; } +static grub_err_t ventoy_cmd_file_strstr(grub_extcmd_context_t ctxt, int argc, char **args) +{ + int rc = 1; + grub_file_t file; + char *buf = NULL; + + (void)ctxt; + (void)argc; + + if (argc != 2) + { + return grub_error(GRUB_ERR_BAD_ARGUMENT, "Usage: %s file str \n", cmd_raw_name); + } + + file = ventoy_grub_file_open(VENTOY_FILE_TYPE, "%s", args[0]); + if (!file) + { + debug("failed to open file %s\n", args[0]); + return 1; + } + + buf = grub_malloc(file->size + 1); + if (!buf) + { + goto end; + } + + buf[file->size] = 0; + grub_file_read(file, buf, file->size); + + if (grub_strstr(buf, args[1])) + { + rc = 0; + } + +end: + + grub_check_free(buf); + grub_file_close(file); + + return rc; +} + static grub_err_t ventoy_cmd_parse_volume(grub_extcmd_context_t ctxt, int argc, char **args) { int len; @@ -2790,6 +2833,9 @@ static cmd_para ventoy_cmds[] = { "vt_check_plugin_json", ventoy_cmd_plugin_check_json, 0, NULL, "", "", NULL }, { "vt_1st_line", ventoy_cmd_read_1st_line, 0, NULL, "", "", NULL }, + { "vt_file_strstr", ventoy_cmd_file_strstr, 0, NULL, "", "", NULL }, + + { "vt_parse_iso_volume", ventoy_cmd_parse_volume, 0, NULL, "", "", NULL }, { "vt_parse_iso_create_date", ventoy_cmd_parse_create_date, 0, NULL, "", "", NULL }, { "vt_parse_freenas_ver", ventoy_cmd_parse_freenas_ver, 0, NULL, "", "", NULL }, diff --git a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_linux.c b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_linux.c index dfda6a84..25ce82cd 100644 --- a/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_linux.c +++ b/GRUB2/MOD_SRC/grub-2.04/grub-core/ventoy/ventoy_linux.c @@ -910,6 +910,40 @@ grub_err_t ventoy_cmd_linux_locate_initrd(grub_extcmd_context_t ctxt, int argc, VENTOY_CMD_RETURN(GRUB_ERR_NONE); } +static int ventoy_cpio_busybox64(cpio_newc_header *head) +{ + char *name; + int namelen; + int offset; + int count = 0; + + name = (char *)(head + 1); + while (name[0] && count < 2) + { + if (grub_strcmp(name, "ventoy/busybox/ash") == 0) + { + grub_memcpy(name, "ventoy/busybox/32h", 18); + count++; + } + else if (grub_strcmp(name, "ventoy/busybox/64h") == 0) + { + grub_memcpy(name, "ventoy/busybox/ash", 18); + count++; + } + + namelen = ventoy_cpio_newc_get_int(head->c_namesize); + offset = sizeof(cpio_newc_header) + namelen; + offset = ventoy_align(offset, 4); + offset += ventoy_cpio_newc_get_int(head->c_filesize); + offset = ventoy_align(offset, 4); + + head = (cpio_newc_header *)((char *)head + offset); + name = (char *)(head + 1); + } + + return 0; +} + grub_err_t ventoy_cmd_load_cpio(grub_extcmd_context_t ctxt, int argc, char **args) { int rc; @@ -934,7 +968,7 @@ grub_err_t ventoy_cmd_load_cpio(grub_extcmd_context_t ctxt, int argc, char **arg (void)ctxt; (void)argc; - if (argc != 3) + if (argc != 4) { return grub_error(GRUB_ERR_BAD_ARGUMENT, "Usage: %s cpiofile\n", cmd_raw_name); } @@ -1087,6 +1121,12 @@ grub_err_t ventoy_cmd_load_cpio(grub_extcmd_context_t ctxt, int argc, char **arg grub_file_close(file); + if (grub_strcmp(args[3], "busybox=64") == 0) + { + debug("cpio busybox proc %s\n", args[3]); + ventoy_cpio_busybox64((cpio_newc_header *)g_ventoy_cpio_buf); + } + VENTOY_CMD_RETURN(GRUB_ERR_NONE); } diff --git a/IMG/cpio/sbin/init b/IMG/cpio/sbin/init index bd8e06db..2fbf7f52 100644 --- a/IMG/cpio/sbin/init +++ b/IMG/cpio/sbin/init @@ -1,4 +1,4 @@ -#!/ventoy/busybox/tmpsh +#!/ventoy/busybox/ash #************************************************************************************ # Copyright (c) 2020, longpanda # @@ -36,7 +36,14 @@ export SED=$BUSYBOX_PATH/sed export SLEEP=$BUSYBOX_PATH/sleep export HEAD=$BUSYBOX_PATH/head -$BUSYBOX_PATH/tmpxz -d $BUSYBOX_PATH/busybox.xz +if [ -e $BUSYBOX_PATH/64h ]; then + $BUSYBOX_PATH/xzminidec32 < $BUSYBOX_PATH/busybox32.xz > $BUSYBOX_PATH/busybox + $BUSYBOX_PATH/vtchmod32 $BUSYBOX_PATH/busybox +else + $BUSYBOX_PATH/xzminidec64 < $BUSYBOX_PATH/busybox64.xz > $BUSYBOX_PATH/busybox + $BUSYBOX_PATH/vtchmod64 $BUSYBOX_PATH/busybox +fi + $BUSYBOX_PATH/busybox --install $BUSYBOX_PATH export PATH=$BUSYBOX_PATH/:$VTOY_PATH/tool @@ -60,9 +67,21 @@ xz -d ventoy_loop.sh.xz if [ -n "$VTOY_REDT_BUG" ]; then xz -d -c hook.cpio.xz | cpio -idm xz -d -c tool.cpio.xz | cpio -idm + xz -d -c loop.cpio.xz | cpio -idm else xz -d -c hook.cpio.xz | cpio -idm 2>>$VTLOG xz -d -c tool.cpio.xz | cpio -idm 2>>$VTLOG + xz -d -c loop.cpio.xz | cpio -idm 2>>$VTLOG +fi + +if [ -e $BUSYBOX_PATH/64h ]; then + echo "Use busybox32 toolkit ..." >>$VTLOG + ln -s $BUSYBOX_PATH/xzminidec32 $BUSYBOX_PATH/xzminidec + ln -s $VTOY_PATH/tool/dmsetup32 $VTOY_PATH/tool/dmsetup +else + echo "Use busybox64 toolkit ..." >>$VTLOG + ln -s $BUSYBOX_PATH/xzminidec64 $BUSYBOX_PATH/xzminidec + ln -s $VTOY_PATH/tool/dmsetup64 $VTOY_PATH/tool/dmsetup fi rm -f *.xz diff --git a/IMG/cpio/ventoy/busybox/64h b/IMG/cpio/ventoy/busybox/64h new file mode 100644 index 00000000..32379432 Binary files /dev/null and b/IMG/cpio/ventoy/busybox/64h differ diff --git a/IMG/cpio/ventoy/busybox/tmpsh b/IMG/cpio/ventoy/busybox/ash similarity index 100% rename from IMG/cpio/ventoy/busybox/tmpsh rename to IMG/cpio/ventoy/busybox/ash diff --git a/IMG/cpio/ventoy/busybox/busybox.xz b/IMG/cpio/ventoy/busybox/busybox32.xz similarity index 100% rename from IMG/cpio/ventoy/busybox/busybox.xz rename to IMG/cpio/ventoy/busybox/busybox32.xz diff --git a/IMG/cpio/ventoy/busybox/busybox64.xz b/IMG/cpio/ventoy/busybox/busybox64.xz new file mode 100644 index 00000000..df9d768f Binary files /dev/null and b/IMG/cpio/ventoy/busybox/busybox64.xz differ diff --git a/IMG/cpio/ventoy/busybox/tmpxz b/IMG/cpio/ventoy/busybox/tmpxz deleted file mode 100644 index 34acebf8..00000000 Binary files a/IMG/cpio/ventoy/busybox/tmpxz and /dev/null differ diff --git a/IMG/cpio/ventoy/busybox/vtchmod32 b/IMG/cpio/ventoy/busybox/vtchmod32 new file mode 100644 index 00000000..4b66db3c Binary files /dev/null and b/IMG/cpio/ventoy/busybox/vtchmod32 differ diff --git a/IMG/cpio/ventoy/busybox/vtchmod64 b/IMG/cpio/ventoy/busybox/vtchmod64 new file mode 100644 index 00000000..9c799581 Binary files /dev/null and b/IMG/cpio/ventoy/busybox/vtchmod64 differ diff --git a/IMG/cpio/ventoy/tool/xzminidec b/IMG/cpio/ventoy/busybox/xzminidec32 similarity index 100% rename from IMG/cpio/ventoy/tool/xzminidec rename to IMG/cpio/ventoy/busybox/xzminidec32 diff --git a/IMG/cpio/ventoy/busybox/xzminidec64 b/IMG/cpio/ventoy/busybox/xzminidec64 new file mode 100644 index 00000000..e2dde491 Binary files /dev/null and b/IMG/cpio/ventoy/busybox/xzminidec64 differ diff --git a/IMG/cpio/ventoy/init b/IMG/cpio/ventoy/init index ef7310e6..74d085dc 100644 --- a/IMG/cpio/ventoy/init +++ b/IMG/cpio/ventoy/init @@ -23,11 +23,38 @@ # Step 1 : parse kernel debug parameter # # # #################################################################### -[ -d /proc ] || mkdir /proc; mount -t proc proc /proc -vtoy_cmdline=$(cat /proc/cmdline) -umount /proc; rm -rf /proc -if echo $vtoy_cmdline | grep -q 'rdinit=/vtoy/vtoy'; then +if ! [ -d /proc ]; then + mkdir /proc + vtrmproc='Y' +fi + +mount -t proc proc /proc +export vtcmdline=$(cat /proc/cmdline) +export vtkerver=$(cat /proc/version) +umount /proc; + +if [ "$vtrmproc" = "Y" ]; then + rm -rf /proc +fi + +echo "kenel version=$vtkerver" >>$VTLOG +echo "kenel cmdline=$vtcmdline" >>$VTLOG + +#break here for debug +if [ "$VTOY_BREAK_LEVEL" = "01" ] || [ "$VTOY_BREAK_LEVEL" = "11" ]; then + sleep 5 + echo -e "\n\n\033[32m ################################################# \033[0m" + echo -e "\033[32m ################ VENTOY DEBUG ################### \033[0m" + echo -e "\033[32m ################################################# \033[0m \n" + + if [ "$VTOY_BREAK_LEVEL" = "11" ]; then + cat $VTLOG + fi + exec $BUSYBOX_PATH/sh +fi + +if echo $vtcmdline | grep -q 'rdinit=/vtoy/vtoy'; then echo "handover to init_loop" >>$VTLOG rm -f /xxxx /vtoyxrc exec $BUSYBOX_PATH/sh $VTOY_PATH/init_loop diff --git a/IMG/cpio/ventoy/init_chain b/IMG/cpio/ventoy/init_chain index 17e27c74..7a102265 100644 --- a/IMG/cpio/ventoy/init_chain +++ b/IMG/cpio/ventoy/init_chain @@ -18,36 +18,9 @@ #************************************************************************************ -################################################################### -# # -# Step 1 : parse kernel debug parameter # -# # -#################################################################### -[ -d /proc ] || mkdir /proc; mount -t proc proc /proc -vtcmdline=$(cat /proc/cmdline) -vtkerver=$(cat /proc/version) -umount /proc; rm -rf /proc - -echo "kenel version=$vtkerver" >>$VTLOG -echo "kenel cmdline=$vtcmdline" >>$VTLOG - -#break here for debug -if [ "$VTOY_BREAK_LEVEL" = "01" ] || [ "$VTOY_BREAK_LEVEL" = "11" ]; then - sleep 5 - echo -e "\n\n\033[32m ################################################# \033[0m" - echo -e "\033[32m ################ VENTOY DEBUG ################### \033[0m" - echo -e "\033[32m ################################################# \033[0m \n" - - if [ "$VTOY_BREAK_LEVEL" = "11" ]; then - cat $VTLOG - fi - exec $BUSYBOX_PATH/sh -fi - - #################################################################### # # -# Step 2 : extract real initramfs to / # +# Step 1 : extract real initramfs to / # # # #################################################################### cd / diff --git a/IMG/cpio/ventoy/init_loop b/IMG/cpio/ventoy/init_loop index 1cbb6190..92886330 100644 --- a/IMG/cpio/ventoy/init_loop +++ b/IMG/cpio/ventoy/init_loop @@ -18,36 +18,9 @@ #************************************************************************************ -################################################################### -# # -# Step 1 : parse kernel debug parameter # -# # -#################################################################### -[ -d /proc ] || mkdir /proc; mount -t proc proc /proc -vtcmdline=$(cat /proc/cmdline) -vtkerver=$(cat /proc/version) -umount /proc; rm -rf /proc - -echo "kenel version=$vtkerver" >>$VTLOG -echo "kenel cmdline=$vtcmdline" >>$VTLOG - -#break here for debug -if [ "$VTOY_BREAK_LEVEL" = "01" ] || [ "$VTOY_BREAK_LEVEL" = "11" ]; then - sleep 5 - echo -e "\n\n\033[32m ################################################# \033[0m" - echo -e "\033[32m ################ VENTOY DEBUG ################### \033[0m" - echo -e "\033[32m ################################################# \033[0m \n" - - if [ "$VTOY_BREAK_LEVEL" = "11" ]; then - cat $VTLOG - fi - exec $BUSYBOX_PATH/sh -fi - - #################################################################### # # -# Step 2 : Extract injection archive # +# Step 1 : Extract injection archive # # # #################################################################### ventoy_unpack_injection() { diff --git a/IMG/cpio/ventoy/loop/deepin/ventoy-disk.sh b/IMG/cpio/ventoy/loop/deepin/ventoy-disk.sh deleted file mode 100644 index 48c3752d..00000000 --- a/IMG/cpio/ventoy/loop/deepin/ventoy-disk.sh +++ /dev/null @@ -1,36 +0,0 @@ -#!/bin/sh -#************************************************************************************ -# Copyright (c) 2020, longpanda -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -#************************************************************************************ - -cd /ventoy -xzcat tool.cpio.xz | cpio -idmu -/ventoy/tool/vtoytool/00/vtoytool_64 --install - -while [ -n "Y" ]; do - line=$(/ventoy/tool/vtoydump -f /ventoy/ventoy_os_param) - if [ $? -eq 0 ]; then - vtdiskname=${line%%#*} - break - else - sleep 1 - fi -done - -echo "ventoy disk is $vtdiskname" >> /ventoy/log -/ventoy/tool/vtoydm -p -f /ventoy/ventoy_image_map -d $vtdiskname > /ventoy/ventoy_dm_table -dmsetup create ventoy /ventoy/ventoy_dm_table --readonly diff --git a/IMG/cpio/ventoy/loop/deepin/ventoy-init.sh b/IMG/cpio/ventoy/loop/deepin/ventoy-init.sh deleted file mode 100644 index 17543eb3..00000000 --- a/IMG/cpio/ventoy/loop/deepin/ventoy-init.sh +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh -#************************************************************************************ -# Copyright (c) 2020, longpanda -# -# This program is free software; you can redistribute it and/or -# modify it under the terms of the GNU General Public License as -# published by the Free Software Foundation; either version 3 of the -# License, or (at your option) any later version. -# -# This program is distributed in the hope that it will be useful, but -# WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -# General Public License for more details. -# -# You should have received a copy of the GNU General Public License -# along with this program; if not, see . -# -#************************************************************************************ - -sed "/^mountroot$/i\\sh /ventoy/loop/deepin/ventoy-disk.sh" -i /init -exec /init diff --git a/IMG/cpio/ventoy/ventoy_loop.sh b/IMG/cpio/ventoy/ventoy_loop.sh index 6171adfe..bbb7c259 100644 --- a/IMG/cpio/ventoy/ventoy_loop.sh +++ b/IMG/cpio/ventoy/ventoy_loop.sh @@ -97,7 +97,7 @@ cd / unset VTLOG FIND GREP EGREP CAT AWK SED SLEEP HEAD -for vtinit in $user_rdinit /sbin/init /init /linuxrc; do +for vtinit in $user_rdinit /init /sbin/init /linuxrc; do if [ -d /ventoy_rdroot ]; then if [ -e "/ventoy_rdroot$vtinit" ]; then # switch_root will check /init file, this is a cheat code diff --git a/IMG/mkcpio.sh b/IMG/mkcpio.sh index 301d7cca..adbe1753 100644 --- a/IMG/mkcpio.sh +++ b/IMG/mkcpio.sh @@ -16,7 +16,7 @@ ln -s sbin/init linuxrc cd ventoy -cp -a $VENTOY_PATH/DMSETUP/dmsetup tool/ +cp -a $VENTOY_PATH/DMSETUP/dmsetup* tool/ cp -a $VENTOY_PATH/SQUASHFS/unsquashfs_* tool/ cp -a $VENTOY_PATH/FUSEISO/vtoy_fuse_iso_* tool/ cp -a $VENTOY_PATH/VtoyTool/vtoytool tool/ @@ -28,6 +28,10 @@ find ./tool | cpio -o -H newc>tool.cpio xz tool.cpio rm -rf tool +find ./loop | cpio -o -H newc>loop.cpio +xz loop.cpio +rm -rf loop + xz ventoy_chain.sh xz ventoy_loop.sh diff --git a/INSTALL/grub/grub.cfg b/INSTALL/grub/grub.cfg index d59e46d7..38ab7d4f 100644 --- a/INSTALL/grub/grub.cfg +++ b/INSTALL/grub/grub.cfg @@ -389,7 +389,7 @@ function uefi_linux_menu_func { loopback loop $1$2 fi - vt_load_cpio ${vtoy_path}/ventoy.cpio $2 $1 + vt_load_cpio ${vtoy_path}/ventoy.cpio $2 $1 "busybox=$ventoy_busybox_ver" vt_linux_clear_initrd @@ -594,7 +594,7 @@ function legacy_linux_menu_func { loopback loop $1$2 fi - vt_load_cpio $vtoy_path/ventoy.cpio $2 $1 + vt_load_cpio $vtoy_path/ventoy.cpio $2 $1 "busybox=$ventoy_busybox_ver" vt_linux_clear_initrd @@ -709,32 +709,6 @@ function legacy_iso_memdisk { boot } -function iso_deepin_live_proc { - if [ -d (loop)/ ]; then - loopback -d loop - fi - - loopback loop ${1}${2} - vt_img_sector ${1}${2} - - vt_load_cpio $vtoy_path/ventoy.cpio $2 $1 - vt_trailer_cpio $1 $2 noinit - - ventoy_debug_pause - - vt_set_boot_opt rdinit=/ventoy/loop/deepin/ventoy-init.sh live-media=/dev/mapper/ventoy - - set ventoy_loading_tip="Loading files ......" - - linux (loop)/live/vmlinuz boot=live components locales=zh_CN.UTF-8 splash quiet - initrd (loop)/live/initrd.img - boot - - unset ventoy_loading_tip - - vt_unset_boot_opt -} - function iso_endless_os_proc { if [ -d (loop)/ ]; then @@ -744,7 +718,7 @@ function iso_endless_os_proc { loopback loop ${1}${2} vt_img_sector ${1}${2} - vt_load_cpio $vtoy_path/ventoy.cpio $2 $1 + vt_load_cpio $vtoy_path/ventoy.cpio $2 $1 "busybox=$ventoy_busybox_ver" vt_trailer_cpio $1 $2 noinit ventoy_debug_pause @@ -765,20 +739,27 @@ function iso_endless_os_proc { vt_unset_boot_opt } -function iso_common_menuentry { - unset vt_system_id - unset vt_volume_id - - vt_chosen_img_path vt_chosen_path vt_chosen_size - vt_parse_iso_volume ${vtoy_iso_part}${vt_chosen_path} vt_system_id vt_volume_id + +function ventoy_iso_busybox_ver { + set ventoy_busybox_ver=32 #special process for deepin-live iso if [ "$vt_chosen_size" = "403701760" ]; then if vt_str_begin $vt_chosen_path "/deepin-live"; then - iso_deepin_live_proc $vtoy_iso_part $vt_chosen_path + set ventoy_busybox_ver=64 fi fi +} +function iso_common_menuentry { + unset vt_system_id + unset vt_volume_id + + vt_chosen_img_path vt_chosen_path vt_chosen_size + vt_parse_iso_volume ${vtoy_iso_part}${vt_chosen_path} vt_system_id vt_volume_id + + ventoy_iso_busybox_ver + #special process for Endless OS if vt_str_begin $vt_volume_id "Endless-OS"; then iso_endless_os_proc $vtoy_iso_part $vt_chosen_path @@ -853,8 +834,15 @@ function efi_unsupport_menuentry { } - - +function ventoy_img_busybox_ver { + set ventoy_busybox_ver=32 + + if [ -e (vtimghd,2)/etc/openwrt_release ]; then + if vt_file_strstr (vtimghd,2)/etc/openwrt_release x86_64; then + set ventoy_busybox_ver=64 + fi + fi +} function img_common_menuentry { diff --git a/INSTALL/grub/i386-pc/core.img b/INSTALL/grub/i386-pc/core.img index 27043b12..eec9e4ee 100644 Binary files a/INSTALL/grub/i386-pc/core.img and b/INSTALL/grub/i386-pc/core.img differ diff --git a/INSTALL/grub/i386-pc/syslinuxcfg.mod b/INSTALL/grub/i386-pc/syslinuxcfg.mod index ebeda650..0756a05d 100644 Binary files a/INSTALL/grub/i386-pc/syslinuxcfg.mod and b/INSTALL/grub/i386-pc/syslinuxcfg.mod differ diff --git a/LANGUAGES/languages.ini b/LANGUAGES/languages.ini index e2e57eb7..ae657056 100644 Binary files a/LANGUAGES/languages.ini and b/LANGUAGES/languages.ini differ diff --git a/Ventoy2Disk/Ventoy2Disk/xz-embedded-20130513/userspace/ventoy_makefile64 b/Ventoy2Disk/Ventoy2Disk/xz-embedded-20130513/userspace/ventoy_makefile64 new file mode 100644 index 00000000..5c456b34 --- /dev/null +++ b/Ventoy2Disk/Ventoy2Disk/xz-embedded-20130513/userspace/ventoy_makefile64 @@ -0,0 +1,48 @@ +# +# Makefile +# +# Author: Lasse Collin +# +# This file has been put into the public domain. +# You can do whatever you want with this file. +# + +CC = /opt/diet64/bin/diet gcc -Os -std=gnu89 +BCJ_CPPFLAGS = -DXZ_DEC_X86 -DXZ_DEC_POWERPC -DXZ_DEC_IA64 \ + -DXZ_DEC_ARM -DXZ_DEC_ARMTHUMB -DXZ_DEC_SPARC +CPPFLAGS = -DXZ_USE_CRC64 -DXZ_DEC_ANY_CHECK +CFLAGS = -ggdb3 -O2 -pedantic -Wall -Wextra +RM = rm -f +VPATH = ../linux/include/linux ../linux/lib/xz +COMMON_SRCS = xz_crc32.c xz_crc64.c xz_dec_stream.c xz_dec_lzma2.c xz_dec_bcj.c +COMMON_OBJS = $(COMMON_SRCS:.c=.o) +XZMINIDEC_OBJS = xzminidec.o +BYTETEST_OBJS = bytetest.o +BUFTEST_OBJS = buftest.o +BOOTTEST_OBJS = boottest.o +XZ_HEADERS = xz.h xz_private.h xz_stream.h xz_lzma2.h xz_config.h +PROGRAMS = xzminidec bytetest buftest boottest + +ALL_CPPFLAGS = -I../linux/include/linux -I. $(BCJ_CPPFLAGS) $(CPPFLAGS) + +all: $(PROGRAMS) + +%.o: %.c $(XZ_HEADERS) + $(CC) $(ALL_CPPFLAGS) $(CFLAGS) -c -o $@ $< + +xzminidec: $(COMMON_OBJS) $(XZMINIDEC_OBJS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(COMMON_OBJS) $(XZMINIDEC_OBJS) + +bytetest: $(COMMON_OBJS) $(BYTETEST_OBJS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(COMMON_OBJS) $(BYTETEST_OBJS) + +buftest: $(COMMON_OBJS) $(BUFTEST_OBJS) + $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(COMMON_OBJS) $(BUFTEST_OBJS) + +boottest: $(BOOTTEST_OBJS) $(COMMON_SRCS) + $(CC) $(ALL_CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $(BOOTTEST_OBJS) + +.PHONY: clean +clean: + -$(RM) $(COMMON_OBJS) $(XZMINIDEC_OBJS) $(BUFTEST_OBJS) \ + $(BOOTTEST_OBJS) $(PROGRAMS)