avatar
Articles
144
Tags
120
Categories
17
Home
Archives
Categories
Tags
About
LITREILY
Search
Home
Archives
Categories
Tags
About

LITREILY

openwrt make defconfig 详解
Created2020-12-29|Embedded
对于 linux kernel,有几个常用 make 指令用于生成 .config 文件。 make oldconfig make menuconfig make defconfig make config 那么这些指令具体执行了什么操作呢,针对 openwrt 来看下吧。 主 Makefile在 buildroot 执行 make,首先会访问仓库根目录的主 Makefile,其中有个 ifneq 判断如下: ifneq ($(OPENWRT_BUILD),1) _SINGLE=export MAKEFLAGS=$(space); override OPENWRT_BUILD=1 export OPENWRT_BUILD GREP_OPTIONS= export GREP_OPTIONS CDPATH= export CDPATH include $(TOPDIR)/include/debug.mk include $(TOPDIR)/include/depends.mk include $(TOPDIR)/include/tople...
lua 高级特性
Created2020-12-25|LanguageLua
这一篇来记录下 lua 的某些高级特性,以便在实际应用中得心应手。 模块和包为了方便代码复用和扩展,可以使用 table 实现模块 module,在模块中封装通用代码。把同类型的函数放在一个文件中,然后在其它脚本中调用。 module = {} module.version = "V0.1" module.author = "litreily" function module.func1 () function-body end function module.func2 () function-body end return module 然后在其它文件通过 require 导入。 require ("module") -- or require "module" print(module.version) module.func1() -- or local m = require ("module") print(m.version) m.func1() 举例说明,为了复用一些通用方法比如文件读写,异常处理等功能,可以将...
lua 基本语法
Created2020-12-24|LanguageLua
基本语法注释-- single line comment --[[ mutil line comments ]] 关键词变量名避免与以下关键词重复。 and break do else elseif end false for function if in local nil not or repeat return then true until while goto 变量默认情况下,变量总是 全局变量 , 局部变量需要使用 local 标记。 a = 1 -- global value local b = 2 -- local value function test() c = 3 -- global value local d = 4 -- local value end Lua 的变量与 Python 一样也是弱类型,无需明确指定数据类型,Lua解释器自动识别或转换。 数据类型lua 包含8个基本数据类型: nil, boolean, n...
lua 语言的基本使用
Created2020-12-23|LanguageLua
下载安装在联网状态下,Ubuntu可以直接apt安装。 sudo apt install lua 如果是不直接联网的服务器,并且没有root权限的情况下,需要先在联网PC上下载后导入,再编译安装。 wget http://www.lua.org/ftp/lua-5.1.5.tar.gz # copy lua-5.1.5.tar.gz to server by scp or ftp tar -xvf lua-5.1.5.tar.gz cd lua-5.1.5 sed -i 's/\/usr\/local/~\/bin\/local/' Makefile make generic make install 默认安装目录是/usr/local, 如果没有root权限,需要修改Makefile,将其改为指定目录(~/bin/local),上面通过sed修改。 值得注意的是,Lua 如果按 make linux 编译,会要求支持readline,所以需要先安装依赖 libreadline-dev sudo apt-get install libreadline-dev 执行lua与P...
使用 gdb 解析 ppp driver crash log
Created2020-12-17|Embedded
由于项目整合,经过一次大版本升级后的项目,继承了大家族中许多新的特性,然而在正常功能测试中崩溃了,而且还是kernel crash, 会导致reboot的那种。本文就此问题重现、调试分析过程予以归纳总结。 问题描述PPTP 拨号上网模式下,Router 在添加特定静态路由后crash. 添加路由的原因在本文讨论内容中不重要,因此略过。 问题再现实际测试过程中寻找重现方法耗时较长,经过大量实验后简化如下: 连接 WAN Port PPTP 拨号上网 拨号成功后,查看 WAN 口及 ppp0 的 IP. root@model:$ ifconfig brwan brwan Link encap:Ethernet HWaddr 00:13:2F:34:42:59 inet addr:10.0.0.84 Bcast:10.156.23.255 Mask:255.255.254.0 inet6 addr: fe80::203:7fff:fe94:229/64 Scope:Link UP BROADCAST RUNN...
Setup PPTP and DNS server
Created2020-12-02|Network
PPTP (Point to Point Tunneling Protocol) 点对点隧道协议,与PPPoE, L2TP 均属于 PPP(Point to Point Protocol) 点对点协议。这篇来记录下PPTP server的安装和配置过程。 install DHCP server除了PPPoE外,PPTP 与 L2TP 都无法直接给client分配IP,需要使用dhcp server分配。所以在安装PPTP的同时,也要保证DHCP server也已安装。具体方法参考 Setup dhcpd/dhcpdv6 server. 需要注意的是,在Ubuntu 20.10 版本中,网卡的静态IP管理模式与以往有所不同。在以往版本中,是修改 /etc/network/interfaces 文件,但是在最新Ubuntu确不一样,最新版提出了一个叫 netplan 的概念,修改的文件是: /etc/netplan/01-network-manager-all.yaml 以 yaml 文件存储配置信息,我们将配置dhcp 对应接口的静态IP为 10.0.0.138/24, 对应配...
openssl 验证证书有效性
Created2020-09-17|NetworkSecurity
OpenSSL is a robust, commercial-grade, and full-featured toolkit for the Transport Layer Security (TLS) and Secure Sockets Layer (SSL) protocols. It is also a general-purpose cryptography library. openssl是非常强大的TLS/SSL协议相关的工具集,包含丰富的测试工具。 这篇文章来讲讲如何使用openssl工具集中的s_client测试证书认证。 $ openssl -h openssl:Error: '-h' is an invalid command. Standard commands asn1parse ca ciphers cms crl crl2pkcs7 dgst dh dhparam dsa dsaparam ...
python之给pdf添加页码
Created2020-08-13|LanguagePython
最近写release note, 总感觉用tex不太方便,特别是装texlive占用大量空间,还有各种依赖问题,想着能不能用markdown写更方便。实践证明,typora导出pdf的功能真的很棒,唯独一个不足之处就是生成的PDF不带页码。 这个虽然可以使用在线工具实现,或者使用Adobe、福昕的 pdf 编辑功能,但是很多情况,尤其是工作平台是不方便使用的。为此我想到了Python,通过脚本把页码加上。 安装Python库首先需要安装两个依赖库,PyPDF2以及reportLab, PyPDF2可以对PDF进行拆分、合并、删除、加密等操作;reportlab则更是强大,看看下面的官方介绍。 We build solutions to generate rich, attractive and fully bespoke PDFs at incredible speeds.Over 5 million documents are generated each month using Reportlab's software--- https://www.reportla...
1…789…18
avatar
litreily
simple life
Articles
144
Tags
120
Categories
17
Follow Me
Announcement
This is my Blog
Recent Posts
每日东方美人探索 2026-07-05
每日东方美人探索 2026-07-052026-07-05
每日东方美人探索 2026-07-04
每日东方美人探索 2026-07-042026-07-04
每日东方美人探索 2026-07-03
每日东方美人探索 2026-07-032026-07-03
每日东方美人探索 2026-07-02
每日东方美人探索 2026-07-022026-07-02
每日东方美人探索 2026-07-01
每日东方美人探索 2026-07-012026-07-01
Categories
  • AI1
  • Android20
  • Embedded24
  • Language27
    • LabVIEW7
    • Lua3
    • Matlab4
    • Python13
Tags
windowsjekyllrubymatlabbracketsgittoolslabviewtdmsatomutorrentC/C++musicubuntulinuxsignalVShexoteststm32RSSFeedalgorithmlogofficewordmakefiletelnetsmtpshellwiresharkmysqlcentosddoshping3tmuxspidersinasortvisualization
Archives
  • July 2026 5
  • June 2026 21
  • May 2026 1
  • September 2024 1
  • May 2024 1
  • February 2024 1
  • January 2024 1
  • December 2023 1
Website Info
Article Count :
144
Unique Visitors :
Page Views :
Last Update :
© 2025 - 2026 By litreilyFramework Hexo 5.4.2|Theme Butterfly 5.5.4
Search
Loading Database