google-x64cros: new device (MR 3862)
Add a generic device that should work on x86_64 ChromeOS devices. This is mostly a copy of tablet-x64uefi, with ChromeOS-specific stuff from google-kevin. Keeps the UEFI parts so that it can still be booted with alternative firmware (i.e. MrChromebox's RW_LEGACY builds). Lightly tested on a Lenovo IdeaPad 3 Chromebook 11IGL05 (codename "Lick"). Signed-off-by: Alper Nebi Yasak <alpernebiyasak@gmail.com>
This commit is contained in:
parent
d7ec2e46dc
commit
80948e3be9
5 changed files with 151 additions and 0 deletions
110
device/testing/device-google-x64cros/APKBUILD
Normal file
110
device/testing/device-google-x64cros/APKBUILD
Normal file
|
@ -0,0 +1,110 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
# Maintainer: Alper Nebi Yasak <alpernebiyasak@gmail.com>
|
||||
pkgname=device-google-x64cros
|
||||
pkgdesc="Google Chromebooks with x64 CPU"
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="x86_64"
|
||||
# pmb:strict: avoid grub-related install error during build with pmbootstrap
|
||||
options="!check !archcheck pmb:strict"
|
||||
depends="
|
||||
alsa-ucm-conf
|
||||
sof-bin
|
||||
postmarketos-base
|
||||
depthcharge-tools
|
||||
postmarketos-update-depthcharge-kernel
|
||||
"
|
||||
makedepends="
|
||||
devicepkg-dev
|
||||
grub
|
||||
grub-efi
|
||||
"
|
||||
subpackages="
|
||||
$pkgname-libva
|
||||
$pkgname-kernel-lts:kernel_lts
|
||||
$pkgname-kernel-edge:kernel_edge
|
||||
$pkgname-vulkan
|
||||
"
|
||||
source="
|
||||
deviceinfo
|
||||
grub_early.cfg
|
||||
grub_edge.cfg
|
||||
grub_lts.cfg
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
|
||||
grub-mkimage \
|
||||
--config="$srcdir/grub_early.cfg" \
|
||||
--prefix="" \
|
||||
--output="bootx64.efi" \
|
||||
--format="x86_64-efi" \
|
||||
--compression="xz" \
|
||||
\
|
||||
all_video \
|
||||
cat \
|
||||
configfile \
|
||||
disk \
|
||||
echo \
|
||||
efi_gop \
|
||||
fat \
|
||||
gzio \
|
||||
help \
|
||||
iso9660 \
|
||||
linux \
|
||||
ls \
|
||||
normal \
|
||||
part_gpt \
|
||||
part_msdos \
|
||||
search \
|
||||
search_label \
|
||||
test \
|
||||
true
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
|
||||
install -Dm644 "$srcdir"/bootx64.efi \
|
||||
"$pkgdir"/boot/EFI/Boot/bootx64.efi
|
||||
}
|
||||
|
||||
libva() {
|
||||
install_if="$pkgname libva"
|
||||
depends="intel-media-driver libva-intel-driver"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
kernel_edge() {
|
||||
pkgdesc="Alpine Edge kernel"
|
||||
depends="linux-edge"
|
||||
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
||||
|
||||
install -Dm644 "$srcdir"/grub_edge.cfg \
|
||||
"$subpkgdir"/boot/grub/grub.cfg
|
||||
}
|
||||
|
||||
kernel_lts() {
|
||||
pkgdesc="Alpine LTS kernel"
|
||||
depends="linux-lts"
|
||||
devicepkg_subpackage_kernel $startdir $pkgname $subpkgname
|
||||
|
||||
install -Dm644 "$srcdir"/grub_lts.cfg \
|
||||
"$subpkgdir"/boot/grub/grub.cfg
|
||||
}
|
||||
|
||||
vulkan() {
|
||||
install_if="$pkgname vulkan-loader"
|
||||
depends="mesa-vulkan-intel"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
f7a3d88cf462a3adda84e7e14483df53e4034a8af26fae0c89af337a997a653f2c56bd485b33957916e5e8b89b6c1e5f6ae4478afe04a3a700b0374a80cd61d9 deviceinfo
|
||||
0f9357d4eea089628fbceb1e3e96d21a3f4329aeb6743158a6f877f967ef274506404eba949d5f01b7e1adea149f9a3aef992a5e8cd4181f93ab00909b1c5ecd grub_early.cfg
|
||||
1fcae6891028bc07051e6e6faf9dd3ec2304c6165f9df05198f28a7fa2ba85c1dd8d07b72a5122d9628b67a2b0096ac180a9a2de0f391f9ce850c07dc79ac857 grub_edge.cfg
|
||||
e15beaf385a350a7c36be249cf9495e4622f7888c8def6ac47359ebd2ef2c994f954abec8ccb16b402269f949e6f6016d41711e6596f46ba3dad240f84ba163f grub_lts.cfg
|
||||
"
|
27
device/testing/device-google-x64cros/deviceinfo
Normal file
27
device/testing/device-google-x64cros/deviceinfo
Normal file
|
@ -0,0 +1,27 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell
|
||||
# scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Google Chromebooks with x86_64 CPU"
|
||||
deviceinfo_manufacturer="Google"
|
||||
deviceinfo_codename="google-x64cros"
|
||||
deviceinfo_modules_initfs="jbd2 mbcache scsi_mod sd_mod sg libata sd ahci libahci usb_storage usb xhci_hcd ehci_hcd uas xhci_pci ehci_pci"
|
||||
deviceinfo_arch="x86_64"
|
||||
deviceinfo_gpu_accelerated="true"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="laptop"
|
||||
deviceinfo_keyboard="true"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1366"
|
||||
deviceinfo_screen_height="768"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_boot_filesystem="fat32"
|
||||
deviceinfo_cgpt_kpart="/boot/vmlinuz.kpart"
|
||||
deviceinfo_cgpt_kpart_start="8192"
|
||||
deviceinfo_cgpt_kpart_size="32768"
|
||||
deviceinfo_depthcharge_board="amd64-generic"
|
||||
deviceinfo_generate_depthcharge_image="true"
|
2
device/testing/device-google-x64cros/grub_early.cfg
Normal file
2
device/testing/device-google-x64cros/grub_early.cfg
Normal file
|
@ -0,0 +1,2 @@
|
|||
search --no-floppy --set=root --label "pmOS_boot"
|
||||
set prefix=($root)/grub
|
6
device/testing/device-google-x64cros/grub_edge.cfg
Normal file
6
device/testing/device-google-x64cros/grub_edge.cfg
Normal file
|
@ -0,0 +1,6 @@
|
|||
timeout=0
|
||||
|
||||
menuentry "postmarketOS" {
|
||||
linux ($root)/vmlinuz-edge console=tty0 PMOS_NO_OUTPUT_REDIRECT
|
||||
initrd ($root)/initramfs
|
||||
}
|
6
device/testing/device-google-x64cros/grub_lts.cfg
Normal file
6
device/testing/device-google-x64cros/grub_lts.cfg
Normal file
|
@ -0,0 +1,6 @@
|
|||
timeout=0
|
||||
|
||||
menuentry "postmarketOS" {
|
||||
linux ($root)/vmlinuz-lts console=tty0 PMOS_NO_OUTPUT_REDIRECT
|
||||
initrd ($root)/initramfs
|
||||
}
|
Loading…
Reference in a new issue