uboot主Makefile中的origin函式

2022-08-24 05:54:13 字數 649 閱讀 6522

ifdef o

ifeq ("$(origin o)", "command line")

build_dir := $(o)

endif

endif

這裡主要說明origin的語法:

origin函式不像其它的函式,他並不操作變數的值,他只是告訴你你的這個變數是**來的?其語法是:

$(origin ;)

注意,;是變數的名字,不應該是引用。所以你最好不要在;中使用「$」字元。origin函式會以其返回值來告訴你這個變數的「出生情況」,下面,是origin函式的返回值:

「undefined」

如果;從來沒有定義過,origin函式返回這個值「undefined」。

「default」

如果;是乙個預設的定義

「environment」

如果;是乙個環境變數,並且當makefile被執行時,「-e」引數沒有被開啟。

「file」

如果;這個變數被定義在makefile中。

「command line」

如果;這個變數是被命令列定義的。

「override」

如果;是被override指示符重新定義的。

「automatic」

如果;是乙個命令執行中的自動化變數。

U boot移植之配置編譯Makefile分析

前面兩篇文章主要是有乙個感性的認識,用的官網提供的補丁,沒有過多的提及u boot內部的細節,用的是u boot 1.1.6。從這篇文章開始才是真正意義上的移植u boot,基於u boot 2009.11。我將按照以下幾個步驟分析makefile 一 makefile重要變數一覽表,刪除makef...

u boot啟動之Makefile結構分析

先進行配置命令 make smdk2410 config在makefile檔案中 smdk2410 config unconfig mkconfig config arm arm920t smdk2410 null s3c24x0因此mkconfig檔案中會傳入如下引數 parameters tar...

09 uboot的配置編譯主過程分析

在orangepi sdk目錄下 uboot的配置過程 make config uboot 配置uboot 1 當前目錄的makefile 26 phony config uboot 27 config uboot 28 echo config uboot 29 pwd script config ...