ibm-s390-linux / s390-tools

Tools for use with the s390 Linux kernel and device drivers
MIT License
63 stars 60 forks source link

zipl: On Alpine Linux #26

Closed tmh1999 closed 6 years ago

tmh1999 commented 6 years ago

Hello, I am trying to build s390-tools and run zipl on musl-libc-based Alpine Linux. The compilation is good, with some patches (https://github.com/tmh1999/wip/tree/master/s390-tools). Running zipl sometimes succeeds, sometimes fails. The environment is a KVM vm, boot with a kernel, initramfs, and an ext4 filesystem containing the rootfs.

I narrow down the bug to this line : https://github.com/ibm-s390-tools/s390-tools/blob/master/zipl/src/boot.c#L106 Sometimes it shows Arithmetic Exception SIGFPE, sometimes Illegal Instruction.

I pasted build log, dump output at : https://gist.github.com/tmh1999.

Also, I have to stick with version 1.37.0 atm since libutil in later releases started using GNU extension argz. But for zipl, it doesn't mean much since there isn't any significant changes. We also have to use -no-pie.

Would you mind having a look?

I have a publicly reachable Alpine s390x instance here if you need.

Thanks,

michael-holzheu commented 6 years ago

@stefan-haberland Could you please have a look please?

stefan-haberland commented 6 years ago

Sure, I will have a look but this will take some time.

tmh1999 commented 6 years ago

This is my bad. It turns out zipl does require other programs (which one? zdev ? ) in s390-tools in order to function properly at run time. I just built zipl only by modifying TOOL_DIRS in Makefile. Build-time deps only require libiraries in lib*. There is no run-time deps as far as I know. Maybe I miss the documentation somewhere ?

Sorry for the fuss. I'm closing this issue.