2 * Bright Star Engineering Inc.
4 * code for readng parameters from the
5 * parameter blocks of the boot block
10 static int strcmp(const char *s1, const char *s2)
12 while (*s1 != '\0' && *s1 == *s2)
18 return (*(unsigned char *) s1) - (*(unsigned char *) s2);
26 static char *bse_getflashparam(char *name) {
30 struct pblk_t *thepb = (struct pblk_t *) 0x00004000;
31 struct pblk_t *altpb = (struct pblk_t *) 0x00006000;
34 /* no valid param block */
44 p = (char*)thepb + sizeof(struct pblk_t);
49 if (esize == 0xFF) break;
50 if (esize == 0) break;
52 esize = (esize&0x7F)<<8 | p[1];
57 if (*r && ((name == 0) || (!strcmp(name,r)))) {
66 void bse_setup(void) {
67 /* extract the linux cmdline from flash */
68 char *name=bse_getflashparam("linuxboot");
69 char *x = (char *)0xc0000100;
71 while (*name) *x++=*name++;