at v2.6.14 44 lines 896 B view raw
1/* 2 * Copyright (C) Cort Dougan 1999. 3 * 4 * This program is free software; you can redistribute it and/or 5 * modify it under the terms of the GNU General Public License 6 * as published by the Free Software Foundation; either version 7 * 2 of the License, or (at your option) any later version. 8 * 9 * Generate a note section as per the CHRP specification. 10 * 11 */ 12 13#include <stdio.h> 14#include <string.h> 15 16#define PL(x) printf("%c%c%c%c", ((x)>>24)&0xff, ((x)>>16)&0xff, ((x)>>8)&0xff, (x)&0xff ); 17 18int main(void) 19{ 20/* header */ 21 /* namesz */ 22 PL(strlen("PowerPC")+1); 23 /* descrsz */ 24 PL(6*4); 25 /* type */ 26 PL(0x1275); 27 /* name */ 28 printf("PowerPC"); printf("%c", 0); 29 30/* descriptor */ 31 /* real-mode */ 32 PL(0xffffffff); 33 /* real-base */ 34 PL(0x00c00000); 35 /* real-size */ 36 PL(0xffffffff); 37 /* virt-base */ 38 PL(0xffffffff); 39 /* virt-size */ 40 PL(0xffffffff); 41 /* load-base */ 42 PL(0x4000); 43 return 0; 44}