├── archlive
├── packages.i686
├── airootfs
│ ├── etc
│ │ ├── fstab
│ │ ├── machine-id
│ │ ├── hostname
│ │ ├── locale.conf
│ │ ├── modules-load.d
│ │ │ └── btusb.conf
│ │ ├── udev
│ │ │ └── rules.d
│ │ │ │ └── 81-dhcpcd.rules
│ │ ├── systemd
│ │ │ ├── system
│ │ │ │ ├── getty@tty1.service.d
│ │ │ │ │ └── autologin.conf
│ │ │ │ ├── etc-pacman.d-gnupg.mount
│ │ │ │ ├── choose-mirror.service
│ │ │ │ └── pacman-init.service
│ │ │ └── scripts
│ │ │ │ └── choose-mirror
│ │ └── default
│ │ │ └── tlp
│ ├── root
│ │ ├── .zlogin
│ │ ├── install.txt
│ │ ├── customize_airootfs.sh
│ │ └── .automated_script.sh
│ └── usr
│ │ └── bin
│ │ └── gpd-setup
├── packages.x86_64
├── vconsole.conf
├── efiboot
│ └── loader
│ │ ├── loader.conf
│ │ └── entries
│ │ ├── uefi-shell-v1-x86_64.conf
│ │ ├── uefi-shell-v2-x86_64.conf
│ │ ├── archiso-x86_64-cd.conf
│ │ └── archiso-x86_64-usb.conf
├── syslinux
│ ├── splash.png
│ ├── syslinux.cfg
│ ├── archiso.cfg
│ ├── archiso_sys.cfg
│ ├── archiso_tail.cfg
│ ├── archiso_head.cfg
│ └── archiso_pxe.cfg
├── isolinux
│ └── isolinux.cfg
├── mkinitcpio.conf
├── packages.both
├── pacman.conf
├── wififw
│ └── brcmfmac4356-pcie.txt
└── build.sh
├── .gitignore
├── extras
└── gnome-caribou-layout.xml
└── README.md
/archlive/packages.i686:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/archlive/airootfs/etc/fstab:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/archlive/packages.x86_64:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/archlive/airootfs/etc/machine-id:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/archlive/airootfs/etc/hostname:
--------------------------------------------------------------------------------
1 | archiso
2 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | /archlive/work
2 | /archlive/out
3 |
--------------------------------------------------------------------------------
/archlive/vconsole.conf:
--------------------------------------------------------------------------------
1 | FONT=latarcyrheb-sun32
2 |
--------------------------------------------------------------------------------
/archlive/airootfs/etc/locale.conf:
--------------------------------------------------------------------------------
1 | LANG=en_US.UTF-8
2 |
--------------------------------------------------------------------------------
/archlive/airootfs/etc/modules-load.d/btusb.conf:
--------------------------------------------------------------------------------
1 | btusb
2 |
--------------------------------------------------------------------------------
/archlive/airootfs/root/.zlogin:
--------------------------------------------------------------------------------
1 | ~/.automated_script.sh
2 |
--------------------------------------------------------------------------------
/archlive/efiboot/loader/loader.conf:
--------------------------------------------------------------------------------
1 | timeout 3
2 | default archiso-x86_64
3 |
--------------------------------------------------------------------------------
/archlive/syslinux/splash.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sigboe/GPD-ArchISO/HEAD/archlive/syslinux/splash.png
--------------------------------------------------------------------------------
/archlive/efiboot/loader/entries/uefi-shell-v1-x86_64.conf:
--------------------------------------------------------------------------------
1 | title UEFI Shell x86_64 v1
2 | efi /EFI/shellx64_v1.efi
3 |
--------------------------------------------------------------------------------
/archlive/efiboot/loader/entries/uefi-shell-v2-x86_64.conf:
--------------------------------------------------------------------------------
1 | title UEFI Shell x86_64 v2
2 | efi /EFI/shellx64_v2.efi
3 |
--------------------------------------------------------------------------------
/archlive/syslinux/syslinux.cfg:
--------------------------------------------------------------------------------
1 | DEFAULT loadconfig
2 |
3 | LABEL loadconfig
4 | CONFIG archiso.cfg
5 | APPEND ../../
6 |
--------------------------------------------------------------------------------
/extras/gnome-caribou-layout.xml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/archlive/airootfs/root/install.txt:
--------------------------------------------------------------------------------
1 | View this installation guide online at
2 | https://wiki.archlinux.org/index.php/Installation_Guide
3 |
4 |
--------------------------------------------------------------------------------
/archlive/airootfs/etc/udev/rules.d/81-dhcpcd.rules:
--------------------------------------------------------------------------------
1 | ACTION=="add", SUBSYSTEM=="net", ENV{INTERFACE}=="en*|eth*", ENV{SYSTEMD_WANTS}="dhcpcd@$name.service"
2 |
--------------------------------------------------------------------------------
/archlive/airootfs/etc/systemd/system/getty@tty1.service.d/autologin.conf:
--------------------------------------------------------------------------------
1 | [Service]
2 | ExecStart=
3 | ExecStart=-/sbin/agetty --autologin root --noclear %I 38400 linux
4 |
--------------------------------------------------------------------------------
/archlive/isolinux/isolinux.cfg:
--------------------------------------------------------------------------------
1 | PATH /%INSTALL_DIR%/boot/syslinux/
2 | DEFAULT loadconfig
3 |
4 | LABEL loadconfig
5 | CONFIG /%INSTALL_DIR%/boot/syslinux/archiso.cfg
6 | APPEND /%INSTALL_DIR%/
7 |
--------------------------------------------------------------------------------
/archlive/airootfs/etc/systemd/system/etc-pacman.d-gnupg.mount:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Temporary /etc/pacman.d/gnupg directory
3 |
4 | [Mount]
5 | What=tmpfs
6 | Where=/etc/pacman.d/gnupg
7 | Type=tmpfs
8 | Options=mode=0755
9 |
--------------------------------------------------------------------------------
/archlive/mkinitcpio.conf:
--------------------------------------------------------------------------------
1 | HOOKS="consolefont base udev memdisk archiso_shutdown archiso archiso_loop_mnt archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_kms block pcmcia filesystems keyboard"
2 | COMPRESSION="xz"
3 |
--------------------------------------------------------------------------------
/archlive/syslinux/archiso.cfg:
--------------------------------------------------------------------------------
1 | DEFAULT select
2 |
3 | LABEL select
4 | COM32 boot/syslinux/whichsys.c32
5 | APPEND -pxe- pxe -sys- sys -iso- sys
6 |
7 | LABEL pxe
8 | CONFIG boot/syslinux/archiso_pxe.cfg
9 |
10 | LABEL sys
11 | CONFIG boot/syslinux/archiso_sys.cfg
12 |
--------------------------------------------------------------------------------
/archlive/efiboot/loader/entries/archiso-x86_64-cd.conf:
--------------------------------------------------------------------------------
1 | title Arch Linux archiso x86_64 UEFI CD
2 | linux /EFI/archiso/vmlinuz.efi
3 | initrd /EFI/archiso/intel_ucode.img
4 | initrd /EFI/archiso/archiso.img
5 | options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
6 |
--------------------------------------------------------------------------------
/archlive/airootfs/etc/systemd/system/choose-mirror.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Choose mirror from the kernel command line
3 | ConditionKernelCommandLine=mirror
4 |
5 | [Service]
6 | Type=oneshot
7 | ExecStart=/etc/systemd/scripts/choose-mirror
8 |
9 | [Install]
10 | WantedBy=multi-user.target
11 |
--------------------------------------------------------------------------------
/archlive/efiboot/loader/entries/archiso-x86_64-usb.conf:
--------------------------------------------------------------------------------
1 | title Arch Linux archiso x86_64 UEFI USB
2 | linux /%INSTALL_DIR%/boot/x86_64/vmlinuz
3 | initrd /%INSTALL_DIR%/boot/intel_ucode.img
4 | initrd /%INSTALL_DIR%/boot/x86_64/archiso.img
5 | options archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
6 |
--------------------------------------------------------------------------------
/archlive/airootfs/etc/systemd/system/pacman-init.service:
--------------------------------------------------------------------------------
1 | [Unit]
2 | Description=Initializes Pacman keyring
3 | Wants=haveged.service
4 | After=haveged.service
5 | Requires=etc-pacman.d-gnupg.mount
6 | After=etc-pacman.d-gnupg.mount
7 |
8 | [Service]
9 | Type=oneshot
10 | RemainAfterExit=yes
11 | ExecStart=/usr/bin/pacman-key --init
12 | ExecStart=/usr/bin/pacman-key --populate archlinux
13 |
14 | [Install]
15 | WantedBy=multi-user.target
16 |
--------------------------------------------------------------------------------
/archlive/syslinux/archiso_sys.cfg:
--------------------------------------------------------------------------------
1 | INCLUDE boot/syslinux/archiso_head.cfg
2 |
3 | LABEL arch64
4 | TEXT HELP
5 | Boot the Arch Linux (x86_64) live medium.
6 | It allows you to install Arch Linux or perform system maintenance.
7 | ENDTEXT
8 | MENU LABEL Boot Arch Linux (x86_64)
9 | LINUX boot/x86_64/vmlinuz
10 | INITRD boot/intel_ucode.img,boot/x86_64/archiso.img
11 | APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL%
12 |
13 | INCLUDE boot/syslinux/archiso_tail.cfg
14 |
--------------------------------------------------------------------------------
/archlive/airootfs/etc/systemd/scripts/choose-mirror:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | get_cmdline() {
4 | local param
5 | for param in $(< /proc/cmdline); do
6 | case "${param}" in
7 | $1=*) echo "${param##*=}";
8 | return 0
9 | ;;
10 | esac
11 | done
12 | }
13 |
14 | mirror=$(get_cmdline mirror)
15 | [[ $mirror = auto ]] && mirror=$(get_cmdline archiso_http_srv)
16 | [[ $mirror ]] || exit 0
17 |
18 | mv /etc/pacman.d/mirrorlist /etc/pacman.d/mirrorlist.orig
19 | cat >/etc/pacman.d/mirrorlist << EOF
20 | #
21 | # Arch Linux repository mirrorlist
22 | # Generated by archiso
23 | #
24 |
25 | Server = ${mirror%%/}/\$repo/os/\$arch
26 | EOF
27 |
--------------------------------------------------------------------------------
/archlive/syslinux/archiso_tail.cfg:
--------------------------------------------------------------------------------
1 | LABEL existing
2 | TEXT HELP
3 | Boot an existing operating system.
4 | Press TAB to edit the disk and partition number to boot.
5 | ENDTEXT
6 | MENU LABEL Boot existing OS
7 | COM32 boot/syslinux/chain.c32
8 | APPEND hd0 0
9 |
10 | # http://www.memtest.org/
11 | LABEL memtest
12 | MENU LABEL Run Memtest86+ (RAM test)
13 | LINUX boot/memtest
14 |
15 | # http://hdt-project.org/
16 | LABEL hdt
17 | MENU LABEL Hardware Information (HDT)
18 | COM32 boot/syslinux/hdt.c32
19 | APPEND modules_alias=boot/syslinux/hdt/modalias.gz pciids=boot/syslinux/hdt/pciids.gz
20 |
21 | LABEL reboot
22 | MENU LABEL Reboot
23 | COM32 boot/syslinux/reboot.c32
24 |
25 | LABEL poweroff
26 | MENU LABEL Power Off
27 | COM32 boot/syslinux/poweroff.c32
28 |
--------------------------------------------------------------------------------
/archlive/airootfs/root/customize_airootfs.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e -u
4 |
5 | sed -i 's/#\(en_US\.UTF-8\)/\1/' /etc/locale.gen
6 | locale-gen
7 |
8 | ln -sf /usr/share/zoneinfo/UTC /etc/localtime
9 |
10 | usermod -s /usr/bin/zsh root
11 | cp -aT /etc/skel/ /root/
12 | chmod 700 /root
13 |
14 | sed -i 's/#\(PermitRootLogin \).\+/\1yes/' /etc/ssh/sshd_config
15 | sed -i "s/#Server/Server/g" /etc/pacman.d/mirrorlist
16 | sed -i 's/#\(Storage=\)auto/\1volatile/' /etc/systemd/journald.conf
17 |
18 | sed -i 's/#\(HandleSuspendKey=\)suspend/\1ignore/' /etc/systemd/logind.conf
19 | sed -i 's/#\(HandleHibernateKey=\)hibernate/\1ignore/' /etc/systemd/logind.conf
20 | sed -i 's/#\(HandleLidSwitch=\)suspend/\1ignore/' /etc/systemd/logind.conf
21 |
22 | systemctl enable pacman-init.service choose-mirror.service
23 | systemctl set-default multi-user.target
24 |
--------------------------------------------------------------------------------
/archlive/packages.both:
--------------------------------------------------------------------------------
1 | arch-install-scripts
2 | b43-fwcutter
3 | btrfs-progs
4 | clonezilla
5 | crda
6 | darkhttpd
7 | ddrescue
8 | dhclient
9 | dialog
10 | dmraid
11 | dnsmasq
12 | dnsutils
13 | dosfstools
14 | elinks
15 | ethtool
16 | exfat-utils
17 | f2fs-tools
18 | fsarchiver
19 | gnu-netcat
20 | gpm
21 | gptfdisk
22 | grml-zsh-config
23 | grub
24 | hdparm
25 | ipw2100-fw
26 | ipw2200-fw
27 | irssi
28 | lftp
29 | linux-atm
30 | lsscsi
31 | mc
32 | mtools
33 | ndisc6
34 | nfs-utils
35 | nilfs-utils
36 | nmap
37 | ntfs-3g
38 | ntp
39 | openconnect
40 | openssh
41 | openvpn
42 | partclone
43 | parted
44 | partimage
45 | ppp
46 | pptpclient
47 | refind-efi
48 | rp-pppoe
49 | rsync
50 | sdparm
51 | sg3_utils
52 | smartmontools
53 | speedtouch
54 | sudo
55 | tcpdump
56 | testdisk
57 | usb_modeswitch
58 | vim-minimal
59 | vpnc
60 | wget
61 | wireless_tools
62 | wpa_actiond
63 | wvdial
64 | xl2tpd
65 | zd1211-firmware
66 | screen
67 |
--------------------------------------------------------------------------------
/archlive/syslinux/archiso_head.cfg:
--------------------------------------------------------------------------------
1 | SERIAL 0 38400
2 | UI boot/syslinux/vesamenu.c32
3 | MENU TITLE Arch Linux
4 | MENU BACKGROUND boot/syslinux/splash.png
5 |
6 | MENU WIDTH 78
7 | MENU MARGIN 4
8 | MENU ROWS 7
9 | MENU VSHIFT 10
10 | MENU TABMSGROW 14
11 | MENU CMDLINEROW 14
12 | MENU HELPMSGROW 16
13 | MENU HELPMSGENDROW 29
14 |
15 | # Refer to http://syslinux.zytor.com/wiki/index.php/Doc/menu
16 |
17 | MENU COLOR border 30;44 #40ffffff #a0000000 std
18 | MENU COLOR title 1;36;44 #9033ccff #a0000000 std
19 | MENU COLOR sel 7;37;40 #e0ffffff #20ffffff all
20 | MENU COLOR unsel 37;44 #50ffffff #a0000000 std
21 | MENU COLOR help 37;40 #c0ffffff #a0000000 std
22 | MENU COLOR timeout_msg 37;40 #80ffffff #00000000 std
23 | MENU COLOR timeout 1;37;40 #c0ffffff #00000000 std
24 | MENU COLOR msg07 37;40 #90ffffff #a0000000 std
25 | MENU COLOR tabmsg 31;40 #30ffffff #00000000 std
26 |
--------------------------------------------------------------------------------
/archlive/airootfs/root/.automated_script.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | script_cmdline ()
4 | {
5 | local param
6 | for param in $(< /proc/cmdline); do
7 | case "${param}" in
8 | script=*) echo "${param#*=}" ; return 0 ;;
9 | esac
10 | done
11 | }
12 |
13 | automated_script ()
14 | {
15 | local script rt
16 | script="$(script_cmdline)"
17 | if [[ -n "${script}" && ! -x /tmp/startup_script ]]; then
18 | if [[ "${script}" =~ ^http:// || "${script}" =~ ^ftp:// ]]; then
19 | wget "${script}" --retry-connrefused -q -O /tmp/startup_script >/dev/null
20 | rt=$?
21 | else
22 | cp "${script}" /tmp/startup_script
23 | rt=$?
24 | fi
25 | if [[ ${rt} -eq 0 ]]; then
26 | chmod +x /tmp/startup_script
27 | /tmp/startup_script
28 | fi
29 | fi
30 | }
31 |
32 | if [[ $(tty) == "/dev/tty1" ]]; then
33 | automated_script
34 | fi
35 |
--------------------------------------------------------------------------------
/archlive/syslinux/archiso_pxe.cfg:
--------------------------------------------------------------------------------
1 | INCLUDE boot/syslinux/archiso_head.cfg
2 |
3 | LABEL arch64_nbd
4 | TEXT HELP
5 | Boot the Arch Linux (x86_64) live medium (Using NBD).
6 | It allows you to install Arch Linux or perform system maintenance.
7 | ENDTEXT
8 | MENU LABEL Boot Arch Linux (x86_64) (NBD)
9 | LINUX boot/x86_64/vmlinuz
10 | INITRD boot/intel_ucode.img,boot/x86_64/archiso.img
11 | APPEND archisobasedir=%INSTALL_DIR% archisolabel=%ARCHISO_LABEL% archiso_nbd_srv=${pxeserver}
12 | SYSAPPEND 3
13 |
14 | LABEL arch64_nfs
15 | TEXT HELP
16 | Boot the Arch Linux (x86_64) live medium (Using NFS).
17 | It allows you to install Arch Linux or perform system maintenance.
18 | ENDTEXT
19 | MENU LABEL Boot Arch Linux (x86_64) (NFS)
20 | LINUX boot/x86_64/vmlinuz
21 | INITRD boot/intel_ucode.img,boot/x86_64/archiso.img
22 | APPEND archisobasedir=%INSTALL_DIR% archiso_nfs_srv=${pxeserver}:/run/archiso/bootmnt
23 | SYSAPPEND 3
24 |
25 | LABEL arch64_http
26 | TEXT HELP
27 | Boot the Arch Linux (x86_64) live medium (Using HTTP).
28 | It allows you to install Arch Linux or perform system maintenance.
29 | ENDTEXT
30 | MENU LABEL Boot Arch Linux (x86_64) (HTTP)
31 | LINUX boot/x86_64/vmlinuz
32 | INITRD boot/intel_ucode.img,boot/x86_64/archiso.img
33 | APPEND archisobasedir=%INSTALL_DIR% archiso_http_srv=http://${pxeserver}/
34 | SYSAPPEND 3
35 |
36 | INCLUDE boot/syslinux/archiso_tail.cfg
37 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # GPD Pocket Arch Linux Full disk encryption
2 | Tutorial how to install Arch Linux with (almost) full disk encryption using LUKS and LVM on GPD Pocket
3 |
4 | https://github.com/sigboe/GPD-ArchISO/wiki
5 |
6 | ## Todo
7 |
8 | - [x] Custom Arch ISO with WiFi and repository already set up
9 | - [x] Improve guide
10 | - [x] More improvements to the installation
11 | - [x] Install Gnome
12 | - [x] Install KDE
13 | - [x] Other optional software
14 | - [ ] ~~Integrate guide in the ISO~~ Iced for now
15 |
16 |
17 | ## What works?
18 |
19 | Most things work, if not mentioned it is likely that it works.
20 |
21 | - [x] Readable terminal shortly after bootloader
22 | - [x] Multitouch
23 | - [x] Wifi
24 | - [x] Bluetooth
25 | - [x] Speaker
26 | - [x] Microphone
27 | - [x] Headphones with autoswitch
28 | - [x] Battery manager
29 | - [x] Intel video driver
30 | - [x] Sleep/wake
31 | - [x] USB-C for data
32 | - [x] HDMI port
33 | - [x] Audio over HDMI
34 | - [ ] Displayport/HDMI over USB-C
35 | - [ ] Hibernation (Its possible to do it unreliably)
36 |
37 | ## Building the ISO
38 |
39 | ### Dependencies
40 |
41 | pacman -S archiso
42 |
43 | If you want to build the ISO on another platform than Arch Linux I suggest doing it in a VM or a Docker running Arch. It should work in distros based on arch, but this is not supported.
44 |
45 | ### Procedure
46 |
47 | The files are very sensitive to file permission changes, so unfortunately you need to do everything as root (even git clone). This may be fixed upstream later.
48 |
49 | ```bash
50 | sudo su
51 | cd
52 | git clone https://github.com/sigboe/GPD-ArchISO.git
53 | cd GPD-ArchISO/archlive
54 | mkdir out
55 | ./build.sh -v
56 | ```
57 |
58 | #### Cleanup
59 |
60 | You need to clean up after the script before running it again. You need to `rm -rf work`. **Make sure** you do this in the **correct directory** because you do run it with root permissions.
61 |
62 | If you exited the script during execution you may end up with files that are mounted inside work. This will prevent you from deleting work. Then you may run
63 |
64 | umount --recursive work
65 |
66 | ## Credits
67 |
68 | [joshskidmore](https://github.com/joshskidmore/) lots of help, inspirations and awesome commits
69 | [emanuelduss](https://emanuelduss.ch/2016/03/arch-linux-installation-gpt-luks-lvm-i3/) as basis for partitioning, encryption and bootloader.
70 | [jwrdegoede](https://github.com/jwrdegoede/) for making the kernel
71 | [njkli](https://github.com/njkli/)For working on lots of the packages used after install
72 | [cawilliamson](https://github.com/cawilliamson) For working on lots of the packages used after install
73 | [microdou](https://github.com/microdou) for testing, finding bugs, and filing issues.
74 |
--------------------------------------------------------------------------------
/archlive/pacman.conf:
--------------------------------------------------------------------------------
1 | #
2 | # /etc/pacman.conf
3 | #
4 | # See the pacman.conf(5) manpage for option and repository directives
5 |
6 | #
7 | # GENERAL OPTIONS
8 | #
9 | [options]
10 | # The following paths are commented out with their default values listed.
11 | # If you wish to use different paths, uncomment and update the paths.
12 | #RootDir = /
13 | #DBPath = /var/lib/pacman/
14 | #CacheDir = /var/cache/pacman/pkg/
15 | #LogFile = /var/log/pacman.log
16 | #GPGDir = /etc/pacman.d/gnupg/
17 | HoldPkg = pacman glibc
18 | #XferCommand = /usr/bin/curl -C - -f %u > %o
19 | #XferCommand = /usr/bin/wget --passive-ftp -c -O %o %u
20 | #CleanMethod = KeepInstalled
21 | #UseDelta = 0.7
22 | Architecture = auto
23 |
24 | # Pacman won't upgrade packages listed in IgnorePkg and members of IgnoreGroup
25 | #IgnorePkg =
26 | #IgnoreGroup =
27 |
28 | #NoUpgrade =
29 | #NoExtract =
30 |
31 | # Misc options
32 | #UseSyslog
33 | #Color
34 | #TotalDownload
35 | # We cannot check disk space from within a chroot environment
36 | #CheckSpace
37 | #VerbosePkgLists
38 |
39 | # By default, pacman accepts packages signed by keys that its local keyring
40 | # trusts (see pacman-key and its man page), as well as unsigned packages.
41 | SigLevel = Required DatabaseOptional
42 | LocalFileSigLevel = Optional
43 | #RemoteFileSigLevel = Required
44 |
45 | # NOTE: You must run `pacman-key --init` before first using pacman; the local
46 | # keyring can then be populated with the keys of all official Arch Linux
47 | # packagers with `pacman-key --populate archlinux`.
48 |
49 | #
50 | # REPOSITORIES
51 | # - can be defined here or included from another file
52 | # - pacman will search repositories in the order defined here
53 | # - local/custom mirrors can be added here or in separate files
54 | # - repositories listed first will take precedence when packages
55 | # have identical names, regardless of version number
56 | # - URLs will have $repo replaced by the name of the current repo
57 | # - URLs will have $arch replaced by the name of the architecture
58 | #
59 | # Repository entries are of the format:
60 | # [repo-name]
61 | # Server = ServerName
62 | # Include = IncludePath
63 | #
64 | # The header [repo-name] is crucial - it must be present and
65 | # uncommented to enable the repo.
66 | #
67 |
68 | # The testing repositories are disabled by default. To enable, uncomment the
69 | # repo name header and Include lines. You can add preferred servers immediately
70 | # after the header, and they will be used before the default mirrors.
71 |
72 | #[testing]
73 | #Include = /etc/pacman.d/mirrorlist
74 |
75 | [core]
76 | Include = /etc/pacman.d/mirrorlist
77 |
78 | [extra]
79 | Include = /etc/pacman.d/mirrorlist
80 |
81 | #[community-testing]
82 | #Include = /etc/pacman.d/mirrorlist
83 |
84 | [community]
85 | Include = /etc/pacman.d/mirrorlist
86 |
87 | # An example of a custom package repository. See the pacman manpage for
88 | # tips on creating your own repositories.
89 | #[custom]
90 | #SigLevel = Optional TrustAll
91 | #Server = file:///home/custompkgs
92 |
93 | [gpd-pocket-arch]
94 | SigLevel = Never
95 | Server = https://github.com/joshskidmore/gpd-pocket-arch/raw/master
--------------------------------------------------------------------------------
/archlive/wififw/brcmfmac4356-pcie.txt:
--------------------------------------------------------------------------------
1 | # Sample variables file for BCM94356Z NGFF 22x30mm iPA, iLNA board with PCIe for production package
2 | NVRAMRev=$Rev: 373428 $
3 | #4356 chip = 4354 A2 chip
4 | sromrev=11
5 | boardrev=0x1101
6 | boardtype=0x073e
7 | boardflags=0x02400201
8 | #0x2000 enable 2G spur WAR
9 | boardflags2=0x00802000
10 | boardflags3=0x0000000a
11 | #boardflags3 0x00000100 /* to read swctrlmap from nvram*/
12 | #define BFL3_5G_SPUR_WAR 0x00080000 /* enable spur WAR in 5G band */
13 | #define BFL3_AvVim 0x40000000 /* load AvVim from nvram */
14 | macaddr=00:90:4c:1a:10:01
15 | ccode=X2
16 | regrev=1
17 | antswitch=0
18 | pdgain5g=4
19 | pdgain2g=4
20 | tworangetssi2g=0
21 | tworangetssi5g=0
22 | paprdis=0
23 | femctrl=10
24 | vendid=0x14e4
25 | devid=0x43a3
26 | manfid=0x2d0
27 | #prodid=0x052e
28 | nocrc=1
29 | otpimagesize=502
30 | xtalfreq=37400
31 | rxgains2gelnagaina0=0
32 | rxgains2gtrisoa0=7
33 | rxgains2gtrelnabypa0=0
34 | rxgains5gelnagaina0=0
35 | rxgains5gtrisoa0=11
36 | rxgains5gtrelnabypa0=0
37 | rxgains5gmelnagaina0=0
38 | rxgains5gmtrisoa0=13
39 | rxgains5gmtrelnabypa0=0
40 | rxgains5ghelnagaina0=0
41 | rxgains5ghtrisoa0=12
42 | rxgains5ghtrelnabypa0=0
43 | rxgains2gelnagaina1=0
44 | rxgains2gtrisoa1=7
45 | rxgains2gtrelnabypa1=0
46 | rxgains5gelnagaina1=0
47 | rxgains5gtrisoa1=10
48 | rxgains5gtrelnabypa1=0
49 | rxgains5gmelnagaina1=0
50 | rxgains5gmtrisoa1=11
51 | rxgains5gmtrelnabypa1=0
52 | rxgains5ghelnagaina1=0
53 | rxgains5ghtrisoa1=11
54 | rxgains5ghtrelnabypa1=0
55 | rxchain=3
56 | txchain=3
57 | aa2g=3
58 | aa5g=3
59 | agbg0=2
60 | agbg1=2
61 | aga0=2
62 | aga1=2
63 | tssipos2g=1
64 | extpagain2g=2
65 | tssipos5g=1
66 | extpagain5g=2
67 | tempthresh=255
68 | tempoffset=255
69 | rawtempsense=0x1ff
70 | pa2ga0=-147,6192,-705
71 | pa2ga1=-161,6041,-701
72 | pa5ga0=-194,6069,-739,-188,6137,-743,-185,5931,-725,-171,5898,-715
73 | pa5ga1=-190,6248,-757,-190,6275,-759,-190,6225,-757,-184,6131,-746
74 | subband5gver=0x4
75 | pdoffsetcckma0=0x4
76 | pdoffsetcckma1=0x4
77 | pdoffset40ma0=0x0000
78 | pdoffset80ma0=0x0000
79 | pdoffset40ma1=0x0000
80 | pdoffset80ma1=0x0000
81 | maxp2ga0=80
82 | maxp5ga0=78,78,78,78
83 | maxp2ga1=80
84 | maxp5ga1=78,78,78,78
85 | cckbw202gpo=0x0000
86 | cckbw20ul2gpo=0x0000
87 | mcsbw202gpo=0x99644422
88 | mcsbw402gpo=0x99644422
89 | dot11agofdmhrbw202gpo=0x6666
90 | ofdmlrbw202gpo=0x0022
91 | mcsbw205glpo=0x88766663
92 | mcsbw405glpo=0x88666663
93 | mcsbw805glpo=0xbb666665
94 | mcsbw205gmpo=0xd8666663
95 | mcsbw405gmpo=0x88666663
96 | mcsbw805gmpo=0xcc666665
97 | mcsbw205ghpo=0xdc666663
98 | mcsbw405ghpo=0xaa666663
99 | mcsbw805ghpo=0xdd666665
100 | mcslr5glpo=0x0000
101 | mcslr5gmpo=0x0000
102 | mcslr5ghpo=0x0000
103 | sb20in40hrpo=0x0
104 | sb20in80and160hr5glpo=0x0
105 | sb40and80hr5glpo=0x0
106 | sb20in80and160hr5gmpo=0x0
107 | sb40and80hr5gmpo=0x0
108 | sb20in80and160hr5ghpo=0x0
109 | sb40and80hr5ghpo=0x0
110 | sb20in40lrpo=0x0
111 | sb20in80and160lr5glpo=0x0
112 | sb40and80lr5glpo=0x0
113 | sb20in80and160lr5gmpo=0x0
114 | sb40and80lr5gmpo=0x0
115 | sb20in80and160lr5ghpo=0x0
116 | sb40and80lr5ghpo=0x0
117 | dot11agduphrpo=0x0
118 | dot11agduplrpo=0x0
119 | phycal_tempdelta=255
120 | temps_period=15
121 | temps_hysteresis=15
122 | rssicorrnorm_c0=4,4
123 | rssicorrnorm_c1=4,4
124 | rssicorrnorm5g_c0=1,2,3,1,2,3,6,6,8,6,6,8
125 | rssicorrnorm5g_c1=1,2,3,2,2,2,7,7,8,7,7,8
126 |
--------------------------------------------------------------------------------
/archlive/airootfs/usr/bin/gpd-setup:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | reponame=gpd-pocket-arch
4 | volume=/mnt
5 | version=0.1
6 |
7 | _usage () {
8 | echo "usage ${0} [options]"
9 | echo
10 | echo " General options:"
11 | echo " -m Sets what mountpoint to run against."
12 | echo " Only useful if you mounted the installation"
13 | echo " somewhere else than /mnt"
14 | echo " Default: /mnt"
15 | echo " "
16 | echo " -r Sets repo to install."
17 | echo " supported repos gpd-pocket-arch,njkli"
18 | echo " Default: gpd-pocket-arch"
19 | echo " "
20 | echo " -v Displays the version of the script"
21 | echo " "
22 | echo " -h This help message"
23 | exit "${1}"
24 | }
25 |
26 | _version () {
27 | echo "gpd-setup ${version}"
28 | exit "${1}"
29 | }
30 |
31 | ## the following methods use a try catch to display error messages.
32 | ## {
33 | ## command1 && \
34 | ## command2 && \
35 | ## echo success || \
36 | ## echo fail
37 | ## }
38 |
39 | add_repo() {
40 | mkdir -p ${volume}/etc && \
41 | echo -e "${repo}" >> ${volume}/etc/pacman.conf && \
42 | echo "Added ${reponame} to ${volume}/etc/pacman.conf" || \
43 | echo "Unable to add ${reponame} to ${volume}/etc/pacman.conf"
44 | }
45 |
46 | set_settings() {
47 | mkdir -p ${volume}/etc/default && cp /etc/default/tlp ${volume}/etc/default/tlp && \
48 | echo "Successfully defined default settings" || \
49 | echo "Unable to defined default settings for tlp. Please see archwiki page on GPD Pocket."
50 | }
51 |
52 | blacklist_pcspkr() {
53 | mkdir -p ${volume}/etc/modprobe.d && \
54 | echo "blacklist pcspkr" > ${volume}/etc/modprobe.d/nobeep.conf && \
55 | echo "Successfully blacklisted pcspkr" || \
56 | echo "Unable to blacklist pcspkr, please add pcspkr to blacklisted kernel modules manually."
57 | }
58 |
59 | set_consolefont() {
60 | echo "FONT=latarcyrheb-sun32" > ${volume}/etc/vconsole.conf && \
61 | sed -i '/^HOOKS=/c\HOOKS=(consolefont base udev autodetect keyboard keymap modconf block encrypt lvm2 filesystems fsck)' ${volume}/etc/mkinitcpio.conf && \
62 | echo "Successfully set the consolefont." || \
63 | echo "Unable to set the consolefont, please see archwiki page on GPD Pocket."
64 | }
65 |
66 | install_gpd() {
67 | if [[ "${reponame}" = gpd-pocket-arch ]]; then
68 | arch-chroot ${volume} pacman -Syyu --noconfirm gpd-pocket-support gpd-pocket-alsa-lib gpd-pocket-linux-jwrdegoede gpd-pocket-linux-jwrdegoede-docs gpd-pocket-linux-jwrdegoede-headers && \
69 | echo "Successfully install GPD specific packages." || \
70 | echo "Unable to install packages, please see archwiki page on GPD Pocket."
71 | elif [[ "${reponame}" = njkli ]]; then
72 | pacstrap ${volume} alsa-lib && \
73 | arch-chroot ${volume} pacman -Syyu --force gpd-pocket-support && \
74 | echo "Successfully install GPD specific packages." || \
75 | echo "Unable to install packages, please see archwiki page on GPD Pocket."
76 | fi
77 | }
78 |
79 |
80 | if [[ ${EUID} -ne 0 ]]; then
81 | echo "This script must be run as root."
82 | _usage 1
83 | fi
84 |
85 | if ! mount | grep -qs "on ${volume} type"; then
86 | echo "${volume} is not mounted."
87 | exit 1
88 | fi
89 |
90 | if [[ "${reponame}" = gpd-pocket-arch ]]; then
91 | repo="[gpd-pocket-arch]\nSigLevel = Never\nServer = https://github.com/joshskidmore/gpd-pocket-arch/raw/master"
92 | fi
93 |
94 | if [[ "${reponame}" = njkli ]]; then
95 | repo="[gpd-pocket]\nSigLevel = Optional TrustAll\nServer = https://github.com/njkli/\$repo/releases/download/\$arch"
96 | fi
97 |
98 | ## while condition to catch arguments passed to the script
99 |
100 | while getopts 'r:m:vh' arg; do
101 | case "${arg}" in
102 | r) reponame="${OPTARG}" ;;
103 | m) volume="${OPTARG}" ;;
104 | v) _version 0 ;;
105 | h) _usage 0 ;;
106 | *)
107 | echo "Invalid argument '${arg}'"
108 | _usage 1
109 | ;;
110 | esac
111 | done
112 |
113 |
114 | add_repo
115 | set_settings
116 | blacklist_pcspkr
117 | set_consolefont
118 | install_gpd
119 |
--------------------------------------------------------------------------------
/archlive/airootfs/etc/default/tlp:
--------------------------------------------------------------------------------
1 | # ------------------------------------------------------------------------------
2 | # tlp - Parameters for power saving
3 | # See full explanation: http://linrunner.de/en/tlp/docs/tlp-configuration.html
4 |
5 | # Hint: some features are disabled by default, remove the leading # to enable
6 | # them.
7 |
8 | # Set to 0 to disable, 1 to enable TLP.
9 | TLP_ENABLE=1
10 |
11 | # Operation mode when no power supply can be detected: AC, BAT
12 | # Concerns some desktop and embedded hardware only.
13 | TLP_DEFAULT_MODE=AC
14 |
15 | # Operation mode select: 0=depend on power source, 1=always use TLP_DEFAULT_MODE
16 | # Hint: use in conjunction with TLP_DEFAULT_MODE=BAT for BAT settings on AC
17 | TLP_PERSISTENT_DEFAULT=0
18 |
19 | # Seconds laptop mode has to wait after the disk goes idle before doing a sync.
20 | # Non-zero value enables, zero disables laptop mode.
21 | DISK_IDLE_SECS_ON_AC=0
22 | DISK_IDLE_SECS_ON_BAT=2
23 |
24 | # Dirty page values (timeouts in secs).
25 | MAX_LOST_WORK_SECS_ON_AC=15
26 | MAX_LOST_WORK_SECS_ON_BAT=60
27 |
28 | # Hint: CPU parameters below are disabled by default, remove the leading #
29 | # to enable them, otherwise kernel default values are used.
30 |
31 | # Select a CPU frequency scaling governor.
32 | # Intel Core i processor with intel_pstate driver:
33 | # powersave(*), performance
34 | # Older hardware with acpi-cpufreq driver:
35 | # ondemand(*), powersave, performance, conservative, schedutil
36 | # (*) is recommended.
37 | # Hint: use tlp-stat -p to show the active driver and available governors.
38 | # Important:
39 | # You *must* disable your distribution's governor settings or conflicts will
40 | # occur. ondemand is sufficient for *almost all* workloads, you should know
41 | # what you're doing!
42 | #CPU_SCALING_GOVERNOR_ON_AC=powersave
43 | #CPU_SCALING_GOVERNOR_ON_BAT=powersave
44 |
45 | # Set the min/max frequency available for the scaling governor.
46 | # Possible values strongly depend on your CPU. For available frequencies see
47 | # the output of tlp-stat -p.
48 | #CPU_SCALING_MIN_FREQ_ON_AC=0
49 | #CPU_SCALING_MAX_FREQ_ON_AC=0
50 | #CPU_SCALING_MIN_FREQ_ON_BAT=0
51 | #CPU_SCALING_MAX_FREQ_ON_BAT=0
52 |
53 | # Set energy performance hints (HWP) for Intel P-state governor:
54 | # default, performance, balance_performance, balance_power, power
55 | # Values are given in order of increasing power saving.
56 | # Note: Intel Skylake or newer CPU and Kernel >= 4.10 required.
57 | CPU_HWP_ON_AC=balance_performance
58 | CPU_HWP_ON_BAT=balance_power
59 |
60 | # Set Intel P-state performance: 0..100 (%)
61 | # Limit the max/min P-state to control the power dissipation of the CPU.
62 | # Values are stated as a percentage of the available performance.
63 | # Requires an Intel Core i processor with intel_pstate driver.
64 | #CPU_MIN_PERF_ON_AC=0
65 | #CPU_MAX_PERF_ON_AC=100
66 | #CPU_MIN_PERF_ON_BAT=0
67 | #CPU_MAX_PERF_ON_BAT=30
68 |
69 | # Set the CPU "turbo boost" feature: 0=disable, 1=allow
70 | # Requires an Intel Core i processor.
71 | # Important:
72 | # - This may conflict with your distribution's governor settings
73 | # - A value of 1 does *not* activate boosting, it just allows it
74 | #CPU_BOOST_ON_AC=1
75 | #CPU_BOOST_ON_BAT=0
76 |
77 | # Minimize number of used CPU cores/hyper-threads under light load conditions
78 | SCHED_POWERSAVE_ON_AC=0
79 | SCHED_POWERSAVE_ON_BAT=1
80 |
81 | # Kernel NMI Watchdog:
82 | # 0=disable (default, saves power), 1=enable (for kernel debugging only)
83 | NMI_WATCHDOG=0
84 |
85 | # Change CPU voltages aka "undervolting" - Kernel with PHC patch required
86 | # Frequency voltage pairs are written to:
87 | # /sys/devices/system/cpu/cpu0/cpufreq/phc_controls
88 | # CAUTION: only use this, if you thoroughly understand what you are doing!
89 | #PHC_CONTROLS="F:V F:V F:V F:V"
90 |
91 | # Set CPU performance versus energy savings policy:
92 | # performance, normal, powersave
93 | # Requires kernel module msr and x86_energy_perf_policy from linux-tools
94 | ENERGY_PERF_POLICY_ON_AC=performance
95 | ENERGY_PERF_POLICY_ON_BAT=powersave
96 |
97 | # Hard disk devices; separate multiple devices with spaces (default: sda).
98 | # Devices can be specified by disk ID also (lookup with: tlp diskid).
99 | DISK_DEVICES="mmcblk0"
100 |
101 | # Hard disk advanced power management level: 1..254, 255 (max saving, min, off)
102 | # Levels 1..127 may spin down the disk; 255 allowable on most drives.
103 | # Separate values for multiple disks with spaces. Use the special value 'keep'
104 | # to keep the hardware default for the particular disk.
105 | DISK_APM_LEVEL_ON_AC="254 254"
106 | DISK_APM_LEVEL_ON_BAT="128 128"
107 |
108 | # Hard disk spin down timeout:
109 | # 0: spin down disabled
110 | # 1..240: timeouts from 5s to 20min (in units of 5s)
111 | # 241..251: timeouts from 30min to 5.5 hours (in units of 30min)
112 | # See 'man hdparm' for details.
113 | # Separate values for multiple disks with spaces. Use the special value 'keep'
114 | # to keep the hardware default for the particular disk.
115 | #DISK_SPINDOWN_TIMEOUT_ON_AC="0 0"
116 | #DISK_SPINDOWN_TIMEOUT_ON_BAT="0 0"
117 |
118 | # Select IO scheduler for the disk devices: cfq, deadline, noop (Default: cfq);
119 | # Separate values for multiple disks with spaces. Use the special value 'keep'
120 | # to keep the kernel default scheduler for the particular disk.
121 | DISK_IOSCHED="deadline"
122 |
123 | # SATA aggressive link power management (ALPM):
124 | # min_power, medium_power, max_performance
125 | SATA_LINKPWR_ON_AC=max_performance
126 | SATA_LINKPWR_ON_BAT=min_power
127 |
128 | # Exclude SATA host devices from link power management.
129 | # Separate multiple hosts with spaces.
130 | #SATA_LINKPWR_BLACKLIST="host1"
131 |
132 | # Runtime Power Management for AHCI controllers and disks:
133 | # on=disable, auto=enable
134 | # EXPERIMENTAL ** WARNING: auto will most likely cause system lockups/data loss
135 | #AHCI_RUNTIME_PM_ON_AC=on
136 | #AHCI_RUNTIME_PM_ON_BAT=on
137 |
138 | # Seconds of inactivity before disk is suspended
139 | AHCI_RUNTIME_PM_TIMEOUT=15
140 |
141 | # PCI Express Active State Power Management (PCIe ASPM):
142 | # default, performance, powersave
143 | PCIE_ASPM_ON_AC=performance
144 | PCIE_ASPM_ON_BAT=powersave
145 |
146 | # Radeon graphics clock speed (profile method): low, mid, high, auto, default;
147 | # auto = mid on BAT, high on AC; default = use hardware defaults.
148 | # (Kernel >= 2.6.35 only, open-source radeon driver explicitly)
149 | RADEON_POWER_PROFILE_ON_AC=high
150 | RADEON_POWER_PROFILE_ON_BAT=low
151 |
152 | # Radeon dynamic power management method (DPM): battery, performance
153 | # (Kernel >= 3.11 only, requires boot option radeon.dpm=1)
154 | RADEON_DPM_STATE_ON_AC=performance
155 | RADEON_DPM_STATE_ON_BAT=battery
156 |
157 | # Radeon DPM performance level: auto, low, high; auto is recommended.
158 | RADEON_DPM_PERF_LEVEL_ON_AC=auto
159 | RADEON_DPM_PERF_LEVEL_ON_BAT=auto
160 |
161 | # WiFi power saving mode: on=enable, off=disable; not supported by all adapters.
162 | WIFI_PWR_ON_AC=off
163 | WIFI_PWR_ON_BAT=on
164 |
165 | # Disable wake on LAN: Y/N
166 | WOL_DISABLE=Y
167 |
168 | # Enable audio power saving for Intel HDA, AC97 devices (timeout in secs).
169 | # A value of 0 disables, >=1 enables power saving.
170 | SOUND_POWER_SAVE_ON_AC=0
171 | SOUND_POWER_SAVE_ON_BAT=1
172 |
173 | # Disable controller too (HDA only): Y/N
174 | SOUND_POWER_SAVE_CONTROLLER=Y
175 |
176 | # Power off optical drive in UltraBay/MediaBay: 0=disable, 1=enable.
177 | # Drive can be powered on again by releasing (and reinserting) the eject lever
178 | # or by pressing the disc eject button on newer models.
179 | # Note: an UltraBay/MediaBay hard disk is never powered off.
180 | BAY_POWEROFF_ON_AC=0
181 | BAY_POWEROFF_ON_BAT=0
182 | # Optical drive device to power off (default sr0).
183 | BAY_DEVICE="sr0"
184 |
185 | # Runtime Power Management for PCI(e) bus devices: on=disable, auto=enable
186 | RUNTIME_PM_ON_AC=on
187 | RUNTIME_PM_ON_BAT=auto
188 |
189 | # Exclude PCI(e) device adresses the following list from Runtime PM
190 | # (separate with spaces). Use lspci to get the adresses (1st column).
191 | #RUNTIME_PM_BLACKLIST="bb:dd.f 11:22.3 44:55.6"
192 |
193 | # Exclude PCI(e) devices assigned to the listed drivers from Runtime PM.
194 | # Default when unconfigured is "amdgpu nouveau nvidia radeon" which
195 | # prevents accidential power-on of dGPU in hybrid graphics setups.
196 | # Use "" to disable the feature completely.
197 | # Separate multiple drivers with spaces.
198 | #RUNTIME_PM_DRIVER_BLACKLIST="amdgpu nouveau nvidia radeon"
199 |
200 | # Set to 0 to disable, 1 to enable USB autosuspend feature.
201 | USB_AUTOSUSPEND=1
202 |
203 | # Exclude listed devices from USB autosuspend (separate with spaces).
204 | # Use lsusb to get the ids.
205 | # Note: input devices (usbhid) are excluded automatically
206 | #USB_BLACKLIST="1111:2222 3333:4444"
207 |
208 | # Bluetooth devices are excluded from USB autosuspend:
209 | # 0=do not exclude, 1=exclude
210 | USB_BLACKLIST_BTUSB=0
211 |
212 | # Phone devices are excluded from USB autosuspend:
213 | # 0=do not exclude, 1=exclude (enable charging)
214 | USB_BLACKLIST_PHONE=0
215 |
216 | # WWAN devices are excluded from USB autosuspend:
217 | # 0=do not exclude, 1=exclude
218 | USB_BLACKLIST_WWAN=1
219 |
220 | # Include listed devices into USB autosuspend even if already excluded
221 | # by the blacklists above (separate with spaces).
222 | # Use lsusb to get the ids.
223 | #USB_WHITELIST="1111:2222 3333:4444"
224 |
225 | # Set to 1 to disable autosuspend before shutdown, 0 to do nothing
226 | # (workaround for USB devices that cause shutdown problems).
227 | #USB_AUTOSUSPEND_DISABLE_ON_SHUTDOWN=1
228 |
229 | # Restore radio device state (Bluetooth, WiFi, WWAN) from previous shutdown
230 | # on system startup: 0=disable, 1=enable.
231 | # Hint: the parameters DEVICES_TO_DISABLE/ENABLE_ON_STARTUP/SHUTDOWN below
232 | # are ignored when this is enabled!
233 | RESTORE_DEVICE_STATE_ON_STARTUP=0
234 |
235 | # Radio devices to disable on startup: bluetooth, wifi, wwan.
236 | # Separate multiple devices with spaces.
237 | #DEVICES_TO_DISABLE_ON_STARTUP="bluetooth wifi wwan"
238 |
239 | # Radio devices to enable on startup: bluetooth, wifi, wwan.
240 | # Separate multiple devices with spaces.
241 | #DEVICES_TO_ENABLE_ON_STARTUP="wifi"
242 |
243 | # Radio devices to disable on shutdown: bluetooth, wifi, wwan
244 | # (workaround for devices that are blocking shutdown).
245 | #DEVICES_TO_DISABLE_ON_SHUTDOWN="bluetooth wifi wwan"
246 |
247 | # Radio devices to enable on shutdown: bluetooth, wifi, wwan
248 | # (to prevent other operating systems from missing radios).
249 | #DEVICES_TO_ENABLE_ON_SHUTDOWN="wwan"
250 |
251 | # Radio devices to enable on AC: bluetooth, wifi, wwan
252 | #DEVICES_TO_ENABLE_ON_AC="bluetooth wifi wwan"
253 |
254 | # Radio devices to disable on battery: bluetooth, wifi, wwan
255 | #DEVICES_TO_DISABLE_ON_BAT="bluetooth wifi wwan"
256 |
257 | # Radio devices to disable on battery when not in use (not connected):
258 | # bluetooth, wifi, wwan
259 | #DEVICES_TO_DISABLE_ON_BAT_NOT_IN_USE="bluetooth wifi wwan"
260 |
261 | # Battery charge thresholds (ThinkPad only, tp-smapi or acpi-call kernel module
262 | # required). Charging starts when the remaining capacity falls below the
263 | # START_CHARGE_THRESH value and stops when exceeding the STOP_CHARGE_THRESH value.
264 | # Main / Internal battery (values in %)
265 | #START_CHARGE_THRESH_BAT0=75
266 | #STOP_CHARGE_THRESH_BAT0=80
267 | # Ultrabay / Slice / Replaceable battery (values in %)
268 | #START_CHARGE_THRESH_BAT1=75
269 | #STOP_CHARGE_THRESH_BAT1=80
270 |
271 | # Restore charge thresholds when AC is unplugged: 0=disable, 1=enable
272 | #RESTORE_THRESHOLDS_ON_BAT=1
273 |
274 | # ------------------------------------------------------------------------------
275 | # tlp-rdw - Parameters for the radio device wizard
276 | # Possible devices: bluetooth, wifi, wwan
277 |
278 | # Hints:
279 | # - Parameters are disabled by default, remove the leading # to enable them.
280 | # - Separate multiple radio devices with spaces.
281 |
282 | # Radio devices to disable on connect.
283 | #DEVICES_TO_DISABLE_ON_LAN_CONNECT="wifi wwan"
284 | #DEVICES_TO_DISABLE_ON_WIFI_CONNECT="wwan"
285 | #DEVICES_TO_DISABLE_ON_WWAN_CONNECT="wifi"
286 |
287 | # Radio devices to enable on disconnect.
288 | #DEVICES_TO_ENABLE_ON_LAN_DISCONNECT="wifi wwan"
289 | #DEVICES_TO_ENABLE_ON_WIFI_DISCONNECT=""
290 | #DEVICES_TO_ENABLE_ON_WWAN_DISCONNECT=""
291 |
292 | # Radio devices to enable/disable when docked.
293 | #DEVICES_TO_ENABLE_ON_DOCK=""
294 | #DEVICES_TO_DISABLE_ON_DOCK=""
295 |
296 | # Radio devices to enable/disable when undocked.
297 | #DEVICES_TO_ENABLE_ON_UNDOCK="wifi"
298 | #DEVICES_TO_DISABLE_ON_UNDOCK=""
299 |
--------------------------------------------------------------------------------
/archlive/build.sh:
--------------------------------------------------------------------------------
1 | #!/bin/bash
2 |
3 | set -e -u
4 |
5 | iso_name=archlinux-gpd-pocket
6 | iso_label="ARCH_$(date +%Y%m)"
7 | iso_version=$(date +%Y.%m.%d)
8 | install_dir=arch
9 | work_dir=work
10 | out_dir=out
11 | gpg_key=
12 |
13 | arch=$(uname -m)
14 | verbose=""
15 | script_path=$(readlink -f ${0%/*})
16 |
17 | _usage ()
18 | {
19 | echo "usage ${0} [options]"
20 | echo
21 | echo " General options:"
22 | echo " -N Set an iso filename (prefix)"
23 | echo " Default: ${iso_name}"
24 | echo " -V Set an iso version (in filename)"
25 | echo " Default: ${iso_version}"
26 | echo " -L Set an iso label (disk label)"
27 | echo " Default: ${iso_label}"
28 | echo " -D Set an install_dir (directory inside iso)"
29 | echo " Default: ${install_dir}"
30 | echo " -w Set the working directory"
31 | echo " Default: ${work_dir}"
32 | echo " -o Set the output directory"
33 | echo " Default: ${out_dir}"
34 | echo " -v Enable verbose output"
35 | echo " -h This help message"
36 | exit ${1}
37 | }
38 |
39 | # Helper function to run make_*() only one time per architecture.
40 | run_once() {
41 | if [[ ! -e ${work_dir}/build.${1}_${arch} ]]; then
42 | $1
43 | touch ${work_dir}/build.${1}_${arch}
44 | fi
45 | }
46 |
47 | # Setup custom pacman.conf with current cache directories.
48 | make_pacman_conf() {
49 | local _cache_dirs
50 | _cache_dirs=($(pacman -v 2>&1 | grep '^Cache Dirs:' | sed 's/Cache Dirs:\s*//g'))
51 | sed -r "s|^#?\\s*CacheDir.+|CacheDir = $(echo -n ${_cache_dirs[@]})|g" ${script_path}/pacman.conf > ${work_dir}/pacman.conf
52 | }
53 |
54 | # Base installation, plus needed packages (airootfs)
55 | make_basefs() {
56 | setarch ${arch} mkarchiso ${verbose} -w "${work_dir}/${arch}" -C "${work_dir}/pacman.conf" -D "${install_dir}" init
57 | setarch ${arch} mkarchiso ${verbose} -w "${work_dir}/${arch}" -C "${work_dir}/pacman.conf" -D "${install_dir}" -p "haveged intel-ucode memtest86+ mkinitcpio-nfs-utils nbd zsh gpd-pocket-linux-jwrdegoede gpd-pocket-linux-jwrdegoede-docs gpd-pocket-linux-jwrdegoede-headers" install
58 | }
59 |
60 | # Additional packages (airootfs)
61 | make_packages() {
62 | setarch ${arch} mkarchiso ${verbose} -w "${work_dir}/${arch}" -C "${work_dir}/pacman.conf" -D "${install_dir}" -p "$(grep -h -v ^# ${script_path}/packages.{both,${arch}})" install
63 | }
64 |
65 | # Needed packages for x86_64 EFI boot
66 | make_packages_efi() {
67 | setarch ${arch} mkarchiso ${verbose} -w "${work_dir}/${arch}" -C "${work_dir}/pacman.conf" -D "${install_dir}" -p "efitools" install
68 | }
69 |
70 | # Copy mkinitcpio archiso hooks and build initramfs (airootfs)
71 | make_setup_mkinitcpio() {
72 | local _hook
73 | mkdir -p ${work_dir}/${arch}/airootfs/etc/initcpio/hooks
74 | mkdir -p ${work_dir}/${arch}/airootfs/etc/initcpio/install
75 | for _hook in archiso archiso_shutdown archiso_pxe_common archiso_pxe_nbd archiso_pxe_http archiso_pxe_nfs archiso_loop_mnt; do
76 | cp /usr/lib/initcpio/hooks/${_hook} ${work_dir}/${arch}/airootfs/etc/initcpio/hooks
77 | cp /usr/lib/initcpio/install/${_hook} ${work_dir}/${arch}/airootfs/etc/initcpio/install
78 | done
79 | sed -i "s|/usr/lib/initcpio/|/etc/initcpio/|g" ${work_dir}/${arch}/airootfs/etc/initcpio/install/archiso_shutdown
80 | cp /usr/lib/initcpio/install/archiso_kms ${work_dir}/${arch}/airootfs/etc/initcpio/install
81 | cp /usr/lib/initcpio/archiso_shutdown ${work_dir}/${arch}/airootfs/etc/initcpio
82 | cp ${script_path}/mkinitcpio.conf ${work_dir}/${arch}/airootfs/etc/mkinitcpio-archiso.conf
83 | cp ${script_path}/vconsole.conf ${work_dir}/${arch}/airootfs/etc/vconsole.conf
84 | gnupg_fd=
85 | if [[ ${gpg_key} ]]; then
86 | gpg --export ${gpg_key} >${work_dir}/gpgkey
87 | exec 17<>${work_dir}/gpgkey
88 | fi
89 | ARCHISO_GNUPG_FD=${gpg_key:+17} setarch ${arch} mkarchiso ${verbose} -w "${work_dir}/${arch}" -C "${work_dir}/pacman.conf" -D "${install_dir}" -r 'mkinitcpio -k /boot/vmlinuz-gpd-pocket-linux-jwrdegoede -c /etc/mkinitcpio-archiso.conf -g /boot/initramfs-gpd-pocket-linux-jwrdegoede.img' run
90 | if [[ ${gpg_key} ]]; then
91 | exec 17<&-
92 | fi
93 | }
94 |
95 | # Customize installation (airootfs)
96 | make_customize_airootfs() {
97 | cp -af ${script_path}/airootfs ${work_dir}/${arch}
98 | mkdir -p ${work_dir}/${arch}/airootfs/lib/firmware/brcm/
99 | cp ${script_path}/wififw/* ${work_dir}/${arch}/airootfs/lib/firmware/brcm/
100 |
101 | curl -o ${work_dir}/${arch}/airootfs/etc/pacman.d/mirrorlist 'https://www.archlinux.org/mirrorlist/?country=all&protocol=http&use_mirror_status=on'
102 |
103 | lynx -dump -nolist 'https://wiki.archlinux.org/index.php/Installation_Guide?action=render' >> ${work_dir}/${arch}/airootfs/root/install.txt
104 |
105 | setarch ${arch} mkarchiso ${verbose} -w "${work_dir}/${arch}" -C "${work_dir}/pacman.conf" -D "${install_dir}" -r '/root/customize_airootfs.sh' run
106 | rm ${work_dir}/${arch}/airootfs/root/customize_airootfs.sh
107 | }
108 |
109 | # Prepare kernel/initramfs ${install_dir}/boot/
110 | make_boot() {
111 | mkdir -p ${work_dir}/iso/${install_dir}/boot/${arch}
112 | cp ${work_dir}/${arch}/airootfs/boot/initramfs-gpd-pocket-linux-jwrdegoede.img ${work_dir}/iso/${install_dir}/boot/${arch}/archiso.img
113 | cp ${work_dir}/${arch}/airootfs/boot/vmlinuz-gpd-pocket-linux-jwrdegoede ${work_dir}/iso/${install_dir}/boot/${arch}/vmlinuz
114 | }
115 |
116 | # Add other aditional/extra files to ${install_dir}/boot/
117 | make_boot_extra() {
118 | cp ${work_dir}/${arch}/airootfs/boot/memtest86+/memtest.bin ${work_dir}/iso/${install_dir}/boot/memtest
119 | cp ${work_dir}/${arch}/airootfs/usr/share/licenses/common/GPL2/license.txt ${work_dir}/iso/${install_dir}/boot/memtest.COPYING
120 | cp ${work_dir}/${arch}/airootfs/boot/intel-ucode.img ${work_dir}/iso/${install_dir}/boot/intel_ucode.img
121 | cp ${work_dir}/${arch}/airootfs/usr/share/licenses/intel-ucode/LICENSE ${work_dir}/iso/${install_dir}/boot/intel_ucode.LICENSE
122 | }
123 |
124 | # Prepare /${install_dir}/boot/syslinux
125 | make_syslinux() {
126 | mkdir -p ${work_dir}/iso/${install_dir}/boot/syslinux
127 | for _cfg in ${script_path}/syslinux/*.cfg; do
128 | sed "s|%ARCHISO_LABEL%|${iso_label}|g;
129 | s|%INSTALL_DIR%|${install_dir}|g" ${_cfg} > ${work_dir}/iso/${install_dir}/boot/syslinux/${_cfg##*/}
130 | done
131 | cp ${script_path}/syslinux/splash.png ${work_dir}/iso/${install_dir}/boot/syslinux
132 | cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/*.c32 ${work_dir}/iso/${install_dir}/boot/syslinux
133 | cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/lpxelinux.0 ${work_dir}/iso/${install_dir}/boot/syslinux
134 | cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/memdisk ${work_dir}/iso/${install_dir}/boot/syslinux
135 | mkdir -p ${work_dir}/iso/${install_dir}/boot/syslinux/hdt
136 | gzip -c -9 ${work_dir}/${arch}/airootfs/usr/share/hwdata/pci.ids > ${work_dir}/iso/${install_dir}/boot/syslinux/hdt/pciids.gz
137 | gzip -c -9 ${work_dir}/${arch}/airootfs/usr/lib/modules/*-ARCH/modules.alias > ${work_dir}/iso/${install_dir}/boot/syslinux/hdt/modalias.gz
138 | }
139 |
140 | # Prepare /isolinux
141 | make_isolinux() {
142 | mkdir -p ${work_dir}/iso/isolinux
143 | sed "s|%INSTALL_DIR%|${install_dir}|g" ${script_path}/isolinux/isolinux.cfg > ${work_dir}/iso/isolinux/isolinux.cfg
144 | cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/isolinux.bin ${work_dir}/iso/isolinux/
145 | cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/isohdpfx.bin ${work_dir}/iso/isolinux/
146 | cp ${work_dir}/${arch}/airootfs/usr/lib/syslinux/bios/ldlinux.c32 ${work_dir}/iso/isolinux/
147 | }
148 |
149 | # Prepare /EFI
150 | make_efi() {
151 | mkdir -p ${work_dir}/iso/EFI/boot
152 | cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/PreLoader.efi ${work_dir}/iso/EFI/boot/bootx64.efi
153 | cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/HashTool.efi ${work_dir}/iso/EFI/boot/
154 |
155 | cp ${work_dir}/x86_64/airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi ${work_dir}/iso/EFI/boot/loader.efi
156 |
157 | mkdir -p ${work_dir}/iso/loader/entries
158 | cp ${script_path}/efiboot/loader/loader.conf ${work_dir}/iso/loader/
159 | cp ${script_path}/efiboot/loader/entries/uefi-shell-v2-x86_64.conf ${work_dir}/iso/loader/entries/
160 | cp ${script_path}/efiboot/loader/entries/uefi-shell-v1-x86_64.conf ${work_dir}/iso/loader/entries/
161 |
162 | sed "s|%ARCHISO_LABEL%|${iso_label}|g;
163 | s|%INSTALL_DIR%|${install_dir}|g" \
164 | ${script_path}/efiboot/loader/entries/archiso-x86_64-usb.conf > ${work_dir}/iso/loader/entries/archiso-x86_64.conf
165 |
166 | # EFI Shell 2.0 for UEFI 2.3+
167 | curl -o ${work_dir}/iso/EFI/shellx64_v2.efi https://raw.githubusercontent.com/tianocore/edk2/master/ShellBinPkg/UefiShell/X64/Shell.efi
168 | # EFI Shell 1.0 for non UEFI 2.3+
169 | curl -o ${work_dir}/iso/EFI/shellx64_v1.efi https://raw.githubusercontent.com/tianocore/edk2/master/EdkShellBinPkg/FullShell/X64/Shell_Full.efi
170 | }
171 |
172 | # Prepare efiboot.img::/EFI for "El Torito" EFI boot mode
173 | make_efiboot() {
174 | mkdir -p ${work_dir}/iso/EFI/archiso
175 | truncate -s 64M ${work_dir}/iso/EFI/archiso/efiboot.img
176 | mkfs.fat -n ARCHISO_EFI ${work_dir}/iso/EFI/archiso/efiboot.img
177 |
178 | mkdir -p ${work_dir}/efiboot
179 | mount ${work_dir}/iso/EFI/archiso/efiboot.img ${work_dir}/efiboot
180 |
181 | mkdir -p ${work_dir}/efiboot/EFI/archiso
182 | cp ${work_dir}/iso/${install_dir}/boot/x86_64/vmlinuz ${work_dir}/efiboot/EFI/archiso/vmlinuz.efi
183 | cp ${work_dir}/iso/${install_dir}/boot/x86_64/archiso.img ${work_dir}/efiboot/EFI/archiso/archiso.img
184 |
185 | cp ${work_dir}/iso/${install_dir}/boot/intel_ucode.img ${work_dir}/efiboot/EFI/archiso/intel_ucode.img
186 |
187 | mkdir -p ${work_dir}/efiboot/EFI/boot
188 | cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/PreLoader.efi ${work_dir}/efiboot/EFI/boot/bootx64.efi
189 | cp ${work_dir}/x86_64/airootfs/usr/share/efitools/efi/HashTool.efi ${work_dir}/efiboot/EFI/boot/
190 |
191 | cp ${work_dir}/x86_64/airootfs/usr/lib/systemd/boot/efi/systemd-bootx64.efi ${work_dir}/efiboot/EFI/boot/loader.efi
192 |
193 | mkdir -p ${work_dir}/efiboot/loader/entries
194 | cp ${script_path}/efiboot/loader/loader.conf ${work_dir}/efiboot/loader/
195 | cp ${script_path}/efiboot/loader/entries/uefi-shell-v2-x86_64.conf ${work_dir}/efiboot/loader/entries/
196 | cp ${script_path}/efiboot/loader/entries/uefi-shell-v1-x86_64.conf ${work_dir}/efiboot/loader/entries/
197 |
198 | sed "s|%ARCHISO_LABEL%|${iso_label}|g;
199 | s|%INSTALL_DIR%|${install_dir}|g" \
200 | ${script_path}/efiboot/loader/entries/archiso-x86_64-cd.conf > ${work_dir}/efiboot/loader/entries/archiso-x86_64.conf
201 |
202 | cp ${work_dir}/iso/EFI/shellx64_v2.efi ${work_dir}/efiboot/EFI/
203 | cp ${work_dir}/iso/EFI/shellx64_v1.efi ${work_dir}/efiboot/EFI/
204 |
205 | umount -d ${work_dir}/efiboot
206 | }
207 |
208 | # Build airootfs filesystem image
209 | make_prepare() {
210 | cp -a -l -f ${work_dir}/${arch}/airootfs ${work_dir}
211 | setarch ${arch} mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" pkglist
212 | setarch ${arch} mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" ${gpg_key:+-g ${gpg_key}} prepare
213 | rm -rf ${work_dir}/airootfs
214 | # rm -rf ${work_dir}/${arch}/airootfs (if low space, this helps)
215 | }
216 |
217 | # Build ISO
218 | make_iso() {
219 | mkarchiso ${verbose} -w "${work_dir}" -D "${install_dir}" -L "${iso_label}" -o "${out_dir}" iso "${iso_name}-${iso_version}-x86_64.iso"
220 | }
221 |
222 | if [[ ${EUID} -ne 0 ]]; then
223 | echo "This script must be run as root."
224 | _usage 1
225 | fi
226 |
227 | if [[ ${arch} != x86_64 ]]; then
228 | echo "This script needs to be run on x86_64"
229 | _usage 1
230 | fi
231 |
232 | while getopts 'N:V:L:D:w:o:g:vh' arg; do
233 | case "${arg}" in
234 | N) iso_name="${OPTARG}" ;;
235 | V) iso_version="${OPTARG}" ;;
236 | L) iso_label="${OPTARG}" ;;
237 | D) install_dir="${OPTARG}" ;;
238 | w) work_dir="${OPTARG}" ;;
239 | o) out_dir="${OPTARG}" ;;
240 | g) gpg_key="${OPTARG}" ;;
241 | v) verbose="-v" ;;
242 | h) _usage 0 ;;
243 | *)
244 | echo "Invalid argument '${arg}'"
245 | _usage 1
246 | ;;
247 | esac
248 | done
249 |
250 | mkdir -p ${work_dir}
251 |
252 | run_once make_pacman_conf
253 |
254 | # Do all stuff for each airootfs
255 | for arch in x86_64; do
256 | run_once make_basefs
257 | run_once make_packages
258 | done
259 |
260 | run_once make_packages_efi
261 |
262 | for arch in x86_64; do
263 | run_once make_setup_mkinitcpio
264 | run_once make_customize_airootfs
265 | done
266 |
267 | for arch in x86_64; do
268 | run_once make_boot
269 | done
270 |
271 | # Do all stuff for "iso"
272 | run_once make_boot_extra
273 | run_once make_syslinux
274 | run_once make_isolinux
275 | run_once make_efi
276 | run_once make_efiboot
277 |
278 | for arch in x86_64; do
279 | run_once make_prepare
280 | done
281 |
282 | run_once make_iso
283 |
--------------------------------------------------------------------------------