1. 程式人生 > >petalinux 裝置樹驅動GPIOLED

petalinux 裝置樹驅動GPIOLED

不知道是不是自己的 petalinux 16.4 版本或者是安裝問題

在petalinux-config -get-hw     工程目錄下面找不到裝置樹增加不了裝置樹節點無限鬱悶

subsystems/linux/configs/device-tree/system-top.dts

嘗試用root來建立工程 匯入硬體資訊 petalinux-config 就直接提示不能用root許可權的錯誤

[INFO] generating u-boot configuration files                                        
[INFO] generating kernel configuration files
[INFO] generating kconfig for Rootfs
ERROR:  OE-core's config sanity checker detected a potential misconfiguration.
    Either fix the cause of this error or at your own risk disable the checker (see sanity.conf).
    Following is the list of potential problems / advisories:
    Do not use Bitbake as root.
Summary: There was 1 ERROR message shown, returning a non-zero exit code.
ERROR: bitbake failed to generate dot graph for petalinux-image
ERROR: Failed to config project.
ERROR: Get hw description Failed!.

真是醉了  

/home/vision/workspace/linuxled/project-spec/meta-user/recipes-dt 目錄下找到個檔案開啟後

SRC_URI_append ="\
    file://system-top.dts\
"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"

看手冊的意思就是在這裡可以新增自己的裝置樹,新手真愛生命,不想在折騰了,原本還想嘗試在petalinux 下嘗試編譯,結果一個

petalinux-build -c leddriver -x do_build 簡直就是等到天荒地老 感覺,足足等了十幾分鍾,刪除了一箇中斷函式提示報錯。看來這個工具只適合最後的驅動和應用的整合

絕不是一個好的開發環境,還得重新搭建nfs網路檔案系統,本地安裝交叉編譯來得快,SDK在安裝了petalinux的情況下可以很好的編譯應用。驅動這塊兒就酷斃了。