OpenWrt/LEDE Project

  • Status Unconfirmed
  • Percent Complete
    0%
  • Task Type Bug Report
  • Category Base system
  • Assigned To No-one
  • Operating System All
  • Severity Low
  • Priority Very Low
  • Reported Version Trunk
  • Due in Version Undecided
  • Due Date Undecided
  • Private
Attached to Project: OpenWrt/LEDE Project
Opened by sharbich - 28.09.2019

FS#2522 - x86 sysupgrade not working

Hi,
if I start “sysupgrade -v /tmp/openwrt-x86-64-combined-squashfs.img.gz” my image will not be updated.

System:
OpenWrt 18.06-SNAPSHOT, r7876-491e839262

Package:
sysupgrade

Problem:
As I mentioned earlier, I was suspicious that gzip wasn’t making it to the ramdisk..so I did some digging into how the ramdisk is assembled and found the gzip was indeed missing from the list of packages to copy over in /lib/upgrade/stage2.

Solution:
Here is the relevant function, note how gzip is missing from the list of binaries!

/lib/upgrade/stage2

switch_to_ramfs() {
	for binary in \
		/bin/busybox /bin/ash /bin/sh /bin/mount /bin/umount	\
		pivot_root mount_root reboot sync kill sleep		\
		md5sum hexdump cat zcat bzcat dd tar			\
-		ls basename find cp mv rm mkdir rmdir mknod touch chmod \
+		ls basename find cp mv rm mkdir rmdir mknod touch chmod gzip \
		'[' printf wc grep awk sed cut				\
		mtd partx losetup mkfs.ext4				\
		ubiupdatevol ubiattach ubiblock ubiformat		\
		ubidetach ubirsvol ubirmvol ubimkvol			\
		snapshot snapshot_tool					\
		$RAMFS_COPY_BIN
	do

Loading...

Available keyboard shortcuts

Tasklist

Task Details

Task Editing