Category: Uncategorized

  • The Great Gig in the Sky

    "And I am not frightened of dying, any time will do, I
    don’t mind. Why should I be frightened of dying?
    There’s no reason for it, you’ve gotta go sometime."

    "I never said I was frightened of dying."

  • 焊接RK3566心得以及usb otg改host

    焊接3566,用14S镊子轻推,看到旁边丝印线在动就够了,丝印线0.12mm,刚好不会推多,植锡0.12mm厚度钢网完全够用
    usb otg改hostRK3566 AndroidR usb otg host和peripheral切换软件手动切换,写/sys/devices/platform/fe8a0000.usb2-phy/otg_mode

  • wordpress迁移记录

    从树莓派4B迁移到了腾讯云

    相关更改

    wp-config.php

    added
    define(‘FS_METHOD’, ‘direct’);
    direct貌似是直接写在web server托管的dir下面

    更新无权限

    升级WordPress
    正在从 https://downloads.wordpress.org/release/zh_CN/wordpress-6.5.4.zip 下载更新…
    
    无法验证 wordpress-6.5.4.zip 的真实性,因为没有找到签名。
    
    正在解压缩升级文件…
    
    无法创建目录。: /www/root/wp-content/upgrade/wordpress-6.5.4-zh_cn
    
    安装失败
    
    wordpress迁移

    解决方法:
    sudo chown -R www-data:www-data /www/root/
    since, nginx and php-fpm8.1 is run as user www-root

  • 考完241后的代办

    记得补充一下st7789的调试

    记得补充一下mplayer播放指令怎么使用

  • h616的spi设备,好像正常加载不会打印日志


    搞了半天还以为spi没加载,其实是加载了。
    那个Dumtux的仓库两个spi总线控制器都没开起来。当我开起来后,再把tft和mcp2515都设置成okay,
    /dev/fb0都出来了,
    然后mcp2515好像probe失败了,这说明应该是成功读取SPI端口了
    还有,设备树在/boot/dtb下,而不是有sun50i后缀那个

  • 总算是把tinalinuxv853编译成功了


    Tina-linux 4.9
    然后把出错的老sdk删了,新的放在D:\Embedded\Tutorial\100ASK_V853-PRO_V1.0_2023-03-31\07_Tina_SDK,并且把100ASK的patch打包成了tgz文件,这下以后就不用每次git clone了。

  • [u-boot解读之基于全志V3s]01顶层Makefile解析

    1.xxx_defconf的解析

    在573行

    config: scripts_basic outputmakefile FORCE
        $(Q)$(MAKE) $(build)=scripts/kconfig $@
    
    %config: scripts_basic outputmakefile FORCE
        $(Q)$(MAKE) $(build)=scripts/kconfig $@

    可以看到,当我们执行 make LicheePi_Zero_defconfig时,会触发该规则.
    可以看到后面有两个prerequisites:scripts_basic,outputmakefile,以及一个FORCE
    这个FORCE是为了每次触发该规则都能执行这条命令,可以参考www.gnu.org:Force-Targets

    1.1FORCE目标

    在2483行:

    PHONY += FORCE
    FORCE:
    
    # Declare the contents of the PHONY variable as phony.  We keep that
    # information in a variable so we can use it in if_changed and friends.
    .PHONY: $(PHONY)

    可知FORCE是一个伪目标

    1.2$(Q)是个什么?

    在100行可以看到

    ifeq ($(KBUILD_VERBOSE),1)
      quiet =
      Q =
    else
      quiet=quiet_
      Q = @
    endif

    如果未设置KBUILD_VERBOSE环境变量为1,就会隐藏执行的指令
    因此我们可以在分析脚本时,设置该环境变量来看具体执行了什么
    在67行也有相应的原理分析:

    # Beautify output
    # ---------------------------------------------------------------------------
    #
    # Normally, we echo the whole command before executing it. By making
    # that echo $($(quiet)$(cmd)), we now have the possibility to set
    # $(quiet) to choose other forms of output instead, e.g.
    #
    #         quiet_cmd_cc_o_c = Compiling $(RELDIR)/$@
    #         cmd_cc_o_c       = $(CC) $(c_flags) -c -o $@ $<
    #
    # If $(quiet) is empty, the whole command will be printed.
    # If it is set to "quiet_", only the short version will be printed.
    # If it is set to "silent_", nothing will be printed at all, since
    # the variable $(silent_cmd_cc_o_c) doesn't exist.
    #
    # A simple variant is to prefix commands with $(Q) - that's useful
    # for commands that shall be hidden in non-verbose mode.
    #
    #   $(Q)ln $@ :<
    #
    # If KBUILD_VERBOSE equals 0 then the above command will be hidden.
    # If KBUILD_VERBOSE equals 1 then the above command is displayed.
    #
    # To put more focus on warnings, be less verbose as default
    # Use 'make V=1' to see the full commands

    1.3scripts_basic目标

    PHONY += scripts_basic
    scripts_basic:
        $(Q)$(MAKE) $(build)=scripts/basic
        $(Q)rm -f .tmp_quiet_recordmcount

    生成scripts/basic下的工具fixdep

    1.4outputmakefile目标

    PHONY += outputmakefile
    # outputmakefile generates a Makefile in the output directory, if using a
    # separate output directory. This allows convenient use of make in the
    # output directory.
    outputmakefile:
    ifneq ($(KBUILD_SRC),)
        $(Q)ln -fsn $(srctree) source
        $(Q)$(CONFIG_SHELL) $(srctree)/scripts/mkmakefile $(srctree)
    endif

    如果KBUILD_SRC不为空,在该路径自动生成Makefile(这个规则用不到)

    综上所述,%config规则将传入的LicheePi_Zero_defconfig传给scripts/kconfig的Makefile并执行

    1.5 kconfig下的Menuconfig

    来到第95行

    %_defconfig: $(obj)/conf
        $(Q)$< $(silent) --defconfig=arch/$(SRCARCH)/configs/$@ $(Kconfig)

    这调用了刚才在Kconfig下由conf.c生成的工具conf,来生成
    完整命令如下:

    scripts/kconfig/conf  --defconfig=arch/../configs/LicheePi_Zero_defconfig Kconfig

    至于$SRCARCH又是什么
    位于第九行

    # Added for U-Boot
    #  Linux has defconfig files in arch/$(SRCARCH)/configs/,
    #  on the other hand, U-Boot does in configs/.
    #  Set SRCARCH to .. fake this Makefile.
    SRCARCH := ..

    原来u-boot项目是仿照linux仓库的结构的,但是u-boot不需要把defconfig放在每个arch目录下

    conf.c中生成defconfig

    第664行

        case defconfig:
            conf_set_all_new_symbols(def_default);

    然后conf_set_all_new_symbols在scripts/kconfig/confdata文件中定义,感兴趣的读者可以继续深入,但由于篇幅限制,仅用知道整个过程是往u-boot顶级目录里写入.config文件

    2.直接运行make命令

    2.1第一个目标

    第147行

    # That's our default target when none is given on the command line
    PHONY := _all
    _all:

    然后221行

    # If building an external module we do not care about the all: rule
    # but instead _all depend on modules
    PHONY += all
    ifeq ($(KBUILD_EXTMOD),)
    _all: all
    else
    _all: modules
    endif

    默认依赖all目标
    之后是1112行

    # Timestamp file to make sure that binman always runs
    .binman_stamp: $(INPUTS-y) FORCE
    ifeq ($(CONFIG_BINMAN),y)
        $(call if_changed,binman)
    endif
        @touch $@
    
    all: .binman_stamp

    all依赖.binman_stamp,又间接依赖了$(INPUTS-y)
    INPUTS-y是什么呢

    2.2 INPUTS-y目标

    未完待续

  • [MasterSpark魔炮]代办清单

    1. 记得MT2492分压电阻30k 和910k 或许不能匹配FB的输入阻抗。
      所以BOM记得配好3K 电阻之类的