转载:

http://permalink.gmane.org/gmane.linux.kbuild.devel/8755

This rules are useful for appended device tree conforming to the CONFIG_ARM_APPENDED_DTB kernel option.

The rule dtbImage.<dt> is actually just a:
cat zImage <dt>.dtb > dtbImage.<dt> The dtbuImage.<dt> makes an uImage out of the dtbImage.<dt> file. KernelVersion: v3.6-rc5
Signed-off-by: Richard Genoud <richard.genoud <at> gmail.com>
---
arch/arm/Makefile | 30 ++++++++++++++++--------------
arch/arm/boot/Makefile | 11 +++++++++++
scripts/Makefile.lib | 6 ++++++
3 files changed, 33 insertions(+), 14 deletions(-) diff --git a/arch/arm/Makefile b/arch/arm/Makefile
index 30eae87..c5f2673 100644
--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
<at> <at> -278,7 +278,7 <at> <at> archprepare:
# Convert bzImage to zImage
bzImage: zImage -zImage Image xipImage bootpImage uImage: vmlinux
+zImage Image xipImage bootpImage uImage dtbImage.% dtbuImage.% : vmlinux
$(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $(boot)/$ <at> zinstall uinstall install: vmlinux
<at> <at> -300,17 +300,19 <at> <at> i zi:; $(Q)$(MAKE) $(build)=$(boot) MACHINE=$(MACHINE) $ <at> define archhelp
- echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
- echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
- echo '* xipImage - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)'
- echo ' uImage - U-Boot wrapped zImage'
- echo ' bootpImage - Combined zImage and initial RAM disk'
- echo ' (supply initrd image via make variable INITRD=<path>)'
- echo ' dtbs - Build device tree blobs for enabled boards'
- echo ' install - Install uncompressed kernel'
- echo ' zinstall - Install compressed kernel'
- echo ' uinstall - Install U-Boot wrapped compressed kernel'
- echo ' Install using (your) ~/bin/$(INSTALLKERNEL) or'
- echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
- echo ' install to $$(INSTALL_PATH) and run lilo'
+ echo '* zImage - Compressed kernel image (arch/$(ARCH)/boot/zImage)'
+ echo ' Image - Uncompressed kernel image (arch/$(ARCH)/boot/Image)'
+ echo '* xipImage - XIP kernel image, if configured (arch/$(ARCH)/boot/xipImage)'
+ echo ' uImage - U-Boot wrapped zImage'
+ echo ' bootpImage - Combined zImage and initial RAM disk'
+ echo ' (supply initrd image via make variable INITRD=<path>)'
+ echo ' dtbs - Build device tree blobs for enabled boards'
+ echo ' dtbImage.<dt> - zImage with an appended device tree blob'
+ echo ' dtbuImage.<dt> - uImage with an embedded device tree blob'
+ echo ' install - Install uncompressed kernel'
+ echo ' zinstall - Install compressed kernel'
+ echo ' uinstall - Install U-Boot wrapped compressed kernel'
+ echo ' Install using (your) ~/bin/$(INSTALLKERNEL) or'
+ echo ' (distribution) /sbin/$(INSTALLKERNEL) or'
+ echo ' install to $$(INSTALL_PATH) and run lilo'
endef
diff --git a/arch/arm/boot/Makefile b/arch/arm/boot/Makefile
index c877087..35c01a8 100644
--- a/arch/arm/boot/Makefile
+++ b/arch/arm/boot/Makefile
<at> <at> -98,6 +98,17 <at> <at> $(obj)/bootpImage: $(obj)/bootp/bootp FORCE
$(call if_changed,objcopy)
<at> echo ' Kernel: $ <at> is ready' +# dtbImage.% - a dtbImage is a zImage with an appended device tree blob
+$(obj)/dtbImage.%: $(obj)/zImage $(obj)/%.dtb FORCE
+ $(call if_changed,cat)
+ <at> echo ' Kernel: $ <at> is ready'
+
+# dtbuImage.% - a dtbuImage is a uImage with an embedded device tree blob
+$(obj)/dtbuImage.%: $(obj)/dtbImage.% FORCE
+ <at> $(check_for_multiple_loadaddr)
+ $(call if_changed,uimage)
+ <at> echo ' Image $ <at> is ready'
+
PHONY += initrd FORCE
initrd:
<at> test "$(INITRD_PHYS)" != "" || \
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 0be6f11..8550466 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
<at> <at> -235,6 +235,12 <at> <at> cmd_ld = $(LD) $(LDFLAGS) $(ldflags-y) $(LDFLAGS_$( <at> F)) \
quiet_cmd_objcopy = OBJCOPY $ <at>
cmd_objcopy = $(OBJCOPY) $(OBJCOPYFLAGS) $(OBJCOPYFLAGS_$( <at> F)) $< $ <at> +# Cat
+# ---------------------------------------------------------------------------
+
+quiet_cmd_cat = CAT $ <at>
+cmd_cat = (cat $(filter-out FORCE,$^) > $ <at> ) || (rm -f $ <at> ; false)
+
# Gzip
# --------------------------------------------------------------------------- --

转载:

https://www.osadl.org/Single-View.111+M5297463051f.0.html

How can I boot a recent kernel?

Yes, some vendors still ship bootloaders without device tree support, since their vendor kernel does not know what a device tree is and, thus, the bootloader neither does. But, fortunately, kernel developers are aware of it and implemented the

CONFIG_ARM_APPENDED_DTB

feature. What is this?

Append the device tree to the kernel

Since the bootloader loads the kernel into memory without asking any questions, we can fool the bootloader by making the kernel a little larger and append the device tree at its end. During the first steps of kernel initialization, the device tree is searched for at the end of the regular kernel code and used as if it had been loaded separately.

How do I prepare the kernel for this procedure?

In any case, CONFIG_ARM_APPENDED_DTB=y must be configured. If zImage is used to boot, simply execute

cd /usr/src/kernels/your-linux-tree
cd arch/your-arch/boot
cat zImage dts/your-device-tree.dtb >zImage-with-dtb

after having compiled the kernel as usual. If the uImage format is needed, you still have to execute the above commands. In addition, create a uImage file based on the combined zImage kernel as follows

cp zImage zImage-without-dtb
cp zImage-with-dtb zImage
cd -
make LOADADDR=$YOUR_LOADADDR ARCH=your-arch uImage
cd -
cp zImage-without-dtb zImage

and let the bootloader load the uImage file that now contains both the kernel and device tree.

Check for the correct model string

If everything worked correctly, you should see a line

Machine: Your generic board (Flattened Device Tree), model: your model string

that corresponds to the related setting in your
device tree. This line is one of the first output lines after the kernel
started execution.

[PATCH] ARM: add dtbImage.<dt> and dtbuImage.<dt> rules的更多相关文章

  1. to_datetime 以及 dt.days、dt.months

    Series类型的数据,经过 to_datetime 之后就可以用 pandas.Series.dt.day 和 pandas.Series.pd.month. import pandas as pd ...

  2. GCC编译uboot出现(.ARM.exidx+0x0): undefined reference to `__aeabi_unwind_cpp_pr0&#39;错误的解决的方法

    /opt/arm-2010.09/bin/../lib/gcc/arm-none-linux-gnueabi/4.5.1/armv4t/libgcc.a(_bswapsi2.o):(.ARM.exid ...

  3. [WinForm] DataGridView 绑定 DT && ComboBox 列绑定 Dict

    一  需求介绍 一般像枚举类型的数据,我们在数据库里存储着诸如(1.2.3.4-)或者("001"."002"."003"-)此类,但是界面 ...

  4. dt常用类

    经常使用的一些datatable的操作,包括一些过滤去重的方法 using System; using System.Collections; using System.Collections.Gen ...

  5. DIV+CSS中标签dl dt dd常用的用法

    转自:http://smallpig301.blog.163.com/blog/static/9986093201010262499229/ < dl>< /dl>用来创建一个 ...

  6. HTML 列表 <ol><ul><li><dl><dt><dd>

    <ol>标签-有序列表 定义和用法: <ol>标签定义有序列表. HTML 与 XHTML 之间的差异 在 HTML 4.01 中,ol 元素的 "compact&q ...

  7. html dl dt dd标签元素语法结构与使用

    dl dt dd认识及dl dt dd使用方法 <dl> 标签用于定义列表类型标签. dl dt dd目录 dl dt dd介绍 结构语法 dl dt dd案例 dl dt dd总结 一. ...

  8. (转载)dl,dt,dd标记在网页中要充分利用

    (转载)http://www.jzxue.com/html/css/264I6DG6.html 我们在制作网页过程中用到列表时一般会使用<ul>或者<ol>标签,很少用刑< ...

  9. css案例学习之ul li dl dt dd实现二级菜单

    效果 代码实现 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www ...

随机推荐

  1. JSON各种转换总结

    JSONObject,JSONArray,Map,String之间转换 http://blog.csdn.net/superit401/article/details/51727739 1.Strin ...

  2. 【hdu3080】01背包(容量10^7)

    [题意]n个物品,有wi和vi,组成若干个联通块,只能选取一个联通块,问得到m的价值时最小要多少空间(v).n<=50,v<=10^7 [题解] 先用并查集找出各个联通块. 这题主要就是v ...

  3. 【BZOJ】1770 [Usaco2009 Nov]lights 燈

    [算法]高斯消元-异或方程组 [题解]良心简中题意 首先开关顺序没有意义. 然后就是每个点选或不选使得最后得到全部灯开启. 也就是我们需要一种确定的方案,这种方案使每盏灯都是开启的. 异或中1可以完美 ...

  4. unity中绘制战争迷雾

    接上一篇中说的游戏,我们已经实现了client.host上的一个物体可见不可见的行为.之后我们可以加入类似检查两个单位之间的距离.或是两个单位之间有无阻挡物来进一步实现游戏机制. 在这篇随笔中我会首先 ...

  5. 第一个java的小东西

    第一次自己写的一个java的小东西,毕竟自己第一次写的,其中可谓是历经艰难,最后总结下来就是java实在是不适合写界面化的东西代码量比较大,这还不是最关键的,最关键的是控件的位置实在是太难控制了. 这 ...

  6. LeetCode 3 :Min Stack

    今天做了一道MinStack的题,深深的感到自己C++还完全没有学好!!! #include <iostream> #include <stack> using std::st ...

  7. Cpython解释器支持的线程

    因为Python解释器帮你自动定期进行内存回收,你可以理解为python解释器里有一个独立的线程,每过一段时间它起wake up做一次全局轮询看看哪些内存数据是可以被清空的,此时你自己的程序 里的线程 ...

  8. Bean相关

    Bean容器初始化: 本地文件是绝对路径,classpath是相对路径.例子如下: Bean配置项: 常用Bean的配置项: (1)id :在整个IOC容器中,这个bean的唯一标识 (2)class ...

  9. 获取struts迭代list在页面显示的数据

    js代码: function modifyPactMoney(){ var table=$("#pactfee"); var trs=table.find("tr&quo ...

  10. Selenium2+python自动化35-获取元素属性【转载】

    前言 通常在做断言之前,都要先获取界面上元素的属性,然后与期望结果对比.本篇介绍几种常见的获取元素属性方法. 一.获取页面title 1.有很多小伙伴都不知道title长在哪里,看下图左上角. 2.获 ...