First commit
For now xserver refuse to compile dues to missing dependencies
This commit is contained in:
		
						commit
						3d3a37d79f
					
				
					 34 changed files with 1570 additions and 0 deletions
				
			
		
							
								
								
									
										21
									
								
								Dockerfile
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								Dockerfile
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,21 @@
 | 
				
			||||||
 | 
					FROM debian:bullseye-slim
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN apt update \
 | 
				
			||||||
 | 
					    && apt install --no-install-recommends -y libext2fs2 \
 | 
				
			||||||
 | 
					                      mmdebstrap \
 | 
				
			||||||
 | 
					                      parted \
 | 
				
			||||||
 | 
					                      multistrap \
 | 
				
			||||||
 | 
					                      udisks2 \
 | 
				
			||||||
 | 
					                      qemu-system-aarch64 \
 | 
				
			||||||
 | 
					                      qemu-user-static \
 | 
				
			||||||
 | 
					                      binfmt-support \
 | 
				
			||||||
 | 
					                      arch-test \
 | 
				
			||||||
 | 
					                      curl \
 | 
				
			||||||
 | 
					                      bash 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					RUN echo "none  /proc/sys/fs/binfmt_misc binfmt_misc defaults 0 0" > /etc/fstab 
 | 
				
			||||||
 | 
					COPY docker/entrypoint.sh /tmp
 | 
				
			||||||
 | 
					COPY src/ /tmp
 | 
				
			||||||
 | 
					WORKDIR /tmp
 | 
				
			||||||
 | 
					CMD bash
 | 
				
			||||||
 | 
					# CMD /tmp/entrypoint.sh
 | 
				
			||||||
							
								
								
									
										51
									
								
								README.md
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										51
									
								
								README.md
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,51 @@
 | 
				
			||||||
 | 
					MNT Reform Debian userland creation
 | 
				
			||||||
 | 
					-----------------------------------
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This script built an userland "filesystem" for MNT Reform 2 laptop computer.
 | 
				
			||||||
 | 
					**Work in Progress**: for now there is some dependencies missing for compiling
 | 
				
			||||||
 | 
					xservser.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Usage
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					make_userland -r <recipe> -m <mirror> -o <output> -h
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					 * `recipe`: recipe to apply, see recipe section below, default:`default`
 | 
				
			||||||
 | 
					 * `mirroir`: Debian mirror to use, default: `http://ftp.debian.org`
 | 
				
			||||||
 | 
					 * `output`: output directory, default: `/tmp`, a directory named with recipe
 | 
				
			||||||
 | 
					     name will be createdin this directory.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Recipe
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					A recipe is a collection of scripts and attached files  inside a subdirectory 
 | 
				
			||||||
 | 
					of `recipes/`. Theses script are executed into a chroot of the destination
 | 
				
			||||||
 | 
					directory by `mmdebstrap` and use its hook system.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Docker
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					You can find a Dockerfile and an entrypoint script to help you create userland
 | 
				
			||||||
 | 
					filesystem. This container is created to work on a x86 machine then you need to
 | 
				
			||||||
 | 
					run the container with the `-privileged` parameter.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					First you need to build the container :
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					git clone https://git.epha.se/ephase/reform_mkuserland
 | 
				
			||||||
 | 
					cd reform_mkuserland
 | 
				
			||||||
 | 
					docker build -t reform_make_userland
 | 
				
			||||||
 | 
					[...]
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					And run it :
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					docker run -v /home/docker/output:/output --rm --privileged reform_make_userland
 | 
				
			||||||
 | 
					```
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Licence
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					This work is derivated from MNT script found [here][l_mnt_image] and licenced
 | 
				
			||||||
 | 
					under the GPLv3 Licence
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[l_mnt_image]:https://source.mnt.re/reform/reform-system-image/
 | 
				
			||||||
							
								
								
									
										12
									
								
								docker/entrypoint.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										12
									
								
								docker/entrypoint.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,12 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[ -z $RECIPE ]] && RECIPE="default"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					sleep 2
 | 
				
			||||||
 | 
					mount -a
 | 
				
			||||||
 | 
					echo ':qemu-aarch64:M::\x7fELF\x02\x01\x01\x00\x00\x00\x00\x00\x00\x00\x00\x00\x02\x00\xb7\x00:\xff\xff\xff\xff\xff\xff\xff\x00\xff\xff\xff\xff\xff\xff\xff\xff\xfe\xff\xff\xff:/usr/bin/qemu-aarch64-static:OCF' > /proc/sys/fs/binfmt_misc/register
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if ! ./make_userland.sh -r "$RECIPE" -o /output
 | 
				
			||||||
 | 
					then
 | 
				
			||||||
 | 
					    printf "Error when create userland\n"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
							
								
								
									
										74
									
								
								src/init_target.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										74
									
								
								src/init_target.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,74 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# populate Debian image
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# create a file descriptor for storing log
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					exec 3>/tmp/error.log
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function error {
 | 
				
			||||||
 | 
					    >&2 printf "\e[31mE\e[0m: %s\n" "$1"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					erase_display_char () {
 | 
				
			||||||
 | 
					    local i
 | 
				
			||||||
 | 
					    local nchar
 | 
				
			||||||
 | 
					    nchar=$1
 | 
				
			||||||
 | 
					    i=0
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    while [ "$i" -lt "$nchar" ]; do
 | 
				
			||||||
 | 
					        printf "\b \b"
 | 
				
			||||||
 | 
					        ((i=i + 1))
 | 
				
			||||||
 | 
					    done
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					install_packages () {
 | 
				
			||||||
 | 
					    local package
 | 
				
			||||||
 | 
					    package="$1"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    printf "Install %s: " "$package"
 | 
				
			||||||
 | 
					    apt-get install -y "$package" 2>&3 | while read -r x; do
 | 
				
			||||||
 | 
					    display=""
 | 
				
			||||||
 | 
					    pkg_name=""
 | 
				
			||||||
 | 
					    case $x in
 | 
				
			||||||
 | 
					        Get*)
 | 
				
			||||||
 | 
					            pkg_name=$(echo "$x" | awk '{ printf $5 }')
 | 
				
			||||||
 | 
					            display="downloading $pkg_name"
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					        Unpack*)
 | 
				
			||||||
 | 
					            pkg_name=$(echo "$x" | awk '{ printf $2 }')
 | 
				
			||||||
 | 
					            display="Unpacking $pkg_name"
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					        *already*newest*)
 | 
				
			||||||
 | 
					            pkg_name=$(echo "$x" | awk '{ printf $1 }')
 | 
				
			||||||
 | 
					            display="Already Installed"
 | 
				
			||||||
 | 
					            break
 | 
				
			||||||
 | 
					        ;;
 | 
				
			||||||
 | 
					    esac
 | 
				
			||||||
 | 
						if [[ -n "$display" ]]
 | 
				
			||||||
 | 
					        then
 | 
				
			||||||
 | 
					            display="$display $pkg_name"
 | 
				
			||||||
 | 
					            erase_display_char "$nchar"
 | 
				
			||||||
 | 
					            printf "%s" "$display"
 | 
				
			||||||
 | 
					            nchar=${#display}
 | 
				
			||||||
 | 
					        fi 
 | 
				
			||||||
 | 
					    done
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					SCRIPT_DIR="$( cd "$( dirname "$0" )" && pwd )"
 | 
				
			||||||
 | 
					RECIPE_DIR="${SCRIPT_DIR}/recipe"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[ ! -d "$RECIPE_DIR" ]] && { error "Recipe dir ${RECIPE_DIR} does not exist"; exit 10; }
 | 
				
			||||||
 | 
					export DEBIAN_FRONTEND=noninteractive
 | 
				
			||||||
 | 
					export DEBCONF_NONINTERACTIVE_SEEN=true
 | 
				
			||||||
 | 
					export LC_ALL=C
 | 
				
			||||||
 | 
					export LANGUAGE=C
 | 
				
			||||||
 | 
					export LANG=C
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					for i in  $RECIPE_DIR/*.sh
 | 
				
			||||||
 | 
					do
 | 
				
			||||||
 | 
					    source $i
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					exit 0
 | 
				
			||||||
							
								
								
									
										157
									
								
								src/make_userland.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										157
									
								
								src/make_userland.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,157 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					set -e
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function usage {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    cat <<EOF
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Create Debian userland filesystem for MNT Reform
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					This script create an userland system for the MNT Reform 2 laptop
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					USAGE:
 | 
				
			||||||
 | 
					make_userland.sh -t <target> -r <recipe> -m <mirror>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<target>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					<recipe>.
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function error {
 | 
				
			||||||
 | 
					    >&2 printf "\e[31mE\e[0m %s\n" "$1"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function clean {
 | 
				
			||||||
 | 
					    rm -rf "$output"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function process_args {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    while :; do
 | 
				
			||||||
 | 
					        case $1 in
 | 
				
			||||||
 | 
					            -h|-\?|--help)
 | 
				
			||||||
 | 
					                usage
 | 
				
			||||||
 | 
					                exit 0
 | 
				
			||||||
 | 
					                ;;
 | 
				
			||||||
 | 
					            -r|--recipe)
 | 
				
			||||||
 | 
					                recipe_name="$2"
 | 
				
			||||||
 | 
					                shift
 | 
				
			||||||
 | 
					                ;;
 | 
				
			||||||
 | 
					            -m|--mirror)
 | 
				
			||||||
 | 
					                local http_response
 | 
				
			||||||
 | 
					                http_response=$(curl -o /dev/null -s -L -I -w "%{http_code}\n" "$2")
 | 
				
			||||||
 | 
					                if [ ! "$http_response" -eq 200 ]
 | 
				
			||||||
 | 
					                then
 | 
				
			||||||
 | 
					                    error "Mirror $1 seems to have problem."
 | 
				
			||||||
 | 
					                    exit 5
 | 
				
			||||||
 | 
					                fi
 | 
				
			||||||
 | 
					                debian_mirror="$2"
 | 
				
			||||||
 | 
					                shift
 | 
				
			||||||
 | 
					                ;;
 | 
				
			||||||
 | 
					            -o|--output)
 | 
				
			||||||
 | 
					                if [ ! -d "$2" ]
 | 
				
			||||||
 | 
					                then
 | 
				
			||||||
 | 
					                    error "output directory $2 not exist."
 | 
				
			||||||
 | 
					                    exit 5
 | 
				
			||||||
 | 
					                fi
 | 
				
			||||||
 | 
					                output_dir=$2
 | 
				
			||||||
 | 
					                ;;
 | 
				
			||||||
 | 
					            *)
 | 
				
			||||||
 | 
					            break
 | 
				
			||||||
 | 
					        esac
 | 
				
			||||||
 | 
					        shift
 | 
				
			||||||
 | 
					    done
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function process_packagefile () {
 | 
				
			||||||
 | 
					    local packagesfile
 | 
				
			||||||
 | 
					    local packageslist
 | 
				
			||||||
 | 
					    packagesfile="$1"
 | 
				
			||||||
 | 
					    packageslist="$2"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    if [ ! -f "$packagesfile" ]
 | 
				
			||||||
 | 
					    then
 | 
				
			||||||
 | 
					        error "Package file $packagesfile not found"
 | 
				
			||||||
 | 
					        return
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					    while read -r pkg
 | 
				
			||||||
 | 
					    do
 | 
				
			||||||
 | 
					        if [[ -z $packageslist ]]
 | 
				
			||||||
 | 
					        then
 | 
				
			||||||
 | 
					            packageslist="$pkg"
 | 
				
			||||||
 | 
					        else
 | 
				
			||||||
 | 
					            packageslist="${packageslist},${pkg}"
 | 
				
			||||||
 | 
					        fi
 | 
				
			||||||
 | 
					    done < "$packagesfile"
 | 
				
			||||||
 | 
					    printf "%s" "$packageslist"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					for c in curl mmdebstrap
 | 
				
			||||||
 | 
					do
 | 
				
			||||||
 | 
					    if ! command -v "$c" >/dev/null
 | 
				
			||||||
 | 
					    then
 | 
				
			||||||
 | 
					        error "This script need $c to work properly"
 | 
				
			||||||
 | 
					        exit 6
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# default values
 | 
				
			||||||
 | 
					debian_mirror="http://ftp.debian.org/debian"
 | 
				
			||||||
 | 
					output_dir="/tmp"
 | 
				
			||||||
 | 
					recipe_name="default"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					process_args "$@"
 | 
				
			||||||
 | 
					export RECIPE="recipes/$recipe_name"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					printf "Make userland script, dir:%s recipe:%s" "$(pwd)" "$recipe"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ ! -d "$RECIPE" ]
 | 
				
			||||||
 | 
					then
 | 
				
			||||||
 | 
					    error "recipe folder $RECIPE not found"
 | 
				
			||||||
 | 
					    usage
 | 
				
			||||||
 | 
					    exit 2
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					output="$output_dir/$recipe_name"
 | 
				
			||||||
 | 
					if [ -f "$output" ]
 | 
				
			||||||
 | 
					then
 | 
				
			||||||
 | 
					    error "$output directory exist, remove it and launch $0 again"
 | 
				
			||||||
 | 
					    exit 20
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					trap clean ERR SIGINT
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					include=""
 | 
				
			||||||
 | 
					if [ -d "$RECIPE/packages" ]
 | 
				
			||||||
 | 
					then
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    for f in "$RECIPE"/packages/*.list
 | 
				
			||||||
 | 
					    do
 | 
				
			||||||
 | 
					        printf "Add package list for mmdebstrap: %s\n" "$f"
 | 
				
			||||||
 | 
					        include="$( process_packagefile "$f" "$include")"
 | 
				
			||||||
 | 
					    done
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if [ -d "$RECIPE"/hook ]
 | 
				
			||||||
 | 
					then
 | 
				
			||||||
 | 
					    hook="--hook-directory=$(pwd)/${RECIPE}/hook"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					command="mmdebstrap --architectures=arm64 --components=main --variant=minbase"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[[ -n "$include" ]] && command="$command --include=$include"
 | 
				
			||||||
 | 
					[[ -n "$hook" ]] && command="$command $hook"
 | 
				
			||||||
 | 
					command="$command sid $output $debian_mirror" 
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					$command || exit 20
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					exit
 | 
				
			||||||
 | 
					#mkdir "$output/root/recipe" || exit 21 
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					#cp init_target.sh "$output/root/" || exit 40
 | 
				
			||||||
 | 
					#cp -r "$recipe"/* "$output/root/recipe" || exit 41
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					#chroot "$output" /root/init_target.sh
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					#exit 0
 | 
				
			||||||
							
								
								
									
										28
									
								
								src/recipes/default/hook/customize.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										28
									
								
								src/recipes/default/hook/customize.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,28 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					printf "Customize hook script for mmdebstrap %s\n\n" "$RECIPE"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					printf "Add MNT repository and key\n"
 | 
				
			||||||
 | 
					chroot $1 apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 376511EB67AD7BAF
 | 
				
			||||||
 | 
					echo "deb https://mntre.com/reform-debian sid/" | chroot $1 tee /etc/apt/sources.list.d/mntre.list
 | 
				
			||||||
 | 
					chroot $1 apt update
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					printf "Install MNT packages\n"
 | 
				
			||||||
 | 
					chroot $1 apt install -y reform-tools reform-handbook
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					source="${RECIPE}/hook/data/overlay"
 | 
				
			||||||
 | 
					printf "Sync overlay directory from %s to %s\n" "$source" "$1"
 | 
				
			||||||
 | 
					if [ -d $source ]
 | 
				
			||||||
 | 
					then
 | 
				
			||||||
 | 
					    printf "  -> source exist\n"
 | 
				
			||||||
 | 
					    cp -Raf ${RECIPE}/hook/data/overlay/* $1
 | 
				
			||||||
 | 
					else
 | 
				
			||||||
 | 
					    printf "Can't find %s directory\n" "$source"
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Procfs is needed to build DRM
 | 
				
			||||||
 | 
					mount -t proc /proc $1/proc
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					chroot $1 /root/build_script.sh
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					exit 0
 | 
				
			||||||
							
								
								
									
										85
									
								
								src/recipes/default/hook/data/overlay/etc/adduser.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										85
									
								
								src/recipes/default/hook/data/overlay/etc/adduser.conf
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,85 @@
 | 
				
			||||||
 | 
					# /etc/adduser.conf: `adduser' configuration.
 | 
				
			||||||
 | 
					# See adduser(8) and adduser.conf(5) for full documentation.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# The DSHELL variable specifies the default login shell on your
 | 
				
			||||||
 | 
					# system.
 | 
				
			||||||
 | 
					DSHELL=/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# The DHOME variable specifies the directory containing users' home
 | 
				
			||||||
 | 
					# directories.
 | 
				
			||||||
 | 
					DHOME=/home
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# If GROUPHOMES is "yes", then the home directories will be created as
 | 
				
			||||||
 | 
					# /home/groupname/user.
 | 
				
			||||||
 | 
					GROUPHOMES=no
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# If LETTERHOMES is "yes", then the created home directories will have
 | 
				
			||||||
 | 
					# an extra directory - the first letter of the user name. For example:
 | 
				
			||||||
 | 
					# /home/u/user.
 | 
				
			||||||
 | 
					LETTERHOMES=no
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# The SKEL variable specifies the directory containing "skeletal" user
 | 
				
			||||||
 | 
					# files; in other words, files such as a sample .profile that will be
 | 
				
			||||||
 | 
					# copied to the new user's home directory when it is created.
 | 
				
			||||||
 | 
					SKEL=/etc/skel
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# FIRST_SYSTEM_[GU]ID to LAST_SYSTEM_[GU]ID inclusive is the range for UIDs
 | 
				
			||||||
 | 
					# for dynamically allocated administrative and system accounts/groups.
 | 
				
			||||||
 | 
					# Please note that system software, such as the users allocated by the base-passwd
 | 
				
			||||||
 | 
					# package, may assume that UIDs less than 100 are unallocated.
 | 
				
			||||||
 | 
					FIRST_SYSTEM_UID=100
 | 
				
			||||||
 | 
					LAST_SYSTEM_UID=999
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					FIRST_SYSTEM_GID=100
 | 
				
			||||||
 | 
					LAST_SYSTEM_GID=999
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# FIRST_[GU]ID to LAST_[GU]ID inclusive is the range of UIDs of dynamically
 | 
				
			||||||
 | 
					# allocated user accounts/groups.
 | 
				
			||||||
 | 
					FIRST_UID=1000
 | 
				
			||||||
 | 
					LAST_UID=59999
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					FIRST_GID=1000
 | 
				
			||||||
 | 
					LAST_GID=59999
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# The USERGROUPS variable can be either "yes" or "no".  If "yes" each
 | 
				
			||||||
 | 
					# created user will be given their own group to use as a default.  If
 | 
				
			||||||
 | 
					# "no", each created user will be placed in the group whose gid is
 | 
				
			||||||
 | 
					# USERS_GID (see below).
 | 
				
			||||||
 | 
					USERGROUPS=yes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# If USERGROUPS is "no", then USERS_GID should be the GID of the group
 | 
				
			||||||
 | 
					# `users' (or the equivalent group) on your system.
 | 
				
			||||||
 | 
					USERS_GID=100
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# If DIR_MODE is set, directories will be created with the specified
 | 
				
			||||||
 | 
					# mode. Otherwise the default mode 0755 will be used.
 | 
				
			||||||
 | 
					DIR_MODE=0755
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# If SETGID_HOME is "yes" home directories for users with their own
 | 
				
			||||||
 | 
					# group the setgid bit will be set. This was the default for
 | 
				
			||||||
 | 
					# versions << 3.13 of adduser. Because it has some bad side effects we
 | 
				
			||||||
 | 
					# no longer do this per default. If you want it nevertheless you can
 | 
				
			||||||
 | 
					# still set it here.
 | 
				
			||||||
 | 
					SETGID_HOME=no
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# If QUOTAUSER is set, a default quota will be set from that user with
 | 
				
			||||||
 | 
					# `edquota -p QUOTAUSER newuser'
 | 
				
			||||||
 | 
					QUOTAUSER=""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# If SKEL_IGNORE_REGEX is set, adduser will ignore files matching this
 | 
				
			||||||
 | 
					# regular expression when creating a new home directory
 | 
				
			||||||
 | 
					SKEL_IGNORE_REGEX="dpkg-(old|new|dist|save)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Set this if you want the --add_extra_groups option to adduser to add
 | 
				
			||||||
 | 
					# new users to other groups.
 | 
				
			||||||
 | 
					# This is the list of groups that new non-system users will be added to
 | 
				
			||||||
 | 
					# Default:
 | 
				
			||||||
 | 
					EXTRA_GROUPS="dialout cdrom floppy audio video plugdev users"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# If ADD_EXTRA_GROUPS is set to something non-zero, the EXTRA_GROUPS
 | 
				
			||||||
 | 
					# option above will be default behavior for adding new, non-system users
 | 
				
			||||||
 | 
					ADD_EXTRA_GROUPS=1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# check user and group names also against this regular expression.
 | 
				
			||||||
 | 
					#NAME_REGEX="^[a-z][-a-z0-9_]*\$"
 | 
				
			||||||
							
								
								
									
										54
									
								
								src/recipes/default/hook/data/overlay/etc/dhcp/dhclient.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										54
									
								
								src/recipes/default/hook/data/overlay/etc/dhcp/dhclient.conf
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,54 @@
 | 
				
			||||||
 | 
					# Configuration file for /sbin/dhclient.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# This is a sample configuration file for dhclient. See dhclient.conf's
 | 
				
			||||||
 | 
					#	man page for more information about the syntax of this file
 | 
				
			||||||
 | 
					#	and a more comprehensive list of the parameters understood by
 | 
				
			||||||
 | 
					#	dhclient.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# Normally, if the DHCP server provides reasonable information and does
 | 
				
			||||||
 | 
					#	not leave anything out (like the domain name, for example), then
 | 
				
			||||||
 | 
					#	few changes must be made to this file, if any.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					option rfc3442-classless-static-routes code 121 = array of unsigned integer 8;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					send host-name = gethostname();
 | 
				
			||||||
 | 
					request subnet-mask, broadcast-address, time-offset, routers,
 | 
				
			||||||
 | 
						domain-name, domain-name-servers, domain-search, host-name,
 | 
				
			||||||
 | 
						dhcp6.name-servers, dhcp6.domain-search, dhcp6.fqdn, dhcp6.sntp-servers,
 | 
				
			||||||
 | 
						netbios-name-servers, netbios-scope, interface-mtu,
 | 
				
			||||||
 | 
						rfc3442-classless-static-routes, ntp-servers;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#send dhcp-client-identifier 1:0:a0:24:ab:fb:9c;
 | 
				
			||||||
 | 
					#send dhcp-lease-time 3600;
 | 
				
			||||||
 | 
					#supersede domain-name "fugue.com home.vix.com";
 | 
				
			||||||
 | 
					#prepend domain-name-servers 127.0.0.1;
 | 
				
			||||||
 | 
					#require subnet-mask, domain-name-servers;
 | 
				
			||||||
 | 
					timeout 5;
 | 
				
			||||||
 | 
					#retry 60;
 | 
				
			||||||
 | 
					#reboot 10;
 | 
				
			||||||
 | 
					#select-timeout 5;
 | 
				
			||||||
 | 
					#initial-interval 2;
 | 
				
			||||||
 | 
					#script "/sbin/dhclient-script";
 | 
				
			||||||
 | 
					#media "-link0 -link1 -link2", "link0 link1";
 | 
				
			||||||
 | 
					#reject 192.33.137.209;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#alias {
 | 
				
			||||||
 | 
					#  interface "eth0";
 | 
				
			||||||
 | 
					#  fixed-address 192.5.5.213;
 | 
				
			||||||
 | 
					#  option subnet-mask 255.255.255.255;
 | 
				
			||||||
 | 
					#}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					#lease {
 | 
				
			||||||
 | 
					#  interface "eth0";
 | 
				
			||||||
 | 
					#  fixed-address 192.33.137.200;
 | 
				
			||||||
 | 
					#  medium "link0 link1";
 | 
				
			||||||
 | 
					#  option host-name "andare.swiftmedia.com";
 | 
				
			||||||
 | 
					#  option subnet-mask 255.255.255.0;
 | 
				
			||||||
 | 
					#  option broadcast-address 192.33.137.255;
 | 
				
			||||||
 | 
					#  option routers 192.33.137.250;
 | 
				
			||||||
 | 
					#  option domain-name-servers 127.0.0.1;
 | 
				
			||||||
 | 
					#  renew 2 2000/1/12 00:00:01;
 | 
				
			||||||
 | 
					#  rebind 2 2000/1/12 00:00:01;
 | 
				
			||||||
 | 
					#  expire 2 2000/1/12 00:00:01;
 | 
				
			||||||
 | 
					#}
 | 
				
			||||||
							
								
								
									
										2
									
								
								src/recipes/default/hook/data/overlay/etc/hostname
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										2
									
								
								src/recipes/default/hook/data/overlay/etc/hostname
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,2 @@
 | 
				
			||||||
 | 
					reform
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										4
									
								
								src/recipes/default/hook/data/overlay/etc/hosts
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								src/recipes/default/hook/data/overlay/etc/hosts
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,4 @@
 | 
				
			||||||
 | 
					127.0.0.1	localhost reform
 | 
				
			||||||
 | 
					::1		localhost ip6-localhost ip6-loopback reform
 | 
				
			||||||
 | 
					ff02::1		ip6-allnodes
 | 
				
			||||||
 | 
					ff02::2		ip6-allrouters
 | 
				
			||||||
							
								
								
									
										4
									
								
								src/recipes/default/hook/data/overlay/etc/ld.so.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										4
									
								
								src/recipes/default/hook/data/overlay/etc/ld.so.conf
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,4 @@
 | 
				
			||||||
 | 
					/usr/local/lib
 | 
				
			||||||
 | 
					/usr/local/lib/dri
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					include /etc/ld.so.conf.d/*.conf
 | 
				
			||||||
							
								
								
									
										14
									
								
								src/recipes/default/hook/data/overlay/etc/motd
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								src/recipes/default/hook/data/overlay/etc/motd
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,14 @@
 | 
				
			||||||
 | 
					%G
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    ▒       ▒       ▒
 | 
				
			||||||
 | 
					    ██▒     ██▒     ██▒                 Welcome to Debian GNU/Linux
 | 
				
			||||||
 | 
					    ████▒   ████▒   ████▒   ██████▒     on MNT Reform
 | 
				
			||||||
 | 
					    ██████▒ ██████▒ ██████▒ ██████▒     System Image: 2021-03-04
 | 
				
			||||||
 | 
					    ███████████████████████████
 | 
				
			||||||
 | 
					    ███▒███████▒███████▒███████         https://mntre.com/reform
 | 
				
			||||||
 | 
					    ███  ▒█████  ▒█████  ▒█████         https://www.debian.org
 | 
				
			||||||
 | 
					           ▒███    ▒███    ▒███
 | 
				
			||||||
 | 
					             ▒█      ▒█      ▒█         [31;1m████[33;1m████[32;1m████[0m[36m████[34;1m████[0m[35m████[0m
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										1
									
								
								src/recipes/default/hook/data/overlay/etc/resolv.conf
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								src/recipes/default/hook/data/overlay/etc/resolv.conf
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1 @@
 | 
				
			||||||
 | 
					nameserver 8.8.8.8
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,11 @@
 | 
				
			||||||
 | 
					[Unit]
 | 
				
			||||||
 | 
					Description=MNT Reform Hardware Defaults Setup
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Service]
 | 
				
			||||||
 | 
					Type=oneshot
 | 
				
			||||||
 | 
					ExecStart=/usr/sbin/reform-hw-setup.sh
 | 
				
			||||||
 | 
					StandardOutput=journal
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Install]
 | 
				
			||||||
 | 
					WantedBy=sysinit.target
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										85
									
								
								src/recipes/default/hook/data/overlay/root/build_script.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										85
									
								
								src/recipes/default/hook/data/overlay/root/build_script.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,85 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					exec 3>/tmp/build_error.log
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function error {
 | 
				
			||||||
 | 
					    >&2 printf "\e[31mE\e[0m: %s\n" "$1"
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function get_current_dir {
 | 
				
			||||||
 | 
					    # this function return the absolute path of the script
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    local script_path
 | 
				
			||||||
 | 
					    script_path="$(dirname $0)"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    # If the path begin with /, this is an absolute part
 | 
				
			||||||
 | 
					    if [[ "$script_path" =~ ^/[[:graph:]]*$ ]]
 | 
				
			||||||
 | 
					    then
 | 
				
			||||||
 | 
					        printf "%s" "$script_path"
 | 
				
			||||||
 | 
					        return 
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    local current_path
 | 
				
			||||||
 | 
					    current_path="$(pwd)"
 | 
				
			||||||
 | 
					    if [[ $script_path == "." ]]
 | 
				
			||||||
 | 
					    then
 | 
				
			||||||
 | 
					        script_path=""
 | 
				
			||||||
 | 
					    elif [[ $script_path =~ ^./[[:graph:]]*$ ]]
 | 
				
			||||||
 | 
					    then
 | 
				
			||||||
 | 
					        script_path=${script_path##./}
 | 
				
			||||||
 | 
					        echo " $current_path trad: $script_path"
 | 
				
			||||||
 | 
					    else
 | 
				
			||||||
 | 
					        while [[ $script_path =~ ^../[[:graph:]]*$ ]]
 | 
				
			||||||
 | 
					        do
 | 
				
			||||||
 | 
					            script_path="${script_path##../}"
 | 
				
			||||||
 | 
					            current_path="${current_path%/*}"
 | 
				
			||||||
 | 
					        done
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					    printf "%s/%s" "${current_path}" "${script_path}"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					current_dir=$(get_current_dir)
 | 
				
			||||||
 | 
					scripts_dir="${current_dir}/scripts"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					for script in ${scripts_dir}/*.sh
 | 
				
			||||||
 | 
					do
 | 
				
			||||||
 | 
					    source $script
 | 
				
			||||||
 | 
					    printf "\nBuilding %s\n" "$name"
 | 
				
			||||||
 | 
					    printf "  >> cloning repository\n"
 | 
				
			||||||
 | 
					    $clone_command 2>&3 || {
 | 
				
			||||||
 | 
					        error "Error when cloning $name"
 | 
				
			||||||
 | 
					        exit 1
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    post_clone_hook
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    cd $clone_directory   
 | 
				
			||||||
 | 
					    if [[ ! $patches_dir == 0 ]]
 | 
				
			||||||
 | 
					    then
 | 
				
			||||||
 | 
					        printf "  >> patching\n"
 | 
				
			||||||
 | 
					        for patch in ${current_dir}/${patches_dir}/*
 | 
				
			||||||
 | 
					        do
 | 
				
			||||||
 | 
					            printf "   >  patchfile: %s" "$patch"
 | 
				
			||||||
 | 
					            patch -p1 < "$patch" || {
 | 
				
			||||||
 | 
					                error "Error whan applying patch, check log\n"; 
 | 
				
			||||||
 | 
					                exit 1; 
 | 
				
			||||||
 | 
					            }
 | 
				
			||||||
 | 
					        done
 | 
				
			||||||
 | 
					    fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    printf "  >> configure\n"
 | 
				
			||||||
 | 
					    $configure_command 2>&3 1>/dev/null|| {
 | 
				
			||||||
 | 
					        error "Error when configuring $name, command: $configure_command"
 | 
				
			||||||
 | 
					        exit 1
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    post_configure_hook
 | 
				
			||||||
 | 
					    
 | 
				
			||||||
 | 
					    printf "  >> Build and install\n"
 | 
				
			||||||
 | 
					    $build_command 2>&3 || {
 | 
				
			||||||
 | 
					        error "Error when buildind and installing $name, command: $build_command"
 | 
				
			||||||
 | 
					        exit 1
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    cd ..
 | 
				
			||||||
 | 
					    post_install_hook
 | 
				
			||||||
 | 
					done
 | 
				
			||||||
 | 
					exit 0
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,436 @@
 | 
				
			||||||
 | 
					From 96106df17897b862b87937d6222a3e6483f45480 Mon Sep 17 00:00:00 2001
 | 
				
			||||||
 | 
					From: Lucas Stach <l.stach@pengutronix.de>
 | 
				
			||||||
 | 
					Date: Fri, 13 Nov 2020 14:26:23 +0100
 | 
				
			||||||
 | 
					Subject: [PATCH 1/6] frontend/dri: copy image use in dup_image
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Don't lose the use flags when dup'ing an image.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					 src/gallium/frontends/dri/dri2.c | 1 +
 | 
				
			||||||
 | 
					 1 file changed, 1 insertion(+)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c
 | 
				
			||||||
 | 
					index 0c0168497a2..1cd42cd8114 100644
 | 
				
			||||||
 | 
					--- a/src/gallium/frontends/dri/dri2.c
 | 
				
			||||||
 | 
					+++ b/src/gallium/frontends/dri/dri2.c
 | 
				
			||||||
 | 
					@@ -1308,6 +1308,7 @@ dri2_dup_image(__DRIimage *image, void *loaderPrivate)
 | 
				
			||||||
 | 
					    img->dri_format = image->dri_format;
 | 
				
			||||||
 | 
					    /* This should be 0 for sub images, but dup is also used for base images. */
 | 
				
			||||||
 | 
					    img->dri_components = image->dri_components;
 | 
				
			||||||
 | 
					+   img->use = image->use;
 | 
				
			||||||
 | 
					    img->loader_private = loaderPrivate;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					    return img;
 | 
				
			||||||
 | 
					-- 
 | 
				
			||||||
 | 
					GitLab
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					From 00add4be8620175ccc69869e22479962dacdce9d Mon Sep 17 00:00:00 2001
 | 
				
			||||||
 | 
					From: Lucas Stach <l.stach@pengutronix.de>
 | 
				
			||||||
 | 
					Date: Fri, 13 Nov 2020 14:38:41 +0100
 | 
				
			||||||
 | 
					Subject: [PATCH 2/6] dri: bring back use flags for createImageWithModifiers
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					createImageWithModifiers dropped the use flags that were present with
 | 
				
			||||||
 | 
					the createImage interface as it was believed at the time that all those
 | 
				
			||||||
 | 
					use flags could be expressed as a modifier. This turned out to be untrue,
 | 
				
			||||||
 | 
					as there are some use flags like SCANOUT and the BACKBUFFER hint that
 | 
				
			||||||
 | 
					won't ever get a eqivalent modifier expression.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					 include/GL/internal/dri_interface.h      | 1 +
 | 
				
			||||||
 | 
					 src/egl/drivers/dri2/platform_wayland.c  | 4 ++--
 | 
				
			||||||
 | 
					 src/gallium/frontends/dri/dri2.c         | 5 ++---
 | 
				
			||||||
 | 
					 src/gbm/backends/dri/gbm_dri.c           | 2 +-
 | 
				
			||||||
 | 
					 src/loader/loader_dri3_helper.c          | 3 +++
 | 
				
			||||||
 | 
					 src/mesa/drivers/dri/i965/intel_screen.c | 2 +-
 | 
				
			||||||
 | 
					 6 files changed, 10 insertions(+), 7 deletions(-)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					diff --git a/include/GL/internal/dri_interface.h b/include/GL/internal/dri_interface.h
 | 
				
			||||||
 | 
					index 39d5dd07533..222821428d0 100644
 | 
				
			||||||
 | 
					--- a/include/GL/internal/dri_interface.h
 | 
				
			||||||
 | 
					+++ b/include/GL/internal/dri_interface.h
 | 
				
			||||||
 | 
					@@ -1678,6 +1678,7 @@ struct __DRIimageExtensionRec {
 | 
				
			||||||
 | 
					                                            int width, int height, int format,
 | 
				
			||||||
 | 
					                                            const uint64_t *modifiers,
 | 
				
			||||||
 | 
					                                            const unsigned int modifier_count,
 | 
				
			||||||
 | 
					+                                           unsigned int use,
 | 
				
			||||||
 | 
					                                            void *loaderPrivate);
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					    /*
 | 
				
			||||||
 | 
					diff --git a/src/egl/drivers/dri2/platform_wayland.c b/src/egl/drivers/dri2/platform_wayland.c
 | 
				
			||||||
 | 
					index c0b26c4b623..bb508cbe421 100644
 | 
				
			||||||
 | 
					--- a/src/egl/drivers/dri2/platform_wayland.c
 | 
				
			||||||
 | 
					+++ b/src/egl/drivers/dri2/platform_wayland.c
 | 
				
			||||||
 | 
					@@ -595,7 +595,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
 | 
				
			||||||
 | 
					                                                       dri2_surf->base.Height,
 | 
				
			||||||
 | 
					                                                       linear_dri_image_format,
 | 
				
			||||||
 | 
					                                                       &linear_mod,
 | 
				
			||||||
 | 
					-                                                      1,
 | 
				
			||||||
 | 
					+                                                      1, use_flags,
 | 
				
			||||||
 | 
					                                                       NULL);
 | 
				
			||||||
 | 
					       } else {
 | 
				
			||||||
 | 
					          dri2_surf->back->linear_copy =
 | 
				
			||||||
 | 
					@@ -624,7 +624,7 @@ get_back_bo(struct dri2_egl_surface *dri2_surf)
 | 
				
			||||||
 | 
					                                                      dri2_surf->base.Height,
 | 
				
			||||||
 | 
					                                                      dri_image_format,
 | 
				
			||||||
 | 
					                                                      modifiers,
 | 
				
			||||||
 | 
					-                                                     num_modifiers,
 | 
				
			||||||
 | 
					+                                                     num_modifiers, use_flags,
 | 
				
			||||||
 | 
					                                                      NULL);
 | 
				
			||||||
 | 
					       } else {
 | 
				
			||||||
 | 
					          dri2_surf->back->dri_image =
 | 
				
			||||||
 | 
					diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c
 | 
				
			||||||
 | 
					index 1cd42cd8114..1f1e7a9a65e 100644
 | 
				
			||||||
 | 
					--- a/src/gallium/frontends/dri/dri2.c
 | 
				
			||||||
 | 
					+++ b/src/gallium/frontends/dri/dri2.c
 | 
				
			||||||
 | 
					@@ -1074,12 +1074,11 @@ static __DRIimage *
 | 
				
			||||||
 | 
					 dri2_create_image_with_modifiers(__DRIscreen *dri_screen,
 | 
				
			||||||
 | 
					                                  int width, int height, int format,
 | 
				
			||||||
 | 
					                                  const uint64_t *modifiers,
 | 
				
			||||||
 | 
					-                                 const unsigned count,
 | 
				
			||||||
 | 
					+                                 const unsigned count, unsigned int use,
 | 
				
			||||||
 | 
					                                  void *loaderPrivate)
 | 
				
			||||||
 | 
					 {
 | 
				
			||||||
 | 
					    return dri2_create_image_common(dri_screen, width, height, format,
 | 
				
			||||||
 | 
					-                                   __DRI_IMAGE_USE_SHARE, modifiers, count,
 | 
				
			||||||
 | 
					-                                   loaderPrivate);
 | 
				
			||||||
 | 
					+                                   use, modifiers, count, loaderPrivate);
 | 
				
			||||||
 | 
					 }
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					 static bool
 | 
				
			||||||
 | 
					diff --git a/src/gbm/backends/dri/gbm_dri.c b/src/gbm/backends/dri/gbm_dri.c
 | 
				
			||||||
 | 
					index b5634741554..aff3a107e7d 100644
 | 
				
			||||||
 | 
					--- a/src/gbm/backends/dri/gbm_dri.c
 | 
				
			||||||
 | 
					+++ b/src/gbm/backends/dri/gbm_dri.c
 | 
				
			||||||
 | 
					@@ -1173,7 +1173,7 @@ gbm_dri_bo_create(struct gbm_device *gbm,
 | 
				
			||||||
 | 
					                                               width, height,
 | 
				
			||||||
 | 
					                                               dri_format,
 | 
				
			||||||
 | 
					                                               modifiers, count,
 | 
				
			||||||
 | 
					-                                              bo);
 | 
				
			||||||
 | 
					+                                              dri_use, bo);
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					       if (bo->image) {
 | 
				
			||||||
 | 
					          /* The client passed in a list of invalid modifiers */
 | 
				
			||||||
 | 
					diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c
 | 
				
			||||||
 | 
					index ccf8d1795e7..6fc6a2b705a 100644
 | 
				
			||||||
 | 
					--- a/src/loader/loader_dri3_helper.c
 | 
				
			||||||
 | 
					+++ b/src/loader/loader_dri3_helper.c
 | 
				
			||||||
 | 
					@@ -1407,6 +1407,9 @@ dri3_alloc_render_buffer(struct loader_dri3_drawable *draw, unsigned int format,
 | 
				
			||||||
 | 
					                                                                        format,
 | 
				
			||||||
 | 
					                                                                        modifiers,
 | 
				
			||||||
 | 
					                                                                        count,
 | 
				
			||||||
 | 
					+                                                                       __DRI_IMAGE_USE_SHARE |
 | 
				
			||||||
 | 
					+                                                                       __DRI_IMAGE_USE_SCANOUT |
 | 
				
			||||||
 | 
					+                                                                       __DRI_IMAGE_USE_BACKBUFFER,
 | 
				
			||||||
 | 
					                                                                        buffer);
 | 
				
			||||||
 | 
					          }
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c
 | 
				
			||||||
 | 
					index 4492d43c040..4511b962eef 100644
 | 
				
			||||||
 | 
					--- a/src/mesa/drivers/dri/i965/intel_screen.c
 | 
				
			||||||
 | 
					+++ b/src/mesa/drivers/dri/i965/intel_screen.c
 | 
				
			||||||
 | 
					@@ -893,7 +893,7 @@ static __DRIimage *
 | 
				
			||||||
 | 
					 intel_create_image_with_modifiers(__DRIscreen *dri_screen,
 | 
				
			||||||
 | 
					                                   int width, int height, int format,
 | 
				
			||||||
 | 
					                                   const uint64_t *modifiers,
 | 
				
			||||||
 | 
					-                                  const unsigned count,
 | 
				
			||||||
 | 
					+                                  const unsigned count, unsigned int use,
 | 
				
			||||||
 | 
					                                   void *loaderPrivate)
 | 
				
			||||||
 | 
					 {
 | 
				
			||||||
 | 
					    return intel_create_image_common(dri_screen, width, height, format, 0,
 | 
				
			||||||
 | 
					-- 
 | 
				
			||||||
 | 
					GitLab
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					From 587aac46dbadf2aca1489aadd4216e592e11e17b Mon Sep 17 00:00:00 2001
 | 
				
			||||||
 | 
					From: Lucas Stach <l.stach@pengutronix.de>
 | 
				
			||||||
 | 
					Date: Fri, 13 Nov 2020 14:59:52 +0100
 | 
				
			||||||
 | 
					Subject: [PATCH 3/6] frontend/dri: add EXPLICIT_FLUSH hint in
 | 
				
			||||||
 | 
					 dri2_resource_get_param
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					dri2_resource_get_param() is called from two different places right now.
 | 
				
			||||||
 | 
					Only one of them adds the EXPLICIT_FLUSH hint to the handle usage, which
 | 
				
			||||||
 | 
					may disable the optimizations provided by this hint without a reason.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Make sure to always add this hint when appropriate.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					 src/gallium/frontends/dri/dri2.c | 6 +++---
 | 
				
			||||||
 | 
					 1 file changed, 3 insertions(+), 3 deletions(-)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					diff --git a/src/gallium/frontends/dri/dri2.c b/src/gallium/frontends/dri/dri2.c
 | 
				
			||||||
 | 
					index 1f1e7a9a65e..7851ebceb3e 100644
 | 
				
			||||||
 | 
					--- a/src/gallium/frontends/dri/dri2.c
 | 
				
			||||||
 | 
					+++ b/src/gallium/frontends/dri/dri2.c
 | 
				
			||||||
 | 
					@@ -1198,6 +1198,9 @@ dri2_resource_get_param(__DRIimage *image, enum pipe_resource_param param,
 | 
				
			||||||
 | 
					    if (!pscreen->resource_get_param)
 | 
				
			||||||
 | 
					       return false;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					+   if (image->use & __DRI_IMAGE_USE_BACKBUFFER)
 | 
				
			||||||
 | 
					+      handle_usage |= PIPE_HANDLE_USAGE_EXPLICIT_FLUSH;
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					    return pscreen->resource_get_param(pscreen, NULL, image->texture,
 | 
				
			||||||
 | 
					                                       image->plane, 0, 0, param, handle_usage,
 | 
				
			||||||
 | 
					                                       value);
 | 
				
			||||||
 | 
					@@ -1242,9 +1245,6 @@ dri2_query_image_by_resource_param(__DRIimage *image, int attrib, int *value)
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					    handle_usage = PIPE_HANDLE_USAGE_FRAMEBUFFER_WRITE;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					-   if (image->use & __DRI_IMAGE_USE_BACKBUFFER)
 | 
				
			||||||
 | 
					-      handle_usage |= PIPE_HANDLE_USAGE_EXPLICIT_FLUSH;
 | 
				
			||||||
 | 
					-
 | 
				
			||||||
 | 
					    if (!dri2_resource_get_param(image, param, handle_usage, &res_param))
 | 
				
			||||||
 | 
					       return false;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					-- 
 | 
				
			||||||
 | 
					GitLab
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					From 59f74212bbb5e28badd0775929e42856c9a01d35 Mon Sep 17 00:00:00 2001
 | 
				
			||||||
 | 
					From: Lucas Stach <l.stach@pengutronix.de>
 | 
				
			||||||
 | 
					Date: Fri, 13 Nov 2020 15:03:37 +0100
 | 
				
			||||||
 | 
					Subject: [PATCH 4/6] etnaviv: remove double assigment of surface->texture
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					surf->base.texture is already assigned earlier via a proper
 | 
				
			||||||
 | 
					pipe_resource_reference call. Remove the superfluous assignement.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
 | 
				
			||||||
 | 
					Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					 src/gallium/drivers/etnaviv/etnaviv_surface.c | 1 -
 | 
				
			||||||
 | 
					 1 file changed, 1 deletion(-)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					diff --git a/src/gallium/drivers/etnaviv/etnaviv_surface.c b/src/gallium/drivers/etnaviv/etnaviv_surface.c
 | 
				
			||||||
 | 
					index c78973bdb09..52a937652d2 100644
 | 
				
			||||||
 | 
					--- a/src/gallium/drivers/etnaviv/etnaviv_surface.c
 | 
				
			||||||
 | 
					+++ b/src/gallium/drivers/etnaviv/etnaviv_surface.c
 | 
				
			||||||
 | 
					@@ -112,7 +112,6 @@ etna_create_surface(struct pipe_context *pctx, struct pipe_resource *prsc,
 | 
				
			||||||
 | 
					       etna_screen_resource_alloc_ts(pctx->screen, rsc);
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					-   surf->base.texture = &rsc->base;
 | 
				
			||||||
 | 
					    surf->base.format = templat->format;
 | 
				
			||||||
 | 
					    surf->base.width = rsc->levels[level].width;
 | 
				
			||||||
 | 
					    surf->base.height = rsc->levels[level].height;
 | 
				
			||||||
 | 
					-- 
 | 
				
			||||||
 | 
					GitLab
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					From 570908323e02c4558f5a9abc2d82621056cd65ab Mon Sep 17 00:00:00 2001
 | 
				
			||||||
 | 
					From: Lucas Stach <l.stach@pengutronix.de>
 | 
				
			||||||
 | 
					Date: Tue, 17 Nov 2020 12:08:13 +0100
 | 
				
			||||||
 | 
					Subject: [PATCH 5/6] etnaviv: compact etna_state_updates
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Just reclaim a bit of screen real estate, purely cosmetic change.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					 src/gallium/drivers/etnaviv/etnaviv_state.c | 18 ++++++------------
 | 
				
			||||||
 | 
					 1 file changed, 6 insertions(+), 12 deletions(-)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					diff --git a/src/gallium/drivers/etnaviv/etnaviv_state.c b/src/gallium/drivers/etnaviv/etnaviv_state.c
 | 
				
			||||||
 | 
					index 1b4a7040b50..84fea58ecb5 100644
 | 
				
			||||||
 | 
					--- a/src/gallium/drivers/etnaviv/etnaviv_state.c
 | 
				
			||||||
 | 
					+++ b/src/gallium/drivers/etnaviv/etnaviv_state.c
 | 
				
			||||||
 | 
					@@ -749,24 +749,18 @@ struct etna_state_updater {
 | 
				
			||||||
 | 
					 static const struct etna_state_updater etna_state_updates[] = {
 | 
				
			||||||
 | 
					    {
 | 
				
			||||||
 | 
					       etna_shader_update_vertex, ETNA_DIRTY_SHADER | ETNA_DIRTY_VERTEX_ELEMENTS,
 | 
				
			||||||
 | 
					-   },
 | 
				
			||||||
 | 
					-   {
 | 
				
			||||||
 | 
					+   }, {
 | 
				
			||||||
 | 
					       etna_shader_link, ETNA_DIRTY_SHADER,
 | 
				
			||||||
 | 
					-   },
 | 
				
			||||||
 | 
					-   {
 | 
				
			||||||
 | 
					+   }, {
 | 
				
			||||||
 | 
					       etna_update_blend, ETNA_DIRTY_BLEND | ETNA_DIRTY_FRAMEBUFFER
 | 
				
			||||||
 | 
					-   },
 | 
				
			||||||
 | 
					-   {
 | 
				
			||||||
 | 
					+   }, {
 | 
				
			||||||
 | 
					       etna_update_blend_color, ETNA_DIRTY_BLEND_COLOR | ETNA_DIRTY_FRAMEBUFFER,
 | 
				
			||||||
 | 
					-   },
 | 
				
			||||||
 | 
					-   {
 | 
				
			||||||
 | 
					+   }, {
 | 
				
			||||||
 | 
					       etna_update_ts_config, ETNA_DIRTY_DERIVE_TS,
 | 
				
			||||||
 | 
					-   },
 | 
				
			||||||
 | 
					-   {
 | 
				
			||||||
 | 
					+   }, {
 | 
				
			||||||
 | 
					       etna_update_clipping, ETNA_DIRTY_SCISSOR | ETNA_DIRTY_FRAMEBUFFER |
 | 
				
			||||||
 | 
					                             ETNA_DIRTY_RASTERIZER | ETNA_DIRTY_VIEWPORT,
 | 
				
			||||||
 | 
					-   },
 | 
				
			||||||
 | 
					-   {
 | 
				
			||||||
 | 
					+   }, {
 | 
				
			||||||
 | 
					       etna_update_zsa, ETNA_DIRTY_ZSA | ETNA_DIRTY_SHADER,
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					 };
 | 
				
			||||||
 | 
					-- 
 | 
				
			||||||
 | 
					GitLab
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					From 537c7a6ea3fd2e5a6433e52b406ba39b89f520d9 Mon Sep 17 00:00:00 2001
 | 
				
			||||||
 | 
					From: Lucas Stach <l.stach@pengutronix.de>
 | 
				
			||||||
 | 
					Date: Fri, 13 Nov 2020 15:05:55 +0100
 | 
				
			||||||
 | 
					Subject: [PATCH 6/6] etnaviv: flush used render buffers on context flush when
 | 
				
			||||||
 | 
					 neccessary
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Some resources like backbuffers are explicitly flushed by the frontend
 | 
				
			||||||
 | 
					at the appropriate time, others however won't get flushed explicitly.
 | 
				
			||||||
 | 
					Remember those resources when they get emitted as a render buffer and
 | 
				
			||||||
 | 
					flush them on a context flush to make their content visible to other
 | 
				
			||||||
 | 
					entities sharing the buffer.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					We still keep the optimized path for most resources where the frontend
 | 
				
			||||||
 | 
					promises to do the flushing for us and only enable implicit flushing
 | 
				
			||||||
 | 
					when a buffer handle is exported/imported without the
 | 
				
			||||||
 | 
					PIPE_HANDLE_USAGE_EXPLICIT_FLUSH flag set.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Signed-off-by: Lucas Stach <l.stach@pengutronix.de>
 | 
				
			||||||
 | 
					---
 | 
				
			||||||
 | 
					 src/gallium/drivers/etnaviv/etnaviv_context.c  | 16 ++++++++++++++++
 | 
				
			||||||
 | 
					 src/gallium/drivers/etnaviv/etnaviv_context.h  |  3 +++
 | 
				
			||||||
 | 
					 src/gallium/drivers/etnaviv/etnaviv_resource.c |  7 +++++++
 | 
				
			||||||
 | 
					 src/gallium/drivers/etnaviv/etnaviv_resource.h |  2 ++
 | 
				
			||||||
 | 
					 src/gallium/drivers/etnaviv/etnaviv_state.c    | 17 +++++++++++++++++
 | 
				
			||||||
 | 
					 5 files changed, 45 insertions(+)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.c b/src/gallium/drivers/etnaviv/etnaviv_context.c
 | 
				
			||||||
 | 
					index 9c334a450c6..80c5d430419 100644
 | 
				
			||||||
 | 
					--- a/src/gallium/drivers/etnaviv/etnaviv_context.c
 | 
				
			||||||
 | 
					+++ b/src/gallium/drivers/etnaviv/etnaviv_context.c
 | 
				
			||||||
 | 
					@@ -128,6 +128,9 @@ etna_context_destroy(struct pipe_context *pctx)
 | 
				
			||||||
 | 
					       _mesa_set_destroy(ctx->used_resources_write, NULL);
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					+   if (ctx->flush_resources)
 | 
				
			||||||
 | 
					+      _mesa_set_destroy(ctx->flush_resources, NULL);
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					    mtx_unlock(&ctx->lock);
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					    if (ctx->dummy_desc_bo)
 | 
				
			||||||
 | 
					@@ -475,6 +478,14 @@ etna_flush(struct pipe_context *pctx, struct pipe_fence_handle **fence,
 | 
				
			||||||
 | 
					    list_for_each_entry(struct etna_acc_query, aq, &ctx->active_acc_queries, node)
 | 
				
			||||||
 | 
					       etna_acc_query_suspend(aq, ctx);
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					+   /* flush all resources that need an implicit flush */
 | 
				
			||||||
 | 
					+   set_foreach(ctx->flush_resources, entry) {
 | 
				
			||||||
 | 
					+      struct pipe_resource *prsc = (struct pipe_resource *)entry->key;
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					+      pctx->flush_resource(pctx, prsc);
 | 
				
			||||||
 | 
					+   }
 | 
				
			||||||
 | 
					+   _mesa_set_clear(ctx->flush_resources, NULL);
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					    etna_cmd_stream_flush(ctx->stream, ctx->in_fence_fd,
 | 
				
			||||||
 | 
					                           (flags & PIPE_FLUSH_FENCE_FD) ? &out_fence_fd : NULL);
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					@@ -581,6 +592,11 @@ etna_context_create(struct pipe_screen *pscreen, void *priv, unsigned flags)
 | 
				
			||||||
 | 
					    if (!ctx->used_resources_write)
 | 
				
			||||||
 | 
					       goto fail;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					+   ctx->flush_resources = _mesa_set_create(NULL, _mesa_hash_pointer,
 | 
				
			||||||
 | 
					+                                           _mesa_key_pointer_equal);
 | 
				
			||||||
 | 
					+   if (!ctx->flush_resources)
 | 
				
			||||||
 | 
					+      goto fail;
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					    mtx_init(&ctx->lock, mtx_recursive);
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					    /* context ctxate setup */
 | 
				
			||||||
 | 
					diff --git a/src/gallium/drivers/etnaviv/etnaviv_context.h b/src/gallium/drivers/etnaviv/etnaviv_context.h
 | 
				
			||||||
 | 
					index dd6af3d93e6..112902aac8a 100644
 | 
				
			||||||
 | 
					--- a/src/gallium/drivers/etnaviv/etnaviv_context.h
 | 
				
			||||||
 | 
					+++ b/src/gallium/drivers/etnaviv/etnaviv_context.h
 | 
				
			||||||
 | 
					@@ -206,6 +206,9 @@ struct etna_context {
 | 
				
			||||||
 | 
					    struct set *used_resources_read;
 | 
				
			||||||
 | 
					    struct set *used_resources_write;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					+   /* resources that must be flushed implicitly at the context flush time */
 | 
				
			||||||
 | 
					+   struct set *flush_resources;
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					    mtx_t lock;
 | 
				
			||||||
 | 
					 };
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.c b/src/gallium/drivers/etnaviv/etnaviv_resource.c
 | 
				
			||||||
 | 
					index ae4f24b9b44..0c8c28e66aa 100644
 | 
				
			||||||
 | 
					--- a/src/gallium/drivers/etnaviv/etnaviv_resource.c
 | 
				
			||||||
 | 
					+++ b/src/gallium/drivers/etnaviv/etnaviv_resource.c
 | 
				
			||||||
 | 
					@@ -265,6 +265,7 @@ etna_resource_alloc(struct pipe_screen *pscreen, unsigned layout,
 | 
				
			||||||
 | 
					    rsc->base.nr_samples = nr_samples;
 | 
				
			||||||
 | 
					    rsc->layout = layout;
 | 
				
			||||||
 | 
					    rsc->halign = halign;
 | 
				
			||||||
 | 
					+   rsc->explicit_flush = true;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					    pipe_reference_init(&rsc->base.reference, 1);
 | 
				
			||||||
 | 
					    util_range_init(&rsc->valid_buffer_range);
 | 
				
			||||||
 | 
					@@ -519,6 +520,9 @@ etna_resource_from_handle(struct pipe_screen *pscreen,
 | 
				
			||||||
 | 
					    rsc->layout = modifier_to_layout(handle->modifier);
 | 
				
			||||||
 | 
					    rsc->halign = TEXTURE_HALIGN_FOUR;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					+   if (usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH)
 | 
				
			||||||
 | 
					+      rsc->explicit_flush = true;
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					    level->width = tmpl->width0;
 | 
				
			||||||
 | 
					    level->height = tmpl->height0;
 | 
				
			||||||
 | 
					    level->depth = tmpl->depth0;
 | 
				
			||||||
 | 
					@@ -584,6 +588,9 @@ etna_resource_get_handle(struct pipe_screen *pscreen,
 | 
				
			||||||
 | 
					    handle->offset = rsc->levels[0].offset;
 | 
				
			||||||
 | 
					    handle->modifier = layout_to_modifier(rsc->layout);
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					+   if (!(usage & PIPE_HANDLE_USAGE_EXPLICIT_FLUSH))
 | 
				
			||||||
 | 
					+      rsc->explicit_flush = false;
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					    if (handle->type == WINSYS_HANDLE_TYPE_SHARED) {
 | 
				
			||||||
 | 
					       return etna_bo_get_name(rsc->bo, &handle->handle) == 0;
 | 
				
			||||||
 | 
					    } else if (handle->type == WINSYS_HANDLE_TYPE_KMS) {
 | 
				
			||||||
 | 
					diff --git a/src/gallium/drivers/etnaviv/etnaviv_resource.h b/src/gallium/drivers/etnaviv/etnaviv_resource.h
 | 
				
			||||||
 | 
					index cb83e891d34..167cf4ed069 100644
 | 
				
			||||||
 | 
					--- a/src/gallium/drivers/etnaviv/etnaviv_resource.h
 | 
				
			||||||
 | 
					+++ b/src/gallium/drivers/etnaviv/etnaviv_resource.h
 | 
				
			||||||
 | 
					@@ -93,6 +93,8 @@ struct etna_resource {
 | 
				
			||||||
 | 
					    struct pipe_resource *texture;
 | 
				
			||||||
 | 
					    /* for when PE doesn't support the base layout */
 | 
				
			||||||
 | 
					    struct pipe_resource *render;
 | 
				
			||||||
 | 
					+   /* frontend flushes resource via an explicit call to flush_resource */
 | 
				
			||||||
 | 
					+   bool explicit_flush;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					    enum etna_resource_status status;
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					diff --git a/src/gallium/drivers/etnaviv/etnaviv_state.c b/src/gallium/drivers/etnaviv/etnaviv_state.c
 | 
				
			||||||
 | 
					index 84fea58ecb5..5848735ab14 100644
 | 
				
			||||||
 | 
					--- a/src/gallium/drivers/etnaviv/etnaviv_state.c
 | 
				
			||||||
 | 
					+++ b/src/gallium/drivers/etnaviv/etnaviv_state.c
 | 
				
			||||||
 | 
					@@ -741,6 +741,21 @@ etna_update_zsa(struct etna_context *ctx)
 | 
				
			||||||
 | 
					    return true;
 | 
				
			||||||
 | 
					 }
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					+static bool
 | 
				
			||||||
 | 
					+etna_record_flush_resources(struct etna_context *ctx)
 | 
				
			||||||
 | 
					+{
 | 
				
			||||||
 | 
					+   struct pipe_framebuffer_state *fb = &ctx->framebuffer_s;
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					+   if (fb->nr_cbufs > 0) {
 | 
				
			||||||
 | 
					+      struct etna_surface *surf = etna_surface(fb->cbufs[0]);
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					+      if (!etna_resource(surf->prsc)->explicit_flush)
 | 
				
			||||||
 | 
					+         _mesa_set_add(ctx->flush_resources, surf->prsc);
 | 
				
			||||||
 | 
					+   }
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					+   return true;
 | 
				
			||||||
 | 
					+}
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					 struct etna_state_updater {
 | 
				
			||||||
 | 
					    bool (*update)(struct etna_context *ctx);
 | 
				
			||||||
 | 
					    uint32_t dirty;
 | 
				
			||||||
 | 
					@@ -762,6 +777,8 @@ static const struct etna_state_updater etna_state_updates[] = {
 | 
				
			||||||
 | 
					                             ETNA_DIRTY_RASTERIZER | ETNA_DIRTY_VIEWPORT,
 | 
				
			||||||
 | 
					    }, {
 | 
				
			||||||
 | 
					       etna_update_zsa, ETNA_DIRTY_ZSA | ETNA_DIRTY_SHADER,
 | 
				
			||||||
 | 
					+   }, {
 | 
				
			||||||
 | 
					+      etna_record_flush_resources, ETNA_DIRTY_FRAMEBUFFER,
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					 };
 | 
				
			||||||
 | 
					 
 | 
				
			||||||
 | 
					-- 
 | 
				
			||||||
 | 
					GitLab
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,12 @@
 | 
				
			||||||
 | 
					--- a/src/gallium/drivers/etnaviv/etnaviv_screen.c
 | 
				
			||||||
 | 
					+++ b/src/gallium/drivers/etnaviv/etnaviv_screen.c
 | 
				
			||||||
 | 
					@@ -445,6 +445,10 @@ etna_screen_is_format_supported(struct pipe_screen *pscreen,
 | 
				
			||||||
 | 
					    struct etna_screen *screen = etna_screen(pscreen);
 | 
				
			||||||
 | 
					    unsigned allowed = 0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					+   /* HACK to disable all MSAA, as is causes GPU crashes */
 | 
				
			||||||
 | 
					+   if (sample_count > 1)
 | 
				
			||||||
 | 
					+      return false;
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					    if (!gpu_supports_texture_target(screen, target))
 | 
				
			||||||
 | 
					       return false;
 | 
				
			||||||
							
								
								
									
										19
									
								
								src/recipes/default/hook/data/overlay/root/scripts/10.drm.sh
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										19
									
								
								src/recipes/default/hook/data/overlay/root/scripts/10.drm.sh
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					name="DRM"
 | 
				
			||||||
 | 
					patches_dir=0
 | 
				
			||||||
 | 
					clone_directory="drm"
 | 
				
			||||||
 | 
					clone_command="git clone --depth 1 https://gitlab.freedesktop.org/mesa/drm.git"
 | 
				
			||||||
 | 
					configure_command="meson build -Detnaviv=true -Dradeon=false -Damdgpu=false -Dvmwgfx=false -Dfreedreno=false -Dvc4=false -Dnouveau=false"
 | 
				
			||||||
 | 
					build_command="ninja -C build install"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Hooks
 | 
				
			||||||
 | 
					function post_clone_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_configure_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_install_hook {
 | 
				
			||||||
 | 
					    ldconfig
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					name="MESA"
 | 
				
			||||||
 | 
					patches_dir="mesa_patches"
 | 
				
			||||||
 | 
					clone_directory="mesa"
 | 
				
			||||||
 | 
					clone_command="git clone --depth 1 --branch mesa-20.3.4 https://gitlab.freedesktop.org/mesa/mesa.git"
 | 
				
			||||||
 | 
					configure_command="meson build -Dplatforms=x11,wayland -Ddri3=true -Dgallium-drivers=swrast,etnaviv,kmsro,virgl -Dgbm=enabled -Degl=enabled -Dbuildtype=release -Db_ndebug=true"
 | 
				
			||||||
 | 
					build_command="ninja -C build install"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Hooks
 | 
				
			||||||
 | 
					function post_clone_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_configure_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_install_hook {
 | 
				
			||||||
 | 
					    ldconfig
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					name="Wayland"
 | 
				
			||||||
 | 
					patches_dir=0
 | 
				
			||||||
 | 
					clone_directory="wayland"
 | 
				
			||||||
 | 
					clone_command="git clone --depth 1 https://github.com/wayland-project/wayland.git" 
 | 
				
			||||||
 | 
					configure_command="meson build -Ddocumentation=false"
 | 
				
			||||||
 | 
					build_command="ninja -C build install"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Hooks
 | 
				
			||||||
 | 
					function post_clone_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_configure_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_install_hook {
 | 
				
			||||||
 | 
					    ldconfig
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					name="wlroots"
 | 
				
			||||||
 | 
					patches_dir=0
 | 
				
			||||||
 | 
					clone_directory="wlroots"
 | 
				
			||||||
 | 
					clone_command="git clone --depth 1 --branch=0.12.0 https://github.com/swaywm/wlroots.git"
 | 
				
			||||||
 | 
					configure_command="meson build"
 | 
				
			||||||
 | 
					build_command="ninja -C build install"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Hooks
 | 
				
			||||||
 | 
					function post_clone_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_configure_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_install_hook {
 | 
				
			||||||
 | 
					    ldconfig
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					name="sway"
 | 
				
			||||||
 | 
					patches_dir=0
 | 
				
			||||||
 | 
					clone_directory="sway"
 | 
				
			||||||
 | 
					clone_command="git clone --depth 1 --branch=1.5.1 https://github.com/swaywm/sway.git"
 | 
				
			||||||
 | 
					configure_command="meson build"
 | 
				
			||||||
 | 
					build_command="ninja -C build install"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Hooks
 | 
				
			||||||
 | 
					function post_clone_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_configure_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_install_hook {
 | 
				
			||||||
 | 
					    chmod +s /usr/local/bin/sway
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,21 @@
 | 
				
			||||||
 | 
					name="xserver"
 | 
				
			||||||
 | 
					patches_dir="xserver_patches"
 | 
				
			||||||
 | 
					clone_directory="xserver"
 | 
				
			||||||
 | 
					clone_command="git clone --depth 1 --branch-xorg-server-1.20.11 https://gitlab.freedesktop.org/xorg/xserver.git"
 | 
				
			||||||
 | 
					configure_command="meson build -Dxorg=true -Dxwayland=true -Dglamor=true -Dxwayland_eglstream=false -Dxnest=false -Ddmx=false -Dxvfb=true -Dxwin=false -Dxephyr=false -Ddri3=true"
 | 
				
			||||||
 | 
					build_command="ninja -C build install"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Hooks
 | 
				
			||||||
 | 
					function post_clone_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_configure_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_install_hook {
 | 
				
			||||||
 | 
					    # overwrite /usr/bin/Xwayland with symlink to our Xwayland (FIXME: brittle)
 | 
				
			||||||
 | 
					    rm -f /usr/bin/Xwayland
 | 
				
			||||||
 | 
					    ln -s /usr/local/bin/Xwayland /usr/bin/Xwayland
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					name="Waybar"
 | 
				
			||||||
 | 
					patches_dir=0
 | 
				
			||||||
 | 
					clone_directory="Waybar"
 | 
				
			||||||
 | 
					clone_command="git clone --depth 1 https://github.com/Alexays/Waybar.git"
 | 
				
			||||||
 | 
					configure_command="meson build"
 | 
				
			||||||
 | 
					build_command="ninja -C build install"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Hooks
 | 
				
			||||||
 | 
					function post_clone_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_configure_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_install_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,32 @@
 | 
				
			||||||
 | 
					name="WayVNC"
 | 
				
			||||||
 | 
					patches_dir=0
 | 
				
			||||||
 | 
					clone_directory="Waybar"
 | 
				
			||||||
 | 
					clone_command="git clone --depth 1 https://github.com/any1/wayvnc.git"
 | 
				
			||||||
 | 
					configure_command="meson build"
 | 
				
			||||||
 | 
					build_command="ninja -C build install"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Hooks
 | 
				
			||||||
 | 
					function post_clone_hook {
 | 
				
			||||||
 | 
					    printf "  >> post-clone hook : clone subproject\n"
 | 
				
			||||||
 | 
					    cd $clone_directory
 | 
				
			||||||
 | 
					    mkdir subprojects
 | 
				
			||||||
 | 
					    cd subprojects
 | 
				
			||||||
 | 
					    git clone https://github.com/any1/neatvnc.git 1>/dev/null || {
 | 
				
			||||||
 | 
					        error "Error when cloning netvnc.\n";
 | 
				
			||||||
 | 
					        exit 1;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    git clone https://github.com/any1/aml.git 1>/dev/null || {
 | 
				
			||||||
 | 
					        error "Error when cloning aml.\n";
 | 
				
			||||||
 | 
					        exit 1;
 | 
				
			||||||
 | 
					    }
 | 
				
			||||||
 | 
					    cd ..
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_configure_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_install_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,19 @@
 | 
				
			||||||
 | 
					name="Cage"
 | 
				
			||||||
 | 
					patches_dir=0
 | 
				
			||||||
 | 
					clone_directory="cage"
 | 
				
			||||||
 | 
					clone_command="git clone --depth 1 https://github.com/Hjdskes/cage.git"
 | 
				
			||||||
 | 
					configure_command="meson build"
 | 
				
			||||||
 | 
					build_command="ninja -C build install"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					## Hooks
 | 
				
			||||||
 | 
					function post_clone_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_configure_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					function post_install_hook {
 | 
				
			||||||
 | 
					    return
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,13 @@
 | 
				
			||||||
 | 
					diff --git a/glamor/glamor_render.c b/glamor/glamor_render.c
 | 
				
			||||||
 | 
					index be0741a..1dd2876 100644
 | 
				
			||||||
 | 
					--- a/glamor/glamor_render.c
 | 
				
			||||||
 | 
					+++ b/glamor/glamor_render.c
 | 
				
			||||||
 | 
					@@ -1584,6 +1584,8 @@ glamor_composite_clipped_region(CARD8 op,
 | 
				
			||||||
 | 
					     if (prect != rect)
 | 
				
			||||||
 | 
					         free(prect);
 | 
				
			||||||
 | 
					  out:
 | 
				
			||||||
 | 
					+    glFinish();
 | 
				
			||||||
 | 
					+
 | 
				
			||||||
 | 
					     if (temp_src != source)
 | 
				
			||||||
 | 
					         FreePicture(temp_src, 0);
 | 
				
			||||||
 | 
					     if (temp_mask != mask)
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,98 @@
 | 
				
			||||||
 | 
					# This file is part of PulseAudio.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# PulseAudio is free software; you can redistribute it and/or modify
 | 
				
			||||||
 | 
					# it under the terms of the GNU Lesser General Public License as
 | 
				
			||||||
 | 
					# published by the Free Software Foundation; either version 2.1 of the
 | 
				
			||||||
 | 
					# License, or (at your option) any later version.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# PulseAudio is distributed in the hope that it will be useful, but
 | 
				
			||||||
 | 
					# WITHOUT ANY WARRANTY; without even the implied warranty of
 | 
				
			||||||
 | 
					# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
 | 
				
			||||||
 | 
					# General Public License for more details.
 | 
				
			||||||
 | 
					#
 | 
				
			||||||
 | 
					# You should have received a copy of the GNU Lesser General Public License
 | 
				
			||||||
 | 
					# along with PulseAudio; if not, see <http://www.gnu.org/licenses/>.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					; Analog input path for MNT Reform, which has a headset mic input
 | 
				
			||||||
 | 
					; that is only on the left channel (mono).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[General]
 | 
				
			||||||
 | 
					priority = 100
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Capture]
 | 
				
			||||||
 | 
					switch = mute
 | 
				
			||||||
 | 
					volume = ignore
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Mic]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Mic Boost]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Dock Mic]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Dock Mic Boost]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Front Mic]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Front Mic Boost]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Int Mic]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Int Mic Boost]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Internal Mic]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Internal Mic Boost]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Rear Mic]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Rear Mic Boost]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Headset]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Headset Mic]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Headset Mic Boost]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Headphone Mic]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Headphone Mic Boost]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Line]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Line Boost]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Aux]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Video]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element Mic/Line]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element TV Tuner]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Element FM]
 | 
				
			||||||
 | 
					required-absent = any
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					.include analog-input.conf.common
 | 
				
			||||||
| 
						 | 
					@ -0,0 +1,24 @@
 | 
				
			||||||
 | 
					[General]
 | 
				
			||||||
 | 
					auto-profiles = yes
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Mapping stereo-out]
 | 
				
			||||||
 | 
					device-strings = hw:0
 | 
				
			||||||
 | 
					fallback = yes
 | 
				
			||||||
 | 
					channel-map = left,right
 | 
				
			||||||
 | 
					paths-output = analog-output analog-output-speaker analog-output-headphones
 | 
				
			||||||
 | 
					direction = output
 | 
				
			||||||
 | 
					priority = 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Mapping headset-mono-in]
 | 
				
			||||||
 | 
					device-strings = hw:0
 | 
				
			||||||
 | 
					fallback = yes
 | 
				
			||||||
 | 
					channel-map = mono
 | 
				
			||||||
 | 
					paths-input = analog-input-reform
 | 
				
			||||||
 | 
					direction = input
 | 
				
			||||||
 | 
					priority = 1
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					[Profile output:stereo-out+input:mono-in]
 | 
				
			||||||
 | 
					description = MNT Reform
 | 
				
			||||||
 | 
					output-mappings = stereo-out
 | 
				
			||||||
 | 
					input-mappings = headset-mono-in
 | 
				
			||||||
 | 
					
 | 
				
			||||||
							
								
								
									
										10
									
								
								src/recipes/default/hook/essential.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										10
									
								
								src/recipes/default/hook/essential.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,10 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					printf "Essential hook script for mmdebstrap\n\n"
 | 
				
			||||||
 | 
					printf "Configure locales\n"
 | 
				
			||||||
 | 
					chroot $1 ln --force --symbolic /usr/share/zoneinfo/Europe/Paris /etc/localtime
 | 
				
			||||||
 | 
					echo "locales locales/default_environment_locale select en_US.UTF-8" | chroot $1 debconf-set-selections
 | 
				
			||||||
 | 
					echo "locales locales/locales_to_be_generated multiselect en_US.UTF-8 UTF-8" | chroot $1 debconf-set-selections
 | 
				
			||||||
 | 
					chroot $1 dpkg --configure -a
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					exit 0
 | 
				
			||||||
							
								
								
									
										5
									
								
								src/recipes/default/hook/extract.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								src/recipes/default/hook/extract.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					printf "Extract hook script for mmdebstrap\n\n"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					exit 0
 | 
				
			||||||
							
								
								
									
										5
									
								
								src/recipes/default/hook/setup.sh
									
										
									
									
									
										Executable file
									
								
							
							
						
						
									
										5
									
								
								src/recipes/default/hook/setup.sh
									
										
									
									
									
										Executable file
									
								
							| 
						 | 
					@ -0,0 +1,5 @@
 | 
				
			||||||
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					printf "Setup hook script for mmdebstrap\n\n"
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					exit 0
 | 
				
			||||||
							
								
								
									
										92
									
								
								src/recipes/default/packages/packages.list
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										92
									
								
								src/recipes/default/packages/packages.list
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,92 @@
 | 
				
			||||||
 | 
					alsa-utils
 | 
				
			||||||
 | 
					arc-theme
 | 
				
			||||||
 | 
					bash-completion
 | 
				
			||||||
 | 
					breeze-icon-theme
 | 
				
			||||||
 | 
					brightness-udev
 | 
				
			||||||
 | 
					brightnessctl
 | 
				
			||||||
 | 
					bsdmainutils
 | 
				
			||||||
 | 
					ca-certificates
 | 
				
			||||||
 | 
					connman-gtk
 | 
				
			||||||
 | 
					console-data
 | 
				
			||||||
 | 
					console-setup
 | 
				
			||||||
 | 
					coreutils
 | 
				
			||||||
 | 
					cpio
 | 
				
			||||||
 | 
					cron
 | 
				
			||||||
 | 
					cryptsetup
 | 
				
			||||||
 | 
					curl
 | 
				
			||||||
 | 
					debian-archive-keyring
 | 
				
			||||||
 | 
					dosfstools
 | 
				
			||||||
 | 
					e2fsprogs
 | 
				
			||||||
 | 
					engrampa
 | 
				
			||||||
 | 
					eog
 | 
				
			||||||
 | 
					evince
 | 
				
			||||||
 | 
					fbset
 | 
				
			||||||
 | 
					file
 | 
				
			||||||
 | 
					fonts-noto-color-emoji
 | 
				
			||||||
 | 
					gedit
 | 
				
			||||||
 | 
					git
 | 
				
			||||||
 | 
					gpg
 | 
				
			||||||
 | 
					gnome-disk-utility
 | 
				
			||||||
 | 
					gnome-icon-theme
 | 
				
			||||||
 | 
					gnome-system-monitor
 | 
				
			||||||
 | 
					gpgv
 | 
				
			||||||
 | 
					gpm
 | 
				
			||||||
 | 
					grim
 | 
				
			||||||
 | 
					htop
 | 
				
			||||||
 | 
					ifupdown
 | 
				
			||||||
 | 
					init-system-helpers
 | 
				
			||||||
 | 
					iproute2
 | 
				
			||||||
 | 
					iptables
 | 
				
			||||||
 | 
					iputils-ping
 | 
				
			||||||
 | 
					ircii
 | 
				
			||||||
 | 
					isc-dhcp-client
 | 
				
			||||||
 | 
					kbd
 | 
				
			||||||
 | 
					less
 | 
				
			||||||
 | 
					libblockdev-crypto2
 | 
				
			||||||
 | 
					libblockdev-dm2
 | 
				
			||||||
 | 
					libpam-systemd
 | 
				
			||||||
 | 
					lm-sensors
 | 
				
			||||||
 | 
					locales
 | 
				
			||||||
 | 
					lxpolkit
 | 
				
			||||||
 | 
					man-db
 | 
				
			||||||
 | 
					mesa-utils
 | 
				
			||||||
 | 
					micro
 | 
				
			||||||
 | 
					mpv
 | 
				
			||||||
 | 
					nano
 | 
				
			||||||
 | 
					ncdu
 | 
				
			||||||
 | 
					ncurses-term
 | 
				
			||||||
 | 
					net-tools
 | 
				
			||||||
 | 
					netbase
 | 
				
			||||||
 | 
					netcat-traditional
 | 
				
			||||||
 | 
					nfacct
 | 
				
			||||||
 | 
					ntp
 | 
				
			||||||
 | 
					ntpdate
 | 
				
			||||||
 | 
					parted
 | 
				
			||||||
 | 
					pavucontrol
 | 
				
			||||||
 | 
					pciutils
 | 
				
			||||||
 | 
					policykit-1
 | 
				
			||||||
 | 
					procps
 | 
				
			||||||
 | 
					pulseaudio
 | 
				
			||||||
 | 
					python3-psutil
 | 
				
			||||||
 | 
					readline-common
 | 
				
			||||||
 | 
					rfkill
 | 
				
			||||||
 | 
					rofi
 | 
				
			||||||
 | 
					screen
 | 
				
			||||||
 | 
					slurp
 | 
				
			||||||
 | 
					sudo
 | 
				
			||||||
 | 
					sway
 | 
				
			||||||
 | 
					systemd
 | 
				
			||||||
 | 
					systemd-sysv
 | 
				
			||||||
 | 
					telnet
 | 
				
			||||||
 | 
					thunar
 | 
				
			||||||
 | 
					tmux
 | 
				
			||||||
 | 
					traceroute
 | 
				
			||||||
 | 
					unicode-data
 | 
				
			||||||
 | 
					usbutils
 | 
				
			||||||
 | 
					vim
 | 
				
			||||||
 | 
					w3m
 | 
				
			||||||
 | 
					wget
 | 
				
			||||||
 | 
					wpasupplicant
 | 
				
			||||||
 | 
					xfce4-terminal
 | 
				
			||||||
 | 
					xterm
 | 
				
			||||||
 | 
					xwayland
 | 
				
			||||||
							
								
								
									
										86
									
								
								src/recipes/default/packages/packages_build.list
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										86
									
								
								src/recipes/default/packages/packages_build.list
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
					@ -0,0 +1,86 @@
 | 
				
			||||||
 | 
					autoconf
 | 
				
			||||||
 | 
					autopoint
 | 
				
			||||||
 | 
					bison
 | 
				
			||||||
 | 
					cmake
 | 
				
			||||||
 | 
					expat
 | 
				
			||||||
 | 
					flex
 | 
				
			||||||
 | 
					g++
 | 
				
			||||||
 | 
					gcc
 | 
				
			||||||
 | 
					gettext
 | 
				
			||||||
 | 
					git
 | 
				
			||||||
 | 
					intltool
 | 
				
			||||||
 | 
					libbsd-dev
 | 
				
			||||||
 | 
					libdbus-1-dev
 | 
				
			||||||
 | 
					libdbusmenu-gtk3-dev
 | 
				
			||||||
 | 
					libdrm-dev
 | 
				
			||||||
 | 
					libepoxy-dev
 | 
				
			||||||
 | 
					libevdev-dev
 | 
				
			||||||
 | 
					libflac-dev
 | 
				
			||||||
 | 
					libfmt-dev
 | 
				
			||||||
 | 
					libgarcon-1-dev
 | 
				
			||||||
 | 
					libgbm-dev
 | 
				
			||||||
 | 
					libgirepository1.0-dev
 | 
				
			||||||
 | 
					libgtkmm-3.0-dev
 | 
				
			||||||
 | 
					libinput-dev
 | 
				
			||||||
 | 
					libjson-c-dev
 | 
				
			||||||
 | 
					libjsoncpp-dev
 | 
				
			||||||
 | 
					libmpdclient-dev
 | 
				
			||||||
 | 
					libmpeg2-4-dev
 | 
				
			||||||
 | 
					libmpg123-dev
 | 
				
			||||||
 | 
					libmtdev-dev
 | 
				
			||||||
 | 
					libnl-3-dev
 | 
				
			||||||
 | 
					libnl-genl-3-dev
 | 
				
			||||||
 | 
					libpango1.0-dev
 | 
				
			||||||
 | 
					libpciaccess-dev
 | 
				
			||||||
 | 
					libpcre3-dev
 | 
				
			||||||
 | 
					libpixman-1-dev
 | 
				
			||||||
 | 
					libpng-dev
 | 
				
			||||||
 | 
					libpulse-dev
 | 
				
			||||||
 | 
					libsdl2-dev
 | 
				
			||||||
 | 
					libsdl2-gfx-dev
 | 
				
			||||||
 | 
					libsdl2-image-dev
 | 
				
			||||||
 | 
					libsdl2-mixer-dev
 | 
				
			||||||
 | 
					libsdl2-net-dev
 | 
				
			||||||
 | 
					libsdl2-ttf-dev
 | 
				
			||||||
 | 
					libsigc++-2.0-dev
 | 
				
			||||||
 | 
					libspdlog-dev
 | 
				
			||||||
 | 
					libsystemd-dev
 | 
				
			||||||
 | 
					libtool
 | 
				
			||||||
 | 
					libudev-dev
 | 
				
			||||||
 | 
					libunwind-dev
 | 
				
			||||||
 | 
					libwayland-dev
 | 
				
			||||||
 | 
					libwayland-egl-backend-dev
 | 
				
			||||||
 | 
					libx11-dev
 | 
				
			||||||
 | 
					libx11-xcb-dev
 | 
				
			||||||
 | 
					libxcb-composite0-dev
 | 
				
			||||||
 | 
					libxcb-dri2-0-dev
 | 
				
			||||||
 | 
					libxcb-dri3-dev
 | 
				
			||||||
 | 
					libxcb-glx0-dev
 | 
				
			||||||
 | 
					libxcb-icccm4-dev
 | 
				
			||||||
 | 
					libxcb-present-dev
 | 
				
			||||||
 | 
					libxcb-sync-dev
 | 
				
			||||||
 | 
					libxcb-xfixes0-dev
 | 
				
			||||||
 | 
					libxcb-xinput-dev
 | 
				
			||||||
 | 
					libxdamage-dev
 | 
				
			||||||
 | 
					libxext-dev
 | 
				
			||||||
 | 
					libxfce4ui-2-dev
 | 
				
			||||||
 | 
					libxfixes-dev
 | 
				
			||||||
 | 
					libxfont-dev
 | 
				
			||||||
 | 
					libxkbcommon-dev
 | 
				
			||||||
 | 
					libxkbfile-dev
 | 
				
			||||||
 | 
					libxml2-dev
 | 
				
			||||||
 | 
					libxrandr-dev
 | 
				
			||||||
 | 
					libxshmfence-dev
 | 
				
			||||||
 | 
					libxxf86vm-dev
 | 
				
			||||||
 | 
					llvm-dev
 | 
				
			||||||
 | 
					make
 | 
				
			||||||
 | 
					meson
 | 
				
			||||||
 | 
					nettle-dev
 | 
				
			||||||
 | 
					patch
 | 
				
			||||||
 | 
					python3-mako
 | 
				
			||||||
 | 
					python3-setuptools
 | 
				
			||||||
 | 
					wayland-protocols
 | 
				
			||||||
 | 
					xfce4-dev-tools
 | 
				
			||||||
 | 
					xfonts-utils
 | 
				
			||||||
 | 
					xutils-dev
 | 
				
			||||||
 | 
					zlib1g-dev
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue