The meminfo tool generates information in a "fex" format so I imagine fexc can use that to output the valid info.
On Mon, Sep 15, 2014 at 7:29 PM, Julian Calaby <[email protected]> wrote: > Hi Emilio, > > On Tue, Sep 16, 2014 at 9:22 AM, Emilio López <[email protected]> > wrote: > > El 15/09/14 a las 20:13, Julian Calaby escibió: > >> > >> Hi Tim, > >> > >> On Tue, Sep 16, 2014 at 6:52 AM, Tim Tisdall <[email protected]> wrote: > >>> > >>> At http://linux-sunxi.org/U-Boot#DRAM it says "copy an existing file > to a > >>> filename relevant for your device and edit the entries manually" but > all > >>> of > >>> those files also say "this file is generated, don't edit it yourself". > >>> Which do I believe? > >> > >> > >> The wiki. > >> > >> As far as I'm aware, there's no tool to generate those automatically. > >> I believe that note is there for historical reasons or to discourage > >> people from messing with the values. > > > > > > `fexc` in sunxi-tools (the tool behind bin2fex/fex2bin aliases) can do > it. > > Note that for it to work, the fex file needs to have valid values. > > Ah, thanks for that! The only problem is that I believe, in general, > fex files don't have valid values. > > > Usage: ./fexc [-vq] [-I <infmt>] [-O <outfmt>] [<input> [<output>]] > > > > infmt: fex, bin (default:fex) > > outfmt: fex, bin, uboot (default:bin) > > > > For example > > > > $ ./fexc -I fex -O uboot < ../sunxi-boards/sys_config/a10/mele_a1000.fex > > /* this file is generated, don't edit it yourself */ > > > > #include <common.h> > > #include <asm/arch/dram.h> > > > > static struct dram_para dram_para = { > > .clock = 360, > > .type = 3, > > .rank_num = 1, > > .density = 2048, > > .io_width = 16, > > .bus_width = 32, > > .cas = 6, > > .zq = 123, > > .odt_en = 0, > > .size = 512, > > .tpr0 = 0x30926692, > > .tpr1 = 0x1090, > > .tpr2 = 0x1a0c8, > > .tpr3 = 0, > > .tpr4 = 0, > > .tpr5 = 0, > > .emr1 = 0, > > .emr2 = 0, > > .emr3 = 0, > > }; > > > > unsigned long sunxi_dram_init(void) > > { > > return dramc_init(&dram_para); > > } > > > > Cheers, > > > > Emilio > > > > > > -- > > You received this message because you are subscribed to the Google Groups > > "linux-sunxi" group. > > To unsubscribe from this group and stop receiving emails from it, send an > > email to [email protected]. > > For more options, visit https://groups.google.com/d/optout. > > > > -- > Julian Calaby > > Email: [email protected] > Profile: http://www.google.com/profiles/julian.calaby/ > -- You received this message because you are subscribed to the Google Groups "linux-sunxi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
