Maemo Linux手机平台系列分析:(17) Maemo应用开发: GNU make 与makefile

实测有效防止colab自动断开连接 阅读详情

 

这部分的内容:

  • 什么是GNU make
  • Make是如何工作的
  • 一个简单的例子
  • 解剖makefile

·         默认目标

什么是GNU Make ?

下面我们介绍能自动编译的工具,这是很有用的。如果你对GNU make很熟悉,或者能自如的写自己的Makefile,可以跳过这里。

“make”程序是GNU 工程中一个很强大的工具,有助于实现软件开发过程的自动化编译。在使用gcc或者其它工具时,你可能经常输入同样的参数。在修改一个文件后,你会注意到你必须重新编译整个工程。这些事情用全手工的方式不是不能做,但你可以采用更好的方法。

GNU make是一个软件自动编译工具。这个就是你的助手!通过Makefile文件,你可以把所有的源文件和目标文件列出来,同时指出它们的依赖关系。Make使用文件的时间戳和我们在makefile文件中指定的一些规则来自动编译。

使用make 也可以干些其它的事情。比如,你可以很容易的创建一个能安装的目标程序;一个文档目标;有些人还使用make来更新最新的软件,等等。简而言之,make足够强大,用好它,事半功倍。

 

Make如何工作的呢?

[一个项目中不同文件中间的依赖关系]

Make的目的就是去满足设定的目标。每一个目标都有它自己的依赖。Make开始会检查所有的依赖是否存在以及是不是有一个比目标还旧的时间戳。如果是这样的话,make什么也不做,因为没有什么被修改过。

如果某个文件修改了,make将会重新编译其影响到的模块。比如,上图中的file3.c被修改过,make会重新编译file3.o, 进而编译libutil.a, 然后重新生成目标app,其它的则不会被重新编译。

[file3.c 被修改过,make时,会重新build依赖file3.c的目标和最终的程序 ]

假设我们给file1.c这个文件增加一个函数,同时修改了util.h。从上图中我们可以看到,make会重新编译file1.o,file2.o, libutil.a,main.o,app。

 

看一个简单的实际的例子

在深入了解makefile语法之前,我们先看看make干些什么事情。用一个简单的例子作为演示。

在C语言中,写header文件和source文件是很平常的事情。下面我们修改文件中的接口函数,

我们需要告诉make两点:

  • 如果一个文件内容改变了,会影响到其它文件吗?由于一个接口可以影响多个文件,所以对于每一个目标,我们需要列出其依赖文件。
  • 重新生成目标文件的命令?

如下:两个C文件和一个头文件:

/**

 * The old faithful hello world.

 *

 * This maemo code example is licensed under a MIT-style license,

 * that can be found in the file called "License" in the same

 * directory as this file.

 * Copyright (c) 2007 Nokia Corporation. All rights reserved.

 */

 

#include <stdio.h>     /* printf */

#include <unistd.h>    /* EXIT_* */

#include "hello_api.h" /* sayhello */

 

int main(int argc, char **argv) {

  sayhello();

 

  return EXIT_SUCCESS;

}

[ Contents of simple-make-files/hello.c ]

/**

 * Implementation of sayhello.

 *

 * This maemo code example is licensed under a MIT-style license,

 * that can be found in the file called "License" in the same

 * directory as this file.

 * Copyright (c) 2007 Nokia Corporation. All rights reserved.

 */

 

#include <stdio.h>     /* printf */

#include "hello_api.h" /* sayhello declaration */

 

void sayhello(void) {

  printf("Hello world!/n");

}

[ Contents of simple-make-files/hello_func.c ]

/**

 * Interface description for the hello_func module.

 *

 * This maemo code example is licensed under a MIT-style license,

 * that can be found in the file called "License" in the same

 * directory as this file.

 * Copyright (c) 2007 Nokia Corporation. All rights reserved.

 */

 

#ifndef INCLUDE_HELLO_API_H

#define INCLUDE_HELLO_API_H

/* The above is protection against circular header inclusion. */

 

/* Function to print out "Hello world!/n". */

extern void sayhello(void);

 

#endif

/* ifndef INCLUDE_HELLO_API_H */

我们可以手动写出编译的命令:

gcc -Wall hello.c hello_func.c -o hello

或者可以分为3步:

gcc -Wall -c hello.c -o hello.o

gcc -Wall -c hello_func.c -o hello_func.o

gcc -Wall hello.o hello_func.o -o hello

两种情况下,目标程序是一样的。

第一种情况下,我们让gcc一次性处理所有的源文件,并且把链接目标代码,进而把代码存入hello。

第二种情况,我们首先让gcc为每一个源文件生成一个二进制目标文件,之后再让gcc把这些目标文件链接在一块,同样把链接过的代码存储到hello中。

请注意:当gcc读取整个C源文件时,它也会读取头文件,因为在C代码中使用了“#include”预处理。

用文件可以描述上面的过程:

# define default target (first target = default)

  //定义默认目标 (第一个目标就是默认目标)

# it depends on 'hello.o' (which will be created if necessary)

# and hello_func.o (same as hello.o)

 //这个目标就依赖hello.o和hello_func.o

 

hello: hello.o hello_func.o

      gcc -Wall hello.o hello_func.o -o hello

 

// 定义hello.o目标,它依赖hello.c和hello_api.h,如果hello_api.h修改了,就会重新build这个hello.o

# define hello.o target

# it depends on hello.c (and is created from it)

# also depends on hello_api.h which would mean that

# changing the hello.h api would force make to rebuild

# this target (hello.o).

# gcc -c: compile only, do not link //-c参数:编译但不链接

hello.o: hello.c hello_api.h

      gcc -Wall -c hello.c -o hello.o

 

# define hello_func.o target

# it depends on hello_func.c (and is created from)

# and hello_api.h (since that's its declaration)

hello_func.o: hello_func.c hello_api.h

      gcc -Wall -c hello_func.c -o hello_func.o

[Makefile内容 ]

这个文件没有使用GNU make的任何变量,是非常简单的格式。后来我们会看到可以用更简短的方式实现这种相同的功能。

你可以测试一下makefile:

user@system:~$ make

gcc -Wall -c hello.c -o hello.o

gcc -Wall -c hello_func.c -o hello_func.o

gcc -Wall hello.o hello_func.o -o hello

[ 运行 make. ]

user@system:~$ ls -la

total 58

drwxr-xr-x 3  user user 456  Aug 11 15:04 .

drwxr-xr-x 13 user user 576  Aug 11 14:56 ..

-rw-r--r-- 1  user user 699  Jun 1  14:48 Makefile

-rwxr-xr-x 1  user user 4822 Aug 11 15:04 hello

-rw-r--r-- 1  user user 150  Jun 1  14:48 hello.c

-rw-r--r-- 1  user user 824  Aug 11 15:04 hello.o

-rw-r--r-- 1  user user 220  Jun 1  14:48 hello_api.h

-rw-r--r-- 1  user user 130  Jun 1  14:48 hello_func.c

-rw-r--r-- 1  user user 912  Aug 11 15:04 hello_func.o

[ 运行make之后生成的文件. ]

user@system:~$ ./hello

Hello world!

[执行程序. ]

 

解剖 makefile

从上面的简单例子,我们可以减少一些Make语法。

下面是我们可以学习的规则:

  • 注释是用“#”字符开始的。在读取makefile时,会忽略#号以及其后面的部分,知道该行结束。
  • 反斜杠/可以用来续行。在makefile中最重要的是美元$符号,用来访问变量的内容。
  • 空行会被忽略的。
  • 一行以第0列开始,并且包含一个冒号:。冒号左边是命令,即目标;冒号右边指定的任何文件名都是目标的依赖。它们被称之为先决条件
  • 以tab空行开始的行是生成目标的命令集合。

使用这些规则,我们现在可以简化makefile如下:

  • 当hello的先决条件之一有一个发生了改变,都会重新生成hello目标。
    gcc -Wall hello.o hello_func.o -o hello
  • 如果hello.c或者hello_api.h改变了,make会重新生成hello.o
  • 如果hello_func.c或者hello_api.h改变了,Make会重新生成hello_func.o

 

默认目标

注意,我们需要告诉make:当没有任何命令行参数时,如何保证生成目标.

在makefile中,第一个目标就是默认目标。一个目标会achieves一些higher-level目标(就像把所有的组件链接为最终的程序)。

注意,就像魔术一样,make会自动获取不同组件之间的依赖关系,然后推导出创建hello的顺序,同时也会产生hello.o和hello_func.o。make会在需要时重新生成缺少的预置条件。

由于hello的预置条件不存在,而且hello是默认的目标程序,所以make会首先生成hello依赖的文件。你可以这样验证这个过程:不加任何命令运行make。你会看到命令的执行顺序,首先生成默认目标的先决条件,最后才生成hello目标程序。

user@system:~$ make

gcc -Wall -c hello.c -o hello.o

gcc -Wall -c hello_func.c -o hello_func.o

gcc -Wall hello.o hello_func.o -o hello

 

makefiles的名字

对于makefile的名字,我们推荐Makefile。这种名字不是GNU第一个尝试打开的文件,但它是最具移植性的一个。事实上,make尝试打开的顺序是:GNUMakefile, Makefile,最后才是makefile。

除非你确认你的makefile不能在别的系统上正常工作,否则你不要使用GNUMakefile。我们将使用Makefile。用Makefile而不用makefile主要是因为排序问题。在ASCII中,大写字母是在小写字母前面的。

当然你可以用-f参数强制指定make去读取哪个文件。

 

问题:

基于你的常识,运行make后,如果做下面的事情呢?

  • 如何删除hello文件?
  • 如何删除hello.o文件?
  • 正在修改 hello_func.c?
  • 正在修改hello.c?
  • 正在修改hello_api.h?
  • 正在删除Makefile?

可以考虑一下上面的问题。

 

增加make的目标

有时候,我们添加一些这样的目标:并不生成什么文件,而是执行一系列的命令。这种目标是非常有用的,比如clean。这种手法在makefile中是很常用的。这种目标叫做“伪目标”。

下面看一个例子:

# add a cleaning target (to get rid of the binaries)

 

# define default target (first target = default)

# it depends on 'hello.o' (which must exist)

# and hello_func.o

hello: hello.o hello_func.o

      gcc -Wall hello.o hello_func.o -o hello

 

# define hello.o target

# it depends on hello.c (and is created from)

# also depends on hello_api.h which would mean that

# changing the hello.h api would force make to rebuild

# this target (hello.o).

# gcc -c: compile only, do not link

hello.o: hello.c hello_api.h

      gcc -Wall -c hello.c -o hello.o

 

# define hello_func.o target

# it depends on hello_func.c (and is created from)

# and hello_api.h (since that's it's declaration)

hello_func.o: hello_func.c hello_api.h

      gcc -Wall -c hello_func.c -o hello_func.o

 

# This is the definition of the target 'clean'

# Here we'll remove all the built binaries and

# all the object files that we might have generated

# Notice the -f flag for rm, it means "force" which

# in turn means that rm will try to remove the given

# files, and if there are none, then that's ok. Also

# it means that we have no writing permission to that

# file and have writing permission to the directory

# holding the file, rm will not then ask for permission

# interactivelly.

这个就是伪目标,主要是执行一些命令,在运行Make时,可以加上,

比如:make clean; 就是执行删除操作。

clean:

      rm -f hello hello.o hello_func.o

有时候,我们不用默认的makefile文件,可以用一个参数-f指定:

user@system:~$ make -f Makefile.2

gcc -Wall -c hello.c -o hello.o

gcc -Wall -c hello_func.c -o hello_func.o

gcc -Wall hello.o hello_func.o -o hello

[ 告诉make使用Makefile.2作为makefile文件. ]

我们可以在make后面指定目标,这样可以不编译默认目标:

user@system:~$ make -f Makefile.2 clean

rm -f hello hello.o hello_func.o

[ 测试clean目标. ]

user@system:~$ ls -la

total 42

drwxr-xr-x 3  user user 376  Aug 11 15:08 .

drwxr-xr-x 13 user user 576  Aug 11 14:56 ..

-rw-r--r-- 1  user user 699  Jun 1  14:48 Makefile

-rw-r--r-- 1  user user 1279 Jun 1  14:48 Makefile.2

-rw-r--r-- 1  user user 150  Jun 1  14:48 hello.c

-rw-r--r-- 1  user user 220  Jun 1  14:48 hello_api.h

-rw-r--r-- 1  user user 130  Jun 1  14:48 hello_func.c

[ 运行过clean后,就没有中间文件和目标程序了. ]

 

 

PHONY伪关键字

假设,由于某种原因,一个叫clean的文件出现在我们准备运行make的目录中,如果此时我们还携带clean参数的话,make将会误认为clean目标早已存在,不会运行我们预先写好的rm指令。很显然,我们需要避免这种情况。这种情况下,GNU make提供了一个特殊的目标,叫做.PHONY, 我们把实际的伪目标作为.PHONY的依赖。这就告诉make,不要把一个clean文件名当作伪目标的结果。

实际上,多数开源项目都这么使用make。

示例makefile如下:

 

hello: hello.o hello_func.o
	gcc -Wall hello.o hello_func.o -o hello

hello.o: hello.c hello_api.h
	gcc -Wall -c hello.c -o hello.o

hello_func.o: hello_func.c hello_api.h
	gcc -Wall -c hello_func.c -o hello_func.o

.PHONY: clean
clean:
	rm -f hello hello.o hello_func.o

 

[ Using .PHONY (simple-make-files/Makefile.3) ]


指定一个默认的目标

我们知道make把第一个目标当作它的默认目标。如果我们想明确指定默认目标,如何能达到这个目的呢?

我们创建一个新的伪目标,并且把想要的目标当作这个伪目标的先决条件,这里你可以设用任何名字作为你的目标,不过all是一个非常通用的名字,这里我们就用它了。

你所要记住的一件事:这个all目标,就是在makefile中的第一个目标。如下:

.PHONY: all
all: hello

hello: hello.o hello_func.o
	gcc -Wall hello.o hello_func.o -o hello

hello.o: hello.c hello_api.h
	gcc -Wall -c hello.c -o hello.o

hello_func.o: hello_func.c hello_api.h
	gcc -Wall -c hello_func.c -o hello_func.o

.PHONY: clean
clean:
	rm -f hello hello.o hello_func.o

 

[ Explicit default goal (simple-make-files/Makefile.4) ]

 


其它通用的伪目标

在项目中,你将会遇到许多其它的伪目标,其中包括如下一些:

 

  • install: install的先决条件是软件应用二进制文件。这个命令会指定软件的安装路径。
  • distclean: 类似于clean, 为了清除一些目标文件,主要是为了清除一些有自动工具生成的中间文件。
  • package: 它的先决条件与install的相同,但是不安装,仅仅是打一个包。这个包可以用于发布软件。


makefile中的变量

到目前为止,我们都是直接在makefile中明确指定要编译哪些文件。不过这种方式是很繁琐的。如果用一些变量,就会使得makefile有趣多了。有些程序把makefile中的变量称作宏。


变量的习惯。

在makefile中使用的变量有两种基本类型。一种是recursive。就是前面定义一个宏变量,后面在引用处直接替代掉。另外一种是simple, 就是这个变量的内容仅仅被执行一次。

Recursive 变量

写recursive variables的原则:

  • 名字必须包含ASCII 字符和下划线。
  • 一般大写。
  • 长行可以使用反斜杠(/)分开,注意在反斜杠后面不要有任何空格。

 

We'll re-use the same makefile as before, but introduce some variables. You will also see the syntax on how to define the variables and how to use them (reference them):

 

# define the command that we use for compilation
CC = gcc -Wall

# which targets do we want to build by default?
# note that 'targets' is just a variable, its name
# does not have any special meaning to make
targets = hello

# first target defined will be the default target
# we use the variable to hold the dependencies
.PHONY: all
all: $(targets)

hello: hello.o hello_func.o
	$(CC) hello.o hello_func.o -o hello

hello.o: hello.c hello_api.h
	$(CC) -c hello.c -o hello.o

hello_func.o: hello_func.c hello_api.h
	$(CC) -c hello_func.c -o hello_func.o

# we'll make our cleaning target more powerful
# we remove the targets that we build by default and also
# remove all object files
.PHONY: clean
clean:
	rm -f $(targets) *.o

 

[ The makefile with some variables (simple-make-files/Makefile.5) ]

 

CC 变量是标准的变量,用来表示编译器的命令。


Simple variables

Suppose you have a makefile like this:

 

CC = gcc -Wall

# we want to add something to the end of the variable
CC = $(CC) -g

hello.o: hello.c hello_api.h
	$(CC) -c hello.c -o hello.o

 

上面会陷入无穷循环。

 

How do we correct this? make actually provides two mechanisms for this. This is the solution with simple variables:

 

CC := gcc -Wall

# we want to add something to the end of the variable
CC := $(CC) -g

hello.o: hello.c hello_api.h
	$(CC) -c hello.c -o hello.o

 

我们注意到:等号变成了:=。这就是simple变量。无论合适引用simple变量,make仅仅替代文本,而不执行它。

 

另外一种方式:= --> +=,我们一般常用这种方式。

 

 

CC = gcc -Wall

# we want to add something to the end of the variable
CC += -g

hello.o: hello.c hello_api.h
	$(CC) -c hello.c -o hello.o

 

 


自动变量,这是在makefile中大量使用的。

make预定义了一组变量,可以避免大量的打字工作,下面是最有用的一些:

  • $< : 表示第一个先决条件.
  • $^ : 所有的先决条件.
  • $@ : 目标.
  • $? : 列出比目标文件新的一些先决条件。

 

By rewriting our makefile using automatic variables we get:

 

# add the warning flag to CFLAGS-variable
CFLAGS += -Wall

targets = hello

.PHONY: all
all: $(targets)

hello: hello.o hello_func.o
	$(CC) $^ -o $@            // $(CC) hello.o hello_func.o -o hello

hello.o: hello.c hello_api.h
	$(CC) $(CFLAGS) -c ___FCKpd___6lt; -o $@   // $(CC) $(CFLAGS) -C hello.c -o hello.o 

hello_func.o: hello_func.c hello_api.h
	$(CC) $(CFLAGS) -c ___FCKpd___6lt; -o $@    // $(CC) $(CFLAGS) -c hello_func.c -o hello_func.o 

.PHONY: clean
clean:
	$(RM) $(targets) *.o

 

[ Contents of simple-make-files/Makefile.9 ]

 

 

同pkg-config一块使用

现在你可以写简单的Makefile了,下面我们开始使用pkg-config,这可是一个很常用的参数,用于指定Header file和Lib的路径。我们使用一个GNU make的函数:$(shell command params) : 

# define a list of pkg-config packages we want to use
pkg_packages := gtk+-2.0 hildon-1   #### 这里定义pc文件: gtk+-2.0.pc hildon-1.pc

# get the necessary flags for compiling
PKG_CFLAGS := $(shell pkg-config --cflags $(pkg_packages)) #### 替换
# get the necessary flags for linking
PKG_LDFLAGS := $(shell pkg-config --libs $(pkg_packages))  #### 替换

# additional flags
# -Wall: warnings
# -g: debugging
ADD_CFLAGS := -Wall -g

# combine the flags (so that CFLAGS/LDFLAGS from the command line
# still work).
CFLAGS  := $(PKG_CFLAGS) $(ADD_CFLAGS) $(CFLAGS)
LDFLAGS := $(PKG_LDFLAGS) $(LDFLAGS)

targets = hildon_helloworld-1

.PHONY: all
all: $(targets)

hildon_helloworld-1: hildon_helloworld-1.o
	$(CC) $^ -o $@ $(LDFLAGS)

hildon_helloworld-1.o: hildon_helloworld-1.c
	$(CC) $(CFLAGS) -c ___FCKpd___7lt; -o $@

.PHONY: clean
clean:
	$(RM) $(targets) *.o

 

[ Contents of simple-make-files/Makefile.10 ]

 

 

An up-to-date manual for GNU make can be found in http://www.gnu.org/software/make/manual/make.html

 

IPMItool 控制风扇转速 然后手动设置风扇,最后一位0x1e为设置30%的转速(16进制)。最后4位 0x0f 表示15%,0x0a,表示10%,不建议小于10%,因为10%已经很静音了 如果再小怕不能控温,烧毁硬件。首先停止服务器的自动风扇控制,最后一位0x00表示停止自动风扇控制,0x01为开启自动风扇控制。首先开启主板上的ipmi 设置好 用户名密码。此过程可以在网上搜索,有很多的资料可以参考。解压只有在目录里面有ipmltool。下面是一些常用的修改温度命令。 阅读详情

相关推荐

单相变换器的二次纹波分析

1. 单相PWM整流器的二次纹波产生原因   单相变换器的二次纹波产生的原因是功率含有二次脉动分量。设电网电压 us=Vmsin(wt),电网电流IL=Imsin(wt−θ)I_L=I_msin(wt-\theta)IL​=Im​sin(wt−θ)。其中w是电网电压披绿,θ\thetaθ是电流之后电压相位。保证输入功率和输出功率相等,就要保证两者的直流量和交流量对应相等。   uDu_DuD​为 PWM 整流器直流电容电压平均值,IoI_oIo​ 为负载电流平均值 ,uDC^\widehat {u_{DC}

qq_38847810的博客 4973

GNU make系列之写Makefile文件(1)

默认的,当make程序寻找Makefile的时候,它会按照:GNUmakefile,makefile,Makefile的顺序来找。GNUmakefile这个名字不推荐使用,当一个makefile文件不能被其他版本的make程序执行的时候,你可以将一个makefile文件指定为GNU make。如果你想要使用一个不好理解的名字作为Makefile的名字,你可以使用" -f " 或 “–file” 指定特定的Makefile文件。Makefile使用基于行的语法,其中换行符是特殊的,用来标记语句的结尾。

StayAlive1887的博客 706

ROS2前置基础教程 | 小鱼教你用CMake依赖查找流程

上面我们用g++、make、cmake三种方式来编译ros2的C++节点。用cmake虽然成功了,但是CMakeLists.txt的内容依然非常的臃肿,我们需要将其进一步的简化。将上面的CmakLists.txt改成下面的样子 接着继续生成和编译 是不是非常的神奇,为什么可以浓缩成那么短的几句指令呢?find_package查找路径对应的环境变量如下。 打开终端,输入指令: 结果 观察PATH变量,你会发现赫然在其中,中的路径如果以或结尾,则自动回退到上一级目录,接着检查这些目录下的 cmake找到这些目录

生活不止眼前的苟且 7162

Maemo Linux手机平台系列分析:11 Maemo平台开发之 异步GConf

  异步GConf 用GConf来监视变化 当监视对象发生变化时,用GConf给通知 用GConf来监视对象的改变在Maemo中,GConf是主要的用于存储一些设置参数的底层软件。下面,我们将会看到如何去扩展GConf,使它能够更适合于异步方式工作,特别是实现一些服务时,如果把握GConf的使用。 这些情况下需要使用GConf: 1 你的服务

Linux智能手机--cuijpus的专栏 1202

【物联网毕设】多模态智能门禁系统设计(STM32+人脸识别+蓝牙联动)

本文详细介绍了基于STM32的多模态智能门禁系统设计,整合了人脸识别、蓝牙联动、RFID和密码等多种开锁方式。文章从硬件选型、电路设计、嵌入式软件编程到手机APP开发,提供了完整的毕设实现方案与调试指南,帮助物联网与嵌入式方向的学生构建一个功能全面、可扩展的智能门禁系统。

rain6的博客 248

Elsevier投稿实战:从ESWA模板到录用通知的全流程拆解

本文详细拆解了Elsevier旗下期刊ESWA(Expert Systems With Applications)的投稿全流程,从模板选择、投稿系统操作到审稿意见回复和录用后注意事项。重点分享了单栏LaTeX模板调整、APA文献格式处理、Highlights撰写技巧等实战经验,帮助研究者高效完成投稿并提升录用概率。

weixin_32715349的博客 246

Maemo Linux手机平台系列分析:1 技术概览

QA: Q:为什么去分析Maemo平台呢?A:分析一个平台是为了掌握它,吸收有用的东西为我所用。 Q:为什么选择Maemo平台呢?A:Linux手机平台目前主要有ALP,Maemo, LiMo, Android, etc. (欢迎大家补充J)目前不少都是打着开源的旗号的,但是公开的力度不同:ALP目前仅仅公开了其Hilker部分;Maemo全部公开;Li

Linux智能手机--cuijpus的专栏 4233

Jetson Nano 【1】入手开箱、烧系统

类似于半开箱哈哈 怀着小期待的心情,屁颠屁颠跑到村口领快递,拿到了这个香喷喷的Jetson Nano 开发板 开箱: 由于太激动了忘记拍点啥,于是在最后留了张全家福 板子的结构: 我觉得这个有必要记录一下,于是去官方文档拿了张图来:官方文档传送 1=SD card 的卡槽,位于第二层板子的背部,也就是大风扇屁股位置 2=40针扩展接头(还没开用) 3=USB的供电口,根据大佬测试(某哩...

椰子奶糖的博客 4196

maemo sdk 搭建(官方转载)

http://wiki.maemo.org/Maemo_5_Final_SDK_%E5%AE%89%E8%A3%85%E6%8C%87%E5%8D%97Maemo 5 Final SDK 安装指南Contents [hide]1 介绍1.1 Maemo SDK没有包含的内容2 通过图形界面的安装程序安装Maemo 5 SD

liucheng2009的专栏 1711

Qwen-Image LoRA训练实战:从数据准备到异常修复的全流程解析

本文详细解析了Qwen-Image LoRA训练的全流程,从数据准备到参数优化再到异常修复。通过实战案例展示了如何利用LoRA技术微调Qwen-Image模型,提升中文场景下的图像生成质量,特别针对手脚生成异常等问题提供了有效解决方案。文章还分享了中文提示词优化技巧和高级训练方法,帮助开发者高效训练出高质量的LoRA模型。

lemon的博客 967

保姆级教程:STM32CubeMX配置PWM死区与刹车功能,防止电机驱动炸管

本文详细解析了使用STM32CubeMX配置PWM死区与刹车功能的完整流程,帮助工程师避免电机驱动中的炸管风险。通过深入讲解死区时间计算公式、CubeMX配置界面及刹车功能的安全机制,结合实际电路设计要点和调试技巧,为电机驱动和电源转换应用提供可靠解决方案。

weixin_42550597的博客 346

Maemo Linux手机平台分析系列:3 安装Maemo平台宿主Linux系统

 我们大多数单个主机都用的是Windows, 如果为了研究Maemo,还要把Windows的某个分区格式化,然后安装Linux,好像动静大了点。而且我们看文档一般习惯于在windows下面。用vmware可以解决这问题:在windows上安装vmware, 然后在vmware中安装Linux. 这样就不必离开windows了,而且可以在windows和Linux之前方便的切换。

Linux智能手机--cuijpus的专栏 6410

RK+linux教程:RK3588 RGA硬件加速在YOLOv5图像预处理中的深度应用教程

摘要: 本教程深入解析了RK3588芯片的RGA硬件加速器在YOLOv5图像预处理中的应用。通过专用硬件设计,RGA支持图像缩放、边界填充等核心操作,结合零拷贝技术显著提升处理效率。重点分析了LetterBox算法的RGA实现,包括参数计算、边界填充和性能优化,并与传统CPU处理对比,展示了RGA在高分辨率图像处理中的优势。教程还提供了统一的预处理接口设计,便于在OpenCV与RGA方案间灵活切换,为RK3588平台的深度学习部署提供实用优化方案。

LXY_LOVE36的博客 977

Maemo Linux手机平台系列分析:(15) Maemo应用开发

 Maemo应用开发              前面的几篇文章介绍了Maemo平台中比较底层的东西:链接:Maemo Linux手机平台系列分析:Maemo平台开发 (6~14)http://blog.youkuaiyun.com/cuijpus/archive/2008/01/30/2073962.aspxhttp://blog.youkuaiyun.com/cuijpus/archive/

Linux智能手机--cuijpus的专栏 1531

jre9下载 jdk9

(Java SE Runtime Environment 9.0) 9.0u175 官方最新版 【x86|x64】

android 蓝牙通讯demo

android 下蓝牙通讯demo,实现了发现蓝牙,使能蓝牙,通过蓝牙发送消息。

Maemo中使用autoconf, automake, configure等autotools。

可能大家在Linux下面开发2~3年之后,还是没有仔细用过autotools. 大家可能是直接使用、改造开源项目原先写好的makefile.am, configure等,而没有自己从头到脚写一遍。把这几个工具用的熟练些,对于移植目前的开源项目有不小的帮助。 在Maemo中,有个详细的文档,介绍autotools:http://maemo.org/maemo_training_m

Linux智能手机--cuijpus的专栏 2036

VC中sqlite的使用

在VC中对sqlite的使用,实现数据库大批数据的快速插入,读取数据库中的数据在ListCtrl中显示

构建Maemo软件包

 Maemo是Nokia开发的新一代手机操作系统,基于开源的Linux内核。为了更进一步的简化用户操作,Maemo在Debian的APT包管理系统之上,提供了一个非常简单易用的前端程序Application Manager。这里将简单介绍如何创建能够用于Maemo的软件包。假设我们的源码包括一个main.c文件和一个Makefile文件,存放到一个名为“hellodebia

Xizhi Zhu的博客 1736

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

maemo教程

http://maemo.org/development/documentation/tutorials/maemo_4-0_tutorial/#development

QuietHeart的专栏 742

Maemo系统介绍

Maemo 是构建于桌面开源组件的计算机架构平台,其目标是为移动手持终端提供一种应用和创新技术。 该平台基于GNU/Linux 操作系统和GNOME 桌面技术。Maemo 向开发伙伴们提供了一个方便实用的开发环境。其全新、优化,且不断演进的Hildon UI 专为触摸屏手持终端的屏幕大小和典型用途而作了优化。这一开发平台面向那些为移动领域开发应用和新技术的创新开发伙伴和创新型机构。用maemo ...

jianhai1229的博客 509

Maemo Linux手机平台系列分析:12 分析其Platform后,再回头整体看看Maemo

  Maemo 平台概述 为何开始maemo 平台开发? SDKs 和工具 文档和指南 maemo.org 诺基亚论坛maemo 开发伙伴服务 代表性终端 Maemo 平台概述Maemo 是构建于桌面开源组件的计算机架构平台,其目标是为移动手持终端提供一种应用和创新技术。该平台基于GNU/

Linux智能手机--cuijpus的专栏 2631

MeeGo的架构

  MeeGo-OS Middleware 1.Comms Services (1)Connection Mgmt---connman http://connman.net/ The ConnMan project provides a daemon for managing internet connections within embedded devices running...

Ackerman's Blog 465

不同系统多媒体架构对比

android 多媒体架构 maemo多媒体架构(诺基亚N800等) 三星Tizen多媒体架构

sundaygeek的专栏 685

在Ubuntu 9.10上搭建Maemo 5及Qt 4开发环境

 Maemo是Linux的一个嵌入式发行版,支持ARM构架,其开发环境自然是桌面Linux了。由于Maemo使用了Debian包管理系统,所以最好还是在Debian或者Ubuntu上搭建开发环境了(目前支持X86和ARM两个构架)。为了简化开发,推荐使用Scratchbox作为沙盒,该软件能够很好的虚拟Maemo环境以便于调试,并提供了很好的跨平台编译支持。如果你没有Linux环境

Xizhi Zhu的博客 3292

Maemo Linux手机平台系列分析:(14) Maemo平台开发之 设计D-Bus server时要注意的若干问题

  设计D-Bus server时要注意的若干问题  Server的定义 精灵化,后台化 事件循环和电量消耗 支持并行处理能力 调试Server的定义就软件而言,server一般理解成:能为client提供服务的软件组件。在Linux中,server一般是daemon的形式运行的。Daemon 是一个术语:daemon是

Linux智能手机--cuijpus的专栏 1615

理解 Linux 动态库加载:LD_LIBRARY_PATH

flyfish

二分掌柜的 380

Linux-iostat命令详解

Linux命令学习记录

m0xin的博客 128

USB 技术系列 11 · USB Linux 驱动框架

本文系统解析Linux USB驱动框架,涵盖USB Core、HCD(xhci-hcd/dwc3)、类驱动(CDC/HID/Mass Storage)分层架构,详解usb_device_id匹配、probe/disconnect生命周期及Device Tree配置。结合RISC-V N300实战,揭示Host/Device双模式驱动开发核心逻辑,助力嵌入式BSP开发者掌握USB子系统全栈能力。

peter_pan_study的博客 261
上一篇: TouchFlo的一次重要升级:TouchFlo 3D, HTC 发布与3G版iPhone抗衡的Diamond手机。
下一篇: 手机触摸竞争日渐升级!
testhw
博客等级 码龄19年 172粉丝 183原创
评论 2
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值