User Tools

Site Tools


developersguide:pkgsrconarm

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
Last revision Both sides next revision
developersguide:pkgsrconarm [2016/02/09 10:14]
dcvmoole created
developersguide:pkgsrconarm [2016/02/09 10:41]
dcvmoole formatting: better quoting style
Line 1: Line 1:
 ====== Pkgsrc on ARM ====== ====== Pkgsrc on ARM ======
 +
 +==== Overview ====
  
 Right now, no pkgsrc packages are available on the ARM port for MINIX3. Of course we would love to have pkgsrc on ARM - in fact, it will be a necessity for many real-world uses of MINIX3 on the Beagle platforms. However, current technical shortcomings prevent this. Right now, no pkgsrc packages are available on the ARM port for MINIX3. Of course we would love to have pkgsrc on ARM - in fact, it will be a necessity for many real-world uses of MINIX3 on the Beagle platforms. However, current technical shortcomings prevent this.
  
-Ideally, pkgsrc would be crosscompiled with MINIX3-on-ARM as target, just like MINIX3 itself needs to be crosscompiled. However, the main problem is that crosscompiling pkgsrc is not yet supported properly by pkgsrc itself. This is a larger problem that would have to be, and hopefully eventually will be, addressed by the NetBSD/​pkgsrc community. It is unlikely that we can pull this off ourselves.+Ideally, pkgsrc would be crosscompiled with MINIX3-on-ARM as target, just like MINIX3 itself needs to be crosscompiled ​for ARM. However, the main problem ​with this approach ​is that crosscompiling pkgsrc is not yet supported properly by pkgsrc itself. This is a larger problem that would have to be, and hopefully eventually will be, addressed by the NetBSD/​pkgsrc community. It is unlikely that we can pull this off ourselves.
  
 Crosscompiling is necessary not only to compile the packages for the ARM platform, but also to compile them for MINIX3, which means that the only way to avoid having to crosscompile at all, is to compile the pkgsrc packages natively from the MINIX3-on-ARM platform itself (as is done for MINIX3-on-x86 as well). With the current situation, this gives us two options. Crosscompiling is necessary not only to compile the packages for the ARM platform, but also to compile them for MINIX3, which means that the only way to avoid having to crosscompile at all, is to compile the pkgsrc packages natively from the MINIX3-on-ARM platform itself (as is done for MINIX3-on-x86 as well). With the current situation, this gives us two options.
Line 11: Line 13:
 The second option is to use the [[developersguide:​minixonlinaroqemuarm|Linaro QEMU emulator]] with its BeagleXM support. This would potentially be much faster than on real hardware. However, it would be difficult (even though not necessarily impossible) to do this without networking support: pkgsrc generally downloads whatever it needs on the fly from its sources, and without networking support, one would have to make sure that all needed components are available on the local storage in the emulator already. MINIX3 currently does not support the emulator'​s USB host controller, nor its USB network device. It should be possible to implement those. It may also be possible to find another way to get networking to work, e.g., by somehow enabling virtio-net for the emulator. The second option is to use the [[developersguide:​minixonlinaroqemuarm|Linaro QEMU emulator]] with its BeagleXM support. This would potentially be much faster than on real hardware. However, it would be difficult (even though not necessarily impossible) to do this without networking support: pkgsrc generally downloads whatever it needs on the fly from its sources, and without networking support, one would have to make sure that all needed components are available on the local storage in the emulator already. MINIX3 currently does not support the emulator'​s USB host controller, nor its USB network device. It should be possible to implement those. It may also be possible to find another way to get networking to work, e.g., by somehow enabling virtio-net for the emulator.
  
-In both cases, it is likely that many problems will have to be solved for the actual pkgsrc compilation process, ​since none of this has ever been tested. Any progress in any direction would be highly welcome though, and we encourage anyone who takes a shot at this to publish their results, even if partial and ending in problems only.+In both cases, it is likely that many problems will have to be solved for the actual pkgsrc compilation process, ​both for bootstrapping pkgsrc itself and for building packages. After all, none of this has ever been tested. Any progress in any direction would be highly welcome though, and we encourage anyone who takes a shot at this to publish their results, even if partial and ending in problems only. 
 + 
 +==== Getting started ==== 
 + 
 +Quoting sambuc on IRC (2016-02-09):​ 
 + 
 +> I would first look to bootstrap pkgsrc on minix/arm. You can take a look at https://​github.com/​Stichting-MINIX-Research-Foundation/​pkgsrc-ng/​blob/​3.3.0/​minix/​pbulk-ng.sh to see the exact way we bootstrap on minix/x86 
 +> the first step is to do what is within the lines 270-332 
 +> then you will be able to use bmake to compile anything you want from pkgsrc 
 +> you don't need to build the chroot for now. This is mainly a safety net to ensure a clean environment on minix/x86 
 +> and as those steps take a couple of hours already, even on intel, we copy the chroot, to be able to restart from the step n-1 when needed 
 +> iirc, the strict minimum to do to get bmake & pkgsrc working is line 273-297, then you have bmake available
developersguide/pkgsrconarm.txt · Last modified: 2016/02/09 13:49 by dcvmoole