Date: Sat, 23 Jul 2016 18:04:49 -0400 From: Emb Aud <embaudarm@gmail.com> To: freebsd-arm <freebsd-arm@freebsd.org> Subject: Questions about writing custom boot loader, Zynq, Zybo Message-ID: <CANC_bnO7HWA87nNmYAHUWb21_MefbM2TgYUXsOc%2Bx9AUwHhoxA@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hi Everyone, I am trying to write a custom boot loader for FreeBSD on the Zybo board (Zynq). I am able to boot with Thomas Skibo's binary files, using u-boot, but I can't seem to get it to work myself. Right now I am: + loading the kernel ELF file into DDR and jumping to the correct entry point (0x100 offset). + passing zero in r1 so it falls back to the default boot params in machdep.c + that means I am not passing in any boot params. + I have decompiled the DTB file that Thomas Skibo posted on his website, and am includiing that DTS file statically in the kernel build. I have instrumented a kernel to print out r1-r4, and also the boot params, so I can see what a successful load looks like. Soon I will try supplying a boot params structure, but right now I don't really know how to construct one properly. I have the following problems while the kernel is booting: 1. RS232 port switches to double speed when the kernel starts printing (230400 baud instead of 115200 baud). 2. The ethernet driver cannot find the MAC address 3. The whole thing freezes during configuration of the USB port. Some questions: 1. What is the role of the boot param data structure (MODINFO_NAME, etc)? Which fields are important? 2. What is the boot param field type 0x00009002? I couldn't find a #define that matched that. 3. Is there anything special about how the Zynq is configured in ps7_init.c? 4. Is the exact ps7_init.c that Thomas Skibo used for his Zybo binaries available anywhere? 5. Where is the code in ubldr that constructs the boot param structure? Any advice would be very welcome. If I get a custom boot loader working I will post the code. Thank you, Lee
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CANC_bnO7HWA87nNmYAHUWb21_MefbM2TgYUXsOc%2Bx9AUwHhoxA>