summaryrefslogtreecommitdiff
path: root/tests/boot-sector.c
diff options
context:
space:
mode:
Diffstat (limited to 'tests/boot-sector.c')
-rw-r--r--tests/boot-sector.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/tests/boot-sector.c b/tests/boot-sector.c
index 3ffe2987ff..e3193c0a12 100644
--- a/tests/boot-sector.c
+++ b/tests/boot-sector.c
@@ -77,6 +77,15 @@ int boot_sector_init(const char *fname)
fprintf(stderr, "Couldn't open \"%s\": %s", fname, strerror(errno));
return 1;
}
+
+ /* For Open Firmware based system, we can use a Forth script instead */
+ if (strcmp(qtest_get_arch(), "ppc64") == 0) {
+ memset(boot_sector, ' ', sizeof boot_sector);
+ sprintf((char *)boot_sector, "\\ Bootscript\n%x %x c! %x %x c!\n",
+ LOW(SIGNATURE), BOOT_SECTOR_ADDRESS + SIGNATURE_OFFSET,
+ HIGH(SIGNATURE), BOOT_SECTOR_ADDRESS + SIGNATURE_OFFSET + 1);
+ }
+
fwrite(boot_sector, 1, sizeof boot_sector, f);
fclose(f);
return 0;