patches to allow DTB to be appended to the ARM zImage
Get series with b4
b4 am [email protected]Versions newest first
- v1 Latest0 of 3 patches 0 repliesNew
Patches in v1 No applies recorded yet
None of the 3 patches the cover letter announces are in this archive.
Reviews trailers per patch
No Reviewed-by, Acked-by or Tested-by trailers for v1 yet.
Cover letter [PATCH 0/3] patches to allow DTB to be appended to the ARM zImage
Quoted 55 lines · Nicolas Pitre
Quoted 53 lines · Rob Herring
Quoted 51 lines · Arnd Bergmann
Quoted 25 lines · On Tuesday 14 June 2011 19:28:49 Nicolas Pitre wrote:
Quoted 23 lines · Tony Lindgren
Quoted 21 lines · Nicolas Pitre
(quoted diff) +21
-0+ + 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); + } + }Quoted 6 lines
Quoted 3 lines
I think Russell posted a complete list of the ATAGs to translate somewhere, but at least
ATAG_REVISIONis missing here. That's being used quite a bit assystem_revto 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.
Let's talk about the revision field now, because it doesn't have a direct correspondence in existing attributes.
Functionality-wise, this would probably be the "compatible" property of the root node, with its most specific name to match, but that's not trivial to generate.
In some cases, the system revisions have significant differences in their devices (why else would you care about the revision), which means that you actually need a different device tree per revision anyway. If that's the common case, we could just ignore it completely or instead have a way to choose a specific device tree from a list based on the revision.
Another option would be to merge both the
ATAG_REVISIONandATAG_SERIALinto a string and put them into the root "serial-number" property that is fairly easy to do, but would be harder to parse if you actually rely on specific values.
Quoted 8 lines
Quoted 3 lines
IIRC,
system_revat least can be specified on the kernel command line, so you could just append the cmd line. However, if you force the built-in command line to be used that would not work,If you do that then you probably don't care as much about translating existing ATAGs from the bootloader and could as well just live with the hardcoded values in the appended DTB.
What I meant was you could translate these ATAGs into the DTB kernel command-line options rather than come-up with something new. You already having to mess with the command line.
Rob