zaval wrote:
all above screenshots are cool, nice achievement, guys.
especially pleasurable for me was seeing the last one with finally something other that x86 (no offense, I like it too, but it's for later :^)). moreover - with arm. and with PE as an executable format. this is intriguing, and honestly I am lost a little. How did you get PE executables for arm targets? Does MS compilers finally allow to build free standing images for arm? what's "raspbootin" (haha, nice pun)? I have 5 armv7/armv8 target machines but it just happenned that none of them are raspberry pi. is there "uboot" on RPi?
Thanks. I've been aiming beyond x86 for some time, so I'm glad to finally get past the architecture barrier.
PE on ARM is doable - after all, WinRT sandboxed programs still use the PE format, and Microsoft are known to use in house tools to write Windows - that includes WinRT. In particular, there's actually no limitation to producing free standing images - there's a setting.
Code:
<WindowsSDKDesktopARMSupport>true</WindowsSDKDesktopARMSupport>
<WindowsSDKDesktopARM64Support>true</WindowsSDKDesktopARM64Support>
Pop those in your project file under the first configuration property groups (<Debug,Release>|<ARM and ARM64 respectively>), and Bob's your uncle. I build as a native exe with 4KB file alignment - I probably should write a better PE loader.
raspbootin is referenced on the wiki -
http://wiki.osdev.org/ARM_RaspberryPi#Boot-from-serial_kernel. It's not mine, but it's great for testing by booting over serial. It did take some love and care to make it work on the raspberry pi 2 - I commented out the model detection code (maybe a mistake), and disabled the UART init code, since it seemed to give garbage otherwise. The firmware puts the UART in a good state. I'm not too bothered about making my testing tool correct, but I'm going to be working on that same issue with the kernel, I think. I don't know about uboot, I'd imagine there is. I've just been working towards the Pi's default bootloader (raspbootin is transparent). The one issue is that the default bootloader won't recognise an MZ - but it shouldn't be too hard to find some neutral values for the header that are non-destructive of r0-r2. The signature is the only important thing, since MS LINK checks it. As it is, it works out as
Code:
andeq r5, r0, sp, asr #20
Which isn't an issue.