如何通过设备树配置 uio_dmem_genirq 驱动程序

2024-04-14

The uio_dmem_genirq https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/drivers/uio/uio_dmem_genirq.c?h=v4.4.113驱动程序向后兼容uio_pdrv_genirq https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git/tree/drivers/uio/uio_pdrv_genirq.c?h=v4.4.113驱动程序,但除此之外,它动态分配连续内存 https://elinux.org/images/2/23/LinuxCMA-cewg43.pdf。必须如何定义设备树条目才能加载dmem司机?工作配置为pdrv版本由以下设备树条目组成:

spw0@7aa00000 {
  compatible = "generic-uio";
  reg = <0x7aa00000 0x10000>;
  interrupts = <0x0 0x1D 0x4>;
  interrupt-parent = <0x3>;
  clocks = <0x1>;
};

并将 bootargs 更改为console=ttyPS0,115200 root=/dev/mmcblk0p1 rw rootwait earlyprintk uio_pdrv_genirq.of_id=generic-uio.

我当前的配置dmem版本如下所示,但不加载 uio 驱动程序,尽管它已编译到内核中。这是的输出/lib/modules/4.4.0-xilinx/modules.builtin

kernel/drivers/uio/uio.ko
kernel/drivers/uio/uio_pdrv_genirq.ko
kernel/drivers/uio/uio_dmem_genirq.ko

用于尝试和配置驱动程序的两种不同方式是:

spw0@7aa00000 {
  compatible = "generic-uio";
  reg = <0x7aa00000 0x10000>;
  uio,number-of-dynamic-regions = <1>;
  uio,dynamic-regions-sizes = <0x4000>;
  interrupts = <0x0 0x1D 0x4>;
  interrupt-parent = <0x3>;
  clocks = <0x1>;
};

spw1@7aa00000 {
  compatible = "generic-uio";
  num_dynamic_regions = <2>;
  dynamic_region_sizes = <0x8000>;
  interrupts = <0x0 0x1E 0x4>;
  interrupt-parent = <0x3>;
  clocks = <0x1>;
};

并且 bootargs 更新为console=ttyPS0,115200 root=/dev/mmcblk0p1 rw rootwait earlyprintk uio_dmem_genirq.of_id=generic-uio.


这是一个适合我的设备树文件。它可能在这里或那里有一个奇怪的配置,如果您必须更改某些内容,我们将不胜感激。

/dts-v1/;

/ {
    #address-cells = <0x1>;
    #size-cells = <0x1>;
    compatible = "xlnx,zynq-7000";
    model = "uart0";

    chosen {
        bootargs = "console=ttyPS0,115200 earlyprintk";
    };

    aliases {
        serial0 = "/amba/serial@e0000000";
        ethernet0 = "/amba/ethernet@e000b000";
        spi0 = "/amba/spi@e000d000";
    };

    memory {
        device_type = "memory";
        reg = <0x0 0x40000000>;
    };

    reserved-memory {
        #address-cells = <1>;
        #size-cells = <1>;
        ranges;

        spw_dma@3E000000 {
            reg = <0x3E000000 0x2000000>;
        };
    };

    cpus {
        #address-cells = <0x1>;
        #size-cells = <0x0>;

        cpu@0 {
            compatible = "arm,cortex-a9";
            device_type = "cpu";
            reg = <0x0>;
            clocks = <0x1 0x3>;
            clock-latency = <0x3e8>;
            cpu0-supply = <0x2>;
            operating-points = <0xa2c2a 0xf4240 0x51615 0xf4240>;
        };

        cpu@1 {
            compatible = "arm,cortex-a9";
            device_type = "cpu";
            reg = <0x1>;
            clocks = <0x1 0x3>;
        };
    };

    pmu {
        compatible = "arm,cortex-a9-pmu";
        interrupts = <0x0 0x5 0x4 0x0 0x6 0x4>;
        interrupt-parent = <0x3>;
        reg = <0xf8891000 0x1000 0xf8893000 0x1000>;
    };

    fixedregulator@0 {
        compatible = "regulator-fixed";
        regulator-name = "VCCPINT";
        regulator-min-microvolt = <0xf4240>;
        regulator-max-microvolt = <0xf4240>;
        regulator-boot-on;
        regulator-always-on;
        linux,phandle = <0x2>;
        phandle = <0x2>;
    };

    amba {
        compatible = "simple-bus";
        #address-cells = <0x1>;
        #size-cells = <0x1>;
        interrupt-parent = <0x3>;
        ranges;

        spw0@7aa00000 {
          compatible = "generic-uio";
          reg = <0x7aa00000 0x10000>;
          uio,number-of-dynamic-regions = <1>;
          uio,dynamic-regions-sizes = <0x4000>;
          interrupts = <0x0 0x1D 0x0>;
          interrupt-parent = <0x3>;
          clocks = <0x1>;
      };

        spw1@7aa00000 {
          compatible = "generic-uio";
          uio,number-of-dynamic-regions = <2>;
          uio,dynamic-regions-sizes = <0x8000>;
          interrupts = <0x0 0x1E 0x0>;
          interrupt-parent = <0x3>;
          clocks = <0x1>;
      };

        spw2@7aa00000 {
          compatible = "generic-uio";
          reg = <0x3d000000 0x10000>;
          interrupts = <0x0 0x1F 0x0>;
          interrupt-parent = <0x3>;
          clocks = <0x1>;
      };

        spw3@7aa00000 {
          compatible = "generic-uio";
          interrupts = <0x0 0x20 0x0>;
          interrupt-parent = <0x3>;
          clocks = <0x1>;
      };

        spw4@7aa00000 {
          compatible = "generic-uio";
          interrupts = <0x0 0x21 0x4>;
          interrupt-parent = <0x3>;
          clocks = <0x1>;
      };

        spw5@7aa00000 {
          compatible = "generic-uio";
          interrupts = <0x0 0x22 0x4>;
          interrupt-parent = <0x3>;
          clocks = <0x1>;
      };

        spw6@7aa00000 {
          compatible = "generic-uio";
          interrupts = <0x0 0x23 0x4>;
          interrupt-parent = <0x3>;
          clocks = <0x1>;
      };

        spw7@7aa00000 {
          compatible = "generic-uio";
          interrupts = <0x0 0x24 0x4>;
          interrupt-parent = <0x3>;
          clocks = <0x1>;
      };

        spw8@7aa00000 {
          compatible = "generic-uio";
          interrupts = <0x0 0x34 0x4>;
          interrupt-parent = <0x3>;
          clocks = <0x1>;
      };

        spw9@7aa00000 {
          compatible = "generic-uio";
          interrupts = <0x0 0x35 0x4>;
          interrupt-parent = <0x3>;
          clocks = <0x1>;
      };

        spw10@7aa00000 {
          compatible = "generic-uio";
          interrupts = <0x0 0x36 0x4>;
          interrupt-parent = <0x3>;
          clocks = <0x1>;
      };

        spw11@7aa00000 {
          compatible = "generic-uio";
          interrupts = <0x0 0x37 0x4>;
          interrupt-parent = <0x3>;
          clocks = <0x1>;
      };

        spw12@7aa00000 {
          compatible = "generic-uio";
          interrupts = <0x0 0x38 0x4>;
          interrupt-parent = <0x3>;
          clocks = <0x1>;
      };

        spw13@7aa00000 {
          compatible = "generic-uio";
          interrupts = <0x0 0x39 0x4>;
          interrupt-parent = <0x3>;
          clocks = <0x1>;
      };

        spw14@7aa00000 {
          compatible = "generic-uio";
          interrupts = <0x0 0x3A 0x4>;
          interrupt-parent = <0x3>;
          clocks = <0x1>;
      };

        spw15@7aa00000 {
          compatible = "generic-uio";
          interrupts = <0x0 0x3B 0x4>;
          interrupt-parent = <0x3>;
          clocks = <0x1>;
      };

        adc@f8007100 {
            compatible = "xlnx,zynq-xadc-1.00.a";
            reg = <0xf8007100 0x20>;
            interrupts = <0x0 0x7 0x4>;
            interrupt-parent = <0x3>;
            clocks = <0x1 0xc>;
        };

        can@e0008000 {
            compatible = "xlnx,zynq-can-1.0";
            status = "disabled";
            clocks = <0x1 0x13 0x1 0x24>;
            clock-names = "can_clk", "pclk";
            reg = <0xe0008000 0x1000>;
            interrupts = <0x0 0x1c 0x4>;
            interrupt-parent = <0x3>;
            tx-fifo-depth = <0x40>;
            rx-fifo-depth = <0x40>;
        };

        can@e0009000 {
            compatible = "xlnx,zynq-can-1.0";
            status = "disabled";
            clocks = <0x1 0x14 0x1 0x25>;
            clock-names = "can_clk", "pclk";
            reg = <0xe0009000 0x1000>;
            interrupts = <0x0 0x33 0x4>;
            interrupt-parent = <0x3>;
            tx-fifo-depth = <0x40>;
            rx-fifo-depth = <0x40>;
        };

        gpio@e000a000 {
            compatible = "xlnx,zynq-gpio-1.0";
            #gpio-cells = <0x2>;
            clocks = <0x1 0x2a>;
            gpio-controller;
            interrupt-parent = <0x3>;
            interrupts = <0x0 0x14 0x4>;
            reg = <0xe000a000 0x1000>;
            emio-gpio-width = <0x40>;
            gpio-mask-high = <0x0>;
            gpio-mask-low = <0x5600>;
        };

        i2c@e0004000 {
            compatible = "cdns,i2c-r1p10";
            status = "okay";
            clocks = <0x1 0x26>;
            interrupt-parent = <0x3>;
            interrupts = <0x0 0x19 0x4>;
            reg = <0xe0004000 0x1000>;
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            clock-frequency = <0x61a80>;
        };

        i2c@e0005000 {
            compatible = "cdns,i2c-r1p10";
            status = "okay";
            clocks = <0x1 0x27>;
            interrupt-parent = <0x3>;
            interrupts = <0x0 0x30 0x4>;
            reg = <0xe0005000 0x1000>;
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            clock-frequency = <0x61a80>;
        };

        interrupt-controller@f8f01000 {
            compatible = "arm,cortex-a9-gic";
            #interrupt-cells = <0x3>;
            interrupt-controller;
            reg = <0xf8f01000 0x1000 0xf8f00100 0x100>;
            num_cpus = <0x2>;
            num_interrupts = <0x60>;
            linux,phandle = <0x3>;
            phandle = <0x3>;
        };

        cache-controller@f8f02000 {
            compatible = "arm,pl310-cache";
            reg = <0xf8f02000 0x1000>;
            interrupts = <0x0 0x2 0x4>;
            arm,data-latency = <0x3 0x2 0x2>;
            arm,tag-latency = <0x2 0x2 0x2>;
            cache-unified;
            cache-level = <0x2>;
        };

        memory-controller@f8006000 {
            compatible = "xlnx,zynq-ddrc-a05";
            reg = <0xf8006000 0x1000>;
        };

        ocmc@f800c000 {
            compatible = "xlnx,zynq-ocmc-1.0";
            interrupt-parent = <0x3>;
            interrupts = <0x0 0x3 0x4>;
            reg = <0xf800c000 0x1000>;
        };

        serial@e0000000 {
            compatible = "xlnx,xuartps", "cdns,uart-r1p8";
            status = "okay";
            clocks = <0x1 0x17 0x1 0x28>;
            clock-names = "uart_clk", "pclk";
            reg = <0xe0000000 0x1000>;
            interrupts = <0x0 0x1b 0x4>;
            current-speed = <0x1c200>;
            device_type = "serial";
            port-number = <0x0>;
        };

        serial@e0001000 {
            compatible = "xlnx,xuartps", "cdns,uart-r1p8";
            status = "disabled";
            clocks = <0x1 0x18 0x1 0x29>;
            clock-names = "uart_clk", "pclk";
            reg = <0xe0001000 0x1000>;
            interrupts = <0x0 0x32 0x4>;
        };

        spi@e0006000 {
            compatible = "xlnx,zynq-spi-r1p6";
            reg = <0xe0006000 0x1000>;
            status = "okay";
            interrupt-parent = <0x3>;
            interrupts = <0x0 0x1a 0x4>;
            clocks = <0x1 0x19 0x1 0x22>;
            clock-names = "ref_clk", "pclk";
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            is-decoded-cs = <0x0>;
            num-cs = <0x3>;
        };

        spi@e0007000 {
            compatible = "xlnx,zynq-spi-r1p6";
            reg = <0xe0007000 0x1000>;
            status = "okay";
            interrupt-parent = <0x3>;
            interrupts = <0x0 0x31 0x4>;
            clocks = <0x1 0x1a 0x1 0x23>;
            clock-names = "ref_clk", "pclk";
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            is-decoded-cs = <0x0>;
            num-cs = <0x3>;
        };

        spi@e000d000 {
            clock-names = "ref_clk", "pclk";
            clocks = <0x1 0xa 0x1 0x2b>;
            compatible = "xlnx,zynq-qspi-1.0";
            status = "okay";
            interrupt-parent = <0x3>;
            interrupts = <0x0 0x13 0x4>;
            reg = <0xe000d000 0x1000>;
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            is-dual = <0x0>;
            num-cs = <0x1>;

            flash@0 {
                compatible = "micron,n25q128";
                reg = <0x0>;
                #address-cells = <0x1>;
                #size-cells = <0x1>;
                spi-max-frequency = <0x2faf080>;

                partition@0x00000000 {
                    label = "boot";
                    reg = <0x0 0x500000>;
                };

                partition@0x00500000 {
                    label = "bootenv";
                    reg = <0x500000 0x20000>;
                };

                partition@0x00520000 {
                    label = "kernel";
                    reg = <0x520000 0xa80000>;
                };

                partition@0x00fa0000 {
                    label = "spare";
                    reg = <0xfa0000 0x0>;
                };
            };
        };

        memory-controller@e000e000 {
            #address-cells = <0x1>;
            #size-cells = <0x1>;
            status = "disabled";
            clock-names = "memclk", "aclk";
            clocks = <0x1 0xb 0x1 0x2c>;
            compatible = "arm,pl353-smc-r2p1";
            interrupt-parent = <0x3>;
            interrupts = <0x0 0x12 0x4>;
            ranges;
            reg = <0xe000e000 0x1000>;

            flash@e1000000 {
                status = "disabled";
                compatible = "arm,pl353-nand-r2p1";
                reg = <0xe1000000 0x1000000>;
                #address-cells = <0x1>;
                #size-cells = <0x1>;
            };

            flash@e2000000 {
                status = "disabled";
                compatible = "cfi-flash";
                reg = <0xe2000000 0x2000000>;
                #address-cells = <0x1>;
                #size-cells = <0x1>;
            };
        };

        ethernet@e000b000 {
            compatible = "cdns,gem";
            reg = <0xe000b000 0x1000>;
            status = "okay";
            interrupts = <0x0 0x16 0x4>;
            clocks = <0x1 0x1e 0x1 0x1e 0x1 0xd>;
            clock-names = "pclk", "hclk", "tx_clk";
            #address-cells = <0x1>;
            #size-cells = <0x0>;
            phy-mode = "rgmii-id";
            xlnx,ptp-enet-clock = <0x69f6bcb>;
            local-mac-address = [00 0a 35 00 1e 53];
        };

        ethernet@e000c000 {
            compatible = "cdns,gem";
            reg = <0xe000c000 0x1000>;
            status = "disabled";
            interrupts = <0x0 0x2d 0x4>;
            clocks = <0x1 0x1f 0x1 0x1f 0x1 0xe>;
            clock-names = "pclk", "hclk", "tx_clk";
            #address-cells = <0x1>;
            #size-cells = <0x0>;
        };

        sdhci@e0100000 {
            compatible = "arasan,sdhci-8.9a";
            status = "okay";
            clock-names = "clk_xin", "clk_ahb";
            clocks = <0x1 0x15 0x1 0x20>;
            interrupt-parent = <0x3>;
            interrupts = <0x0 0x18 0x4>;
            reg = <0xe0100000 0x1000>;
            xlnx,has-cd = <0x1>;
            xlnx,has-power = <0x0>;
            xlnx,has-wp = <0x1>;
        };

        sdhci@e0101000 {
            compatible = "arasan,sdhci-8.9a";
            status = "okay";
            clock-names = "clk_xin", "clk_ahb";
            clocks = <0x1 0x16 0x1 0x21>;
            interrupt-parent = <0x3>;
            interrupts = <0x0 0x2f 0x4>;
            reg = <0xe0101000 0x1000>;
            xlnx,has-cd = <0x1>;
            xlnx,has-power = <0x0>;
            xlnx,has-wp = <0x1>;
        };

        slcr@f8000000 {
            #address-cells = <0x1>;
            #size-cells = <0x1>;
            compatible = "xlnx,zynq-slcr", "syscon", "simple-bus";
            reg = <0xf8000000 0x1000>;
            ranges;
            linux,phandle = <0x4>;
            phandle = <0x4>;

            clkc@100 {
                #clock-cells = <0x1>;
                compatible = "xlnx,ps7-clkc";
                fclk-enable = <0x3>;
                clock-output-names = "armpll", "ddrpll", "iopll", "cpu_6or4x", "cpu_3or2x", "cpu_2x", "cpu_1x", "ddr2x", "ddr3x", "dci", "lqspi", "smc", "pcap", "gem0", "gem1", "fclk0", "fclk1", "fclk2", "fclk3", "can0", "can1", "sdio0", "sdio1", "uart0", "uart1", "spi0", "spi1", "dma", "usb0_aper", "usb1_aper", "gem0_aper", "gem1_aper", "sdio0_aper", "sdio1_aper", "spi0_aper", "spi1_aper", "can0_aper", "can1_aper", "i2c0_aper", "i2c1_aper", "uart0_aper", "uart1_aper", "gpio_aper", "lqspi_aper", "smc_aper", "swdt", "dbg_trc", "dbg_apb";
                reg = <0x100 0x100>;
                ps-clk-frequency = <0x1fca055>;
                linux,phandle = <0x1>;
                phandle = <0x1>;
            };

            pinctrl@700 {
                compatible = "xlnx,pinctrl-zynq";
                reg = <0x700 0x200>;
                syscon = <0x4>;
            };
        };

        dmac@f8003000 {
            compatible = "arm,pl330", "arm,primecell";
            reg = <0xf8003000 0x1000>;
            interrupt-parent = <0x3>;
            interrupt-names = "abort", "dma0", "dma1", "dma2", "dma3", "dma4", "dma5", "dma6", "dma7";
            interrupts = <0x0 0xd 0x4 0x0 0xe 0x4 0x0 0xf 0x4 0x0 0x10 0x4 0x0 0x11 0x4 0x0 0x28 0x4 0x0 0x29 0x4 0x0 0x2a 0x4 0x0 0x2b 0x4>;
            #dma-cells = <0x1>;
            #dma-channels = <0x8>;
            #dma-requests = <0x4>;
            clocks = <0x1 0x1b>;
            clock-names = "apb_pclk";
        };

        devcfg@f8007000 {
            clock-names = "ref_clk", "fclk0", "fclk1", "fclk2", "fclk3";
            clocks = <0x1 0xc 0x1 0xf 0x1 0x10 0x1 0x11 0x1 0x12>;
            compatible = "xlnx,zynq-devcfg-1.0";
            interrupt-parent = <0x3>;
            interrupts = <0x0 0x8 0x4>;
            reg = <0xf8007000 0x100>;
            syscon = <0x4>;
        };

        timer@f8f00200 {
            compatible = "arm,cortex-a9-global-timer";
            reg = <0xf8f00200 0x20>;
            interrupts = <0x1 0xb 0x301>;
            interrupt-parent = <0x3>;
            clocks = <0x1 0x4>;
        };

        timer@f8001000 {
            interrupt-parent = <0x3>;
            interrupts = <0x0 0xa 0x4 0x0 0xb 0x4 0x0 0xc 0x4>;
            compatible = "cdns,ttc";
            clocks = <0x1 0x6>;
            reg = <0xf8001000 0x1000>;
        };

        timer@f8002000 {
            interrupt-parent = <0x3>;
            interrupts = <0x0 0x25 0x4 0x0 0x26 0x4 0x0 0x27 0x4>;
            compatible = "cdns,ttc";
            clocks = <0x1 0x6>;
            reg = <0xf8002000 0x1000>;
        };

        timer@f8f00600 {
            interrupt-parent = <0x3>;
            interrupts = <0x1 0xd 0x301>;
            compatible = "arm,cortex-a9-twd-timer";
            reg = <0xf8f00600 0x20>;
            clocks = <0x1 0x4>;
        };

        usb@e0002000 {
            compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
            status = "okay";
            clocks = <0x1 0x1c>;
            interrupt-parent = <0x3>;
            interrupts = <0x0 0x15 0x4>;
            reg = <0xe0002000 0x1000>;
            phy_type = "ulpi";
            dr_mode = "host";
        };

        usb@e0003000 {
            compatible = "xlnx,zynq-usb-2.20a", "chipidea,usb2";
            status = "disabled";
            clocks = <0x1 0x1d>;
            interrupt-parent = <0x3>;
            interrupts = <0x0 0x2c 0x4>;
            reg = <0xe0003000 0x1000>;
            phy_type = "ulpi";
        };

        watchdog@f8005000 {
            clocks = <0x1 0x2d>;
            compatible = "cdns,wdt-r1p2";
            interrupt-parent = <0x3>;
            interrupts = <0x0 0x9 0x1>;
            reg = <0xf8005000 0x1000>;
            reset-on-timeout;
            timeout-sec = <0x2>;
        };
    };
};

另外,还需要添加以下文件来将uio驱动编译到内核中enable-uio.cfg

CONFIG_UIO=y
CONFIG_UIO_PDRV_GENIRQ=y
CONFIG_UIO_DMEM_GENIRQ=y

内核bootargs必须包括最后一部分

bootargs=console=ttyPS0,115200 root=/dev/mmcblk0p1 rw rootwait earlyprintk uio_pdrv_genirq.of_id=generic-uio

注:我的配置参考uio_dmem_genirq但它似乎不起作用。我的解决方法是使用reserved-memory条目但我没有明确验证它

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

如何通过设备树配置 uio_dmem_genirq 驱动程序 的相关文章

  • 让“git pull”在拉取不同分支时要求确认

    当同时处理许多项目和分支时 我偶尔会犯一些愚蠢的错误 比如拉入错误的分支 例如在分支上master I did git pull origin dangerous code并且有一段时间没有注意到这一点 这个小错误造成了很大的混乱 当我尝试
  • 使用 linux perf 工具测量应用程序的 FLOP

    我想使用 perf Linux 性能计数器子系统的新命令行接口命令 来测量某些应用程序执行的浮点和算术运算的数量 出于测试目的 我使用了我创建的一个简单的虚拟应用程序 请参见下文 因为我找不到任何为测量 FP 和整数运算而定义的 perf
  • 在 C 中使用 sqrtf():“未定义对‘sqrtf’的引用”

    我正在使用Linux Ubuntu 12 04 https en wikipedia org wiki Ubuntu version history Ubuntu 12 04 LTS 28Precise Pangolin 29 Precis
  • 当存在点和下划线时,使用 sed 搜索并替换

    我该如何更换foo with foo sed 只需运行 sed s foo foo g file php 不起作用 逃离 sed s foo foo g file php Example cat test txt foo bar sed s
  • 如何查找或计算Linux进程的页表大小和其他内核占用?

    我怎样才能知道 Linux 进程页表有多大 以及任何其他可变大小的进程统计 如果您真的对页表感兴趣 请执行以下操作 cat proc meminfo grep PageTables PageTables 24496 kB
  • 当我通过 shell 脚本创建 .txt 文件时,为什么文件名末尾出现问号? [复制]

    这个问题在这里已经有答案了 我正在编写一个 shell 脚本 我应该在其中创建 1 个文本文件 当我这样做时 文件名末尾出现一个问号 是什么原因 我正在 bash 脚本中尝试以下方法 1 grep ERROR a1 gt text txt
  • 如何使用 tmuxinator 在 tmux 中拆分水平窗格内的两个垂直窗格

    目前我的 tmuxinator yml 文件中有这个 windows editor layout main horizontal panes vim server rails s 这给了我两个窗口 一个用于编辑器 另一个用于服务器 在编辑器
  • 如何“grep”连续流?

    可以用吗grep在连续的流中 我的意思是有点tail f
  • Linux下的C#,Process.Start()异常“没有这样的文件或目录”

    我在使用 Process 类调用程序来启动程序时遇到问题 可执行文件的层次结构位于 bin 目录下 而当前工作目录需要位于 lib 目录下 project bin a out this is what I need to call lib
  • 在单个命令中使用前缀重命名文件夹中的所有文件

    重命名带有前缀的文件夹中的所有文件 Unix 假设一个文件夹有两个文件 a txt b pdf 那么它们都应该从一个命令重命名为 Unix a txt Unix b pdf 如果您的文件名包含没有空格并且你没有任何子目录 你可以使用一个简单
  • 有关 Linux 内存类型的问题

    关于Linux内存我有以下问题 我知道活动内存是最常访问的内存部分 但是有人可以解释一下 linux 如何考虑将内存位置用于活动内存或非活动内存 主动存储器由哪些部分组成 磁盘 文件缓存是否被视为活动内存的一部分 有什么区别Buffers
  • 如何删除树莓派的相机预览

    我在我的 raspberryPi 上安装了 SimpleCv 并安装了用于使用相机板的驱动程序 uv4l 驱动程序 现在我想使用它 当我在 simpleCV shell Camera 0 getImage save foo jpg 上键入时
  • 对 sf:: 的未定义引用

    我想用 C 制作 GUI 应用程序 发现 SFML 是一个不错的选择 幸运的是 我使用的是 Linux 所以 SFML 2 4 已经安装在我的系统上 所以我开始搜索一些教程并找到了一个制作简单窗口的教程 但是当我运行代码时 出现错误 提示未
  • 使用 sed 将 old-link-url 替换为 new-link-url

    我正在 bash 中编写一个脚本 将 old link url 替换为 new link url 我的问题是 sed 由于斜杠而无法替换 url 如果我只输入一些文字就可以了 my code sed e s old link new lin
  • /proc/PID 文件格式

    我想从中检索一些流程信息 proc目录 我的问题如下 中的文件是否有标准格式 proc PID 例如 有这个proc PID status文件与Name t ProcName在第一行 我可以在其他地方用空格代替这个文件吗 t或者类似的东西
  • 什么是标记结构初始化语法?

    struct file operations scull fops owner THIS MODULE llseek scull llseek read scull read write scull write ioctl scull io
  • 如何使用ffmpeg重叠和合并多个音频文件?

    我正在尝试将多个音频文件合并到一个文件中 但我可以使用以下命令来连接 而不是连接 ffmpeg v debug i file1 wav i file2 wav i file3 wav filter complex 0 0 concat n
  • 大会,你好世界问题

    我正在 Linux 上学习 asm noobuntu 10 04 我得到了以下代码 http asm sourceforge net intro hello html http asm sourceforge net intro hello
  • Xenomai 中的周期性线程实时失败

    我正在创建一个周期性线程 它在模拟输出上输出方波信号 我正在使用 Xenomai API 中的 Posix Skin 和 Analogy 我使用示波器测试了代码的实时性能 并查看了方波信号 频率为 1kHz 的延迟 我应该实现 250us
  • 如何在 Linux x86_64 上模拟 iret

    我正在编写一个基于 Intel VT 的调试器 由于当 NMI Exiting 1 时 iret 指令在 vmx guest 中的性能发生了变化 所以我应该自己处理vmx主机中的NMI 否则 guest会出现nmi可重入错误 我查了英特尔手

随机推荐

  • 在 Maven 测试范围中运行时,如何排除提供的范围中的依赖项?

    在 Maven 测试范围中运行时 如何排除提供的范围中的依赖项 我有一个不寻常的用例 我需要排除特定提供的实现并将其替换为测试用例中的另一个实现 Maven 测试似乎也总是包含其他范围 但就我而言 我想破例 我该怎么做呢 在某些情况下 您需
  • 如何异步等待直到我从数据库收到数据?

    我正在尝试创建可以通过屏幕访问的商店 文件结构 索引 ios js app index js app store database js app store userStore js 索引 ios js import AppRegistry
  • 如何解释无效的 CSS 行?

    我花了大约30分钟调试字体加载 https stackoverflow com q 20900218 1420197页面出现问题 我终于发现我使用了错误的注释 this is a comment font face is this igno
  • 使用 JDBC 获取所有外键

    我正在使用 postgreSQL 我正在尝试从表中获取所有外键 这是我目前正在使用的方法 public String getFKeyData String tableName int i throws SQLException Databa
  • RVM设置ruby默认,当打开新终端时删除RVM设置,返回系统ruby

    我刚买了一台新 MacBook Pro 并尝试在系统中设置 RVM 我安装了RVM并将默认设置为 rvm list default 默认 Ruby 用于新 shell ruby 1 9 3 p194 x86 64 If RVM is在 sh
  • 使用 javascript 对 html 脚本进行小修改,我无法解决[关闭]

    这个问题不太可能对任何未来的访客有帮助 它只与一个较小的地理区域 一个特定的时间点或一个非常狭窄的情况相关 通常不适用于全世界的互联网受众 为了帮助使这个问题更广泛地适用 访问帮助中心 help reopen questions 这是我的代
  • tkinter python 的全局变量问题

    我正在尝试创建一个简单的界面来访问具有第一个 最后一个 上一个和下一个功能的名称数组 但我用作位置跟踪器的全局变量不起作用 我已经提到过各种问题 非常感谢您的帮助 这是代码 from tkinter import Tk Label Entr
  • Google Maps API v3:地形图的自定义样式

    有谁知道是否可以为地形图创建自定义浮雕样式 显然 您可以为法线贴图创建自定义样式 但我也想更改地形的默认颜色渐变 非常感谢 您确实可以设置地形图的样式 我这里有一个 JSFiddle 演示了这一点 https jsfiddle net w7
  • Eclipse调试时断点错误如何解决?

    需要调试一个JAR文件 ProA 所以在项目中导入源代码 但是在尝试设置断点时 Eclipse 出现一个奇怪的错误 详情如下 Unable to install breakpoint due to missing line number a
  • 为什么 jQuery 1.9+ attr() 方法没有被弃用?

    作为一名 jQuery1 9 软件开发人员 我可以 弃用 使用attr 我日常工作中的方法 正如许多问题所表明的那样 prop 与 attr https stackoverflow com questions 5874652 prop vs
  • jQuery - 在函数之间共享变量

    这应该相当简单 我很确定我只是不明白 仅供参考 该网站使用 jQuery 在内容上运行 ajax load 在我的主父页面上 在标题中我有我的 nav load jQuery 代码
  • 如何从 cpp 文件修改 VS_VERSION_INFO

    当我去资源视图 gt myproject rc gt 版本 gt VS VERSION INFO我有可以更改的字段 可以通过cpp文件更改这些字段吗 所以我可以使用类似的东西 define FileDescription This is m
  • 在猫鼬中指定模式

    我想知道定义此模式的最佳方法是什么 Newsitem 只能有 1 个用户 ID 和 1 个任务 ID 一个任务可以属于多个新闻站点 一个用户可以属于多个新闻站点 我搜索过例子 但我想说的例子并不多 我怎样才能用 mongoose 和 mon
  • Node.js 中的 Json 到 csv

    我正在尝试在 node js 中将非常大的 json 转换为 csv 但它花费了太多时间 并且在转换时导致 100 cpu 占用 jsonToCsv function data var keys Object keys data 0 var
  • 在omniauth中命名的Rails路由

    我在routes rb中有这个 namespace api do namespace v1 do devise for users constraints format json controllers gt omniauth callba
  • 在 Eclipse 中调试时查看完整字符串

    在调试 Java 代码时 视图 变量 和 表达式 中的字符串仅显示到一定长度 之后 Eclipse 将显示 有什么方法可以检查整个字符串吗 这减轻了在各处添加日志语句进行调试的痛苦 在 变量 视图中 您可以右键单击 详细信息 窗格 显示字符
  • Firefox:从网页强制全屏模式

    我正在开发一个基于网络的数据库 需要通过firefox网络浏览器打开 因为一些css3元素 我希望页面以全屏模式自动打开 我不希望数据库的用户有权访问 Firefox 菜单项 无法完成如果您只是控制网页 网页中的控件不会导致浏览器实例本身发
  • TextEditingController 被废弃后被使用

    我创建了一个容器输入的表单 我循环遍历输入列表来创建表单 我的变量是 List fields label Strings firstName controller fnameController validator val gt Valid
  • 如何使用 Neo4jTemplate 进行合并而不是创建

    我当前正在迭代一个数组 其中每个索引包含两个节点和一个关系 Part 1 gt Part 2 并且我使用 Neo4jTemplate save 方法将其保存到数据库中 但是 某些索引具有与其他节点有关系的重复节点 Part 2 gt Par
  • 如何通过设备树配置 uio_dmem_genirq 驱动程序

    The uio dmem genirq https git kernel org pub scm linux kernel git stable linux stable git tree drivers uio uio dmem geni