Home | Blog | Upgrading OpenWrt (guide)

Remotely upgrading OpenWrt 15.05 to 19.07 on Mikrotik Routerboards with NAND flash (yaffs2 → ubifs)

This guide will explain how to remotely, i.e. without having physical access to the machine, upgrade an embedded device from OpenWrt 15.05 or lower to LEDE 17.01 or OpenWrt 18.06/19.07. This process is usually not possible on systems equipped with NAND flash storage due to the root file system having been switched from yaffs2 to UBIFS without an official migration path in newer releases.

This guide was written for our migration of Mikrotik Routerboard 450G, but should be applicable to a wide range of devices and possibly even manufacturers. Apply your usual judgement for when to deviate from the instructions.

Overview

On a high level, the upgrade will take place in three parts: First, we prepare a specialized image (kernel + minimal initramfs) that fits solely within the "kernel" partition (/dev/mtdblock5 on a Routerboard 450G). Secondly, we will replace the currently installed kernel with our boot image and boot from it. Finally, we transfer the stock sysupgrade.bin and our backup tar.gz and flash it using the official method—sysupgrade(8).

Prepare bespoke initramfs image Replace kernel and boot custom image Transfer and flash stock OpenWrt
High level strategy

In the following steps, I will start with a bulleted list of the tasks, then explain them in detail.

Step 0: Backing up and checking compatibility

If you intend to keep your current configuration, you should follow the Preparing To Upgrade section from the OpenWrt documentation. sysupgrade -b /tmp/config.tar.gz should get you close. Keep in mind that OpenWrt has been overhauled dramatically, and changes to your configuration will probably be necessary.

But before we can initiate the upgrade, we need to make sure your NAND flash is compatible with UBIFS. For a short period of time in 2010, Mikrotik installed cheaper and less reliable MLC flash chips instead of the more reliable SLC ones. UBIFS predates MLC flash and will destroy it even when just reading from it due to a lack of an error correction daemon to fix the constantly occurring bitflips; the kernel will refuse to operate on such chips.
To find out if you are affected, issue dmesg | grep nand. This command will return information about the chip on your device, including the type of NAND technology used (SLC or MLC). Flash storage from Samsung, Winbond, Numonyx or Micron is supposedly safe, while Hynix requires a closer look. Sadly, there is nothing you can do but to decommission the device if it has an MLC flash.

Sample dmesg output SLC example:
[    2.252914] nand: device found, Manufacturer ID: 0x20, Chip ID: 0xdc
[    2.259309] nand: ST Micro NAND04GW3B2DN6
[    2.263313] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
MLC example:
[    0.825198] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xdc
[    0.831588] nand: Hynix NAND 512MiB 3,3V 8-bit
[    0.836191] nand: 512MiB, MLC, page size: 2048, OOB size: 64

Step 1: Preparing an OpenWrt boot image

To get around the problem that the old kernel can't read the new filesystem and vice versa, we temporarily boot into a self-contained initramfs environment. This is essentially just a Linux kernel that has its own file system embedded and lives entirely in the kernel partition. Given our size constraints (~3.4MB), this image needs to be stripped down as much as possible and only come with a basic configuration to reach your network.

Begin by following the Quick Image Building Guide. Start off by verifying that your build environment is working correctly by compiling a normal OpenWrt image by just modifying the Target System settings.

When you feel ready, reissue make menuconfig and disable as much packages as possible. A <*> or [*] indicates that the package will be pre-installed and take up precious disk space. However, you must install an ssh daemon (dropbear) and the sysupgrade tool. You could also directly modify the .config file in your OpenWrt build environment.

Sample .config file

CONFIG_MODULES=y
CONFIG_HAVE_DOT_CONFIG=y
CONFIG_TARGET_ar71xx=y
CONFIG_TARGET_ar71xx_mikrotik=y
CONFIG_TARGET_ar71xx_mikrotik_DEVICE_nand-large=y
CONFIG_HAS_SUBTARGETS=y
CONFIG_HAS_DEVICES=y
CONFIG_TARGET_BOARD="ar71xx"
CONFIG_TARGET_SUBTARGET="mikrotik"
CONFIG_TARGET_PROFILE="DEVICE_nand-large"
CONFIG_TARGET_ARCH_PACKAGES="mips_24kc"
CONFIG_DEFAULT_TARGET_OPTIMIZATION="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc"
CONFIG_CPU_TYPE="24kc"
CONFIG_LINUX_4_14=y
CONFIG_DEFAULT_base-files=y
CONFIG_DEFAULT_busybox=y
CONFIG_DEFAULT_dnsmasq=y
CONFIG_DEFAULT_dropbear=y
CONFIG_DEFAULT_firewall=y
CONFIG_DEFAULT_fstools=y
CONFIG_DEFAULT_ip6tables=y
CONFIG_DEFAULT_iptables=y
CONFIG_DEFAULT_iwinfo=y
CONFIG_DEFAULT_kmod-ath9k=y
CONFIG_DEFAULT_kmod-gpio-button-hotplug=y
CONFIG_DEFAULT_kmod-ipt-offload=y
CONFIG_DEFAULT_kmod-usb-ledtrig-usbport=y
CONFIG_DEFAULT_kmod-usb-ohci=y
CONFIG_DEFAULT_kmod-usb2=y
CONFIG_DEFAULT_libc=y
CONFIG_DEFAULT_libgcc=y
CONFIG_DEFAULT_logd=y
CONFIG_DEFAULT_mtd=y
CONFIG_DEFAULT_nand-utils=y
CONFIG_DEFAULT_netifd=y
CONFIG_DEFAULT_odhcp6c=y
CONFIG_DEFAULT_odhcpd-ipv6only=y
CONFIG_DEFAULT_opkg=y
CONFIG_DEFAULT_ppp=y
CONFIG_DEFAULT_ppp-mod-pppoe=y
CONFIG_DEFAULT_swconfig=y
CONFIG_DEFAULT_uboot-envtools=y
CONFIG_DEFAULT_uci=y
CONFIG_DEFAULT_uclient-fetch=y
CONFIG_DEFAULT_urandom-seed=y
CONFIG_DEFAULT_urngd=y
CONFIG_DEFAULT_wpad-basic=y
CONFIG_AUDIO_SUPPORT=y
CONFIG_GPIO_SUPPORT=y
CONFIG_PCI_SUPPORT=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_GADGET_SUPPORT=y
CONFIG_BIG_ENDIAN=y
CONFIG_USES_INITRAMFS=y
CONFIG_USES_SQUASHFS=y
CONFIG_USES_MINOR=y
CONFIG_HAS_MIPS16=y
CONFIG_NAND_SUPPORT=y
CONFIG_mips=y
CONFIG_ARCH="mips"
CONFIG_TARGET_ROOTFS_INITRAMFS=y
CONFIG_TARGET_INITRAMFS_COMPRESSION_LZMA=y
CONFIG_EXTERNAL_CPIO=""
CONFIG_TARGET_ROOTFS_TARGZ=y
CONFIG_TARGET_ROOTFS_SQUASHFS=y
CONFIG_TARGET_SQUASHFS_BLOCK_SIZE=256
CONFIG_TARGET_UBIFS_FREE_SPACE_FIXUP=y
CONFIG_TARGET_UBIFS_JOURNAL_SIZE=""
CONFIG_SHADOW_PASSWORDS=y
CONFIG_KERNEL_BUILD_USER=""
CONFIG_KERNEL_BUILD_DOMAIN=""
CONFIG_KERNEL_PRINTK=y
CONFIG_KERNEL_CRASHLOG=y
CONFIG_KERNEL_SWAP=y
CONFIG_KERNEL_DEBUG_FS=y
CONFIG_KERNEL_KALLSYMS=y
CONFIG_KERNEL_DEBUG_KERNEL=y
CONFIG_KERNEL_DEBUG_INFO=y
CONFIG_KERNEL_AIO=y
CONFIG_KERNEL_FHANDLE=y
CONFIG_KERNEL_FANOTIFY=y
CONFIG_KERNEL_MAGIC_SYSRQ=y
CONFIG_KERNEL_COREDUMP=y
CONFIG_KERNEL_ELF_CORE=y
CONFIG_KERNEL_PRINTK_TIME=y
CONFIG_KERNEL_CGROUPS=y
CONFIG_KERNEL_FREEZER=y
CONFIG_KERNEL_CGROUP_FREEZER=y
CONFIG_KERNEL_CGROUP_DEVICE=y
CONFIG_KERNEL_CGROUP_PIDS=y
CONFIG_KERNEL_CPUSETS=y
CONFIG_KERNEL_CGROUP_CPUACCT=y
CONFIG_KERNEL_RESOURCE_COUNTERS=y
CONFIG_KERNEL_MM_OWNER=y
CONFIG_KERNEL_MEMCG=y
CONFIG_KERNEL_MEMCG_KMEM=y
CONFIG_KERNEL_CGROUP_SCHED=y
CONFIG_KERNEL_FAIR_GROUP_SCHED=y
CONFIG_KERNEL_RT_GROUP_SCHED=y
CONFIG_KERNEL_BLK_CGROUP=y
CONFIG_KERNEL_NET_CLS_CGROUP=y
CONFIG_KERNEL_NETPRIO_CGROUP=y
CONFIG_KERNEL_NAMESPACES=y
CONFIG_KERNEL_UTS_NS=y
CONFIG_KERNEL_IPC_NS=y
CONFIG_KERNEL_USER_NS=y
CONFIG_KERNEL_PID_NS=y
CONFIG_KERNEL_NET_NS=y
CONFIG_KERNEL_DEVPTS_MULTIPLE_INSTANCES=y
CONFIG_KERNEL_POSIX_MQUEUE=y
CONFIG_KERNEL_SECCOMP_FILTER=y
CONFIG_KERNEL_SECCOMP=y
CONFIG_KERNEL_IP_MROUTE=y
CONFIG_KERNEL_SQUASHFS_FRAGMENT_CACHE_SIZE=3
CONFIG_KERNEL_CC_OPTIMIZE_FOR_PERFORMANCE=y
CONFIG_USE_SSTRIP=y
CONFIG_USE_UCLIBCXX=y
CONFIG_PKG_CHECK_FORMAT_SECURITY=y
CONFIG_PKG_ASLR_PIE_REGULAR=y
CONFIG_PKG_CC_STACKPROTECTOR_REGULAR=y
CONFIG_KERNEL_CC_STACKPROTECTOR_REGULAR=y
CONFIG_KERNEL_STACKPROTECTOR=y
CONFIG_PKG_FORTIFY_SOURCE_1=y
CONFIG_PKG_RELRO_FULL=y
CONFIG_BINARY_FOLDER=""
CONFIG_DOWNLOAD_FOLDER=""
CONFIG_LOCALMIRROR=""
CONFIG_AUTOREBUILD=y
CONFIG_BUILD_SUFFIX=""
CONFIG_TARGET_ROOTFS_DIR=""
CONFIG_EXTERNAL_KERNEL_TREE=""
CONFIG_KERNEL_GIT_CLONE_URI=""
CONFIG_BUILD_LOG_DIR=""
CONFIG_EXTRA_OPTIMIZATION="-fno-caller-saves -fno-plt"
CONFIG_TARGET_OPTIMIZATION="-Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc"
CONFIG_SOFT_FLOAT=y
CONFIG_USE_MIPS16=y
CONFIG_EXTRA_BINUTILS_CONFIG_OPTIONS=""
CONFIG_EXTRA_GCC_CONFIG_OPTIONS=""
CONFIG_GDB=y
CONFIG_USE_MUSL=y
CONFIG_SSP_SUPPORT=y
CONFIG_BINUTILS_VERSION_2_31_1=y
CONFIG_BINUTILS_VERSION="2.31.1"
CONFIG_GCC_VERSION="8.3.0"
CONFIG_LIBC="musl"
CONFIG_TARGET_SUFFIX="musl"
CONFIG_IB=y
CONFIG_IB_STANDALONE=y
CONFIG_TARGET_PREINIT_SUPPRESS_STDERR=y
CONFIG_TARGET_PREINIT_TIMEOUT=2
CONFIG_TARGET_PREINIT_IFNAME=""
CONFIG_TARGET_PREINIT_IP="192.168.1.1"
CONFIG_TARGET_PREINIT_NETMASK="255.255.255.0"
CONFIG_TARGET_PREINIT_BROADCAST="192.168.1.255"
CONFIG_TARGET_INIT_PATH="/usr/sbin:/usr/bin:/sbin:/bin"
CONFIG_TARGET_INIT_ENV=""
CONFIG_TARGET_INIT_CMD="/sbin/init"
CONFIG_TARGET_INIT_SUPPRESS_STDERR=y
CONFIG_PER_FEED_REPO=y
CONFIG_FEED_packages=y
CONFIG_FEED_luci=y
CONFIG_FEED_routing=y
CONFIG_FEED_telephony=y
CONFIG_PACKAGE_base-files=y
CONFIG_PACKAGE_busybox=y
CONFIG_BUSYBOX_CUSTOM=y
CONFIG_BUSYBOX_DEFAULT_HAVE_DOT_CONFIG=y
CONFIG_BUSYBOX_DEFAULT_INCLUDE_SUSv2=y
CONFIG_BUSYBOX_DEFAULT_LONG_OPTS=y
CONFIG_BUSYBOX_DEFAULT_SHOW_USAGE=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_VERBOSE_USAGE=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_COMPRESS_USAGE=y
CONFIG_BUSYBOX_DEFAULT_LFS=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_DEVPTS=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_PIDFILE=y
CONFIG_BUSYBOX_DEFAULT_PID_FILE_PATH="/var/run"
CONFIG_BUSYBOX_DEFAULT_FEATURE_PREFER_APPLETS=y
CONFIG_BUSYBOX_DEFAULT_BUSYBOX_EXEC_PATH="/proc/self/exe"
CONFIG_BUSYBOX_DEFAULT_FEATURE_SYSLOG=y
CONFIG_BUSYBOX_DEFAULT_PLATFORM_LINUX=y
CONFIG_BUSYBOX_DEFAULT_CROSS_COMPILER_PREFIX=""
CONFIG_BUSYBOX_DEFAULT_SYSROOT=""
CONFIG_BUSYBOX_DEFAULT_EXTRA_CFLAGS=""
CONFIG_BUSYBOX_DEFAULT_EXTRA_LDFLAGS=""
CONFIG_BUSYBOX_DEFAULT_EXTRA_LDLIBS=""
CONFIG_BUSYBOX_DEFAULT_INSTALL_APPLET_SYMLINKS=y
CONFIG_BUSYBOX_DEFAULT_PREFIX="./_install"
CONFIG_BUSYBOX_DEFAULT_NO_DEBUG_LIB=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_BUFFERS_GO_ON_STACK=y
CONFIG_BUSYBOX_DEFAULT_PASSWORD_MINLEN=6
CONFIG_BUSYBOX_DEFAULT_MD5_SMALL=1
CONFIG_BUSYBOX_DEFAULT_SHA3_SMALL=1
CONFIG_BUSYBOX_DEFAULT_FEATURE_FAST_TOP=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING_MAX_LEN=512
CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING_HISTORY=256
CONFIG_BUSYBOX_DEFAULT_FEATURE_TAB_COMPLETION=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_EDITING_FANCY_PROMPT=y
CONFIG_BUSYBOX_DEFAULT_SUBST_WCHAR=0
CONFIG_BUSYBOX_DEFAULT_LAST_SUPPORTED_WCHAR=0
CONFIG_BUSYBOX_DEFAULT_FEATURE_NON_POSIX_CP=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_USE_SENDFILE=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_COPYBUF_KB=4
CONFIG_BUSYBOX_DEFAULT_IOCTL_HEX2STR_ERROR=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_SEAMLESS_GZ=y
CONFIG_BUSYBOX_DEFAULT_GUNZIP=y
CONFIG_BUSYBOX_DEFAULT_ZCAT=y
CONFIG_BUSYBOX_DEFAULT_BUNZIP2=y
CONFIG_BUSYBOX_DEFAULT_BZCAT=y
CONFIG_BUSYBOX_DEFAULT_BZIP2_SMALL=0
CONFIG_BUSYBOX_DEFAULT_FEATURE_BZIP2_DECOMPRESS=y
CONFIG_BUSYBOX_DEFAULT_GZIP=y
CONFIG_BUSYBOX_DEFAULT_GZIP_FAST=0
CONFIG_BUSYBOX_DEFAULT_FEATURE_GZIP_DECOMPRESS=y
CONFIG_BUSYBOX_DEFAULT_TAR=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_TAR_CREATE=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_TAR_FROM=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_TAR_GNU_EXTENSIONS=y
CONFIG_BUSYBOX_DEFAULT_BASENAME=y
CONFIG_BUSYBOX_DEFAULT_CAT=y
CONFIG_BUSYBOX_DEFAULT_CHGRP=y
CONFIG_BUSYBOX_DEFAULT_CHMOD=y
CONFIG_BUSYBOX_DEFAULT_CHOWN=y
CONFIG_BUSYBOX_DEFAULT_CHROOT=y
CONFIG_BUSYBOX_DEFAULT_CP=y
CONFIG_BUSYBOX_DEFAULT_CUT=y
CONFIG_BUSYBOX_DEFAULT_DATE=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_DATE_ISOFMT=y
CONFIG_BUSYBOX_DEFAULT_DD=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_DD_SIGNAL_HANDLING=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_DD_IBS_OBS=y
CONFIG_BUSYBOX_DEFAULT_DF=y
CONFIG_BUSYBOX_DEFAULT_DIRNAME=y
CONFIG_BUSYBOX_DEFAULT_DU=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
CONFIG_BUSYBOX_DEFAULT_ECHO=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FANCY_ECHO=y
CONFIG_BUSYBOX_DEFAULT_ENV=y
CONFIG_BUSYBOX_DEFAULT_EXPR=y
CONFIG_BUSYBOX_DEFAULT_EXPR_MATH_SUPPORT_64=y
CONFIG_BUSYBOX_DEFAULT_FALSE=y
CONFIG_BUSYBOX_DEFAULT_HEAD=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FANCY_HEAD=y
CONFIG_BUSYBOX_DEFAULT_ID=y
CONFIG_BUSYBOX_DEFAULT_LN=y
CONFIG_BUSYBOX_DEFAULT_LS=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_FILETYPES=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_FOLLOWLINKS=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_RECURSIVE=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_WIDTH=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_SORTFILES=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_TIMESTAMPS=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_USERNAME=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_COLOR=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_LS_COLOR_IS_DEFAULT=y
CONFIG_BUSYBOX_DEFAULT_MD5SUM=y
CONFIG_BUSYBOX_DEFAULT_SHA256SUM=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_MD5_SHA1_SUM_CHECK=y
CONFIG_BUSYBOX_DEFAULT_MKDIR=y
CONFIG_BUSYBOX_DEFAULT_MKFIFO=y
CONFIG_BUSYBOX_DEFAULT_MKNOD=y
CONFIG_BUSYBOX_DEFAULT_MKTEMP=y
CONFIG_BUSYBOX_DEFAULT_MV=y
CONFIG_BUSYBOX_DEFAULT_NICE=y
CONFIG_BUSYBOX_DEFAULT_PRINTF=y
CONFIG_BUSYBOX_DEFAULT_PWD=y
CONFIG_BUSYBOX_DEFAULT_READLINK=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_READLINK_FOLLOW=y
CONFIG_BUSYBOX_DEFAULT_RM=y
CONFIG_BUSYBOX_DEFAULT_RMDIR=y
CONFIG_BUSYBOX_DEFAULT_SEQ=y
CONFIG_BUSYBOX_DEFAULT_SLEEP=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FANCY_SLEEP=y
CONFIG_BUSYBOX_DEFAULT_SORT=y
CONFIG_BUSYBOX_DEFAULT_SYNC=y
CONFIG_BUSYBOX_DEFAULT_FSYNC=y
CONFIG_BUSYBOX_DEFAULT_TAIL=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FANCY_TAIL=y
CONFIG_BUSYBOX_DEFAULT_TEE=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_TEE_USE_BLOCK_IO=y
CONFIG_BUSYBOX_DEFAULT_TEST=y
CONFIG_BUSYBOX_DEFAULT_TEST1=y
CONFIG_BUSYBOX_DEFAULT_TEST2=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_TEST_64=y
CONFIG_BUSYBOX_DEFAULT_TOUCH=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_TOUCH_SUSV3=y
CONFIG_BUSYBOX_DEFAULT_TR=y
CONFIG_BUSYBOX_DEFAULT_TRUE=y
CONFIG_BUSYBOX_DEFAULT_UNAME=y
CONFIG_BUSYBOX_DEFAULT_UNAME_OSNAME="GNU/Linux"
CONFIG_BUSYBOX_DEFAULT_UNIQ=y
CONFIG_BUSYBOX_DEFAULT_WC=y
CONFIG_BUSYBOX_DEFAULT_YES=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_PRESERVE_HARDLINKS=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_HUMAN_READABLE=y
CONFIG_BUSYBOX_DEFAULT_CLEAR=y
CONFIG_BUSYBOX_DEFAULT_DEFAULT_SETFONT_DIR=""
CONFIG_BUSYBOX_DEFAULT_RESET=y
CONFIG_BUSYBOX_DEFAULT_START_STOP_DAEMON=y
CONFIG_BUSYBOX_DEFAULT_WHICH=y
CONFIG_BUSYBOX_DEFAULT_AWK=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_AWK_LIBM=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_AWK_GNU_EXTENSIONS=y
CONFIG_BUSYBOX_DEFAULT_CMP=y
CONFIG_BUSYBOX_DEFAULT_SED=y
CONFIG_BUSYBOX_DEFAULT_VI=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_MAX_LEN=1024
CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_COLON=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_YANKMARK=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_SEARCH=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_USE_SIGNALS=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_DOT_CMD=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_READONLY=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_SETOPTS=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_SET=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_WIN_RESIZE=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_ASK_TERMINAL=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_VI_UNDO_QUEUE_MAX=0
CONFIG_BUSYBOX_DEFAULT_FEATURE_ALLOW_EXEC=y
CONFIG_BUSYBOX_DEFAULT_FIND=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_PRINT0=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_MTIME=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_PERM=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_TYPE=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_XDEV=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_MAXDEPTH=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_NEWER=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_EXEC=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_USER=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_GROUP=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_NOT=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_DEPTH=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_PAREN=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_SIZE=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_PRUNE=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_PATH=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FIND_REGEX=y
CONFIG_BUSYBOX_DEFAULT_GREP=y
CONFIG_BUSYBOX_DEFAULT_EGREP=y
CONFIG_BUSYBOX_DEFAULT_FGREP=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_GREP_CONTEXT=y
CONFIG_BUSYBOX_DEFAULT_XARGS=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_QUOTES=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_TERMOPT=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
CONFIG_BUSYBOX_DEFAULT_HALT=y
CONFIG_BUSYBOX_DEFAULT_POWEROFF=y
CONFIG_BUSYBOX_DEFAULT_REBOOT=y
CONFIG_BUSYBOX_DEFAULT_TELINIT_PATH=""
CONFIG_BUSYBOX_DEFAULT_FEATURE_KILL_DELAY=0
CONFIG_BUSYBOX_DEFAULT_INIT_TERMINAL_TYPE=""
CONFIG_BUSYBOX_DEFAULT_FEATURE_SHADOWPASSWDS=y
CONFIG_BUSYBOX_DEFAULT_LAST_ID=0
CONFIG_BUSYBOX_DEFAULT_FIRST_SYSTEM_ID=0
CONFIG_BUSYBOX_DEFAULT_LAST_SYSTEM_ID=0
CONFIG_BUSYBOX_DEFAULT_FEATURE_DEFAULT_PASSWD_ALGO="md5"
CONFIG_BUSYBOX_DEFAULT_LOGIN=y
CONFIG_BUSYBOX_DEFAULT_LOGIN_SESSION_AS_CHILD=y
CONFIG_BUSYBOX_DEFAULT_PASSWD=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_PASSWD_WEAK_CHECK=y
CONFIG_BUSYBOX_DEFAULT_DEFAULT_MODULES_DIR=""
CONFIG_BUSYBOX_DEFAULT_DEFAULT_DEPMOD_FILE=""
CONFIG_BUSYBOX_DEFAULT_DMESG=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_DMESG_PRETTY=y
CONFIG_BUSYBOX_DEFAULT_FLOCK=y
CONFIG_BUSYBOX_DEFAULT_HEXDUMP=y
CONFIG_BUSYBOX_DEFAULT_HWCLOCK=y
CONFIG_BUSYBOX_DEFAULT_MKSWAP=y
CONFIG_BUSYBOX_DEFAULT_MOUNT=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_MOUNT_HELPERS=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_MOUNT_CIFS=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_MOUNT_FLAGS=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_MOUNT_FSTAB=y
CONFIG_BUSYBOX_DEFAULT_PIVOT_ROOT=y
CONFIG_BUSYBOX_DEFAULT_SWAPON=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_SWAPON_DISCARD=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_SWAPON_PRI=y
CONFIG_BUSYBOX_DEFAULT_SWAPOFF=y
CONFIG_BUSYBOX_DEFAULT_SWITCH_ROOT=y
CONFIG_BUSYBOX_DEFAULT_UMOUNT=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_UMOUNT_ALL=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_MOUNT_LOOP=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_BEEP_FREQ=0
CONFIG_BUSYBOX_DEFAULT_FEATURE_BEEP_LENGTH_MS=0
CONFIG_BUSYBOX_DEFAULT_CROND=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_CROND_DIR="/etc"
CONFIG_BUSYBOX_DEFAULT_CRONTAB=y
CONFIG_BUSYBOX_DEFAULT_LESS=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_LESS_MAXLINES=9999999
CONFIG_BUSYBOX_DEFAULT_LOCK=y
CONFIG_BUSYBOX_DEFAULT_STRINGS=y
CONFIG_BUSYBOX_DEFAULT_TIME=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_PREFER_IPV4_ADDRESS=y
CONFIG_BUSYBOX_DEFAULT_VERBOSE_RESOLUTION_ERRORS=y
CONFIG_BUSYBOX_DEFAULT_BRCTL=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_BRCTL_FANCY=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_BRCTL_SHOW=y
CONFIG_BUSYBOX_DEFAULT_IFCONFIG=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_IFCONFIG_STATUS=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_IFCONFIG_HW=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_IFCONFIG_BROADCAST_PLUS=y
CONFIG_BUSYBOX_DEFAULT_IFUPDOWN_IFSTATE_PATH=""
CONFIG_BUSYBOX_DEFAULT_IP=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_IP_ADDRESS=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_IP_LINK=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_IP_ROUTE=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_IP_ROUTE_DIR="/etc/iproute2"
CONFIG_BUSYBOX_DEFAULT_FEATURE_IP_RULE=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_IP_NEIGH=y
CONFIG_BUSYBOX_DEFAULT_NC=y
CONFIG_BUSYBOX_DEFAULT_NETMSG=y
CONFIG_BUSYBOX_DEFAULT_NETSTAT=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_NETSTAT_WIDE=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_NETSTAT_PRG=y
CONFIG_BUSYBOX_DEFAULT_NSLOOKUP_OPENWRT=y
CONFIG_BUSYBOX_DEFAULT_NTPD=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_NTPD_SERVER=y
CONFIG_BUSYBOX_DEFAULT_PING=y
CONFIG_BUSYBOX_DEFAULT_PING6=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_FANCY_PING=y
CONFIG_BUSYBOX_DEFAULT_ROUTE=y
CONFIG_BUSYBOX_DEFAULT_TRACEROUTE=y
CONFIG_BUSYBOX_DEFAULT_TRACEROUTE6=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_TRACEROUTE_VERBOSE=y
CONFIG_BUSYBOX_DEFAULT_DHCPD_LEASES_FILE=""
CONFIG_BUSYBOX_DEFAULT_UDHCPC=y
CONFIG_BUSYBOX_DEFAULT_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
CONFIG_BUSYBOX_DEFAULT_UDHCP_DEBUG=0
CONFIG_BUSYBOX_DEFAULT_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
CONFIG_BUSYBOX_DEFAULT_FEATURE_UDHCP_RFC3397=y
CONFIG_BUSYBOX_DEFAULT_IFUPDOWN_UDHCPC_CMD_OPTIONS=""
CONFIG_BUSYBOX_DEFAULT_FEATURE_MIME_CHARSET=""
CONFIG_BUSYBOX_DEFAULT_FREE=y
CONFIG_BUSYBOX_DEFAULT_KILL=y
CONFIG_BUSYBOX_DEFAULT_KILLALL=y
CONFIG_BUSYBOX_DEFAULT_PGREP=y
CONFIG_BUSYBOX_DEFAULT_PIDOF=y
CONFIG_BUSYBOX_DEFAULT_PS=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_PS_WIDE=y
CONFIG_BUSYBOX_DEFAULT_BB_SYSCTL=y
CONFIG_BUSYBOX_DEFAULT_TOP=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
CONFIG_BUSYBOX_DEFAULT_UPTIME=y
CONFIG_BUSYBOX_DEFAULT_SV_DEFAULT_SERVICE_DIR=""
CONFIG_BUSYBOX_DEFAULT_SH_IS_ASH=y
CONFIG_BUSYBOX_DEFAULT_BASH_IS_NONE=y
CONFIG_BUSYBOX_DEFAULT_ASH=y
CONFIG_BUSYBOX_DEFAULT_ASH_INTERNAL_GLOB=y
CONFIG_BUSYBOX_DEFAULT_ASH_BASH_COMPAT=y
CONFIG_BUSYBOX_DEFAULT_ASH_JOB_CONTROL=y
CONFIG_BUSYBOX_DEFAULT_ASH_ALIAS=y
CONFIG_BUSYBOX_DEFAULT_ASH_EXPAND_PRMT=y
CONFIG_BUSYBOX_DEFAULT_ASH_ECHO=y
CONFIG_BUSYBOX_DEFAULT_ASH_PRINTF=y
CONFIG_BUSYBOX_DEFAULT_ASH_TEST=y
CONFIG_BUSYBOX_DEFAULT_ASH_GETOPTS=y
CONFIG_BUSYBOX_DEFAULT_ASH_CMDCMD=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_SH_MATH=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_SH_MATH_64=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_SH_NOFORK=y
CONFIG_BUSYBOX_DEFAULT_LOGGER=y
CONFIG_BUSYBOX_DEFAULT_FEATURE_SYSLOGD_READ_BUFFER_SIZE=0
CONFIG_BUSYBOX_DEFAULT_FEATURE_IPC_SYSLOG_BUFFER_SIZE=0
CONFIG_BUSYBOX_CONFIG_HAVE_DOT_CONFIG=y
CONFIG_BUSYBOX_CONFIG_INCLUDE_SUSv2=y
CONFIG_BUSYBOX_CONFIG_LONG_OPTS=y
CONFIG_BUSYBOX_CONFIG_SHOW_USAGE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VERBOSE_USAGE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_COMPRESS_USAGE=y
CONFIG_BUSYBOX_CONFIG_LFS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_DEVPTS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_PIDFILE=y
CONFIG_BUSYBOX_CONFIG_PID_FILE_PATH="/var/run"
CONFIG_BUSYBOX_CONFIG_FEATURE_PREFER_APPLETS=y
CONFIG_BUSYBOX_CONFIG_BUSYBOX_EXEC_PATH="/proc/self/exe"
CONFIG_BUSYBOX_CONFIG_FEATURE_SYSLOG=y
CONFIG_BUSYBOX_CONFIG_PLATFORM_LINUX=y
CONFIG_BUSYBOX_CONFIG_CROSS_COMPILER_PREFIX=""
CONFIG_BUSYBOX_CONFIG_SYSROOT=""
CONFIG_BUSYBOX_CONFIG_EXTRA_CFLAGS=""
CONFIG_BUSYBOX_CONFIG_EXTRA_LDFLAGS=""
CONFIG_BUSYBOX_CONFIG_EXTRA_LDLIBS=""
CONFIG_BUSYBOX_CONFIG_INSTALL_APPLET_SYMLINKS=y
CONFIG_BUSYBOX_CONFIG_PREFIX="./_install"
CONFIG_BUSYBOX_CONFIG_NO_DEBUG_LIB=y
CONFIG_BUSYBOX_CONFIG_FEATURE_BUFFERS_GO_ON_STACK=y
CONFIG_BUSYBOX_CONFIG_PASSWORD_MINLEN=6
CONFIG_BUSYBOX_CONFIG_MD5_SMALL=1
CONFIG_BUSYBOX_CONFIG_SHA3_SMALL=1
CONFIG_BUSYBOX_CONFIG_FEATURE_FAST_TOP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING=y
CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_MAX_LEN=512
CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_HISTORY=256
CONFIG_BUSYBOX_CONFIG_FEATURE_TAB_COMPLETION=y
CONFIG_BUSYBOX_CONFIG_FEATURE_EDITING_FANCY_PROMPT=y
CONFIG_BUSYBOX_CONFIG_FEATURE_NON_POSIX_CP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_USE_SENDFILE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_COPYBUF_KB=4
CONFIG_BUSYBOX_CONFIG_IOCTL_HEX2STR_ERROR=y
CONFIG_BUSYBOX_CONFIG_FEATURE_SEAMLESS_GZ=y
CONFIG_BUSYBOX_CONFIG_GUNZIP=y
CONFIG_BUSYBOX_CONFIG_ZCAT=y
CONFIG_BUSYBOX_CONFIG_BUNZIP2=y
CONFIG_BUSYBOX_CONFIG_BZCAT=y
CONFIG_BUSYBOX_CONFIG_FEATURE_BZIP2_DECOMPRESS=y
CONFIG_BUSYBOX_CONFIG_GZIP=y
CONFIG_BUSYBOX_CONFIG_GZIP_FAST=0
CONFIG_BUSYBOX_CONFIG_FEATURE_GZIP_DECOMPRESS=y
CONFIG_BUSYBOX_CONFIG_TAR=y
CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_CREATE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_FROM=y
CONFIG_BUSYBOX_CONFIG_FEATURE_TAR_GNU_EXTENSIONS=y
CONFIG_BUSYBOX_CONFIG_BASENAME=y
CONFIG_BUSYBOX_CONFIG_CAT=y
CONFIG_BUSYBOX_CONFIG_CHGRP=y
CONFIG_BUSYBOX_CONFIG_CHMOD=y
CONFIG_BUSYBOX_CONFIG_CHOWN=y
CONFIG_BUSYBOX_CONFIG_CHROOT=y
CONFIG_BUSYBOX_CONFIG_CP=y
CONFIG_BUSYBOX_CONFIG_CUT=y
CONFIG_BUSYBOX_CONFIG_DATE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_DATE_ISOFMT=y
CONFIG_BUSYBOX_CONFIG_DD=y
CONFIG_BUSYBOX_CONFIG_FEATURE_DD_SIGNAL_HANDLING=y
CONFIG_BUSYBOX_CONFIG_FEATURE_DD_IBS_OBS=y
CONFIG_BUSYBOX_CONFIG_DF=y
CONFIG_BUSYBOX_CONFIG_DIRNAME=y
CONFIG_BUSYBOX_CONFIG_DU=y
CONFIG_BUSYBOX_CONFIG_FEATURE_DU_DEFAULT_BLOCKSIZE_1K=y
CONFIG_BUSYBOX_CONFIG_ECHO=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_ECHO=y
CONFIG_BUSYBOX_CONFIG_ENV=y
CONFIG_BUSYBOX_CONFIG_EXPR=y
CONFIG_BUSYBOX_CONFIG_EXPR_MATH_SUPPORT_64=y
CONFIG_BUSYBOX_CONFIG_FALSE=y
CONFIG_BUSYBOX_CONFIG_HEAD=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_HEAD=y
CONFIG_BUSYBOX_CONFIG_ID=y
CONFIG_BUSYBOX_CONFIG_LN=y
CONFIG_BUSYBOX_CONFIG_LS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LS_FILETYPES=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LS_FOLLOWLINKS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LS_RECURSIVE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LS_WIDTH=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LS_SORTFILES=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LS_TIMESTAMPS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LS_USERNAME=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LS_COLOR=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LS_COLOR_IS_DEFAULT=y
CONFIG_BUSYBOX_CONFIG_MD5SUM=y
CONFIG_BUSYBOX_CONFIG_SHA256SUM=y
CONFIG_BUSYBOX_CONFIG_FEATURE_MD5_SHA1_SUM_CHECK=y
CONFIG_BUSYBOX_CONFIG_MKDIR=y
CONFIG_BUSYBOX_CONFIG_MKFIFO=y
CONFIG_BUSYBOX_CONFIG_MKNOD=y
CONFIG_BUSYBOX_CONFIG_MKTEMP=y
CONFIG_BUSYBOX_CONFIG_MV=y
CONFIG_BUSYBOX_CONFIG_NICE=y
CONFIG_BUSYBOX_CONFIG_PRINTF=y
CONFIG_BUSYBOX_CONFIG_PWD=y
CONFIG_BUSYBOX_CONFIG_READLINK=y
CONFIG_BUSYBOX_CONFIG_FEATURE_READLINK_FOLLOW=y
CONFIG_BUSYBOX_CONFIG_RM=y
CONFIG_BUSYBOX_CONFIG_RMDIR=y
CONFIG_BUSYBOX_CONFIG_SEQ=y
CONFIG_BUSYBOX_CONFIG_SLEEP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_SLEEP=y
CONFIG_BUSYBOX_CONFIG_SORT=y
CONFIG_BUSYBOX_CONFIG_SYNC=y
CONFIG_BUSYBOX_CONFIG_FSYNC=y
CONFIG_BUSYBOX_CONFIG_TAIL=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_TAIL=y
CONFIG_BUSYBOX_CONFIG_TEE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_TEE_USE_BLOCK_IO=y
CONFIG_BUSYBOX_CONFIG_TEST=y
CONFIG_BUSYBOX_CONFIG_TEST1=y
CONFIG_BUSYBOX_CONFIG_TEST2=y
CONFIG_BUSYBOX_CONFIG_FEATURE_TEST_64=y
CONFIG_BUSYBOX_CONFIG_TOUCH=y
CONFIG_BUSYBOX_CONFIG_FEATURE_TOUCH_SUSV3=y
CONFIG_BUSYBOX_CONFIG_TR=y
CONFIG_BUSYBOX_CONFIG_TRUE=y
CONFIG_BUSYBOX_CONFIG_UNAME=y
CONFIG_BUSYBOX_CONFIG_UNAME_OSNAME="GNU/Linux"
CONFIG_BUSYBOX_CONFIG_UNIQ=y
CONFIG_BUSYBOX_CONFIG_WC=y
CONFIG_BUSYBOX_CONFIG_YES=y
CONFIG_BUSYBOX_CONFIG_FEATURE_PRESERVE_HARDLINKS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_HUMAN_READABLE=y
CONFIG_BUSYBOX_CONFIG_CLEAR=y
CONFIG_BUSYBOX_CONFIG_RESET=y
CONFIG_BUSYBOX_CONFIG_START_STOP_DAEMON=y
CONFIG_BUSYBOX_CONFIG_WHICH=y
CONFIG_BUSYBOX_CONFIG_AWK=y
CONFIG_BUSYBOX_CONFIG_FEATURE_AWK_LIBM=y
CONFIG_BUSYBOX_CONFIG_FEATURE_AWK_GNU_EXTENSIONS=y
CONFIG_BUSYBOX_CONFIG_CMP=y
CONFIG_BUSYBOX_CONFIG_SED=y
CONFIG_BUSYBOX_CONFIG_VI=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VI_MAX_LEN=1024
CONFIG_BUSYBOX_CONFIG_FEATURE_VI_COLON=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VI_YANKMARK=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VI_SEARCH=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VI_USE_SIGNALS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VI_DOT_CMD=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VI_READONLY=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VI_SETOPTS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VI_SET=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VI_WIN_RESIZE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_VI_ASK_TERMINAL=y
CONFIG_BUSYBOX_CONFIG_FEATURE_ALLOW_EXEC=y
CONFIG_BUSYBOX_CONFIG_FIND=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PRINT0=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_MTIME=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PERM=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_TYPE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_XDEV=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_MAXDEPTH=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_NEWER=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_EXEC=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_USER=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_GROUP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_NOT=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_DEPTH=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PAREN=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_SIZE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PRUNE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_PATH=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FIND_REGEX=y
CONFIG_BUSYBOX_CONFIG_GREP=y
CONFIG_BUSYBOX_CONFIG_EGREP=y
CONFIG_BUSYBOX_CONFIG_FGREP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_GREP_CONTEXT=y
CONFIG_BUSYBOX_CONFIG_XARGS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_CONFIRMATION=y
CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_QUOTES=y
CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_TERMOPT=y
CONFIG_BUSYBOX_CONFIG_FEATURE_XARGS_SUPPORT_ZERO_TERM=y
CONFIG_BUSYBOX_CONFIG_HALT=y
CONFIG_BUSYBOX_CONFIG_POWEROFF=y
CONFIG_BUSYBOX_CONFIG_REBOOT=y
CONFIG_BUSYBOX_CONFIG_FEATURE_SHADOWPASSWDS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_DEFAULT_PASSWD_ALGO="md5"
CONFIG_BUSYBOX_CONFIG_LOGIN=y
CONFIG_BUSYBOX_CONFIG_PASSWD=y
CONFIG_BUSYBOX_CONFIG_FEATURE_PASSWD_WEAK_CHECK=y
CONFIG_BUSYBOX_CONFIG_DMESG=y
CONFIG_BUSYBOX_CONFIG_FEATURE_DMESG_PRETTY=y
CONFIG_BUSYBOX_CONFIG_FLOCK=y
CONFIG_BUSYBOX_CONFIG_HEXDUMP=y
CONFIG_BUSYBOX_CONFIG_HWCLOCK=y
CONFIG_BUSYBOX_CONFIG_MKSWAP=y
CONFIG_BUSYBOX_CONFIG_MOUNT=y
CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_HELPERS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_CIFS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_FLAGS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_FSTAB=y
CONFIG_BUSYBOX_CONFIG_PIVOT_ROOT=y
CONFIG_BUSYBOX_CONFIG_SWAPON=y
CONFIG_BUSYBOX_CONFIG_FEATURE_SWAPON_DISCARD=y
CONFIG_BUSYBOX_CONFIG_FEATURE_SWAPON_PRI=y
CONFIG_BUSYBOX_CONFIG_SWAPOFF=y
CONFIG_BUSYBOX_CONFIG_SWITCH_ROOT=y
CONFIG_BUSYBOX_CONFIG_UMOUNT=y
CONFIG_BUSYBOX_CONFIG_FEATURE_UMOUNT_ALL=y
CONFIG_BUSYBOX_CONFIG_FEATURE_MOUNT_LOOP=y
CONFIG_BUSYBOX_CONFIG_CROND=y
CONFIG_BUSYBOX_CONFIG_FEATURE_CROND_DIR="/etc"
CONFIG_BUSYBOX_CONFIG_CRONTAB=y
CONFIG_BUSYBOX_CONFIG_LESS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_LESS_MAXLINES=9999999
CONFIG_BUSYBOX_CONFIG_LOCK=y
CONFIG_BUSYBOX_CONFIG_STRINGS=y
CONFIG_BUSYBOX_CONFIG_TIME=y
CONFIG_BUSYBOX_CONFIG_VERBOSE_RESOLUTION_ERRORS=y
CONFIG_BUSYBOX_CONFIG_BRCTL=y
CONFIG_BUSYBOX_CONFIG_FEATURE_BRCTL_FANCY=y
CONFIG_BUSYBOX_CONFIG_FEATURE_BRCTL_SHOW=y
CONFIG_BUSYBOX_CONFIG_IFCONFIG=y
CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_STATUS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_HW=y
CONFIG_BUSYBOX_CONFIG_FEATURE_IFCONFIG_BROADCAST_PLUS=y
CONFIG_BUSYBOX_CONFIG_IP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_IP_ADDRESS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_IP_LINK=y
CONFIG_BUSYBOX_CONFIG_FEATURE_IP_ROUTE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_IP_ROUTE_DIR="/etc/iproute2"
CONFIG_BUSYBOX_CONFIG_FEATURE_IP_RULE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_IP_NEIGH=y
CONFIG_BUSYBOX_CONFIG_NC=y
CONFIG_BUSYBOX_CONFIG_NETCAT=y
CONFIG_BUSYBOX_CONFIG_NC_SERVER=y
CONFIG_BUSYBOX_CONFIG_NC_EXTRA=y
CONFIG_BUSYBOX_CONFIG_NETMSG=y
CONFIG_BUSYBOX_CONFIG_NETSTAT=y
CONFIG_BUSYBOX_CONFIG_FEATURE_NETSTAT_WIDE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_NETSTAT_PRG=y
CONFIG_BUSYBOX_CONFIG_NSLOOKUP_OPENWRT=y
CONFIG_BUSYBOX_CONFIG_NTPD=y
CONFIG_BUSYBOX_CONFIG_FEATURE_NTPD_SERVER=y
CONFIG_BUSYBOX_CONFIG_PING=y
CONFIG_BUSYBOX_CONFIG_FEATURE_FANCY_PING=y
CONFIG_BUSYBOX_CONFIG_ROUTE=y
CONFIG_BUSYBOX_CONFIG_TRACEROUTE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_TRACEROUTE_VERBOSE=y
CONFIG_BUSYBOX_CONFIG_UDHCPC=y
CONFIG_BUSYBOX_CONFIG_UDHCPC_DEFAULT_SCRIPT="/usr/share/udhcpc/default.script"
CONFIG_BUSYBOX_CONFIG_UDHCP_DEBUG=0
CONFIG_BUSYBOX_CONFIG_UDHCPC_SLACK_FOR_BUGGY_SERVERS=80
CONFIG_BUSYBOX_CONFIG_FEATURE_UDHCP_RFC3397=y
CONFIG_BUSYBOX_CONFIG_FREE=y
CONFIG_BUSYBOX_CONFIG_KILL=y
CONFIG_BUSYBOX_CONFIG_KILLALL=y
CONFIG_BUSYBOX_CONFIG_PGREP=y
CONFIG_BUSYBOX_CONFIG_PIDOF=y
CONFIG_BUSYBOX_CONFIG_PS=y
CONFIG_BUSYBOX_CONFIG_FEATURE_PS_WIDE=y
CONFIG_BUSYBOX_CONFIG_BB_SYSCTL=y
CONFIG_BUSYBOX_CONFIG_TOP=y
CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_CPU_USAGE_PERCENTAGE=y
CONFIG_BUSYBOX_CONFIG_FEATURE_TOP_CPU_GLOBAL_PERCENTS=y
CONFIG_BUSYBOX_CONFIG_UPTIME=y
CONFIG_BUSYBOX_CONFIG_SH_IS_ASH=y
CONFIG_BUSYBOX_CONFIG_BASH_IS_NONE=y
CONFIG_BUSYBOX_CONFIG_ASH=y
CONFIG_BUSYBOX_CONFIG_ASH_INTERNAL_GLOB=y
CONFIG_BUSYBOX_CONFIG_ASH_BASH_COMPAT=y
CONFIG_BUSYBOX_CONFIG_ASH_JOB_CONTROL=y
CONFIG_BUSYBOX_CONFIG_ASH_ALIAS=y
CONFIG_BUSYBOX_CONFIG_ASH_EXPAND_PRMT=y
CONFIG_BUSYBOX_CONFIG_ASH_ECHO=y
CONFIG_BUSYBOX_CONFIG_ASH_PRINTF=y
CONFIG_BUSYBOX_CONFIG_ASH_TEST=y
CONFIG_BUSYBOX_CONFIG_ASH_GETOPTS=y
CONFIG_BUSYBOX_CONFIG_ASH_CMDCMD=y
CONFIG_BUSYBOX_CONFIG_FEATURE_SH_MATH=y
CONFIG_BUSYBOX_CONFIG_FEATURE_SH_MATH_64=y
CONFIG_BUSYBOX_CONFIG_FEATURE_SH_NOFORK=y
CONFIG_BUSYBOX_CONFIG_LOGGER=y
CONFIG_PACKAGE_dropbear=y
CONFIG_DROPBEAR_DBCLIENT=y
CONFIG_PACKAGE_fstools=y
CONFIG_PACKAGE_fwtool=y
CONFIG_PACKAGE_jsonfilter=y
CONFIG_PACKAGE_libc=y
CONFIG_PACKAGE_libgcc=y
CONFIG_PACKAGE_mtd=y
CONFIG_PACKAGE_netifd=y
CONFIG_PACKAGE_openwrt-keyring=y
CONFIG_PACKAGE_procd=y
CONFIG_PACKAGE_ubox=y
CONFIG_PACKAGE_ubus=y
CONFIG_PACKAGE_ubusd=y
CONFIG_PACKAGE_uci=y
CONFIG_ZABBIX_NOSSL=y
CONFIG_ZABBIX_POSTGRESQL=y
CONFIG_PACKAGE_wireless-regdb=y
CONFIG_PACKAGE_libip4tc=y
CONFIG_PACKAGE_libip6tc=y
CONFIG_PACKAGE_libxtables=y
CONFIG_PACKAGE_libblobmsg-json=y
CONFIG_PACKAGE_libjson-c=y
CONFIG_PACKAGE_libnl-tiny=y
CONFIG_PACKAGE_libubox=y
CONFIG_PACKAGE_libubus=y
CONFIG_PACKAGE_libuci=y
CONFIG_PACKAGE_libuclient=y
CONFIG_RE2_SHARED=y
CONFIG_LUCI_JSMIN=y
CONFIG_LUCI_CSSTIDY=y
CONFIG_PACKAGE_luci-lib-nixio_notls=y
CONFIG_POSTFIX_TLS=y
CONFIG_POSTFIX_SASL=y
CONFIG_POSTFIX_LDAP=y
CONFIG_POSTFIX_CDB=y
CONFIG_POSTFIX_SQLITE=y
CONFIG_POSTFIX_PCRE=y
CONFIG_OPENLDAP_DEBUG=y
CONFIG_NGINX_NOPCRE=y
CONFIG_PACKAGE_jshn=y
CONFIG_PACKAGE_libjson-script=y
CONFIG_PACKAGE_nand-utils=y
CONFIG_STRACE_NONE=y
CONFIG_PACKAGE_ubi-utils=y
.
└── files
    └── etc
        ├── config
        │   └── network
        ├── dropbear
        │   └── authorized_keys
        └── rc.local

If you require special some configuration (e.g. for a static IP or to secure the ssh daemon during the short time the initramfs image is booted), you can create a files/ directory in the root of your build environment. Files placed there will shadow the default ones supplied by OpenWrt.

Note that for dropbear to start up, an (executable!) ./etc/rc.local is required, because we will not be installing uci (OpenWrt's configuration system that usually starts sshd). It should contain the following:

#!/bin/sh
/usr/sbin/dropbear
exit 0

Finally, issue make FILES=files/ package/install target/install to repackage everything. This will spit out the compressed initramfs image in bin/targets/$TARGET/$SUBTARGET/openwrt-19.07.2-$TARGET-$SUBTARGET-vmlinux-initramfs-lzma.elf.

If you want to verify that your image contains the correct configuration, you can unpack it with binwalk(1) and cpio(1).

Sample binwalk session

Note: Hexadecimal offsets will vary according to your build config. In each step, you're aiming for the file without an extension.

t@gir.st % binwalk -e openwrt-19.07.2-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
0             0x0             ELF, 32-bit MSB MIPS-I executable, MIPS, version 1 (SYSV)
9580          0x256C          Copyright string: "Copyright (C) 2011 Gabor Juhos <juhosg@openwrt.org>"
9740          0x260C          LZMA compressed data, properties: 0x6D, dictionary size: 8388608 bytes, uncompressed size: 6176372 bytes

t@gir.st % binwalk -e _openwrt-19.07.2-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf.extracted/260C

DECIMAL       HEXADECIMAL     DESCRIPTION
--------------------------------------------------------------------------------
4014204       0x3D407C        Linux kernel version "4.14.171 (t@gir.st) (gcc version 8.3.0 (OpenWrt GCC 8.3.0 unknown)) #0 Tue Mar 3 22:38:23 2020"
4100704       0x3E9260        CRC32 polynomial table, big endian
4580680       0x45E548        ASCII cpio archive (SVR4 with no CRC), file name: "op (skipped) already calibrated this CPU", file name length: "0xbrating ", file size: "0xInitramf"
4586876       0x45FD7C        Unix path: /mips/include/asm/fpu.h
4701124       0x47BBC4        xz compressed data
4724084       0x481574        Unix path: /lib/firmware/updates/4.14.171
4756723       0x4894F3        Unix path: /net/ethernet/atheros/ag71xx/ag71xx_main.c
4766033       0x48B951        Neighborly text, "neighbor table overflow!tics"
4780850       0x48F332        Neighborly text, "neighbor %.2x%.2x.%pM lost rename link %s to %s"
5091328       0x4DB000        ELF, 32-bit MSB MIPS64 shared object, MIPS, version 1 (SYSV)
5267728       0x506110        LZMA compressed data, properties: 0x6D, dictionary size: 1048576 bytes, uncompressed size: -1 bytes

t@gir.st % cpio -dium < _260C.extracted/506110
cpio: dev/console: Cannot mknod: Operation not permitted
cpio: dev/console: Cannot mknod: Operation not permitted
cpio: dev/null: Cannot mknod: Operation not permitted
cpio: dev/zero: Cannot mknod: Operation not permitted
cpio: dev/tty: Cannot mknod: Operation not permitted
cpio: dev/tty0: Cannot mknod: Operation not permitted
cpio: dev/tty1: Cannot mknod: Operation not permitted
cpio: dev/random: Cannot mknod: Operation not permitted
cpio: dev/urandom: Cannot mknod: Operation not permitted
5531 blocks
t@gir.st % ls etc/config
dropbear  network

Step 2: Flash and boot from our temporary image

It is now time to boot from our temporary image. If you can, verify your image works on a local device before flashing it to one that's far away.

Use e.g. scp(1) to transfer the image to the system to be upgraded; /tmp is a good location.

SSH into your device and find your kernel partition's mtd block device, by either grepping dmesg for mtd, or with source /lib/functions.sh && find_mtd_part kernel. A string like /dev/mtdblock5 should be returned, which I'll use from now on to refer to this partition. Now would be a good time to verify that your image will actually fit on your partition, e.g. using df(1).

Then, mount the kernel partition with mount -t yaffs2 /dev/mtdblock5 /mnt and overwrite the existing kernel file: Assuming you transferred the boot image to /tmp/initramfs.elf, issue cp /tmp/initramfs.elf /mnt/kernel. The file must be named kernel (without extension) and be executable (chmod +x /mnt/kernel). Then unmount, reboot and wait for your device to come back up.

Step 3: Install the final (full) OpenWrt image and restore configuration

We are nearing the finish line! If you haven't backed up your previous configuration into a config.tar.gz, you could create one now from the configs you prepared for the initramfs image by issuing tar czf config.tar.gz -C files/ . from within the OpenWrt build directory. Once again, dropbear requires some extra attention: it will refuse to do key authentication if /etc/dropbear/authorized_keys is not owned by root; so create your config tar with --owner=root --group=root.

Download the sysupgrade.bin file for your device from OpenWrt.org and transfer it with your config.tar.gz to your target device. The very last step is now to run sysupgrade -r config.tar.gz sysupgrade.bin and enjoy your up to date system. At $dayjob, we then re-deploy the desired configuration using Ansible.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 19.07.2, r10947-65030d81f3
 -----------------------------------------------------
Success, finally!