[gnome-build-meta/valentindavid/pinebook-pro: 5/16] Add bootable image for Pinebook Pro
- From: Valentin David <valentindavid src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-build-meta/valentindavid/pinebook-pro: 5/16] Add bootable image for Pinebook Pro
- Date: Thu, 16 Apr 2020 18:42:48 +0000 (UTC)
commit 356e111f0b2d6aec7bf843b7bda356e95cca9feb
Author: Valentin David <valentin david codethink co uk>
Date: Thu Apr 9 11:48:09 2020 +0000
Add bootable image for Pinebook Pro
.gitlab-ci.yml | 21 ++-
.../boards/pinebook-pro/arm-none-eabi-binutils.bst | 38 ++++
elements/boards/pinebook-pro/arm-none-eabi-gcc.bst | 55 ++++++
.../boards/pinebook-pro/arm-trusted-firmware.bst | 28 +++
elements/boards/pinebook-pro/deps.bst | 36 ++++
elements/boards/pinebook-pro/dtc.bst | 17 ++
elements/boards/pinebook-pro/filesystem.bst | 9 +
elements/boards/pinebook-pro/image-deps.bst | 8 +
elements/boards/pinebook-pro/image.bst | 112 ++++++++++++
elements/boards/pinebook-pro/initial-scripts.bst | 7 +
elements/boards/pinebook-pro/initramfs.bst | 81 +++++++++
elements/boards/pinebook-pro/initramfs/deps.bst | 21 +++
.../pinebook-pro/initramfs/initial-scripts.bst | 7 +
elements/boards/pinebook-pro/linux.bst | 195 +++++++++++++++++++++
.../boards/pinebook-pro/python3-as-python2.bst | 10 ++
elements/boards/pinebook-pro/repo.bst | 43 +++++
elements/boards/pinebook-pro/swig.bst | 14 ++
elements/boards/pinebook-pro/u-boot.bst | 34 ++++
18 files changed, 735 insertions(+), 1 deletion(-)
---
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 1cd8f9b9..ef5ef1b6 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -200,7 +200,7 @@ track:
interruptible: true
script:
- 'sed -i "s/track-tags: False/track-tags: ${BST_TRACK_TAGS}/" project.conf'
- - ${BST} track --deps all core.bst flatpak-runtimes.bst vm/image.bst
+ - ${BST} track --deps all core.bst flatpak-runtimes.bst vm/image.bst boards/pinebook-pro/image.bst
retry: 2
# only run on branches targeting master
rules:
@@ -237,6 +237,25 @@ vm-image-x86_64:
artifacts: false
<<: *x86_64
+pinebook-pro-image:
+ stage: image
+ script:
+ - ${BST_NO_PUSH} --max-jobs $(( $(nproc) / 4 )) -o arch "${ARCH}" build boards/pinebook-pro/image.bst
+ - ${BST_NO_PUSH} -o arch "${ARCH}" checkout --hardlinks boards/pinebook-pro/image.bst pinebook-pro-image
+ when: manual
+ allow_failure: true
+ cache: *bst-cache
+ artifacts:
+ when: always
+ paths:
+ - logs
+ - pinebook-pro-image
+ expire_in: '2 days'
+ needs:
+ - track
+ - job: build-gnome-core-aarch64
+ artifacts: false
+ <<: *aarch64
flatpak-prepare:
stage: prepare_flatpak
diff --git a/elements/boards/pinebook-pro/arm-none-eabi-binutils.bst
b/elements/boards/pinebook-pro/arm-none-eabi-binutils.bst
new file mode 100644
index 00000000..6ad052dc
--- /dev/null
+++ b/elements/boards/pinebook-pro/arm-none-eabi-binutils.bst
@@ -0,0 +1,38 @@
+kind: autotools
+
+sources:
+- kind: tar
+ url: https://ftp.gnu.org/gnu/binutils/binutils-2.32.tar.xz
+
+depends:
+- freedesktop-sdk.bst:bootstrap-import.bst
+
+variables:
+ target: arm-none-eabi
+ conf-local: >-
+ --target=%{target}
+
+config:
+ install-commands:
+ (>):
+ - |
+ rm -rf "%{install-root}%{datadir}/locale"
+ rm -rf "%{install-root}%{infodir}"
+
+ - |
+ rm "%{install-root}%{prefix}/%{target}/bin/ld"
+ ln -s ld.bfd "%{install-root}%{prefix}/%{target}/bin/ld"
+
+ - |
+ for f in "%{install-root}%{bindir}"/*; do
+ basename="$(basename "${f}")"
+ case "${basename}" in
+ %{target}-*)
+ main="%{install-root}%{prefix}/%{target}/bin/${basename#%{target}-}"
+ if [ -f "${main}" ]; then
+ rm "${f}"
+ ln -sr "${main}" "${f}"
+ fi
+ ;;
+ esac
+ done
diff --git a/elements/boards/pinebook-pro/arm-none-eabi-gcc.bst
b/elements/boards/pinebook-pro/arm-none-eabi-gcc.bst
new file mode 100644
index 00000000..d23f9693
--- /dev/null
+++ b/elements/boards/pinebook-pro/arm-none-eabi-gcc.bst
@@ -0,0 +1,55 @@
+kind: autotools
+
+sources:
+- kind: tar
+ url: https://ftp.gnu.org/gnu/gcc/gcc-9.2.0/gcc-9.2.0.tar.xz
+- kind: tar
+ url: https://ftp.gnu.org/gnu/gmp/gmp-6.1.2.tar.xz
+ directory: gmp
+- kind: tar
+ url: https://ftp.gnu.org/gnu/mpfr/mpfr-4.0.2.tar.xz
+ directory: mpfr
+- kind: tar
+ url: https://ftp.gnu.org/gnu/mpc/mpc-1.1.0.tar.gz
+ directory: mpc
+
+build-depends:
+- freedesktop-sdk.bst:components/tar.bst
+
+depends:
+- boards/pinebook-pro/arm-none-eabi-binutils.bst
+
+variables:
+ conf-cmd: ../configure
+ conf-local: >-
+ --with-newlib
+ --target=arm-none-eabi
+ --disable-bootstrap
+ --enable-languages=c
+ --disable-libssp
+ --disable-gomp
+ --enable-threads
+ --disable-shared
+ --disable-nls
+
+config:
+ configure-commands:
+ - |
+ mkdir build
+ cd build
+ %{configure}
+
+ build-commands:
+ - |
+ cd build
+ %{make}
+
+ install-commands:
+ - |
+ cd build
+ %{make-install}
+
+ - rm "%{install-root}%{bindir}/arm-none-eabi-gcc"
+ - ln -s arm-none-eabi-gcc-9.2.0 "%{install-root}%{bindir}/arm-none-eabi-gcc"
+ - rm -rf "%{install-root}%{infodir}"
+ - rm -rf "%{install-root}%{mandir}"
diff --git a/elements/boards/pinebook-pro/arm-trusted-firmware.bst
b/elements/boards/pinebook-pro/arm-trusted-firmware.bst
new file mode 100644
index 00000000..41a0227f
--- /dev/null
+++ b/elements/boards/pinebook-pro/arm-trusted-firmware.bst
@@ -0,0 +1,28 @@
+kind: manual
+
+sources:
+- kind: git_tag
+ url: https://github.com/ARM-software/arm-trusted-firmware.git
+ track: 22d12c4148c373932a7a81e5d1c59a767e143ac2
+ track-tags: false
+
+build-depends:
+- freedesktop-sdk.bst:bootstrap-import.bst
+# This is required because at part of the firmware has to be built for
+# armv7. freedesktop-sdk.bst:cross-compilers/gcc-arm.bst does not
+# seem to be able to compile like needed.
+- boards/pinebook-pro/arm-none-eabi-gcc.bst
+
+variables:
+ board: pinebook_pro-rk3399
+
+environment:
+ CFLAGS: '-fno-stack-protector'
+ LDFLAGS: ''
+
+config:
+ build-commands:
+ - make PLAT=rk3399
+
+ install-commands:
+ - install -Dm644 -t "%{install-root}%{indep-libdir}/u-boot/%{board}" build/rk3399/release/bl31/bl31.elf
diff --git a/elements/boards/pinebook-pro/deps.bst b/elements/boards/pinebook-pro/deps.bst
new file mode 100644
index 00000000..6b6ba067
--- /dev/null
+++ b/elements/boards/pinebook-pro/deps.bst
@@ -0,0 +1,36 @@
+kind: stack
+
+runtime-depends:
+- freedesktop-sdk.bst:components/util-linux.bst
+- freedesktop-sdk.bst:components/tzdata.bst
+- freedesktop-sdk.bst:components/systemd.bst
+- freedesktop-sdk.bst:components/xorg-server.bst
+- freedesktop-sdk.bst:components/shadow.bst
+- freedesktop-sdk.bst:vm/mesa-default.bst
+
+- core-deps/flatpak.bst
+- vm/ostree-config.bst
+- core-deps/avahi.bst
+- core-deps/eos-updater.bst
+
+- vm/plymouth-gnome-theme.bst
+- vm/kbd.bst
+- vm/dev-repo-script.bst
+
+- freedesktop-sdk.bst:vm/config/pulseaudio.bst
+- freedesktop-sdk.bst:vm/config/sudo.bst
+- freedesktop-sdk.bst:vm/config/journald.bst
+- vm/flathub-config.bst
+
+# And add GNOME core on top !
+- sdk-platform.bst
+- core.bst
+- core/systemd-presets.bst
+
+- boards/pinebook-pro/initramfs.bst
+- vm/resize-root.bst
+- vm/eos-repartition.bst
+
+# FIXME: Waiting for those to be merged:
+#- freedesktop-sdk.bst:components/linux-firmware.bst
+#- freedesktop-sdk.bst:components/wireless-regdb-bin.bst
diff --git a/elements/boards/pinebook-pro/dtc.bst b/elements/boards/pinebook-pro/dtc.bst
new file mode 100644
index 00000000..3b2fbaf8
--- /dev/null
+++ b/elements/boards/pinebook-pro/dtc.bst
@@ -0,0 +1,17 @@
+kind: manual
+
+sources:
+- kind: tar
+ url: https://git.kernel.org/pub/scm/utils/dtc/dtc.git/snapshot/dtc-1.6.0.tar.gz
+
+depends:
+- freedesktop-sdk.bst:components/bison.bst
+- freedesktop-sdk.bst:components/flex.bst
+- freedesktop-sdk.bst:components/pkg-config.bst
+
+config:
+ build-commands:
+ - make
+
+ install-commands:
+ - make PREFIX="%{prefix}" LIBDIR="%{libdir}" DESTDIR="%{install-root}" -j1 install
diff --git a/elements/boards/pinebook-pro/filesystem.bst b/elements/boards/pinebook-pro/filesystem.bst
new file mode 100644
index 00000000..e005a981
--- /dev/null
+++ b/elements/boards/pinebook-pro/filesystem.bst
@@ -0,0 +1,9 @@
+kind: compose
+
+build-depends:
+- boards/pinebook-pro/deps.bst
+
+config:
+ exclude:
+ - devel
+ - debug
diff --git a/elements/boards/pinebook-pro/image-deps.bst b/elements/boards/pinebook-pro/image-deps.bst
new file mode 100644
index 00000000..56f95c44
--- /dev/null
+++ b/elements/boards/pinebook-pro/image-deps.bst
@@ -0,0 +1,8 @@
+kind: stack
+
+runtime-depends:
+- freedesktop-sdk.bst:integration/mtab.bst
+- freedesktop-sdk.bst:components/genimage.bst
+- vm/qemu-tools.bst
+- core-deps/libostree.bst
+- boards/pinebook-pro/u-boot.bst
diff --git a/elements/boards/pinebook-pro/image.bst b/elements/boards/pinebook-pro/image.bst
new file mode 100644
index 00000000..330fa2ca
--- /dev/null
+++ b/elements/boards/pinebook-pro/image.bst
@@ -0,0 +1,112 @@
+kind: script
+
+build-depends:
+- boards/pinebook-pro/image-deps.bst
+- boards/pinebook-pro/repo.bst
+
+variables:
+ linux-root: B921B045-1DF0-41C3-AF44-4C6F280D3FAE
+ ostree-branch: gnome-os/aarch64/pinebook-pro
+ board: pinebook_pro-rk3399
+
+ sysroot: "/sysroot"
+
+environment:
+ OSTREE_REPO: "%{sysroot}/ostree/repo"
+
+config:
+ layout:
+ - element: ''
+ destination: '/sysroot'
+ - element: ''
+ destination: '/genimage'
+ - element: boards/pinebook-pro/repo.bst
+ destination: '/source-repo'
+ - element: boards/pinebook-pro/image-deps.bst
+ destination: '/'
+
+ commands:
+ - mkdir -p "${OSTREE_REPO}"
+ - ostree init --repo="${OSTREE_REPO}" --mode=bare
+
+ - ostree config --group sysroot set bootloader auto
+ - ostree pull-local "/source-repo" %{ostree-branch}
+
+ - mkdir -p "%{sysroot}/boot"
+
+ - ostree admin init-fs "%{sysroot}"
+ - ostree admin os-init --sysroot="%{sysroot}" gnome-os
+
+ - |
+ ostree admin deploy --os="gnome-os" \
+ --sysroot="%{sysroot}" %{ostree-branch} \
+ --karg="rw" --karg="quiet" --karg="splash" \
+ --karg="root=LABEL=root"
+
+ - |
+ mkdir -p "%{sysroot}/etc/ostree"
+ cp -r "%{sysroot}"/ostree/boot.1/gnome-os/*/*/etc/ostree/remotes.d "%{sysroot}/etc/ostree/remotes.d"
+
+ - |
+ ostree admin set-origin --sysroot="%{sysroot}" \
+ --index=0 \
+ GnomeOS dummy \
+ %{ostree-branch}
+
+ - |
+ cp -r "%{sysroot}"/ostree/boot.1/gnome-os/*/*/boot/EFI/ "%{sysroot}/boot/"
+
+ - |
+ cp -r "%{sysroot}"/ostree/boot.1/gnome-os/*/*/boot/dtb/ "%{sysroot}/boot/"
+
+ - |
+ size=$(($(du -s -B 4K "%{sysroot}" | cut -f1)*4+200*1024))
+ cat >/genimage/genimage.cfg <<EOF
+ image efi.img {
+ vfat {
+ extraargs = "-F32 -n EFI"
+ }
+ mountpoint = "/boot"
+ size = 500M
+ }
+ image root.img {
+ ext4 {
+ label = "root"
+ }
+ size = ${size}K
+ }
+ image disk.img {
+ hdimage {
+ gpt = true
+ align = 1M
+ }
+ partition idbloader {
+ image = "idbloader.img"
+ offset = 32K
+ in-partition-table = false
+ }
+ partition uboot {
+ image = "u-boot.itb"
+ offset = 8M
+ in-partition-table = false
+ }
+ partition efi {
+ image = "efi.img"
+ partition-type-uuid = "U"
+ }
+ partition root {
+ image = "root.img"
+ partition-type-uuid = "%{linux-root}"
+ }
+ }
+ EOF
+
+ - |
+ cd /genimage
+ genimage --rootpath "%{sysroot}" --inputpath "%{indep-libdir}/u-boot/%{board}"
+
+ - |
+ sfdisk --part-attrs /genimage/images/disk.img 2 55
+
+ - |
+ qemu-img convert -O qcow2 -f raw /genimage/images/disk.img "%{install-root}/disk.qcow2"
diff --git a/elements/boards/pinebook-pro/initial-scripts.bst
b/elements/boards/pinebook-pro/initial-scripts.bst
new file mode 100644
index 00000000..6b6fa464
--- /dev/null
+++ b/elements/boards/pinebook-pro/initial-scripts.bst
@@ -0,0 +1,7 @@
+kind: collect_initial_scripts
+
+build-depends:
+- boards/pinebook-pro/deps.bst
+
+config:
+ path: /etc/fdsdk/initial_scripts
diff --git a/elements/boards/pinebook-pro/initramfs.bst b/elements/boards/pinebook-pro/initramfs.bst
new file mode 100644
index 00000000..5e8f06d2
--- /dev/null
+++ b/elements/boards/pinebook-pro/initramfs.bst
@@ -0,0 +1,81 @@
+kind: script
+
+build-depends:
+- freedesktop-sdk.bst:vm/prepare-image.bst
+- boards/pinebook-pro/initramfs/deps.bst
+- boards/pinebook-pro/initramfs/initial-scripts.bst
+
+variables:
+ uuidnamespace: aea54278-2587-4075-ae67-8688ace4ce3d
+
+config:
+ layout:
+ - element: ''
+ destination: '/tmp'
+ - element: ''
+ destination: '/var/tmp'
+ - element: ''
+ destination: '/efi'
+ - element: boards/pinebook-pro/initramfs/deps.bst
+ destination: '/'
+ - element: boards/pinebook-pro/initramfs/initial-scripts.bst
+ destination: '/'
+ - element: vm/prepare-image.bst
+ destination: '/'
+
+ commands:
+ - |
+ prepare-image.sh \
+ --seed "%{uuidnamespace}" \
+ --rootsource /dev/gpt-auto-root \
+ --efisource LABEL=EFI \
+ --efipath /boot \
+ --rootpasswd "root" >/dev/null
+
+ - |
+ mkdir -p "%{install-root}/usr/lib/"
+ cp -r /usr/lib/modules "%{install-root}/usr/lib/"
+
+ - |
+ version="$(ls -1 /lib/modules | head -n1)"
+ mkdir -p "%{install-root}/usr/lib/modules/${version}"
+ dracut -v --fstab \
+ --no-machineid \
+ --kver "${version}" \
+ --add ostree \
+ --add plymouth \
+ --add eos-repartition \
+ --install 'fsck.ext4' \
+ "%{install-root}/usr/lib/modules/${version}/initramfs"
+
+ - |
+ version="$(ls -1 /lib/modules | head -n1)"
+ install -Dm644 \
+ /boot/dtbs/rockchip/rk3399-pinebook-pro.dtb \
+ "%{install-root}/usr/lib/modules/${version}/devicetree"
+
+ - |
+ version="$(ls -1 /lib/modules | head -n1)"
+ cp /boot/vmlinuz "%{install-root}/usr/lib/modules/${version}/vmlinuz"
+
+ - dbus-uuidgen >/etc/machine-id
+ - SYSTEMD_RELAX_ESP_CHECKS=1 bootctl --path='/efi' --no-variables install
+ - rm /etc/machine-id
+
+ - |
+ cp -r /efi "%{install-root}/boot"
+
+ - |
+ cat <<EOF >"%{install-root}/boot/loader/loader.conf"
+ timeout 3
+ editor yes
+ console-mode keep
+ default *
+ EOF
+
+ # FIXME: u-boot also needs to load the dtb. We should find a way
+ # to keep it updated.
+ - |
+ install -Dm644 \
+ /boot/dtbs/rockchip/rk3399-pinebook-pro.dtb \
+ "%{install-root}/boot/dtb/rockchip/rk3399-pinebook-pro.dtb"
diff --git a/elements/boards/pinebook-pro/initramfs/deps.bst b/elements/boards/pinebook-pro/initramfs/deps.bst
new file mode 100644
index 00000000..a0da8970
--- /dev/null
+++ b/elements/boards/pinebook-pro/initramfs/deps.bst
@@ -0,0 +1,21 @@
+kind: stack
+
+runtime-depends:
+- freedesktop-sdk.bst:bootstrap-import.bst
+- freedesktop-sdk.bst:components/util-linux.bst
+- freedesktop-sdk.bst:components/systemd.bst
+- freedesktop-sdk.bst:components/dbus.bst
+- freedesktop-sdk.bst:components/dracut.bst
+- freedesktop-sdk.bst:components/os-release.bst
+- freedesktop-sdk.bst:components/shadow.bst
+- freedesktop-sdk.bst:components/tzdata.bst
+- freedesktop-sdk.bst:components/pkg-config.bst
+- vm/plymouth-gnome-theme.bst
+
+- boards/pinebook-pro/linux.bst
+# FIXME: Waiting for those to be merged:
+#- freedesktop-sdk.bst:components/linux-firmware.bst
+#- freedesktop-sdk.bst:components/wireless-regdb-bin.bst
+
+- core-deps/libostree.bst
+- vm/eos-repartition.bst
diff --git a/elements/boards/pinebook-pro/initramfs/initial-scripts.bst
b/elements/boards/pinebook-pro/initramfs/initial-scripts.bst
new file mode 100644
index 00000000..f0159e69
--- /dev/null
+++ b/elements/boards/pinebook-pro/initramfs/initial-scripts.bst
@@ -0,0 +1,7 @@
+kind: collect_initial_scripts
+
+build-depends:
+- boards/pinebook-pro/initramfs/deps.bst
+
+config:
+ path: /etc/fdsdk/initial_scripts
diff --git a/elements/boards/pinebook-pro/linux.bst b/elements/boards/pinebook-pro/linux.bst
new file mode 100644
index 00000000..1fb739c6
--- /dev/null
+++ b/elements/boards/pinebook-pro/linux.bst
@@ -0,0 +1,195 @@
+kind: manual
+
+sources:
+- kind: git_tag
+ url: https://gitlab.manjaro.org/tsys/linux-pinebook-pro.git
+ #track: master
+ track: 93293259039d6fc3a725961d42b4f11bfc3f5127
+ track-tags: false
+
+depends:
+- freedesktop-sdk.bst:components/kmod.bst
+
+build-depends:
+- freedesktop-sdk.bst:bootstrap-import.bst
+- freedesktop-sdk.bst:components/bison.bst
+- freedesktop-sdk.bst:components/flex.bst
+- freedesktop-sdk.bst:components/bc.bst
+- freedesktop-sdk.bst:components/gzip.bst
+
+variables:
+ bootdir: /boot
+ kernel_arch: arm64
+ image-name: arch/arm64/boot/Image
+
+environment:
+ ARCH: '%{kernel_arch}'
+
+config:
+ configure-commands:
+ - |
+ # Generate the default kernel config for the target architecture
+ #make pinebook_pro_defconfig
+ make defconfig
+
+ - |
+ # Modify the kernel config for additional features
+
+ # Kernel Config Options
+ scripts/config -e DEVTMPFS
+ scripts/config -e CGROUPS
+ scripts/config -e INOTIFY_USER
+ scripts/config -e SIGNALFD
+ scripts/config -e TIMERFD
+ scripts/config -e EPOLL
+ scripts/config -e NET
+ scripts/config -e SYSFS
+ scripts/config -e PROC_FS
+ scripts/config -e FHANDLE
+
+ # Kernel crypto/hash API
+ scripts/config -e CRYPTO_USER_API_HASH
+ scripts/config -e CRYPTO_HMAC
+ scripts/config -e CRYPTO_SHA256
+
+ # udev will fail to work with legacy sysfs
+ scripts/config -d SYSFS_DEPRECATED
+
+ # Boot is very slow with systemd when legacy PTYs are present
+ scripts/config -d LEGACY_PTYS
+ scripts/config -d LEGACY_PTY_COUNT
+
+ # Legacy hotplug confuses udev
+ scripts/config --set-str UEVENT_HELPER_PATH ""
+
+ # Userspace firmware loading not supported
+ scripts/config -d FW_LOADER_USER_HELPER
+
+ # Some udev/virtualization requires
+ scripts/config -e DMIID
+
+ # Support for some SCSI devices serial number retrieval
+ scripts/config -e BLK_DEV_BSG
+
+ # Required for PrivateNetwork= in service units
+ scripts/config -e NET_NS
+ scripts/config -e USER_NS
+
+ # Required for 9p support
+ scripts/config -e NET_9P
+ scripts/config -e NET_9P_VIRTIO
+ scripts/config -e 9P_FS
+ scripts/config -e 9P_FS_POSIX_ACL
+ scripts/config -e VIRTIO_PCI
+
+ # Strongly Recommended
+ scripts/config -e IPV6
+ scripts/config -e AUTOFS4_FS
+ scripts/config -e TMPFS_XATTR
+ scripts/config -e TMPFS_POSIX_ACL
+ scripts/config -e EXT4_FS_POSIX_ACL
+ scripts/config -e XFS_POSIX_ACL
+ scripts/config -e BTRFS_FS_POSIX_ACL
+ scripts/config -e SECCOMP
+ scripts/config -e SECCOMP_FILTER
+ scripts/config -e CHECKPOINT_RESTORE
+
+ # Required for CPUShares= in resource control unit settings
+ scripts/config -e CGROUP_SCHED
+ scripts/config -e FAIR_GROUP_SCHED
+
+ # Required for CPUQuota= in resource control unit settings
+ scripts/config -e CFS_BANDWIDTH
+
+ # Required for IPAddressDeny=, IPAddressAllow= in resource control unit settings
+ scripts/config -e CGROUP_BPF
+
+ # For UEFI systems
+ scripts/config -e EFIVAR_FS
+ scripts/config -e EFI_PARTITION
+
+ # RT group scheduling (effectively) makes RT scheduling unavailable for userspace
+ scripts/config -d RT_GROUP_SCHED
+
+ # Required for 3D acceleration in qemu
+ scripts/config -e CONFIG_DRM_VIRTIO_GPU
+
+ # Required for systemd-nspawn
+ scripts/config -e DEVPTS_MULTIPLE_INSTANCES
+
+ # Sound with QEMU
+ scripts/config -e SND_HDA_GENERIC
+
+ scripts/config -e MMC
+ scripts/config -m PWRSEQ_SD8787
+ scripts/config -e MMC_BLOCK_MINORS=32
+ scripts/config -m SDIO_UART
+ scripts/config -e MMC_SDHCI
+ scripts/config -e MMC_SDHCI_PCI
+ scripts/config -e MMC_SDHCI_ACPI
+ scripts/config -e MMC_SDHCI_PLTFM
+ scripts/config -e MMC_SDHCI_OF_ARASAN
+ scripts/config -e MMC_SPI
+ scripts/config -e MMC_DW
+ scripts/config -e MMC_DW_PCI
+ scripts/config -e MMC_DW_ROCKCHIP
+
+ scripts/config -d DRM_LIMA
+
+ scripts/config -e DRM_PANFROST
+ scripts/config -m DRM_MALI_DISPLAY
+ scripts/config -m DRM_ANALOGIX_ANX78XX
+ scripts/config -m DRM_DW_HDMI_CEC
+ scripts/config -e DRM_LOAD_EDID_FIRMWARE
+
+ scripts/config -m BATTERY_CW2015
+ scripts/config -e HID_BATTERY_STRENGTH
+
+ scripts/config -e FIRMWARE_EDID
+
+ scripts/config -m CRYPTO_DEV_ROCKCHIP
+ scripts/config -e PCIE_ROCKCHIP_HOST
+ scripts/config -e PHY_ROCKCHIP_DP
+ scripts/config -e PHY_ROCKCHIP_INNO_HDMI
+ scripts/config -e PHY_ROCKCHIP_PCIE
+ scripts/config -e ROCKCHIP_LVDS
+ scripts/config -e ROCKCHIP_MBOX
+ scripts/config -e ROCKCHIP_RGB
+ scripts/config -m SND_SOC_ROCKCHIP_MAX98090
+ scripts/config -m SND_SOC_ROCKCHIP_PDM
+ scripts/config -m VIDEO_ROCKCHIP_RGA
+ scripts/config -e ROCKCHIP_SUSPEND_MODE
+ scripts/config -e ROCKCHIP_SIP
+
+ scripts/config -e DRM_PANEL
+ scripts/config -m DRM_PANEL_LVDS
+ scripts/config -m DRM_PANEL_SIMPLE
+
+ build-commands:
+ - |
+ make
+
+ install-commands:
+ - |
+ install -Dm644 "%{image-name}" '%{install-root}%{bootdir}/vmlinuz'
+ install -Dm644 System.map '%{install-root}%{bootdir}/System.map'
+ make INSTALL_MOD_PATH='%{install-root}%{prefix}' modules_install
+
+ rm %{install-root}%{indep-libdir}/modules/*/{source,build}
+
+ - |
+ make INSTALL_DTBS_PATH='%{install-root}%{bootdir}/dtbs' dtbs_install
+
+public:
+ bst:
+ integration-commands:
+ - |
+ cd '%{indep-libdir}/modules'
+ for version in *; do
+ depmod -b '%{prefix}' -a "$version";
+ done
+
+ split-rules:
+ devel:
+ (>):
+ - '%{bootdir}/System.map'
diff --git a/elements/boards/pinebook-pro/python3-as-python2.bst
b/elements/boards/pinebook-pro/python3-as-python2.bst
new file mode 100644
index 00000000..07dbe1b6
--- /dev/null
+++ b/elements/boards/pinebook-pro/python3-as-python2.bst
@@ -0,0 +1,10 @@
+kind: stack
+
+runtime-depends:
+- freedesktop-sdk.bst:components/python3.bst
+
+public:
+ bst:
+ integration-commands:
+ - ln -s python3 /usr/bin/python2
+ - ln -s python2 /usr/bin/python
diff --git a/elements/boards/pinebook-pro/repo.bst b/elements/boards/pinebook-pro/repo.bst
new file mode 100644
index 00000000..148ac48b
--- /dev/null
+++ b/elements/boards/pinebook-pro/repo.bst
@@ -0,0 +1,43 @@
+kind: script
+
+build-depends:
+- freedesktop-sdk.bst:vm/prepare-image.bst
+- core-deps/libostree.bst
+- boards/pinebook-pro/initial-scripts.bst
+- boards/pinebook-pro/filesystem.bst
+
+variables:
+ uuidnamespace: aea54278-2587-4075-ae67-8688ace4ce3d
+ ostree-branch: gnome-os/aarch64/pinebook-pro
+
+environment:
+ OSTREE_REPO: "%{install-root}"
+
+config:
+ layout:
+ - element: ''
+ destination: /tmp
+ - element: core-deps/libostree.bst
+ destination: /
+ - element: boards/pinebook-pro/filesystem.bst
+ destination: /sysroot
+ - element: boards/pinebook-pro/initial-scripts.bst
+ destination: /
+ - element: vm/prepare-image.bst
+ destination: /
+
+ commands:
+ - |
+ prepare-image.sh \
+ --sysroot /sysroot \
+ --seed "%{uuidnamespace}" \
+ --rootsource /dev/gpt-auto-root \
+ --efisource LABEL=EFI \
+ --efipath /boot \
+ --rootpasswd "root" >/dev/null
+
+ - mkdir -p "${OSTREE_REPO}"
+ - ostree init --repo="${OSTREE_REPO}" --mode=archive
+ - mv /sysroot/etc /sysroot/usr/etc
+ - ostree commit --branch=%{ostree-branch} --timestamp="$(date --date="@${SOURCE_DATE_EPOCH}"
--rfc-3339=seconds)" /sysroot
+
diff --git a/elements/boards/pinebook-pro/swig.bst b/elements/boards/pinebook-pro/swig.bst
new file mode 100644
index 00000000..a268bbe0
--- /dev/null
+++ b/elements/boards/pinebook-pro/swig.bst
@@ -0,0 +1,14 @@
+kind: autotools
+
+sources:
+- kind: tar
+ url: downloads.sourceforge.net:swig/swig-4.0.1.tar.gz
+
+depends:
+- freedesktop-sdk.bst:bootstrap-import.bst
+- freedesktop-sdk.bst:components/pcre.bst
+
+build-depends:
+- freedesktop-sdk.bst:public-stacks/buildsystem-autotools.bst
+- freedesktop-sdk.bst:components/bison.bst
+- freedesktop-sdk.bst:components/flex.bst
diff --git a/elements/boards/pinebook-pro/u-boot.bst b/elements/boards/pinebook-pro/u-boot.bst
new file mode 100644
index 00000000..103bc6b6
--- /dev/null
+++ b/elements/boards/pinebook-pro/u-boot.bst
@@ -0,0 +1,34 @@
+kind: manual
+
+sources:
+- kind: git_tag
+ url: https://git.eno.space/pbp-uboot.git
+ track: 365495a329c8e92ca4c134562d091df71b75845e
+
+build-depends:
+- freedesktop-sdk.bst:components/bison.bst
+- freedesktop-sdk.bst:components/flex.bst
+- freedesktop-sdk.bst:components/gzip.bst
+- freedesktop-sdk.bst:components/bc.bst
+
+- boards/pinebook-pro/swig.bst
+- boards/pinebook-pro/python3-as-python2.bst
+- boards/pinebook-pro/dtc.bst
+- boards/pinebook-pro/arm-trusted-firmware.bst
+
+environment:
+ BL31: "%{indep-libdir}/u-boot/%{board}/bl31.elf"
+
+variables:
+ board: pinebook_pro-rk3399
+
+config:
+ configure-commands:
+ - make "%{board}_defconfig"
+
+ build-commands:
+ - make V=1 all
+
+ install-commands:
+ - install -Dm644 -t "%{install-root}%{indep-libdir}/u-boot/%{board}" idbloader.img
+ - install -Dm644 -t "%{install-root}%{indep-libdir}/u-boot/%{board}" u-boot.itb
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]