Sascha Hauer <s.hauer@xxxxxxxxxxxxxx> writes: >> - ".word 0x65726162\n" /* 'bare' */ >> - ".word 0x00786f62\n" /* 'box' */ >> + ".asciz \"barebox\"\n" >> ".word _text\n" /* text base. If copied there, >> * barebox can skip relocation > > Does the barebox filetype detection need a fix aswell? I guess so. > enum filetype file_detect_type(void *_buf) > { > u32 *buf = _buf; > u8 *buf8 = _buf; > > if (strncmp(buf8, "#!/bin/sh", 9) == 0) > return filetype_sh; BTW there can be a white space between "#!" part and the interpreter name. > if (buf[8] == 0x65726162 && buf[9] == 0x00786f62) > return filetype_arm_barebox; > > This seems wrong on big endian systems. Definitely. A memcmp() would be better (I don't know about the buffer length). -- Krzysztof Halasa _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox