mirror of https://github.com/OpenIPC/firmware.git
				
				
				
			Sync configs and clean project
							parent
							
								
									526c588fa9
								
							
						
					
					
						commit
						1b8ef0dc16
					
				
								
									
									
										
											68
										
									
									NOTIFY.md
									
									
									
									
								
								
							
							
										
											68
										
									
									NOTIFY.md
									
									
									
									
								|  | @ -1,68 +0,0 @@ | ||||||
| # openipc-v2.0 |  | ||||||
| 
 |  | ||||||
| OpenIPC v2.0 based on Buildroot |  | ||||||
| 
 |  | ||||||
| [](https://github.com/FlyRouter/openipc-v2.0/actions/workflows/main.yml) |  | ||||||
| 
 |  | ||||||
| ----- |  | ||||||
| 
 |  | ||||||
| ## Quick Start for Hi3516Ev300 |  | ||||||
| 
 |  | ||||||
| ``` |  | ||||||
| make prepare |  | ||||||
| make -j$(($(nproc)+1)) BOARD=unknown_unknown_hi3516ev300_unknown all |  | ||||||
| ``` |  | ||||||
| 
 |  | ||||||
| Execute the commands above and your files will be in the directory **output/images** |  | ||||||
| 
 |  | ||||||
| ----- |  | ||||||
| 
 |  | ||||||
| ## ToDo support |  | ||||||
| 
 |  | ||||||
| * br-ext-chip-anyka |  | ||||||
| * br-ext-chip-fullhan |  | ||||||
| * br-ext-chip-goke |  | ||||||
| * br-ext-chip-grainmedia |  | ||||||
| * br-ext-chip-ingenic |  | ||||||
| 
 |  | ||||||
| * br-ext-chip-infineon |  | ||||||
| 
 |  | ||||||
| ----- |  | ||||||
| 
 |  | ||||||
| ## Other strings |  | ||||||
| 
 |  | ||||||
| ``` |  | ||||||
| # |  | ||||||
| # make help |  | ||||||
| # make install-deps |  | ||||||
| # make prepare |  | ||||||
| # make list-configs |  | ||||||
| # |  | ||||||
| # make busybox-{dirclean,rebuild} |  | ||||||
| # make fwprintenv-ng-{dirclean,rebuild} |  | ||||||
| # make hisilicon-osdrv4-{dirclean,rebuild} |  | ||||||
| # make ipctool-{dirclean,rebuild} |  | ||||||
| # make jpeg-turbo-{dirclean,rebuild} |  | ||||||
| # make libevent-mini-{dirclean,rebuild} |  | ||||||
| # make linux-{dirclean,rebuild} |  | ||||||
| # make majestic-{dirclean,rebuild} |  | ||||||
| # make uboot-tools-fwprintenv-{dirclean,rebuild} |  | ||||||
| # |  | ||||||
| # make BOARD=unknown_unknown_hi3516ev300_unknown board-info |  | ||||||
| # make BOARD=unknown_unknown_hi3516ev300_unknown all && 2dolphin |  | ||||||
| # |  | ||||||
| # make BOARD=unknown_unknown_xm530_unknown board-info |  | ||||||
| # make BOARD=unknown_unknown_xm530_unknown all |  | ||||||
| # |  | ||||||
| # cd output ; make sdk |  | ||||||
| # |  | ||||||
| # tag="v21.04.10.3" |  | ||||||
| # |  | ||||||
| # git pull |  | ||||||
| # git push |  | ||||||
| # git tag ${tag} -m "Jump to ${tag}" |  | ||||||
| # git push origin --tags |  | ||||||
| # git push --follow-tags |  | ||||||
| # |  | ||||||
| ``` |  | ||||||
| 
 |  | ||||||
|  | @ -11,6 +11,8 @@ | ||||||
| 
 | 
 | ||||||
| [](https://github.com/OpenIPC/openipc-2.1/actions/workflows/hi3516ev300_images.yml) | [](https://github.com/OpenIPC/openipc-2.1/actions/workflows/hi3516ev300_images.yml) | ||||||
| 
 | 
 | ||||||
|  | [](https://github.com/OpenIPC/openipc-2.1/actions/workflows/hi3518ev300_images.yml) | ||||||
|  | 
 | ||||||
| ### Supporting | ### Supporting | ||||||
| 
 | 
 | ||||||
| If you like our work, please consider supporting us on [Opencollective](https://opencollective.com/openipc/contribute/backer-14335/checkout) or [PayPal](https://www.paypal.com/donate/?hosted_button_id=C6F7UJLA58MBS) or [YooMoney](https://openipc.org/donation/yoomoney.html).  | If you like our work, please consider supporting us on [Opencollective](https://opencollective.com/openipc/contribute/backer-14335/checkout) or [PayPal](https://www.paypal.com/donate/?hosted_button_id=C6F7UJLA58MBS) or [YooMoney](https://openipc.org/donation/yoomoney.html).  | ||||||
|  |  | ||||||
|  | @ -348,8 +348,8 @@ CONFIG_ARCH_HISI_BVT=y | ||||||
| # CONFIG_ARCH_HI3516CV500 is not set | # CONFIG_ARCH_HI3516CV500 is not set | ||||||
| # CONFIG_ARCH_HI3516DV300 is not set | # CONFIG_ARCH_HI3516DV300 is not set | ||||||
| # CONFIG_ARCH_HI3516EV200 is not set | # CONFIG_ARCH_HI3516EV200 is not set | ||||||
| CONFIG_ARCH_HI3516EV300=y | # CONFIG_ARCH_HI3516EV300 is not set | ||||||
| # CONFIG_ARCH_HI3518EV300 is not set | CONFIG_ARCH_HI3518EV300=y | ||||||
| # CONFIG_ARCH_HI3516DV200 is not set | # CONFIG_ARCH_HI3516DV200 is not set | ||||||
| # CONFIG_ARCH_HI3556V200 is not set | # CONFIG_ARCH_HI3556V200 is not set | ||||||
| # CONFIG_ARCH_HI3559V200 is not set | # CONFIG_ARCH_HI3559V200 is not set | ||||||
|  | @ -676,7 +676,6 @@ CONFIG_TCP_MD5SIG=y | ||||||
| # CONFIG_ATM is not set | # CONFIG_ATM is not set | ||||||
| # CONFIG_L2TP is not set | # CONFIG_L2TP is not set | ||||||
| # CONFIG_BRIDGE is not set | # CONFIG_BRIDGE is not set | ||||||
| CONFIG_HAVE_NET_DSA=y |  | ||||||
| # CONFIG_VLAN_8021Q is not set | # CONFIG_VLAN_8021Q is not set | ||||||
| # CONFIG_DECNET is not set | # CONFIG_DECNET is not set | ||||||
| # CONFIG_LLC2 is not set | # CONFIG_LLC2 is not set | ||||||
|  | @ -898,8 +897,6 @@ CONFIG_OF_FLATTREE=y | ||||||
| CONFIG_OF_EARLY_FLATTREE=y | CONFIG_OF_EARLY_FLATTREE=y | ||||||
| CONFIG_OF_ADDRESS=y | CONFIG_OF_ADDRESS=y | ||||||
| CONFIG_OF_IRQ=y | CONFIG_OF_IRQ=y | ||||||
| CONFIG_OF_NET=y |  | ||||||
| CONFIG_OF_MDIO=y |  | ||||||
| CONFIG_OF_RESERVED_MEM=y | CONFIG_OF_RESERVED_MEM=y | ||||||
| # CONFIG_OF_OVERLAY is not set | # CONFIG_OF_OVERLAY is not set | ||||||
| CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y | CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y | ||||||
|  | @ -1043,123 +1040,7 @@ CONFIG_SCSI_LOWLEVEL=y | ||||||
| # CONFIG_ATA is not set | # CONFIG_ATA is not set | ||||||
| # CONFIG_MD is not set | # CONFIG_MD is not set | ||||||
| # CONFIG_TARGET_CORE is not set | # CONFIG_TARGET_CORE is not set | ||||||
| CONFIG_NETDEVICES=y | # CONFIG_NETDEVICES is not set | ||||||
| CONFIG_NET_CORE=y |  | ||||||
| # CONFIG_BONDING is not set |  | ||||||
| # CONFIG_DUMMY is not set |  | ||||||
| # CONFIG_EQUALIZER is not set |  | ||||||
| # CONFIG_NET_TEAM is not set |  | ||||||
| # CONFIG_MACVLAN is not set |  | ||||||
| # CONFIG_VXLAN is not set |  | ||||||
| # CONFIG_MACSEC is not set |  | ||||||
| # CONFIG_NETCONSOLE is not set |  | ||||||
| # CONFIG_NETPOLL is not set |  | ||||||
| # CONFIG_NET_POLL_CONTROLLER is not set |  | ||||||
| # CONFIG_TUN is not set |  | ||||||
| # CONFIG_TUN_VNET_CROSS_LE is not set |  | ||||||
| # CONFIG_VETH is not set |  | ||||||
| # CONFIG_NLMON is not set |  | ||||||
| 
 |  | ||||||
| # |  | ||||||
| # CAIF transport drivers |  | ||||||
| # |  | ||||||
| 
 |  | ||||||
| # |  | ||||||
| # Distributed Switch Architecture drivers |  | ||||||
| # |  | ||||||
| CONFIG_ETHERNET=y |  | ||||||
| # CONFIG_ALTERA_TSE is not set |  | ||||||
| # CONFIG_NET_VENDOR_AMAZON is not set |  | ||||||
| # CONFIG_NET_VENDOR_ARC is not set |  | ||||||
| # CONFIG_NET_VENDOR_AURORA is not set |  | ||||||
| # CONFIG_NET_CADENCE is not set |  | ||||||
| # CONFIG_NET_VENDOR_BROADCOM is not set |  | ||||||
| # CONFIG_NET_VENDOR_CIRRUS is not set |  | ||||||
| # CONFIG_DM9000 is not set |  | ||||||
| # CONFIG_DNET is not set |  | ||||||
| # CONFIG_NET_VENDOR_EZCHIP is not set |  | ||||||
| # CONFIG_NET_VENDOR_FARADAY is not set |  | ||||||
| CONFIG_NET_VENDOR_HISILICON=y |  | ||||||
| # CONFIG_HIX5HD2_GMAC is not set |  | ||||||
| CONFIG_HISI_FEMAC=y |  | ||||||
| # CONFIG_HIP04_ETH is not set |  | ||||||
| # CONFIG_HNS is not set |  | ||||||
| # CONFIG_HNS_DSAF is not set |  | ||||||
| # CONFIG_HNS_ENET is not set |  | ||||||
| # CONFIG_HIETH_GMAC is not set |  | ||||||
| # CONFIG_NET_VENDOR_INTEL is not set |  | ||||||
| # CONFIG_NET_VENDOR_MARVELL is not set |  | ||||||
| # CONFIG_NET_VENDOR_MICREL is not set |  | ||||||
| CONFIG_NET_VENDOR_MICROCHIP=y |  | ||||||
| # CONFIG_ENC28J60 is not set |  | ||||||
| # CONFIG_ENCX24J600 is not set |  | ||||||
| # CONFIG_NET_VENDOR_NATSEMI is not set |  | ||||||
| # CONFIG_NET_VENDOR_NETRONOME is not set |  | ||||||
| # CONFIG_ETHOC is not set |  | ||||||
| # CONFIG_NET_VENDOR_QUALCOMM is not set |  | ||||||
| # CONFIG_NET_VENDOR_RENESAS is not set |  | ||||||
| # CONFIG_NET_VENDOR_ROCKER is not set |  | ||||||
| # CONFIG_NET_VENDOR_SAMSUNG is not set |  | ||||||
| # CONFIG_NET_VENDOR_SEEQ is not set |  | ||||||
| # CONFIG_NET_VENDOR_SMSC is not set |  | ||||||
| # CONFIG_NET_VENDOR_STMICRO is not set |  | ||||||
| # CONFIG_NET_VENDOR_SYNOPSYS is not set |  | ||||||
| # CONFIG_NET_VENDOR_VIA is not set |  | ||||||
| # CONFIG_NET_VENDOR_WIZNET is not set |  | ||||||
| CONFIG_PHYLIB=y |  | ||||||
| CONFIG_SWPHY=y |  | ||||||
| 
 |  | ||||||
| # |  | ||||||
| # MDIO bus device drivers |  | ||||||
| # |  | ||||||
| # CONFIG_MDIO_BCM_UNIMAC is not set |  | ||||||
| # CONFIG_MDIO_BITBANG is not set |  | ||||||
| # CONFIG_MDIO_BUS_MUX_GPIO is not set |  | ||||||
| # CONFIG_MDIO_BUS_MUX_MMIOREG is not set |  | ||||||
| CONFIG_MDIO_HISI_FEMAC=y |  | ||||||
| # CONFIG_MDIO_HISI_GEMAC is not set |  | ||||||
| 
 |  | ||||||
| # |  | ||||||
| # MII PHY device drivers |  | ||||||
| # |  | ||||||
| # CONFIG_AMD_PHY is not set |  | ||||||
| # CONFIG_AQUANTIA_PHY is not set |  | ||||||
| # CONFIG_AT803X_PHY is not set |  | ||||||
| # CONFIG_BCM7XXX_PHY is not set |  | ||||||
| # CONFIG_BCM87XX_PHY is not set |  | ||||||
| # CONFIG_BROADCOM_PHY is not set |  | ||||||
| # CONFIG_CICADA_PHY is not set |  | ||||||
| # CONFIG_DAVICOM_PHY is not set |  | ||||||
| # CONFIG_DP83848_PHY is not set |  | ||||||
| # CONFIG_DP83867_PHY is not set |  | ||||||
| CONFIG_FIXED_PHY=y |  | ||||||
| # CONFIG_ICPLUS_PHY is not set |  | ||||||
| # CONFIG_INTEL_XWAY_PHY is not set |  | ||||||
| # CONFIG_LSI_ET1011C_PHY is not set |  | ||||||
| # CONFIG_LXT_PHY is not set |  | ||||||
| # CONFIG_MARVELL_PHY is not set |  | ||||||
| # CONFIG_MICREL_PHY is not set |  | ||||||
| # CONFIG_MICROCHIP_PHY is not set |  | ||||||
| # CONFIG_MICROSEMI_PHY is not set |  | ||||||
| # CONFIG_NATIONAL_PHY is not set |  | ||||||
| # CONFIG_QSEMI_PHY is not set |  | ||||||
| # CONFIG_REALTEK_PHY is not set |  | ||||||
| # CONFIG_SMSC_PHY is not set |  | ||||||
| # CONFIG_STE10XP is not set |  | ||||||
| # CONFIG_TERANETICS_PHY is not set |  | ||||||
| # CONFIG_VITESSE_PHY is not set |  | ||||||
| # CONFIG_XILINX_GMII2RGMII is not set |  | ||||||
| # CONFIG_MICREL_KS8995MA is not set |  | ||||||
| # CONFIG_PPP is not set |  | ||||||
| # CONFIG_SLIP is not set |  | ||||||
| # CONFIG_USB_NET_DRIVERS is not set |  | ||||||
| # CONFIG_WLAN is not set |  | ||||||
| 
 |  | ||||||
| # |  | ||||||
| # Enable WiMAX (Networking options) to see the WiMAX drivers |  | ||||||
| # |  | ||||||
| # CONFIG_WAN is not set |  | ||||||
| # CONFIG_ISDN is not set |  | ||||||
| # CONFIG_NVM is not set | # CONFIG_NVM is not set | ||||||
| 
 | 
 | ||||||
| # | # | ||||||
|  | @ -2107,23 +1988,20 @@ CONFIG_USB_GADGET_STORAGE_NUM_BUFFERS=2 | ||||||
| # CONFIG_USB_NET2272 is not set | # CONFIG_USB_NET2272 is not set | ||||||
| # CONFIG_USB_GADGET_XILINX is not set | # CONFIG_USB_GADGET_XILINX is not set | ||||||
| # CONFIG_USB_DUMMY_HCD is not set | # CONFIG_USB_DUMMY_HCD is not set | ||||||
| CONFIG_USB_LIBCOMPOSITE=m | CONFIG_USB_LIBCOMPOSITE=y | ||||||
| CONFIG_USB_F_ACM=m | CONFIG_USB_U_ETHER=y | ||||||
| CONFIG_USB_U_SERIAL=m | CONFIG_USB_F_ECM=y | ||||||
| CONFIG_USB_U_ETHER=m | CONFIG_USB_F_RNDIS=y | ||||||
| CONFIG_USB_F_ECM=m | CONFIG_USB_CONFIGFS=y | ||||||
| CONFIG_USB_F_RNDIS=m |  | ||||||
| CONFIG_USB_F_MASS_STORAGE=m |  | ||||||
| CONFIG_USB_CONFIGFS=m |  | ||||||
| # CONFIG_USB_CONFIGFS_SERIAL is not set | # CONFIG_USB_CONFIGFS_SERIAL is not set | ||||||
| CONFIG_USB_CONFIGFS_ACM=y | # CONFIG_USB_CONFIGFS_ACM is not set | ||||||
| # CONFIG_USB_CONFIGFS_OBEX is not set | # CONFIG_USB_CONFIGFS_OBEX is not set | ||||||
| # CONFIG_USB_CONFIGFS_NCM is not set | # CONFIG_USB_CONFIGFS_NCM is not set | ||||||
| CONFIG_USB_CONFIGFS_ECM=y | CONFIG_USB_CONFIGFS_ECM=y | ||||||
| # CONFIG_USB_CONFIGFS_ECM_SUBSET is not set | # CONFIG_USB_CONFIGFS_ECM_SUBSET is not set | ||||||
| CONFIG_USB_CONFIGFS_RNDIS=y | CONFIG_USB_CONFIGFS_RNDIS=y | ||||||
| # CONFIG_USB_CONFIGFS_EEM is not set | # CONFIG_USB_CONFIGFS_EEM is not set | ||||||
| CONFIG_USB_CONFIGFS_MASS_STORAGE=y | # CONFIG_USB_CONFIGFS_MASS_STORAGE is not set | ||||||
| # CONFIG_USB_CONFIGFS_F_LB_SS is not set | # CONFIG_USB_CONFIGFS_F_LB_SS is not set | ||||||
| # CONFIG_USB_CONFIGFS_F_FS is not set | # CONFIG_USB_CONFIGFS_F_FS is not set | ||||||
| # CONFIG_USB_CONFIGFS_F_HID is not set | # CONFIG_USB_CONFIGFS_F_HID is not set | ||||||
|  | @ -2310,7 +2188,7 @@ CONFIG_COMMON_CLK=y | ||||||
| # CONFIG_COMMON_CLK_NXP is not set | # CONFIG_COMMON_CLK_NXP is not set | ||||||
| # CONFIG_COMMON_CLK_PXA is not set | # CONFIG_COMMON_CLK_PXA is not set | ||||||
| # CONFIG_COMMON_CLK_PIC32 is not set | # CONFIG_COMMON_CLK_PIC32 is not set | ||||||
| CONFIG_COMMON_CLK_HI3516EV300=y | CONFIG_COMMON_CLK_HI3518EV300=y | ||||||
| CONFIG_RESET_HISI=y | CONFIG_RESET_HISI=y | ||||||
| 
 | 
 | ||||||
| # | # | ||||||
|  |  | ||||||
|  | @ -34,16 +34,16 @@ BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISILICON_PATH)/board/hi3 | ||||||
| # BR2_TARGET_TZ_INFO is not set | # BR2_TARGET_TZ_INFO is not set | ||||||
| BR2_TARGET_ROOTFS_SQUASHFS=y | BR2_TARGET_ROOTFS_SQUASHFS=y | ||||||
| BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y | BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y | ||||||
| BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HISILICON_PATH)/system/skeleton" | BR2_ROOTFS_OVERLAY="$(TOPDIR)/../general/overlay" | ||||||
| 
 | 
 | ||||||
| # OpenIPC configuration | # OpenIPC configuration | ||||||
| BR2_TOOLCHAIN_BUILDROOT_VENDOR="openipc" | BR2_TOOLCHAIN_BUILDROOT_VENDOR="openipc" | ||||||
| BR2_TARGET_GENERIC_ISSUE="Welcome to OpenIPC v21.04.17.1" | BR2_TARGET_GENERIC_ISSUE="Welcome to OpenIPC v21.04.18.1" | ||||||
| BR2_TARGET_GENERIC_HOSTNAME="ipcam" | BR2_TARGET_GENERIC_HOSTNAME="ipcam" | ||||||
| BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HISILICON_PATH)/system/packages/patches" | BR2_GLOBAL_PATCH_DIR="$(TOPDIR)/../general/package/patches" | ||||||
| 
 | 
 | ||||||
| # Packages | # Packages | ||||||
| BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL_HISILICON_PATH)/system/packages/configs/busybox.config" | BR2_PACKAGE_BUSYBOX_CONFIG="$(TOPDIR)/../general/package/configs/busybox.config" | ||||||
| BR2_PACKAGE_DROPBEAR=y | BR2_PACKAGE_DROPBEAR=y | ||||||
| BR2_PACKAGE_FWPRINTENV_NG=y | BR2_PACKAGE_FWPRINTENV_NG=y | ||||||
| BR2_PACKAGE_HISILICON_OSDRV4=y | BR2_PACKAGE_HISILICON_OSDRV4=y | ||||||
|  |  | ||||||
|  | @ -34,16 +34,16 @@ BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISILICON_PATH)/board/hi3 | ||||||
| # BR2_TARGET_TZ_INFO is not set | # BR2_TARGET_TZ_INFO is not set | ||||||
| BR2_TARGET_ROOTFS_SQUASHFS=y | BR2_TARGET_ROOTFS_SQUASHFS=y | ||||||
| BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y | BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y | ||||||
| BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HISILICON_PATH)/system/skeleton" | BR2_ROOTFS_OVERLAY="$(TOPDIR)/../general/overlay" | ||||||
| 
 | 
 | ||||||
| # OpenIPC configuration | # OpenIPC configuration | ||||||
| BR2_TOOLCHAIN_BUILDROOT_VENDOR="openipc" | BR2_TOOLCHAIN_BUILDROOT_VENDOR="openipc" | ||||||
| BR2_TARGET_GENERIC_ISSUE="Welcome to OpenIPC v21.04.17.1" | BR2_TARGET_GENERIC_ISSUE="Welcome to OpenIPC v21.04.18.1" | ||||||
| BR2_TARGET_GENERIC_HOSTNAME="ipcam" | BR2_TARGET_GENERIC_HOSTNAME="ipcam" | ||||||
| BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HISILICON_PATH)/system/packages/patches" | BR2_GLOBAL_PATCH_DIR="$(TOPDIR)/../general/package/patches" | ||||||
| 
 | 
 | ||||||
| # Packages | # Packages | ||||||
| BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL_HISILICON_PATH)/system/packages/configs/busybox.config" | BR2_PACKAGE_BUSYBOX_CONFIG="$(TOPDIR)/../general/package/configs/busybox.config" | ||||||
| BR2_PACKAGE_DROPBEAR=y | BR2_PACKAGE_DROPBEAR=y | ||||||
| BR2_PACKAGE_FWPRINTENV_NG=y | BR2_PACKAGE_FWPRINTENV_NG=y | ||||||
| BR2_PACKAGE_HISILICON_OSDRV4=y | BR2_PACKAGE_HISILICON_OSDRV4=y | ||||||
|  |  | ||||||
|  | @ -34,16 +34,16 @@ BR2_LINUX_KERNEL_EXT_HISI_PATCHER_LIST="$(BR2_EXTERNAL_HISILICON_PATH)/board/hi3 | ||||||
| # BR2_TARGET_TZ_INFO is not set | # BR2_TARGET_TZ_INFO is not set | ||||||
| BR2_TARGET_ROOTFS_SQUASHFS=y | BR2_TARGET_ROOTFS_SQUASHFS=y | ||||||
| BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y | BR2_TARGET_ROOTFS_SQUASHFS4_XZ=y | ||||||
| BR2_ROOTFS_OVERLAY="$(BR2_EXTERNAL_HISILICON_PATH)/system/skeleton" | BR2_ROOTFS_OVERLAY="$(TOPDIR)/../general/overlay" | ||||||
| 
 | 
 | ||||||
| # OpenIPC configuration | # OpenIPC configuration | ||||||
| BR2_TOOLCHAIN_BUILDROOT_VENDOR="openipc" | BR2_TOOLCHAIN_BUILDROOT_VENDOR="openipc" | ||||||
| BR2_TARGET_GENERIC_ISSUE="Welcome to OpenIPC v21.04.17.1" | BR2_TARGET_GENERIC_ISSUE="Welcome to OpenIPC v21.04.18.1" | ||||||
| BR2_TARGET_GENERIC_HOSTNAME="ipcam" | BR2_TARGET_GENERIC_HOSTNAME="ipcam" | ||||||
| BR2_GLOBAL_PATCH_DIR="$(BR2_EXTERNAL_HISILICON_PATH)/system/packages/patches" | BR2_GLOBAL_PATCH_DIR="$(TOPDIR)/../general/package/patches" | ||||||
| 
 | 
 | ||||||
| # Packages | # Packages | ||||||
| BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL_HISILICON_PATH)/system/packages/configs/busybox.config" | BR2_PACKAGE_BUSYBOX_CONFIG="$(TOPDIR)/../general/package/configs/busybox.config" | ||||||
| BR2_PACKAGE_DROPBEAR=y | BR2_PACKAGE_DROPBEAR=y | ||||||
| BR2_PACKAGE_FWPRINTENV_NG=y | BR2_PACKAGE_FWPRINTENV_NG=y | ||||||
| BR2_PACKAGE_HISILICON_OSDRV4=y | BR2_PACKAGE_HISILICON_OSDRV4=y | ||||||
|  |  | ||||||
											
												
													File diff suppressed because it is too large
													Load Diff
												
											
										
									
								|  | @ -1,353 +0,0 @@ | ||||||
| diff -urn -- a/miscutils/rng_fips.h b/miscutils/rng_fips.h
 |  | ||||||
| --- a/miscutils/rng_fips.h	1970-01-01 00:00:00.000000000 +0000
 |  | ||||||
| +++ b/miscutils/rng_fips.h	2008-08-17 13:28:27.000000000 +0000
 |  | ||||||
| @@ -0,0 +1,152 @@
 |  | ||||||
| +/* vi: set sw=4 ts=4: */
 |  | ||||||
| +/* rng_fips.h
 |  | ||||||
| + *
 |  | ||||||
| + * Ported to busybox by Malek Degachi
 |  | ||||||
| + *
 |  | ||||||
| + * Licensed under GPLv2 or later, see file LICENSE in this tarball for details.
 |  | ||||||
| + */
 |  | ||||||
| +
 |  | ||||||
| +#ifndef _RNG_FIPS_H
 |  | ||||||
| +#define _RNG_FIPS_H
 |  | ||||||
| +
 |  | ||||||
| +#include "libbb.h"
 |  | ||||||
| +
 |  | ||||||
| +/**********************************************
 |  | ||||||
| + * FIPS part
 |  | ||||||
| + *********************************************/
 |  | ||||||
| +
 |  | ||||||
| +/*  Size of a FIPS test buffer, do not change this */
 |  | ||||||
| +#define FIPS_RNG_BUFFER_SIZE 2500
 |  | ||||||
| +
 |  | ||||||
| +/* Context for running FIPS tests */
 |  | ||||||
| +typedef struct {
 |  | ||||||
| +	int poker[16];
 |  | ||||||
| +	int runs[12];
 |  | ||||||
| +	int ones;
 |  | ||||||
| +	int rlength;
 |  | ||||||
| +	int current_bit;
 |  | ||||||
| +	int last_bit;
 |  | ||||||
| +	int longrun;
 |  | ||||||
| +	unsigned int last32;
 |  | ||||||
| +} fips_ctx_t;
 |  | ||||||
| +
 |  | ||||||
| +/*
 |  | ||||||
| + * Return values for fips_run_rng_test. These values are OR'ed together
 |  | ||||||
| + * for all tests that failed.
 |  | ||||||
| + */
 |  | ||||||
| +#define FIPS_RNG_MONOBIT	0x0001 /* FIPS 140-2 2001-10-10 monobit */
 |  | ||||||
| +#define FIPS_RNG_POKER		0x0002 /* FIPS 140-2 2001-10-10 poker */
 |  | ||||||
| +#define FIPS_RNG_RUNS		0x0004 /* FIPS 140-2 2001-10-10 runs */
 |  | ||||||
| +#define FIPS_RNG_LONGRUN	0x0008 /* FIPS 140-2 2001-10-10 long run */
 |  | ||||||
| +#define FIPS_RNG_CONTINUOUS_RUN 0x0010 /* FIPS 140-2 continuous run */
 |  | ||||||
| +
 |  | ||||||
| +/*
 |  | ||||||
| + * fips_test_store - store 8 bits of entropy in FIPS
 |  | ||||||
| + * 			 internal test data pool
 |  | ||||||
| + */
 |  | ||||||
| +static void fips_test_store(fips_ctx_t *ctx, unsigned int rng_data)
 |  | ||||||
| +{
 |  | ||||||
| +	int j;
 |  | ||||||
| +
 |  | ||||||
| +	ctx->poker[rng_data >> 4]++;
 |  | ||||||
| +	ctx->poker[rng_data & 15]++;
 |  | ||||||
| +
 |  | ||||||
| +	/* Note in the loop below rlength is always one less than the actual
 |  | ||||||
| +	   run length. This makes things easier. */
 |  | ||||||
| +	for (j = 7; j >= 0; j--) {
 |  | ||||||
| +		ctx->ones += ctx->current_bit = ((rng_data >> j) & 1);
 |  | ||||||
| +		if (ctx->current_bit != ctx->last_bit) {
 |  | ||||||
| +			/* If runlength is 1-6 count it in correct bucket. 0's go in
 |  | ||||||
| +			   runs[0-5] 1's go in runs[6-11] hence the 6*current_bit below */
 |  | ||||||
| +			if (ctx->rlength < 5) {
 |  | ||||||
| +				ctx->runs[ctx->rlength +
 |  | ||||||
| +				     (6 * ctx->current_bit)]++;
 |  | ||||||
| +			} else {
 |  | ||||||
| +				ctx->runs[5 + (6 * ctx->current_bit)]++;
 |  | ||||||
| +			}
 |  | ||||||
| +
 |  | ||||||
| +			/* Check if we just failed longrun test */
 |  | ||||||
| +			if (ctx->rlength >= 25)
 |  | ||||||
| +				ctx->longrun = 1;
 |  | ||||||
| +			ctx->rlength = 0;
 |  | ||||||
| +			/* flip the current run type */
 |  | ||||||
| +			ctx->last_bit = ctx->current_bit;
 |  | ||||||
| +		} else {
 |  | ||||||
| +			ctx->rlength++;
 |  | ||||||
| +		}
 |  | ||||||
| +	}
 |  | ||||||
| +}
 |  | ||||||
| +
 |  | ||||||
| +static int fips_run_rng_test(fips_ctx_t *ctx, const void *buf)
 |  | ||||||
| +{
 |  | ||||||
| +	int i, j;
 |  | ||||||
| +	int rng_test = 0;
 |  | ||||||
| +	unsigned char *rngdatabuf;
 |  | ||||||
| +
 |  | ||||||
| +	if (!ctx) return -1;
 |  | ||||||
| +	if (!buf) return -1;
 |  | ||||||
| +	rngdatabuf = (unsigned char *)buf;
 |  | ||||||
| +
 |  | ||||||
| +	for (i=0; i<FIPS_RNG_BUFFER_SIZE; i += 4) {
 |  | ||||||
| +		int new32 = rngdatabuf[i] | 
 |  | ||||||
| +			    ( rngdatabuf[i+1] << 8 ) | 
 |  | ||||||
| +			    ( rngdatabuf[i+2] << 16 ) | 
 |  | ||||||
| +			    ( rngdatabuf[i+3] << 24 );
 |  | ||||||
| +		if (new32 == ctx->last32) rng_test |= FIPS_RNG_CONTINUOUS_RUN;
 |  | ||||||
| +		ctx->last32 = new32;
 |  | ||||||
| +		fips_test_store(ctx, rngdatabuf[i]);
 |  | ||||||
| +		fips_test_store(ctx, rngdatabuf[i+1]);
 |  | ||||||
| +		fips_test_store(ctx, rngdatabuf[i+2]);
 |  | ||||||
| +		fips_test_store(ctx, rngdatabuf[i+3]);
 |  | ||||||
| +	}
 |  | ||||||
| +
 |  | ||||||
| +	/* add in the last (possibly incomplete) run */
 |  | ||||||
| +	if (ctx->rlength < 5)
 |  | ||||||
| +		ctx->runs[ctx->rlength + (6 * ctx->current_bit)]++;
 |  | ||||||
| +	else {
 |  | ||||||
| +		ctx->runs[5 + (6 * ctx->current_bit)]++;
 |  | ||||||
| +		if (ctx->rlength >= 25)
 |  | ||||||
| +			rng_test |= FIPS_RNG_LONGRUN;
 |  | ||||||
| +	}
 |  | ||||||
| +	
 |  | ||||||
| +	if (ctx->longrun) {
 |  | ||||||
| +		rng_test |= FIPS_RNG_LONGRUN;
 |  | ||||||
| +		ctx->longrun = 0;
 |  | ||||||
| +	}
 |  | ||||||
| +
 |  | ||||||
| +	/* Ones test */
 |  | ||||||
| +	if ((ctx->ones >= 10275) || (ctx->ones <= 9725))
 |  | ||||||
| +		rng_test |= FIPS_RNG_MONOBIT;
 |  | ||||||
| +	/* Poker calcs */
 |  | ||||||
| +	for (i = 0, j = 0; i < 16; i++)
 |  | ||||||
| +		j += ctx->poker[i] * ctx->poker[i];
 |  | ||||||
| +	/* 16/5000*1563176-5000 = 2.1632  */
 |  | ||||||
| +	/* 16/5000*1576928-5000 = 46.1696 */
 |  | ||||||
| +	if ((j > 1576928) || (j < 1563176))
 |  | ||||||
| +		rng_test |= FIPS_RNG_POKER;
 |  | ||||||
| +
 |  | ||||||
| +	if ((ctx->runs[0] < 2315) || (ctx->runs[0] > 2685) ||
 |  | ||||||
| +	    (ctx->runs[1] < 1114) || (ctx->runs[1] > 1386) ||
 |  | ||||||
| +	    (ctx->runs[2] < 527) || (ctx->runs[2] > 723) ||
 |  | ||||||
| +	    (ctx->runs[3] < 240) || (ctx->runs[3] > 384) ||
 |  | ||||||
| +	    (ctx->runs[4] < 103) || (ctx->runs[4] > 209) ||
 |  | ||||||
| +	    (ctx->runs[5] < 103) || (ctx->runs[5] > 209) ||
 |  | ||||||
| +	    (ctx->runs[6] < 2315) || (ctx->runs[6] > 2685) ||
 |  | ||||||
| +	    (ctx->runs[7] < 1114) || (ctx->runs[7] > 1386) ||
 |  | ||||||
| +	    (ctx->runs[8] < 527) || (ctx->runs[8] > 723) ||
 |  | ||||||
| +	    (ctx->runs[9] < 240) || (ctx->runs[9] > 384) ||
 |  | ||||||
| +	    (ctx->runs[10] < 103) || (ctx->runs[10] > 209) ||
 |  | ||||||
| +	    (ctx->runs[11] < 103) || (ctx->runs[11] > 209)) {
 |  | ||||||
| +		rng_test |= FIPS_RNG_RUNS;
 |  | ||||||
| +	}
 |  | ||||||
| +	
 |  | ||||||
| +	/* finally, clear out FIPS variables for start of next run */
 |  | ||||||
| +	memset(ctx->poker, 0, sizeof (ctx->poker));
 |  | ||||||
| +	memset(ctx->runs, 0, sizeof (ctx->runs));
 |  | ||||||
| +	ctx->ones = 0;
 |  | ||||||
| +	ctx->rlength = -1;
 |  | ||||||
| +	ctx->current_bit = 0;
 |  | ||||||
| +
 |  | ||||||
| +	return rng_test;
 |  | ||||||
| +}
 |  | ||||||
| +#endif /* _RNG_FIPS_H */
 |  | ||||||
| diff -urn -- a/miscutils/rngd.c b/miscutils/rngd.c
 |  | ||||||
| --- a/miscutils/rngd.c	2021-04-14 10:06:59.131381906 +0300
 |  | ||||||
| +++ b/miscutils/rngd.c	2021-04-14 10:04:59.785401231 +0300
 |  | ||||||
| @@ -0,0 +1,193 @@
 |  | ||||||
| +/* vi: set sw=4 ts=4: */
 |  | ||||||
| +/*
 |  | ||||||
| + * rngd implementation for busybox
 |  | ||||||
| + *
 |  | ||||||
| + * Ported to busybox by Malek Degachi
 |  | ||||||
| + *
 |  | ||||||
| + * Licensed under GPLv2 or later, see file License in this tarball for details.
 |  | ||||||
| + *
 |  | ||||||
| + */
 |  | ||||||
| +
 |  | ||||||
| +//config:config RNGD
 |  | ||||||
| +//config:	bool "rngd"
 |  | ||||||
| +//config:	default n
 |  | ||||||
| +//config:	help
 |  | ||||||
| +//config:	Hardware random number generation daemon.
 |  | ||||||
| +//config:config FEATURE_RNGD_LONG_OPTIONS
 |  | ||||||
| +//config:	bool "Enable long options"
 |  | ||||||
| +//config:	default n
 |  | ||||||
| +//config:	depends on RNGD && GETOPT_LONG
 |  | ||||||
| +//config:	help
 |  | ||||||
| +//config:	Support long options for the rngd applet.
 |  | ||||||
| +
 |  | ||||||
| +//applet:IF_RNGD(APPLET(rngd, BB_DIR_USR_SBIN, BB_SUID_DROP))
 |  | ||||||
| +
 |  | ||||||
| +//kbuild:lib-$(CONFIG_RNGD) += rngd.o
 |  | ||||||
| +
 |  | ||||||
| +//usage:#define rngd_trivial_usage
 |  | ||||||
| +//usage:       "[-bf] [-o random file] [-r rng file] [-s step] [-t nnn] [-W n]"
 |  | ||||||
| +//usage:#define rngd_full_usage "\n\n"
 |  | ||||||
| +//usage:       "Check and feed random data from hardware device to kernel entropy pool.\n"
 |  | ||||||
| +//usage:      "\nOptions:"
 |  | ||||||
| +//usage:     "\n	-b,--background		Become a daemon (default)"
 |  | ||||||
| +//usage:     "\n	-f,--foreground		Do not fork and become a daemon"
 |  | ||||||
| +//usage:     "\n	-o,--rng-device=file	Kernel device used for random number output"
 |  | ||||||
| +//usage:     "\n				(default: /dev/random)"
 |  | ||||||
| +//usage:     "\n	-r,--random-step=nnn	Kernel device used for random number input"
 |  | ||||||
| +//usage:     "\n				(default: /dev/hw_random)"
 |  | ||||||
| +//usage:     "\n	-s,--random-step=nnn	Number of bytes written to random-device at a time"
 |  | ||||||
| +//usage:     "\n				(default: 64)"
 |  | ||||||
| +//usage:     "\n	-t,--timeout=nnn	Interval written to random-device when the entropy"
 |  | ||||||
| +//usage:     "\n				pool is full, in seconds (default: 60)"
 |  | ||||||
| +//usage:     "\n	-W,--fill-watermark=n	Do not stop feeding entropy to random-device until"
 |  | ||||||
| +//usage:     "\n				at least n bits of entropy are available in the"
 |  | ||||||
| +//usage:     "\n				pool (default: 2048), 0 <= n <= 4096"
 |  | ||||||
| +
 |  | ||||||
| +
 |  | ||||||
| +#include "libbb.h"
 |  | ||||||
| +#include "rng_fips.h"
 |  | ||||||
| +#include <syslog.h>
 |  | ||||||
| +
 |  | ||||||
| +#ifndef __u32
 |  | ||||||
| +typedef unsigned int __u32;
 |  | ||||||
| +#endif
 |  | ||||||
| +#include <linux/random.h>	/* struct rand_pool_info, RNDADDENTROPY and RNDGETENTCNT */
 |  | ||||||
| +
 |  | ||||||
| +enum {
 |  | ||||||
| +	RNG_b	= (1 << 0),
 |  | ||||||
| +	RNG_f	= (1 << 1),
 |  | ||||||
| +	RNG_o	= (1 << 2),
 |  | ||||||
| +	RNG_r	= (1 << 3),
 |  | ||||||
| +	RNG_s	= (1 << 4),
 |  | ||||||
| +	RNG_t	= (1 << 5),
 |  | ||||||
| +	RNG_W	= (1 << 6),
 |  | ||||||
| +};
 |  | ||||||
| +
 |  | ||||||
| +static void random_add_entropy(int random_fd, void *buf, size_t size)
 |  | ||||||
| +{
 |  | ||||||
| +	struct rand_pool_info *entropy;
 |  | ||||||
| +
 |  | ||||||
| +	entropy = xmalloc(sizeof(struct rand_pool_info) + size);
 |  | ||||||
| +
 |  | ||||||
| +	entropy->entropy_count = size * 8;
 |  | ||||||
| +	entropy->buf_size = size;
 |  | ||||||
| +	memcpy(entropy->buf, buf, size);
 |  | ||||||
| +
 |  | ||||||
| +	ioctl_or_perror_and_die(random_fd, RNDADDENTROPY, entropy, "RNDADDENTROPY failed: %s\n",
 |  | ||||||
| +			strerror(errno));
 |  | ||||||
| +}
 |  | ||||||
| +
 |  | ||||||
| +static void random_sleep(int random_fd, double timeout, unsigned fill_watermark)
 |  | ||||||
| +{
 |  | ||||||
| +	int ent_count;
 |  | ||||||
| +	struct pollfd pfd[1];
 |  | ||||||
| +
 |  | ||||||
| +	pfd[0].fd = random_fd;
 |  | ||||||
| +	pfd[0].events = POLLOUT;
 |  | ||||||
| +
 |  | ||||||
| +	ioctl_or_perror_and_die(random_fd, RNDGETENTCNT, &ent_count, "RNDGETENTCNT failed: %s\n",
 |  | ||||||
| +			strerror(errno));
 |  | ||||||
| +	if (ent_count < fill_watermark) return;
 |  | ||||||
| +	
 |  | ||||||
| +	safe_poll(pfd, 1, 1000.0 * timeout);
 |  | ||||||
| +}
 |  | ||||||
| +
 |  | ||||||
| +/* Initialize entropy source */
 |  | ||||||
| +static int discard_initial_data(int rng_fd)
 |  | ||||||
| +{
 |  | ||||||
| +	/* Trash 32 bits of what is probably stale (non-random)
 |  | ||||||
| +	 * initial state from the RNG.  For Intel's, 8 bits would
 |  | ||||||
| +	 * be enough, but since AMD's generates 32 bits at a time...
 |  | ||||||
| +	 *
 |  | ||||||
| +	 * The kernel drivers should be doing this at device powerup,
 |  | ||||||
| +	 * but at least up to 2.4.24, it doesn't. */
 |  | ||||||
| +	unsigned char tempbuf[4];
 |  | ||||||
| +
 |  | ||||||
| +	xread(rng_fd, tempbuf, sizeof tempbuf);
 |  | ||||||
| +
 |  | ||||||
| +	/* Return 32 bits of bootstrap data */
 |  | ||||||
| +	xread(rng_fd, tempbuf, sizeof tempbuf);
 |  | ||||||
| +
 |  | ||||||
| +	return tempbuf[0] | (tempbuf[1] << 8) | 
 |  | ||||||
| +		(tempbuf[2] << 16) | (tempbuf[3] << 24);
 |  | ||||||
| +}
 |  | ||||||
| +
 |  | ||||||
| +
 |  | ||||||
| +#if ENABLE_FEATURE_RNGD_LONG_OPTIONS
 |  | ||||||
| +static const char rngd_longopts[] ALIGN1 =
 |  | ||||||
| +	"background\0"		No_argument		"b"
 |  | ||||||
| +	"foreground\0"		No_argument		"f"
 |  | ||||||
| +	"random-device\0"	Required_argument	"o"
 |  | ||||||
| +	"rng-device\0"		Required_argument	"r"
 |  | ||||||
| +	"random-step\0"		Required_argument	"s"
 |  | ||||||
| +	"timeout\0"		Required_argument	"t"
 |  | ||||||
| +	"fill-watermark\0"	Required_argument	"W"
 |  | ||||||
| +	;
 |  | ||||||
| +#endif
 |  | ||||||
| +
 |  | ||||||
| +int rngd_main(int argc, char **argv) MAIN_EXTERNALLY_VISIBLE;
 |  | ||||||
| +int rngd_main(int argc UNUSED_PARAM, char **argv)
 |  | ||||||
| +{
 |  | ||||||
| +	const char *random_name = "/dev/random";
 |  | ||||||
| +	const char *rng_name = "/dev/hw_random";
 |  | ||||||
| +	int random_step = 64;
 |  | ||||||
| +	unsigned fill_watermark;
 |  | ||||||
| +	double poll_timeout = 60;
 |  | ||||||
| +
 |  | ||||||
| +	const char *watermark = "2048";
 |  | ||||||
| +	static int rng_fd;
 |  | ||||||
| +	static int random_fd;
 |  | ||||||
| +
 |  | ||||||
| +	unsigned char buf[FIPS_RNG_BUFFER_SIZE];
 |  | ||||||
| +	unsigned char *p;
 |  | ||||||
| +	int fips;
 |  | ||||||
| +	fips_ctx_t *fipsctx;
 |  | ||||||
| +
 |  | ||||||
| +#if ENABLE_FEATURE_RNGD_LONG_OPTIONS
 |  | ||||||
| +	applet_long_options = rngd_longopts;
 |  | ||||||
| +#endif
 |  | ||||||
| +
 |  | ||||||
| +
 |  | ||||||
| +	getopt32(argv, "bfo:r:s:t:W:", &random_name, &rng_name, &random_step, &poll_timeout, &watermark);
 |  | ||||||
| +	argv += optind;
 |  | ||||||
| +
 |  | ||||||
| +	fill_watermark = xatou_range(watermark, 0, 4096);
 |  | ||||||
| +
 |  | ||||||
| +	/* Init entropy source, and open hardware RNG device */
 |  | ||||||
| +	rng_fd = xopen(rng_name, O_RDONLY);
 |  | ||||||
| +
 |  | ||||||
| +	/* Bootstrap FIPS tests */
 |  | ||||||
| +	fipsctx = (fips_ctx_t *) xzalloc(sizeof(fips_ctx_t));
 |  | ||||||
| +	fipsctx->rlength = -1;
 |  | ||||||
| +	fipsctx->last32 = discard_initial_data(rng_fd);
 |  | ||||||
| +
 |  | ||||||
| +	/* Init entropy sink and open random device */
 |  | ||||||
| +	random_fd = xopen(random_name, O_RDWR);
 |  | ||||||
| +
 |  | ||||||
| +	if (!(option_mask32 & RNG_f)) { /* no -f */
 |  | ||||||
| +		bb_daemonize_or_rexec(DAEMON_CHDIR_ROOT, argv);
 |  | ||||||
| +		openlog(applet_name, LOG_PID, LOG_DAEMON);
 |  | ||||||
| +		logmode = LOGMODE_SYSLOG;
 |  | ||||||
| +	}
 |  | ||||||
| +
 |  | ||||||
| +	write_pidfile("/var/run/rngd.pid");
 |  | ||||||
| +	for (;;) {
 |  | ||||||
| +		xread(rng_fd, buf, sizeof buf);
 |  | ||||||
| +
 |  | ||||||
| +		fips = fips_run_rng_test(fipsctx, buf);
 |  | ||||||
| +
 |  | ||||||
| +		if (fips) {
 |  | ||||||
| +			bb_info_msg("failed fips test");
 |  | ||||||
| +			sleep(1);
 |  | ||||||
| +			continue;
 |  | ||||||
| +		}
 |  | ||||||
| +
 |  | ||||||
| +		for (p = buf; p + random_step <= &buf[sizeof buf]; p += random_step) {
 |  | ||||||
| +			random_add_entropy(random_fd, p, random_step);
 |  | ||||||
| +			random_sleep(random_fd, poll_timeout ? : -1.0, fill_watermark);
 |  | ||||||
| +		}
 |  | ||||||
| +	}
 |  | ||||||
| +
 |  | ||||||
| +	return EXIT_SUCCESS;
 |  | ||||||
| +}
 |  | ||||||
| +
 |  | ||||||
|  | @ -1 +0,0 @@ | ||||||
| MSK-3 |  | ||||||
|  | @ -1,55 +0,0 @@ | ||||||
| #!/bin/sh |  | ||||||
| 
 |  | ||||||
| DAEMON="syslogd" |  | ||||||
| PIDFILE="/var/run/$DAEMON.pid" |  | ||||||
| 
 |  | ||||||
| SYSLOGD_ARGS="-C64" |  | ||||||
| 
 |  | ||||||
| # shellcheck source=/dev/null |  | ||||||
| [ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON" |  | ||||||
| 
 |  | ||||||
| # BusyBox' syslogd does not create a pidfile, so pass "-n" in the command line |  | ||||||
| # and use "-m" to instruct start-stop-daemon to create one. |  | ||||||
| start() { |  | ||||||
| 	printf 'Starting %s: ' "$DAEMON" |  | ||||||
| 	# shellcheck disable=SC2086 # we need the word splitting |  | ||||||
| 	start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/sbin/$DAEMON" \ |  | ||||||
| 		-- -n $SYSLOGD_ARGS |  | ||||||
| 	status=$? |  | ||||||
| 	if [ "$status" -eq 0 ]; then |  | ||||||
| 		echo "OK" |  | ||||||
| 	else |  | ||||||
| 		echo "FAIL" |  | ||||||
| 	fi |  | ||||||
| 	return "$status" |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| stop() { |  | ||||||
| 	printf 'Stopping %s: ' "$DAEMON" |  | ||||||
| 	start-stop-daemon -K -q -p "$PIDFILE" |  | ||||||
| 	status=$? |  | ||||||
| 	if [ "$status" -eq 0 ]; then |  | ||||||
| 		rm -f "$PIDFILE" |  | ||||||
| 		echo "OK" |  | ||||||
| 	else |  | ||||||
| 		echo "FAIL" |  | ||||||
| 	fi |  | ||||||
| 	return "$status" |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| restart() { |  | ||||||
| 	stop |  | ||||||
| 	sleep 1 |  | ||||||
| 	start |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| case "$1" in |  | ||||||
| 	start|stop|restart) |  | ||||||
| 		"$1";; |  | ||||||
| 	reload) |  | ||||||
| 		# Restart, since there is no true "reload" feature. |  | ||||||
| 		restart;; |  | ||||||
| 	*) |  | ||||||
| 		echo "Usage: $0 {start|stop|restart|reload}" |  | ||||||
| 		exit 1 |  | ||||||
| esac |  | ||||||
|  | @ -1,48 +0,0 @@ | ||||||
| #!/bin/sh |  | ||||||
| 
 |  | ||||||
| NAME="rngd" |  | ||||||
| DAEMON="/usr/sbin/${NAME}" |  | ||||||
| DAEMON_ARGS="-r /dev/urandom" |  | ||||||
| CFG_FILE="/etc/default/${NAME}" |  | ||||||
| PID_FILE="/var/run/${NAME}.pid" |  | ||||||
| 
 |  | ||||||
| # Read configuration variable file if it is present |  | ||||||
| [ -r "${CFG_FILE}" ] && . "${CFG_FILE}" |  | ||||||
| 
 |  | ||||||
| start() |  | ||||||
| { |  | ||||||
| 	printf "Starting ${NAME}: " |  | ||||||
| 	start-stop-daemon -S -q -x "${DAEMON}" -- ${DAEMON_ARGS} |  | ||||||
| 	[ $? = 0 ] && echo "OK" || echo "FAIL" |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| stop() |  | ||||||
| { |  | ||||||
| 	printf "Stopping ${NAME}: " |  | ||||||
| 	# This daemon does not exit properly with the default TERM signal unless |  | ||||||
| 	# it's forced to work by something reading /dev/random. Killing it and |  | ||||||
| 	# removing its PID file is more straightforward. |  | ||||||
| 	if start-stop-daemon -K -q -s KILL -p "${PID_FILE}" -n "${NAME}"; then |  | ||||||
| 		rm -f "${PID_FILE}" |  | ||||||
| 		echo "OK" |  | ||||||
| 	else |  | ||||||
| 		echo "FAIL" |  | ||||||
| 	fi |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| case "$1" in |  | ||||||
| 	start) |  | ||||||
| 		start |  | ||||||
| 		;; |  | ||||||
| 	stop) |  | ||||||
| 		stop |  | ||||||
| 		;; |  | ||||||
| 	restart|reload) |  | ||||||
| 		stop |  | ||||||
| 		start |  | ||||||
| 		;; |  | ||||||
| 	*) |  | ||||||
| 		echo "Usage: $0 {start|stop|restart|reload}" >&2 |  | ||||||
| 		exit 1 |  | ||||||
| 		;; |  | ||||||
| esac |  | ||||||
|  | @ -1,20 +0,0 @@ | ||||||
| #!/bin/sh |  | ||||||
| 
 |  | ||||||
| case "$1" in |  | ||||||
|   start) |  | ||||||
|     printf "Loading modules:" |  | ||||||
|     # load modules for detected devices |  | ||||||
|     # find /sys/ -name modalias -print0 | xargs -0 sort -u -z | xargs -0 modprobe -abq |  | ||||||
| 
 |  | ||||||
|     # load modules from /etc/modules |  | ||||||
|     [ -r /etc/modules ] || exit 0 |  | ||||||
|     while read module args; do |  | ||||||
|         case "$module" in |  | ||||||
|                 ""|"#"*) continue ;; |  | ||||||
|         esac |  | ||||||
| 
 |  | ||||||
|         # attempt to load modules |  | ||||||
|         modprobe ${module} ${args} >/dev/null |  | ||||||
|     done < /etc/modules |  | ||||||
|     ;; |  | ||||||
| esac |  | ||||||
|  | @ -1,55 +0,0 @@ | ||||||
| #!/bin/sh |  | ||||||
| 
 |  | ||||||
| DAEMON="ntpd" |  | ||||||
| PIDFILE="/var/run/$DAEMON.pid" |  | ||||||
| 
 |  | ||||||
| NTPD_ARGS="-p 0.openwrt.pool.ntp.org -p 1.openwrt.pool.ntp.org -p 2.openwrt.pool.ntp.org -p 3.openwrt.pool.ntp.org" |  | ||||||
| 
 |  | ||||||
| # shellcheck source=/dev/null |  | ||||||
| [ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON" |  | ||||||
| 
 |  | ||||||
| # BusyBox' ntpd does not create a pidfile, so pass "-n" in the command line |  | ||||||
| # and use "-m" to instruct start-stop-daemon to create one. |  | ||||||
| start() { |  | ||||||
| 	printf 'Starting %s: ' "$DAEMON" |  | ||||||
| 	# shellcheck disable=SC2086 # we need the word splitting |  | ||||||
| 	start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON" \ |  | ||||||
| 		-- -n $NTPD_ARGS |  | ||||||
| 	status=$? |  | ||||||
| 	if [ "$status" -eq 0 ]; then |  | ||||||
| 		echo "OK" |  | ||||||
| 	else |  | ||||||
| 		echo "FAIL" |  | ||||||
| 	fi |  | ||||||
| 	return "$status" |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| stop() { |  | ||||||
| 	printf 'Stopping %s: ' "$DAEMON" |  | ||||||
| 	start-stop-daemon -K -q -p "$PIDFILE" |  | ||||||
| 	status=$? |  | ||||||
| 	if [ "$status" -eq 0 ]; then |  | ||||||
| 		rm -f "$PIDFILE" |  | ||||||
| 		echo "OK" |  | ||||||
| 	else |  | ||||||
| 		echo "FAIL" |  | ||||||
| 	fi |  | ||||||
| 	return "$status" |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| restart() { |  | ||||||
| 	stop |  | ||||||
| 	sleep 1 |  | ||||||
| 	start |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| case "$1" in |  | ||||||
| 	start|stop|restart) |  | ||||||
| 		"$1";; |  | ||||||
| 	reload) |  | ||||||
| 		# Restart, since there is no true "reload" feature. |  | ||||||
| 		restart;; |  | ||||||
| 	*) |  | ||||||
| 		echo "Usage: $0 {start|stop|restart|reload}" |  | ||||||
| 		exit 1 |  | ||||||
| esac |  | ||||||
|  | @ -1,61 +0,0 @@ | ||||||
| #!/bin/sh |  | ||||||
| # |  | ||||||
| # Starts dropbear sshd. |  | ||||||
| # |  | ||||||
| 
 |  | ||||||
| # Allow a few customizations from a config file |  | ||||||
| test -r /etc/default/dropbear && . /etc/default/dropbear |  | ||||||
| 
 |  | ||||||
| start() { |  | ||||||
| 	DROPBEAR_ARGS="$DROPBEAR_ARGS -R -B -k -p 22 -K 300" |  | ||||||
| 
 |  | ||||||
| 	# If /etc/dropbear is a symlink to /var/run/dropbear, and |  | ||||||
| 	#   - the filesystem is RO (i.e. we can not rm the symlink), |  | ||||||
| 	#     create the directory pointed to by the symlink. |  | ||||||
| 	#   - the filesystem is RW (i.e. we can rm the symlink), |  | ||||||
| 	#     replace the symlink with an actual directory |  | ||||||
| 	if [ -L /etc/dropbear \ |  | ||||||
| 	     -a "$(readlink /etc/dropbear)" = "/var/run/dropbear" ] |  | ||||||
| 	then |  | ||||||
| 		if rm -f /etc/dropbear >/dev/null 2>&1; then |  | ||||||
| 			mkdir -p /etc/dropbear |  | ||||||
| 		else |  | ||||||
| 			echo "No persistent location to store SSH host keys. New keys will be" |  | ||||||
| 			echo "generated at each boot. Are you sure this is what you want to do?" |  | ||||||
| 			mkdir -p "$(readlink /etc/dropbear)" |  | ||||||
| 		fi |  | ||||||
| 	fi |  | ||||||
| 
 |  | ||||||
| 	printf "Starting dropbear sshd: " |  | ||||||
| 	umask 077 |  | ||||||
| 
 |  | ||||||
| 	start-stop-daemon -S -q -p /var/run/dropbear.pid \ |  | ||||||
| 		--exec /usr/sbin/dropbear -- $DROPBEAR_ARGS |  | ||||||
| 	[ $? = 0 ] && echo "OK" || echo "FAIL" |  | ||||||
| } |  | ||||||
| stop() { |  | ||||||
| 	printf "Stopping dropbear sshd: " |  | ||||||
| 	start-stop-daemon -K -q -p /var/run/dropbear.pid |  | ||||||
| 	[ $? = 0 ] && echo "OK" || echo "FAIL" |  | ||||||
| } |  | ||||||
| restart() { |  | ||||||
| 	stop |  | ||||||
| 	start |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| case "$1" in |  | ||||||
|   start) |  | ||||||
|   	start |  | ||||||
| 	;; |  | ||||||
|   stop) |  | ||||||
|   	stop |  | ||||||
| 	;; |  | ||||||
|   restart|reload) |  | ||||||
|   	restart |  | ||||||
| 	;; |  | ||||||
|   *) |  | ||||||
| 	echo "Usage: $0 {start|stop|restart}" |  | ||||||
| 	exit 1 |  | ||||||
| esac |  | ||||||
| 
 |  | ||||||
| exit $? |  | ||||||
|  | @ -1,55 +0,0 @@ | ||||||
| #!/bin/sh |  | ||||||
| 
 |  | ||||||
| DAEMON="mini-snmpd" |  | ||||||
| PIDFILE="/var/run/$DAEMON.pid" |  | ||||||
| 
 |  | ||||||
| SNMPD_ARGS="-n -4 -c openipc -i eth0 -D OpenIPC -C https://openipc.org -L Internet -l notice" |  | ||||||
| 
 |  | ||||||
| # shellcheck source=/dev/null |  | ||||||
| [ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON" |  | ||||||
| 
 |  | ||||||
| # The mini-snmpd does not create a pidfile, so pass "-n" in the command line |  | ||||||
| # and use "-m" to instruct start-stop-daemon to create one. |  | ||||||
| start() { |  | ||||||
| 	printf 'Starting %s: ' "$DAEMON" |  | ||||||
| 	# shellcheck disable=SC2086 # we need the word splitting |  | ||||||
| 	start-stop-daemon -b -m -S -q -p "$PIDFILE" -x "/usr/sbin/$DAEMON" \ |  | ||||||
| 		-- $SNMPD_ARGS |  | ||||||
| 	status=$? |  | ||||||
| 	if [ "$status" -eq 0 ]; then |  | ||||||
| 		echo "OK" |  | ||||||
| 	else |  | ||||||
| 		echo "FAIL" |  | ||||||
| 	fi |  | ||||||
| 	return "$status" |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| stop() { |  | ||||||
| 	printf 'Stopping %s: ' "$DAEMON" |  | ||||||
| 	start-stop-daemon -K -q -p "$PIDFILE" |  | ||||||
| 	status=$? |  | ||||||
| 	if [ "$status" -eq 0 ]; then |  | ||||||
| 		rm -f "$PIDFILE" |  | ||||||
| 		echo "OK" |  | ||||||
| 	else |  | ||||||
| 		echo "FAIL" |  | ||||||
| 	fi |  | ||||||
| 	return "$status" |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| restart() { |  | ||||||
| 	stop |  | ||||||
| 	sleep 1 |  | ||||||
| 	start |  | ||||||
| } |  | ||||||
| 
 |  | ||||||
| case "$1" in |  | ||||||
| 	start|stop|restart) |  | ||||||
| 		"$1";; |  | ||||||
| 	reload) |  | ||||||
| 		# Restart, since there is no true "reload" feature. |  | ||||||
| 		restart;; |  | ||||||
| 	*) |  | ||||||
| 		echo "Usage: $0 {start|stop|restart|reload}" |  | ||||||
| 		exit 1 |  | ||||||
| esac |  | ||||||
|  | @ -1,2 +0,0 @@ | ||||||
| #mt7601u |  | ||||||
| #r8188eu |  | ||||||
|  | @ -1,8 +0,0 @@ | ||||||
| # Interfaces |  | ||||||
| 
 |  | ||||||
| auto lo |  | ||||||
| iface lo inet loopback |  | ||||||
| 
 |  | ||||||
| auto eth0 |  | ||||||
| iface eth0 inet dhcp |  | ||||||
|     hwaddress ether $(fw_printenv -n ethaddr) |  | ||||||
|  | @ -1,7 +0,0 @@ | ||||||
| 
 |  | ||||||
| OpenIPC is asking for your help to support development cost and long-term maintenance of what we believe will serve a fundamental  |  | ||||||
| role in the advancement of a stable, flexible and most importantly, Open IP Network Camera Framework for users worldwide. |  | ||||||
| 
 |  | ||||||
| Your contribution will help us advance development proposals forward, and interact with the community on a regular basis. |  | ||||||
| 
 |  | ||||||
|   https://openipc.org/contribution/ |  | ||||||
|  | @ -1,24 +0,0 @@ | ||||||
| export PATH="/bin:/sbin:/usr/bin:/usr/sbin" |  | ||||||
| export HOME=$(grep -e "^${USER:-root}:" /etc/passwd | cut -d ":" -f 6) |  | ||||||
| export HOME=${HOME:-/root} |  | ||||||
| export TZ=$(cat /etc/TZ) |  | ||||||
| 
 |  | ||||||
| if [ "$PS1" ]; then |  | ||||||
| 	if [ "`id -u`" -eq 0 ]; then |  | ||||||
| 		export PS1='\u@\h:\w\# ' |  | ||||||
| 	else |  | ||||||
| 		export PS1='\u@\h:\w\$ ' |  | ||||||
| 	fi |  | ||||||
| fi |  | ||||||
| 
 |  | ||||||
| export EDITOR='/bin/vi' |  | ||||||
| 
 |  | ||||||
| [ -x /usr/bin/arp ] || arp() { cat /proc/net/arp; } |  | ||||||
| 
 |  | ||||||
| # Source configuration files from /etc/profile.d |  | ||||||
| for i in /etc/profile.d/*.sh ; do |  | ||||||
| 	if [ -r "$i" ]; then |  | ||||||
| 		. $i |  | ||||||
| 	fi |  | ||||||
| done |  | ||||||
| unset i |  | ||||||
|  | @ -1,3 +0,0 @@ | ||||||
| # |  | ||||||
| nameserver 1.1.1.1 |  | ||||||
| # |  | ||||||
|  | @ -1,32 +0,0 @@ | ||||||
| #!/bin/sh |  | ||||||
| 
 |  | ||||||
| on_exit() |  | ||||||
| { |  | ||||||
|   mountpoint -q /proc && umount /proc |  | ||||||
|   exec /sbin/init $* |  | ||||||
| } |  | ||||||
| trap on_exit 0 |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| mount -t proc proc /proc || exit |  | ||||||
| grep -q overlay /proc/filesystems || exit |  | ||||||
| 
 |  | ||||||
| mount -t jffs2 /dev/$(awk -F ':' '/rootfs_data/ {print $1}' /proc/mtd | sed 's/mtd/mtdblock/') /overlay || \ |  | ||||||
|   mount -t tmpfs tmpfs /overlay || exit |  | ||||||
| 
 |  | ||||||
| if grep -q overlayfs /proc/filesystems; then |  | ||||||
|   mount -t overlayfs overlayfs -o lowerdir=/,upperdir=/overlay,ro /mnt \ |  | ||||||
|     || { umount /overlay; exit; } |  | ||||||
| else |  | ||||||
|   overlay_rootdir=/overlay/root |  | ||||||
|   overlay_workdir=/overlay/work |  | ||||||
|   mkdir -p ${overlay_rootdir} ${overlay_workdir} |  | ||||||
|   mount -t overlay overlay \ |  | ||||||
|         -o lowerdir=/,upperdir=${overlay_rootdir},workdir=${overlay_workdir} /mnt \ |  | ||||||
|     || { umount /overlay; exit; } |  | ||||||
| fi |  | ||||||
| 
 |  | ||||||
| pivot_root /mnt /mnt/rom |  | ||||||
| mount -o noatime,move /rom/proc /proc |  | ||||||
| mount -o noatime,move /rom/dev /dev |  | ||||||
| mount -o noatime,move /rom/overlay /overlay |  | ||||||
|  | @ -1 +0,0 @@ | ||||||
| /lib/libc.so |  | ||||||
|  | @ -1 +0,0 @@ | ||||||
| /lib/libc.so |  | ||||||
|  | @ -1 +0,0 @@ | ||||||
| /usr/lib/libjson-c.so.5 |  | ||||||
|  | @ -1,6 +0,0 @@ | ||||||
| #!/bin/sh |  | ||||||
| 
 |  | ||||||
| 
 |  | ||||||
| echo -e "\nСlearing the overlayfs partition and rebooting without any questions...\n" |  | ||||||
| # |  | ||||||
| flash_eraseall -j /dev/$(awk -F ':' '/rootfs_data/ {print $1}' /proc/mtd) && reboot |  | ||||||
		Loading…
	
		Reference in New Issue