How to include sysmap in 2.6 kernel image

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hey Guys,

Recently, I'm working on xmon. The xmon needs sysmap for symbol lookup, however I don't know how to include sysmap to uImage. I looked the kernel source code for a while and found the kernel image need contain struct bi_record *rec. Everybody knows how to include this?

arch/ppc/kernel/setup.c::parse_bootinfo()

void parse_bootinfo(struct bi_record *rec)
{
      if (rec == NULL || rec->tag != BI_FIRST)
              return;
      while (rec->tag != BI_LAST) {
              ulong *data = rec->data;

printk(KERN_INFO "%s:*********** 0x%08lx\n", __FUNCTION__, rec->tag);

              switch (rec->tag) {
              case BI_CMD_LINE:
                      strlcpy(cmd_line, (void *)data, sizeof(cmd_line));
                      break;
              case BI_SYSMAP:
sysmap = (char *)((data[0] >= (KERNELBASE)) ? data[0] :
                                        (data[0]+KERNELBASE));
                      sysmap_size = data[1];
                      break;
#ifdef CONFIG_BLK_DEV_INITRD
              case BI_INITRD:
                      initrd_start = data[0] + KERNELBASE;
                      initrd_end = data[0] + data[1] + KERNELBASE;
                      break;
#endif /* CONFIG_BLK_DEV_INITRD */
#ifdef CONFIG_PPC_MULTIPLATFORM
              case BI_MACHTYPE:
                      _machine = data[0];
                      break;
#endif
              case BI_MEMSIZE:
                      boot_mem_size = data[0];
                      break;
              }
              rec = (struct bi_record *)((ulong)rec + rec->size);
      }
}


Thanks,
Gavin
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux