microblaze: Fix loading of petalogix s3adsp1800 dtb.

Provide a petalogix-s3adsp1800.dtb blob.
Correct loading of the petalogix dtb.

Signed-off-by: Edgar E. Iglesias <edgar.iglesias@gmail.com>
This commit is contained in:
Edgar E. Iglesias 2009-06-03 21:54:31 +02:00
parent 40905a6a31
commit 4b0c7aa364
3 changed files with 12 additions and 10 deletions

View File

@ -271,7 +271,7 @@ ifdef INSTALL_BLOBS
BLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \ BLOBS=bios.bin vgabios.bin vgabios-cirrus.bin ppc_rom.bin \
video.x openbios-sparc32 openbios-sparc64 openbios-ppc \ video.x openbios-sparc32 openbios-sparc64 openbios-ppc \
pxe-ne2k_pci.bin pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin \ pxe-ne2k_pci.bin pxe-rtl8139.bin pxe-pcnet.bin pxe-e1000.bin \
bamboo.dtb bamboo.dtb petalogix-s3adsp1800.dtb
else else
BLOBS= BLOBS=
endif endif

View File

@ -54,22 +54,20 @@ static int petalogix_load_device_tree(target_phys_addr_t addr,
{ {
#ifdef HAVE_FDT #ifdef HAVE_FDT
void *fdt; void *fdt;
char *path = NULL;
int pathlen;
int r; int r;
#endif #endif
char *path;
int fdt_size; int fdt_size;
#ifdef HAVE_FDT #ifdef HAVE_FDT
/* Try the local "mb.dtb" override. */ /* Try the local "mb.dtb" override. */
fdt = load_device_tree("mb.dtb", &fdt_size); fdt = load_device_tree("mb.dtb", &fdt_size);
if (!fdt) { if (!fdt) {
pathlen = snprintf(NULL, 0, "%s/%s", path = qemu_find_file(QEMU_FILE_TYPE_BIOS, BINARY_DEVICE_TREE_FILE);
bios_dir, BINARY_DEVICE_TREE_FILE) + 1; if (path) {
path = qemu_malloc(pathlen); fdt = load_device_tree(path, &fdt_size);
snprintf(path, pathlen, "%s/%s", bios_dir, BINARY_DEVICE_TREE_FILE); qemu_free(path);
fdt = load_device_tree(BINARY_DEVICE_TREE_FILE, &fdt_size); }
free(path);
if (!fdt) if (!fdt)
return 0; return 0;
} }
@ -83,7 +81,11 @@ static int petalogix_load_device_tree(target_phys_addr_t addr,
to the kernel. */ to the kernel. */
fdt_size = load_image_targphys("mb.dtb", addr, 0x10000); fdt_size = load_image_targphys("mb.dtb", addr, 0x10000);
if (fdt_size < 0) { if (fdt_size < 0) {
fdt_size = load_image_targphys(BINARY_DEVICE_TREE_FILE, addr, 0x10000); path = qemu_find_file(QEMU_FILE_TYPE_BIOS, BINARY_DEVICE_TREE_FILE);
if (path) {
fdt_size = load_image_targphys(path, addr, 0x10000);
qemu_free(path);
}
} }
if (kernel_cmdline) { if (kernel_cmdline) {

Binary file not shown.