Differences

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

Link to this comparison view

Next revision
Previous revision
compiling_lxc_containers [2021/10/26 10:55] – created (thanks Grandma Betty) ataricompiling_lxc_containers [2021/12/22 12:14] (current) – First step for unprivileged containers not needed anymore. grandmabetty
Line 3: Line 3:
 <WRAP center round important> <WRAP center round important>
 This is not the recommended way to compile Batocera, as will become evident with all the workarounds you have to do to make this work. Refer to [[https://wiki.batocera.org/compile_batocera.linux|the compile Batocera page]] for the suggested methods. This is not the recommended way to compile Batocera, as will become evident with all the workarounds you have to do to make this work. Refer to [[https://wiki.batocera.org/compile_batocera.linux|the compile Batocera page]] for the suggested methods.
 +
 +Doing this will render it impossible to submit pull requests directly from this repository. If you choose to still proceed, you can use the LXC contained repository for testing things, and make the actual changes to an additional cloned local repository to make the pull request with.
 </WRAP> </WRAP>
  
-If you have a dedicated compiling server then compiling on LXC containers is a very convenient way to balance workloads and therefore get the best out of your hardware.+If you have a dedicated compiling server then compiling on LXC containers, for example on a [[https://www.proxmox.com|Proxmox]] host (which is being used for this LXC tutorial example), is a very convenient way to balance workloads and therefore get the best out of your hardware.
  
 ===== Preparations ===== ===== Preparations =====
  
 For good security reasons LXC containers on Proxmox are running in unprivileged mode by default. It just keeps the container isolated from your Proxmox host and therefore from other different systems running on it. Nevertheless you have indeed the possibility to run an LXC container in privileged mode for whatever reason if you want to. When compiling Batocera on LXC containers be aware that both, unprivileged and privileged mode, need some minor preparations which will cover you from running into compile errors. For good security reasons LXC containers on Proxmox are running in unprivileged mode by default. It just keeps the container isolated from your Proxmox host and therefore from other different systems running on it. Nevertheless you have indeed the possibility to run an LXC container in privileged mode for whatever reason if you want to. When compiling Batocera on LXC containers be aware that both, unprivileged and privileged mode, need some minor preparations which will cover you from running into compile errors.
 +
 +On your unprivileged or privileged LXC container command line do all the steps until the [[compile_batocera.linux#compilation|compilation]] step. Then, before starting to compile, do the following preparations for either unprivileged or privileged LXC containers:
  
 ==== Unprivileged containers ==== ==== Unprivileged containers ====
Line 21: Line 25:
 To prevent these compile error(s) according to file permissions on ''tar'' operations cause by missing tar option flags you need to make a new branch and edit the following files from Batocera Github source as follows: To prevent these compile error(s) according to file permissions on ''tar'' operations cause by missing tar option flags you need to make a new branch and edit the following files from Batocera Github source as follows:
  
-  - Make the following edits to the ''./buildroot/Makefile'' at ~line 457 <WRAP center round tip> +  - Make the following edits to the ''./buildroot/Config.in'' in the ''config BR2_TAR_OPTIONS'' at ~line 160 \\ \\ <WRAP center round tip> 
-the ''-c'' option shows you the line numbers within then ''nano'' editor, eg: ''nano -c ./buildroot/Makefile'' +the ''-c'' option shows you the line numbers within then ''nano'' editor, eg: ''nano ./buildroot/Config.in'' 
-</WRAP> <code>TAR_OPTIONS = $(call qstrip,$(BR2_TAR_OPTIONS)) -xf</code> to <code>TAR_OPTIONS = $(call qstrip,$(BR2_TAR_OPTIONS)) -xfo</code> +</WRAP> <code>default ""</code> to <code>default "--no-same-owner"</code>
-  - Make the following edits to the ''./buildroot/Config.in'' in the ''config BR2_TAR_OPTIONS'' at ~line 160 <code>default ""</code> to <code>default "--no-same-owner"</code>+
   - Make the following edits to the ''./package/batocera/emulators/wine/dxvk/dxvk.mk'' file at ~line 13 <code>mkdir -p $(@D)/target && cd $(@D)/target && tar xf $(DL_DIR)/$(DXVK_DL_SUBDIR)/$(DXVK_SOURCE)</code> to <code>mkdir -p $(@D)/target && cd $(@D)/target && tar xfo $(DL_DIR)/$(DXVK_DL_SUBDIR)/$(DXVK_SOURCE)</code>   - Make the following edits to the ''./package/batocera/emulators/wine/dxvk/dxvk.mk'' file at ~line 13 <code>mkdir -p $(@D)/target && cd $(@D)/target && tar xf $(DL_DIR)/$(DXVK_DL_SUBDIR)/$(DXVK_SOURCE)</code> to <code>mkdir -p $(@D)/target && cd $(@D)/target && tar xfo $(DL_DIR)/$(DXVK_DL_SUBDIR)/$(DXVK_SOURCE)</code>
   - Make the following edits to the ''./package/batocera/emulators/wine/dxvk-nvapi/dxvk-nvapi.mk'' file at ~line 13 <code>mkdir -p $(@D)/target && cd $(@D)/target && tar xf $(DL_DIR)/$(DXVK_DL_SUBDIR)/$(DXVK_SOURCE)</code> to <code>mkdir -p $(@D)/target && cd $(@D)/target && tar xfo $(DL_DIR)/$(DXVK_DL_SUBDIR)/$(DXVK_SOURCE)</code>   - Make the following edits to the ''./package/batocera/emulators/wine/dxvk-nvapi/dxvk-nvapi.mk'' file at ~line 13 <code>mkdir -p $(@D)/target && cd $(@D)/target && tar xf $(DL_DIR)/$(DXVK_DL_SUBDIR)/$(DXVK_SOURCE)</code> to <code>mkdir -p $(@D)/target && cd $(@D)/target && tar xfo $(DL_DIR)/$(DXVK_DL_SUBDIR)/$(DXVK_SOURCE)</code>
   - Make sure all of the files have saved.   - Make sure all of the files have saved.
  
-Now you should be able to compile without file permission errors caused by missing tar options flags.+Now you should be able to compile without file permission errors caused by missing tar options flags. You can continue now from [[compile_batocera.linux#compilation|here]].
  
 ==== Privileged containers ==== ==== Privileged containers ====
Line 57: Line 60:
 </code> </code>
  
-Save the file, quit the editor and fire up your LXC container. Now you should be able to compile without //AppArmor// errors.+Save the file, quit the editor and fire up your LXC container. Now you should be able to compile without //AppArmor// errors so you can continue now from [[compile_batocera.linux#compilation|here]].
  
  • compiling_lxc_containers.1635245718.txt.gz
  • Last modified: 5 years ago
  • by atari