[PATCH 0/3] patches to allow DTB to be appended to the ARM zImage

Nicolas Pitre nicolas.pitre at linaro.org
Tue Jun 14 13:28:49 EDT 2011


On Tue, 14 Jun 2011, Tony Lindgren wrote:

> * Nicolas Pitre <nicolas.pitre at linaro.org> [110614 00:04]:
> > +
> > +	for_each_tag(atag, atag_list) {
> > +		if (atag->hdr.tag == ATAG_CMDLINE) {
> > +			setprop_string(dt, "/chosen", "bootargs",
> > +			                  atag->u.cmdline.cmdline);
> > +		} else if (atag->hdr.tag == ATAG_MEM) {
> > +			uint32_t mem_reg_property[2];
> > +			mem_reg_property[0] = cpu_to_fdt32(atag->u.mem.start);
> > +			mem_reg_property[1] = cpu_to_fdt32(atag->u.mem.size);
> > +			setprop(dt, "/memory", "reg", mem_reg_property,
> > +			           sizeof(mem_reg_property));
> > +		} else if (atag->hdr.tag == ATAG_INITRD2) {
> > +			uint32_t initrd_start, initrd_size;
> > +			initrd_start = atag->u.initrd.start;
> > +			initrd_size = atag->u.initrd.size;
> > +			setprop_cell(dt, "/chosen", "linux,initrd-start",
> > +			                initrd_start);
> > +			setprop_cell(dt, "/chosen", "linux,initrd-end",
> > +			                initrd_start + initrd_size);
> > +		}
> > +	}
> 
> I think Russell posted a complete list of the ATAGs to translate
> somewhere, but at least ATAG_REVISION is missing here. That's being
> used quite a bit as system_rev to set things dynamically.

No problem.  This is a work in progress.  We still can test the concept 
and fine tune the actual set of ATAGs being translated.


Nicolas



More information about the linux-arm-kernel mailing list