Merge Lean's source
This commit is contained in:
commit
f752f2c1c8
@ -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
|
||||
|
||||
37
package/lean/pdnsd-alt/patches/01-musl-compat.patch
Normal file
37
package/lean/pdnsd-alt/patches/01-musl-compat.patch
Normal file
@ -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;
|
||||
@ -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
|
||||
|
||||
|
||||
@ -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,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@ -12,7 +12,7 @@ FEATURES:=fpu usb pci pcie gpio nand squashfs ramdisk boot-part rootfs-part
|
||||
SUBTARGETS:=cortexa9 cortexa53 cortexa72
|
||||
MAINTAINER:=Imre Kaloz <kaloz@openwrt.org>
|
||||
|
||||
KERNEL_PATCHVER:=4.14
|
||||
KERNEL_PATCHVER:=4.19
|
||||
|
||||
include $(INCLUDE_DIR)/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.
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user