google-veyron-speedy: new device (MR 3187)

[ci:skip-build] Already built successfuly on CI in MR
This commit is contained in:
Anton Bambura 2022-06-02 22:54:38 +03:00 committed by Newbyte
parent 97ac1d9d68
commit 7db9fb51cd
No known key found for this signature in database
GPG key ID: 5873C171C9429CFA
10 changed files with 427 additions and 0 deletions

View file

@ -0,0 +1,86 @@
# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Jenneron <jenneron@protonmail.com>
pkgname=device-google-veyron-speedy
pkgdesc="ASUS Chromebook C201"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
# pmb:strict: avoid grub-related install error during build with pmbootstrap
options="!check !archcheck pmb:strict"
depends="
alsa-ucm-conf-google-veyron
linux-postmarketos-rockchip
u-boot-veyron-speedy
mesa-dri-gallium
postmarketos-base
"
subpackages="
$pkgname-i3wm
$pkgname-nonfree-firmware:nonfree_firmware
$pkgname-phosh
"
makedepends="devicepkg-dev grub grub-efi"
source="
deviceinfo
i3wm/xorg.conf.d/90-tap-to-click.conf
grub.cfg
phoc.ini
"
build() {
devicepkg_build $startdir $pkgname
grub-mkimage \
--prefix="/grub" \
--output="bootarm.efi" \
--format="arm-efi" \
--compression="xz" \
\
all_video \
disk \
efi_gop \
fat \
gzio \
iso9660 \
linux \
normal \
part_gpt \
part_msdos
}
package() {
devicepkg_package $startdir $pkgname
install -D "$srcdir"/grub.cfg \
"$pkgdir"/boot/grub/grub.cfg
install -D "$srcdir"/bootarm.efi \
"$pkgdir"/boot/EFI/Boot/bootarm.efi
}
# The only way to right click on this device
i3wm() {
install_if="$pkgname=$pkgver-r$pkgrel postmarketos-ui-i3wm"
install -Dm644 "$srcdir"/90-tap-to-click.conf \
"$subpkgdir"/etc/X11/xorg.conf.d/90-tap-to-click.conf
}
nonfree_firmware() {
pkgdesc="WiFi/BT firmware"
depends="firmware-google-veyron-brcm"
mkdir "$subpkgdir"
}
phosh() {
install_if="$pkgname=$pkgver-r$pkgrel postmarketos-ui-phosh"
install -Dm644 "$srcdir"/phoc.ini \
"$subpkgdir"/etc/phosh/phoc.ini
}
sha512sums="
b6c70318a7df5ac9a39ba05deccfcac56b82532d4b8f2cb73dfbffa7143caec40b01d9f289b869ed5f1bf54dd69d34700aebdd97a09f5c4468999d886d808f46 deviceinfo
e53ca475830930ecfc1fd537702e850e2abcb66fbed521cb6c3a2918d762649254bd0244ec93a47b20dfc593ec3afc9bdebdec1759a7bc96dcbe4800f40893da 90-tap-to-click.conf
0e3cbcd1a61209c60d3df594deea70c71aa41ba5af9e971e55f44b3a1a557bff37970442c881e8f4ea45240a1ed71845b8031373ba0c213c493ad1d9a2ccf1c8 grub.cfg
bd63cfc97d37e81dd9559dad60f330c10dc280afd20081495c6302960fcacf32954e3edab53294fcd5278e86c53c47a95b345a8d9e18807d88fe4313d519d259 phoc.ini
"

View file

@ -0,0 +1,26 @@
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="ASUS Chromebook C201"
deviceinfo_manufacturer="ASUS"
deviceinfo_codename="google-veyron-speedy"
deviceinfo_year="2015"
deviceinfo_arch="armv7"
deviceinfo_modules_initfs="pwm-bl rockchipdrm dw-mipi-dsi drm-kms-helper gpu-sched phy-rockchip-dp pwm-rockchip dw-wdt videobuf2-dma-sg analogix-dp drm-dp-aux-bus panel-edp gpio-charger sbs-battery cros-ec cros-ec-spi cros-ec-keyb"
# Device related
deviceinfo_chassis="laptop"
deviceinfo_keyboard="true"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1366"
deviceinfo_screen_height="768"
deviceinfo_gpu_accelerated="true"
# Bootloader related
deviceinfo_flash_method="none"
deviceinfo_boot_filesystem="fat32"
deviceinfo_cgpt_kpart="/usr/share/u-boot/google-veyron-speedy/u-boot-dtb.img.kpart"
deviceinfo_cgpt_kpart_start="8192"
deviceinfo_cgpt_kpart_size="32768"

View file

@ -0,0 +1,7 @@
timeout=0
menuentry "postmarketOS" {
linux /vmlinuz console=null
initrd /initramfs
devicetree /dtbs-postmarketos-rockchip/rk3288-veyron-speedy.dtb
}

View file

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "touchpad"
MatchIsTouchpad "on"
Driver "libinput"
Option "Tapping" "on"
EndSection

View file

@ -0,0 +1,5 @@
[cursor:seat0]
map-to-output = eDP-1
[output:eDP-1]
scale = 1

View file

@ -0,0 +1,72 @@
diff --git a/configs/chromebit_mickey_defconfig b/configs/chromebit_mickey_defconfig
index 2a308eeaeb..556cc95b82 100644
--- a/configs/chromebit_mickey_defconfig
+++ b/configs/chromebit_mickey_defconfig
@@ -1,7 +1,7 @@
CONFIG_ARM=y
# CONFIG_SPL_USE_ARCH_MEMCPY is not set
CONFIG_ARCH_ROCKCHIP=y
-CONFIG_SYS_TEXT_BASE=0x00100000
+CONFIG_SYS_TEXT_BASE=0x02000100
CONFIG_NR_DRAM_BANKS=1
CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
CONFIG_SPL_TEXT_BASE=0xff704000
@@ -98,3 +98,4 @@ CONFIG_DISPLAY_ROCKCHIP_HDMI=y
CONFIG_SPL_TINY_MEMSET=y
CONFIG_CMD_DHRYSTONE=y
CONFIG_ERRNO_STR=y
+# CONFIG_EFI_LOADER is not set
diff --git a/configs/chromebook_jerry_defconfig b/configs/chromebook_jerry_defconfig
index dada557952..be06e64909 100644
--- a/configs/chromebook_jerry_defconfig
+++ b/configs/chromebook_jerry_defconfig
@@ -1,7 +1,7 @@
CONFIG_ARM=y
# CONFIG_SPL_USE_ARCH_MEMCPY is not set
CONFIG_ARCH_ROCKCHIP=y
-CONFIG_SYS_TEXT_BASE=0x00100000
+CONFIG_SYS_TEXT_BASE=0x02000100
CONFIG_NR_DRAM_BANKS=1
CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
CONFIG_SPL_TEXT_BASE=0xff704000
@@ -106,3 +106,4 @@ CONFIG_DISPLAY_ROCKCHIP_HDMI=y
CONFIG_SPL_TINY_MEMSET=y
CONFIG_CMD_DHRYSTONE=y
CONFIG_ERRNO_STR=y
+# CONFIG_EFI_LOADER is not set
diff --git a/configs/chromebook_minnie_defconfig b/configs/chromebook_minnie_defconfig
index 985ca94770..8884d2d3da 100644
--- a/configs/chromebook_minnie_defconfig
+++ b/configs/chromebook_minnie_defconfig
@@ -1,7 +1,7 @@
CONFIG_ARM=y
# CONFIG_SPL_USE_ARCH_MEMCPY is not set
CONFIG_ARCH_ROCKCHIP=y
-CONFIG_SYS_TEXT_BASE=0x00100000
+CONFIG_SYS_TEXT_BASE=0x02000100
CONFIG_NR_DRAM_BANKS=1
CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
CONFIG_SPL_TEXT_BASE=0xff704000
@@ -105,3 +105,4 @@ CONFIG_CONSOLE_SCROLL_LINES=10
CONFIG_SPL_TINY_MEMSET=y
CONFIG_CMD_DHRYSTONE=y
CONFIG_ERRNO_STR=y
+# CONFIG_EFI_LOADER is not set
diff --git a/configs/chromebook_speedy_defconfig b/configs/chromebook_speedy_defconfig
index e3d4c30739..b81eeca775 100644
--- a/configs/chromebook_speedy_defconfig
+++ b/configs/chromebook_speedy_defconfig
@@ -1,7 +1,7 @@
CONFIG_ARM=y
# CONFIG_SPL_USE_ARCH_MEMCPY is not set
CONFIG_ARCH_ROCKCHIP=y
-CONFIG_SYS_TEXT_BASE=0x00100000
+CONFIG_SYS_TEXT_BASE=0x02000100
CONFIG_NR_DRAM_BANKS=1
CONFIG_SYS_SPI_U_BOOT_OFFS=0x20000
CONFIG_SPL_TEXT_BASE=0xff704000
@@ -102,3 +102,4 @@ CONFIG_DISPLAY_ROCKCHIP_HDMI=y
CONFIG_SPL_TINY_MEMSET=y
CONFIG_CMD_DHRYSTONE=y
CONFIG_ERRNO_STR=y
+# CONFIG_EFI_LOADER is not set

View file

@ -0,0 +1,103 @@
diff --git a/disk/part_efi.c b/disk/part_efi.c
index 60b1c1d761..3003e096ea 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -95,10 +95,10 @@ static int validate_gpt_header(gpt_header *gpt_h, lbaint_t lba,
/* Check the GPT header signature */
if (le64_to_cpu(gpt_h->signature) != GPT_HEADER_SIGNATURE_UBOOT) {
- printf("%s signature is wrong: 0x%llX != 0x%llX\n",
+/* printf("%s signature is wrong: 0x%llX != 0x%llX\n",
"GUID Partition Table Header",
le64_to_cpu(gpt_h->signature),
- GPT_HEADER_SIGNATURE_UBOOT);
+ GPT_HEADER_SIGNATURE_UBOOT); */
return -1;
}
@@ -682,8 +682,8 @@ int gpt_verify_headers(struct blk_desc *dev_desc, gpt_header *gpt_head,
if (is_gpt_valid(dev_desc,
GPT_PRIMARY_PARTITION_TABLE_LBA,
gpt_head, gpt_pte) != 1) {
- printf("%s: *** ERROR: Invalid GPT ***\n",
- __func__);
+/* printf("%s: *** ERROR: Invalid GPT ***\n",
+ __func__); */
return -1;
}
@@ -968,7 +968,7 @@ static int is_gpt_valid(struct blk_desc *dev_desc, u64 lba,
/* Read and allocate Partition Table Entries */
*pgpt_pte = alloc_read_gpt_entries(dev_desc, pgpt_head);
if (*pgpt_pte == NULL) {
- printf("GPT: Failed to allocate memory for PTE\n");
+ /* printf("GPT: Failed to allocate memory for PTE\n"); */
return 0;
}
@@ -1008,9 +1008,9 @@ static int find_valid_gpt(struct blk_desc *dev_desc, gpt_header *gpt_head,
__func__);
return 0;
}
- if (r != 2)
+/* if (r != 2)
printf("%s: *** Using Backup GPT ***\n",
- __func__);
+ __func__); */
}
return 1;
}
diff --git a/fs/ext4/ext4_common.c b/fs/ext4/ext4_common.c
index c52cc400e1..e64ff6c4cf 100644
--- a/fs/ext4/ext4_common.c
+++ b/fs/ext4/ext4_common.c
@@ -2415,7 +2415,7 @@ int ext4fs_mount(unsigned part_length)
return 1;
fail:
- printf("Failed to mount ext2 filesystem...\n");
+/* printf("Failed to mount ext2 filesystem...\n"); */
fail_noerr:
free(data);
ext4fs_root = NULL;
diff --git a/fs/fs.c b/fs/fs.c
index 7a4020607a..a7bb481915 100644
--- a/fs/fs.c
+++ b/fs/fs.c
@@ -36,7 +36,7 @@ static int fs_type = FS_TYPE_ANY;
static inline int fs_probe_unsupported(struct blk_desc *fs_dev_desc,
struct disk_partition *fs_partition)
{
- log_err("** Unrecognized filesystem type **\n");
+/* log_err("** Unrecognized filesystem type **\n"); */
return -1;
}
diff --git a/fs/fs_internal.c b/fs/fs_internal.c
index bfc35c996c..35d75518d3 100644
--- a/fs/fs_internal.c
+++ b/fs/fs_internal.c
@@ -29,8 +29,8 @@ int fs_devread(struct blk_desc *blk, struct disk_partition *partition,
/* Check partition boundaries */
if ((sector + ((byte_offset + byte_len - 1) >> log2blksz))
>= partition->size) {
- log_err("%s read outside partition " LBAFU "\n", __func__,
- sector);
+/* log_err("%s read outside partition " LBAFU "\n", __func__,
+ sector); */
return 0;
}
diff --git a/lib/efi_loader/efi_disk.c b/lib/efi_loader/efi_disk.c
index 7bd1ccec45..62663f45f8 100644
--- a/lib/efi_loader/efi_disk.c
+++ b/lib/efi_loader/efi_disk.c
@@ -531,7 +531,7 @@ efi_status_t efi_disk_register(void)
const char *if_typename = blk_get_if_type_name(desc->if_type);
/* Add block device for the full device */
- log_info("Scanning disk %s...\n", dev->name);
+/* log_info("Scanning disk %s...\n", dev->name); */
ret = efi_disk_add_dev(NULL, NULL, if_typename,
desc, desc->devnum, 0, 0, &disk);
if (ret == EFI_NOT_READY) {

View file

@ -0,0 +1,21 @@
From 92c21e5140288bec38eff1f5bcca63f7555b8d85 Mon Sep 17 00:00:00 2001
From: Anton Bambura <jenneron@protonmail.com>
Date: Tue, 24 May 2022 05:30:19 +0300
Subject: [PATCH] add efi support
---
configs/chromebook_speedy_defconfig | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/configs/chromebook_speedy_defconfig b/configs/chromebook_speedy_defconfig
index 8884d2d3da..1301e3e4ff 100644
--- a/configs/chromebook_speedy_defconfig
+++ b/configs/chromebook_speedy_defconfig
@@ -105,4 +105,5 @@ CONFIG_CONSOLE_SCROLL_LINES=10
CONFIG_SPL_TINY_MEMSET=y
CONFIG_CMD_DHRYSTONE=y
CONFIG_ERRNO_STR=y
-# CONFIG_EFI_LOADER is not set
+CONFIG_CMD_BOOTEFI=y
+CONFIG_EFI_LOADER=y
--
2.25.1

View file

@ -0,0 +1,59 @@
# Maintainer: Jenneron <jenneron@protonmail.com>
pkgname=u-boot-veyron-speedy
pkgver=2021.01
pkgrel=0
pkgdesc="U-Boot for ASUS Chromebook C201"
url="https://www.denx.de/wiki/U-Boot/"
arch="armv7"
license="GPL-2.0-or-later OFL-1.1 BSD-2-Clause BSD-3-Clause eCos-2.0 IBM-pibs
ISC LGPL-2.0-only LGPL-2.1-only X11"
options="!check" # no tests in upstream
makedepends="$depends_dev bc dtc python3-dev swig bison flex openssl-dev
py3-setuptools linux-headers u-boot-tools vboot-utils"
source="
https://ftp.denx.de/pub/u-boot/u-boot-${pkgver//_/-}.tar.bz2
0001-chainloading-v2021.01.patch
0002-supress-efi-errors-v2021.01.patch
0003-add-efi-support.patch
chromebook_speedy.its
"
builddir="$srcdir"/u-boot-${pkgver//_/-}
prepare() {
default_prepare
}
build() {
make chromebook_speedy_defconfig
make
cp "$srcdir"/chromebook_speedy.its ./
mkimage -f chromebook_speedy.its u-boot-dtb.img
echo -e "\n" > dummy_config
echo -e "\n" > dummy_bootloader
vbutil_kernel \
--pack u-boot-dtb.img.kpart \
--keyblock /usr/share/vboot/devkeys/kernel.keyblock \
--signprivate /usr/share/vboot/devkeys/kernel_data_key.vbprivk \
--version 1 \
--arch arm \
--config dummy_config \
--bootloader dummy_bootloader \
--vmlinuz u-boot-dtb.img
}
package() {
install -D -m644 "$builddir"/u-boot-dtb.img.kpart \
"$pkgdir"/usr/share/u-boot/google-veyron-speedy/u-boot-dtb.img.kpart
}
sha512sums="
40dd4d9ef87a1829158658c433d46a047a39c0d8c314ad8d133f7240343ee3a75b060f009dd2efe598cfb8a766773f6cd773ea7f7745ee88e52a771c77eb1c6e u-boot-2021.01.tar.bz2
53e12dece9eb7ab4d5317ac2570714954c3158f1717abe729deca454244a97f885ae9cc571bab4f80a5b65d6dde7752242ac856138eede347fde719ff21a6097 0001-chainloading-v2021.01.patch
b3fd3e1fea09f947b2f0b35dc5a4abd2bf8215907942a88c36685973d08112b74e5cc2e5fc3666a8d27a9f37873dfaedf2136f52c2756c9c97cbb8ad0472478c 0002-supress-efi-errors-v2021.01.patch
789e50a7d01308f2eba442fe20ab93e2a3c2e47af00a20bc6f5cca7a7f91f8fa266884dd88712a28673c2191b0499f866ff560771169986b0d60387ebfdc8211 0003-add-efi-support.patch
2944e710882522748816e2027eee9a9bfd16385ffa6ab051c385ad7ff04b663863e69273972c5988ad64ca7b3b71ee46937818490b1dbad6eb75928c1db7440a chromebook_speedy.its
"

View file

@ -0,0 +1,42 @@
/dts-v1/;
/ {
description = "U-Boot mainline";
#address-cells = <1>;
images {
kernel@1 {
description = "U-Boot mainline";
type = "kernel_noload";
arch = "arm";
os = "linux";
data = /incbin/("./u-boot.bin");
compression = "none";
load = <0>;
entry = <0>;
hash@2 {
algo = "sha1";
};
};
fdt@1{
description = "U-Boot dummy dtb";
data = /incbin/("./u-boot.dtb");
type = "flat_dt";
arch = "arm";
compression = "none";
hash@1{
algo = "sha1";
};
};
};
configurations {
default = "config@1";
config@1 {
description = "Boot U-Boot";
kernel = "kernel@1";
fdt = "fdt@1";
};
};
};