diff --git a/package/lean/luci-app-filetransfer/luasrc/model/cbi/updownload.lua b/package/lean/luci-app-filetransfer/luasrc/model/cbi/updownload.lua index 7b487cb215..af56b44b7c 100644 --- a/package/lean/luci-app-filetransfer/luasrc/model/cbi/updownload.lua +++ b/package/lean/luci-app-filetransfer/luasrc/model/cbi/updownload.lua @@ -86,6 +86,16 @@ elseif luci.http.formvalue("download") then Download() end +local function getSizeStr(size) + local i = 0 + local byteUnits = {' kB', ' MB', ' GB', ' TB'} + repeat + size = size / 1024 + i = i + 1 + until(size <= 1024) + return string.format("%.1f", size) .. byteUnits[i] +end + local inits, attr = {} for i, f in ipairs(fs.glob("/tmp/upload/*")) do attr = fs.stat(f) @@ -94,7 +104,7 @@ for i, f in ipairs(fs.glob("/tmp/upload/*")) do inits[i].name = fs.basename(f) inits[i].mtime = os.date("%Y-%m-%d %H:%M:%S", attr.mtime) inits[i].modestr = attr.modestr - inits[i].size = tostring(attr.size) + inits[i].size = getSizeStr(attr.size) inits[i].remove = 0 inits[i].install = false end diff --git a/package/lean/pdnsd-alt/patches/01-musl-compat.patch b/package/lean/pdnsd-alt/patches/01-musl-compat.patch new file mode 100644 index 0000000000..c83332bc1a --- /dev/null +++ b/package/lean/pdnsd-alt/patches/01-musl-compat.patch @@ -0,0 +1,37 @@ +--- a/src/main.c ++++ b/src/main.c +@@ -219,6 +219,16 @@ static int check_ipv6() + */ + int main(int argc,char *argv[]) + { ++#if DEBUG>0 ++ { ++ int err; ++ /* Generate a key for storing our thread id's */ ++ if ((err=pthread_key_create(&thrid_key, NULL)) != 0) { ++ log_error("pthread_key_create failed: %s",strerror(err)); ++ _exit(1); ++ } ++ } ++#endif + int i,sig,pfd=-1; /* Initialized to inhibit compiler warning */ + + main_thrid=pthread_self(); +@@ -626,17 +636,6 @@ int main(int argc,char *argv[]) + pthread_sigmask(SIG_BLOCK,&sigs_msk,NULL); + #endif + +-#if DEBUG>0 +- { +- int err; +- /* Generate a key for storing our thread id's */ +- if ((err=pthread_key_create(&thrid_key, NULL)) != 0) { +- log_error("pthread_key_create failed: %s",strerror(err)); +- _exit(1); +- } +- } +-#endif +- + { + #if DEBUG>0 + int thrdsucc=1; diff --git a/target/linux/ar71xx/Makefile b/target/linux/ar71xx/Makefile index e7ca46c7ac..93832b560e 100644 --- a/target/linux/ar71xx/Makefile +++ b/target/linux/ar71xx/Makefile @@ -13,7 +13,7 @@ FEATURES:=usbgadget CPU_TYPE:=24kc SUBTARGETS:=generic tiny nand mikrotik -KERNEL_PATCHVER:=4.9 +KERNEL_PATCHVER:=4.14 include $(INCLUDE_DIR)/target.mk diff --git a/target/linux/ar71xx/files/arch/mips/ath79/mach-sgr-w500-n85b-v2.c b/target/linux/ar71xx/files/arch/mips/ath79/mach-sgr-w500-n85b-v2.c index d2749e483a..d35821388e 100644 --- a/target/linux/ar71xx/files/arch/mips/ath79/mach-sgr-w500-n85b-v2.c +++ b/target/linux/ar71xx/files/arch/mips/ath79/mach-sgr-w500-n85b-v2.c @@ -79,7 +79,7 @@ static struct gpio_keys_button grentech_gpio_keys[] __initdata = { static struct mdio_board_info grentech_mdio0_info[] = { { .bus_id = "ag71xx-mdio.0", - .phy_addr = 1, + .mdio_addr = 1, }, }; diff --git a/target/linux/mvebu/Makefile b/target/linux/mvebu/Makefile index a920f6db7d..1688065a5c 100644 --- a/target/linux/mvebu/Makefile +++ b/target/linux/mvebu/Makefile @@ -12,7 +12,7 @@ FEATURES:=fpu usb pci pcie gpio nand squashfs ramdisk boot-part rootfs-part SUBTARGETS:=cortexa9 cortexa53 cortexa72 MAINTAINER:=Imre Kaloz -KERNEL_PATCHVER:=4.14 +KERNEL_PATCHVER:=4.19 include $(INCLUDE_DIR)/target.mk diff --git a/target/linux/ramips/mt76x8/target.mk b/target/linux/ramips/mt76x8/target.mk index f8b21eac02..f3a060466c 100644 --- a/target/linux/ramips/mt76x8/target.mk +++ b/target/linux/ramips/mt76x8/target.mk @@ -7,7 +7,7 @@ BOARDNAME:=MT76x8 based boards FEATURES+=usb ramdisk CPU_TYPE:=24kc -DEFAULT_PACKAGES += kmod-mt7603 wpad-basic +DEFAULT_PACKAGES += kmod-mt7603 wpad-openssl define Target/Description Build firmware images for Ralink MT76x8 based boards. diff --git a/target/linux/x86/image/Makefile b/target/linux/x86/image/Makefile index b54c16c3d2..5a1f9f6fa7 100644 --- a/target/linux/x86/image/Makefile +++ b/target/linux/x86/image/Makefile @@ -140,7 +140,7 @@ ifneq ($(CONFIG_GRUB_IMAGES)$(CONFIG_EFI_IMAGES),) "$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img" # Convert the MBR partition to GPT and set EFI ROOTFS signature - dd if=/dev/zero of="$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img" bs=512 count=33 conv=notrunc oflag=append + dd if=/dev/zero of="$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img" bs=512 count=34 conv=notrunc oflag=append sgdisk -g "$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img" sgdisk -t 2:EF00 "$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img" sgdisk -t 3:EF02 "$(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img" @@ -282,13 +282,13 @@ endif ifneq ($(CONFIG_QCOW2_IMAGES),) define Image/Build/qcow2 rm $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).qcow2 || true - /usr/bin/qemu-img convert -O qcow2 \ + /usr/bin/qemu-img convert -f raw -O qcow2 \ $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).img \ $(BIN_DIR)/$(IMG_PREFIX)-combined-$(1).qcow2 endef define Image/Build/qcow2_efi rm $(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).qcow2 || true - /usr/bin/qemu-img convert -O qcow2 \ + /usr/bin/qemu-img convert -f raw -O qcow2 \ $(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).img \ $(BIN_DIR)/$(IMG_PREFIX)-uefi-gpt-$(1).qcow2 endef