示例#1
0
文件: main.c 项目: czechop/2ndboot
int main() {
  struct memory_image image;
  void *p;
  printf("milestone 2 loader\n");

  image_complete();

  image_dump_stats();
  write32(2, 0x48200010);
  while(!(read32(0x48200014)&1));

  if (image_find(IMG_LINUX, &image) != NULL) 
  {
      printf("ARCH_NUBMBER[%d], KERNEL_DEST[%d]\n", ARCH_NUMBER, KERNEL_DEST);

      enter_kernel(0, ARCH_NUMBER, atag_build(), KERNEL_DEST);
  } else 
  {
      critical_error(IMG_NOT_PROVIDED);
  }

  return 0;
}
示例#2
0
文件: main.c 项目: XVilka/2ndboot-ng
int main() {
  struct memory_image image;
  
  image_complete();

  printf("Multiloader rev %s.\n", LDR_VERSION);
  image_dump_stats();

  atlas_init();
  if (atlas_test_io() != 0) {
    printf("btw, atlas i/o is not working\n");
  }
  dsp_reboot();
  hw_preboot();

  if (image_find(IMG_LINUX, &image) != NULL) {
    jump_to_linux(image.data, 1024, atag_build());
  } else {
    critical_error(IMG_NOT_PROVIDED);
  }

  return 0;
}