Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 79 additions & 0 deletions board/batocera/allwinner/a733/DDK_LICENSE_EVIDENCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
# PowerVR DDK License Evidence

This file records the provenance and licensing basis for the PowerVR BXM-4-64 DDK
userspace libraries bundled in `fsoverlay/usr/local/lib/` and `fsoverlay/usr/lib/`.

## Package Details

| Field | Value |
|-------|-------|
| Package | `xserver-xorg-img-bxm` |
| Version | `1.21.1-2` |
| Architecture | `arm64` |
| DDK Version | `24.2.6603887` |
| BVNC | `36.56.104.183` |
| **Section** | **`free`** |
| **Maintainer** | **`Allwinnertech`** |
| Source repo | Radxa a733-bullseye apt repository |

## What "Section: free" Means

In Debian packaging, `Section: free` means the package is compliant with the
[Debian Free Software Guidelines (DFSG)](https://www.debian.org/social_contract#guidelines) —
software that can be freely used, modified, and redistributed. This classification
is set by the package maintainer (Allwinnertech, the SoC vendor) in the package
control file.

**This is the SoC vendor itself declaring their DDK to be freely distributable.**

## Contrast: Other PVR DDK Packages

The Batocera upstream `img-gpu-powervr` package for StarFive/JH7110 explicitly states:
```
IMG_GPU_POWERVR_LICENSE = Strictly Confidential
IMG_GPU_POWERVR_REDISTRIBUTE = NO
```

Our package has the opposite declaration.

## Secondary Evidence: Public GitHub Distribution

The same DDK binaries (DDK 24.2, BVNC 36.56.104.183, arm64) are also distributed
openly on GitHub by the Deepin Linux project:

- Repository: `https://github.com/deepin-community/img-gpu-bin`
- Path: `bin/ddk242/36.56.104.183/arm64/`
- Files distributed publicly without any access restrictions

This represents a second independent party (Deepin/UOS, a major Chinese Linux
distribution) distributing the same binaries publicly, consistent with Allwinnertech's
"free" classification.

## Files Included

From `xserver-xorg-img-bxm_1.21.1-2_arm64.deb`:

**`/usr/local/lib/`**
- `libEGL.so.1.0.0`
- `libGLESv2.so.2.0.0`
- `libGLESv1_CM.so.1.1.0`
- `libgbm.so.1.0.0`
- `libglapi.so.0.0.0`
- `libvulkan.so.1.3.280`
- `libpvr_mesa_wsi.so`
- `dri/pvr_dri.so`
- `dri/sunxi-drm_dri.so`
- `dri/swrast_dri.so`

**`/usr/lib/`**
- `libGLESv2_PVR_MESA.so.24.2.6603887`
- `libGLESv1_CM_PVR_MESA.so.24.2.6603887`
- `libsrv_um.so.24.2.6603887`
- `libglslcompiler.so.24.2.6603887`
- `libpvr_dri_support.so.24.2.6603887`
- `libPVROCL.so.24.2.6603887`
- `libPVRScopeServices.so.24.2.6603887`
- `libsutu_display.so.24.2.6603887`
- `libufwriter.so.24.2.6603887`
- `libusc.so.24.2.6603887`
- `libVK_IMG.so.24.2.6603887`
Binary file not shown.
Binary file not shown.
7 changes: 7 additions & 0 deletions board/batocera/allwinner/a733/cubie-a7s/boot/extlinux.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
LABEL batocera.linux
LINUX /boot/Image
INITRD /boot/initrd.lz4
# DTS: board/batocera/allwinner/a733/dts/sun60i-a733-cubie-a7s.dts (injected via linux_patches)
FDT /boot/sun60i-a733-cubie-a7s.dtb
# earlycon address 0x02500000 = Allwinner UART0; verify against A733 TRM if serial is silent
APPEND label=BATOCERA earlycon=uart8250,mmio32,0x02500000 keep_bootcon clk_ignore_unused loglevel=4 console=ttyS0,115200 console=tty1 cma=128M usbcore.autosuspend=-1 drm.edid_firmware=DP-1:edid/smartglasses.bin
47 changes: 47 additions & 0 deletions board/batocera/allwinner/a733/cubie-a7s/create-boot-script.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
#!/bin/bash

# HOST_DIR = host toolchain dir
# BOARD_DIR = board-specific dir (this file's directory)
# BUILD_DIR = base build dir
# BINARIES_DIR = images output dir
# TARGET_DIR = target rootfs dir
# BATOCERA_BINARIES_DIR = batocera binaries sub-directory

HOST_DIR=$1
BOARD_DIR=$2
BUILD_DIR=$3
BINARIES_DIR=$4
TARGET_DIR=$5
BATOCERA_BINARIES_DIR=$6

mkdir -p "${BATOCERA_BINARIES_DIR}/boot/boot" || exit 1
mkdir -p "${BATOCERA_BINARIES_DIR}/boot/extlinux" || exit 1

"${HOST_DIR}/bin/mkimage" \
-A arm64 -O linux -T kernel -C none \
-a 0x41000000 -e 0x41000000 \
-n linux \
-d "${BINARIES_DIR}/Image" \
"${BATOCERA_BINARIES_DIR}/boot/boot/uImage" || exit 1

cp "${BINARIES_DIR}/Image" "${BATOCERA_BINARIES_DIR}/boot/boot/Image" || exit 1
cp "${BINARIES_DIR}/initrd.lz4" "${BATOCERA_BINARIES_DIR}/boot/boot/initrd.lz4" || exit 1
cp "${BINARIES_DIR}/uInitrd" "${BATOCERA_BINARIES_DIR}/boot/boot/uInitrd" || exit 1
cp "${BINARIES_DIR}/rootfs.squashfs" "${BATOCERA_BINARIES_DIR}/boot/boot/batocera.update" || exit 1
cp "${BINARIES_DIR}/rufomaculata" "${BATOCERA_BINARIES_DIR}/boot/boot/rufomaculata.update" || exit 1

# TODO: verify DTB filename matches what the BSP kernel produces for Cubie A7S
# If sun60i-a733-cubie-a7s.dtb does not exist, use sun60i-a733-cubie-a7a.dtb as a
# temporary stand-in and update extlinux.conf to match.
DTB_NAME="sun60i-a733-cubie-a7s.dtb"
if [ ! -f "${BINARIES_DIR}/${DTB_NAME}" ]; then
echo "WARNING: ${DTB_NAME} not found, falling back to sun60i-a733-cubie-a7a.dtb"
DTB_NAME="sun60i-a733-cubie-a7a.dtb"
fi
cp "${BINARIES_DIR}/${DTB_NAME}" "${BATOCERA_BINARIES_DIR}/boot/boot/${DTB_NAME}" || exit 1

cp "${BOARD_DIR}/boot/extlinux.conf" "${BATOCERA_BINARIES_DIR}/boot/extlinux/" || exit 1
cp "${BOARD_DIR}/boot/boot0_sdcard.fex" "${BATOCERA_BINARIES_DIR}/boot/boot0_sdcard.fex" || exit 1
cp "${BOARD_DIR}/boot/boot_package.fex" "${BATOCERA_BINARIES_DIR}/boot/boot_package.fex" || exit 1

exit 0
48 changes: 48 additions & 0 deletions board/batocera/allwinner/a733/cubie-a7s/genimage.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
image boot.vfat {
vfat {
extraargs = "-F 32 -n BATOCERA"
@files
}
size = 6G
}

image userdata.ext4 {
ext4 {
label = "SHARE"
use-mke2fs = "true"
extraargs = "-m 0"
}
size = "512M"
mountpoint = "/userdata"
}

image batocera-a733-cubie-a7s.img {
hdimage {
align = "512"
partition-table-type = "gpt"
}

# Allwinner A733 (sun60iw2) boot chain:
# BROM → boot0 (DRAM init / SPL) → boot_package (U-Boot) → kernel
#
# boot0 and boot_package are NOT listed as GPT partitions — they are
# written directly into the image at raw byte offsets by dd in the
# post-image script after genimage runs. This matches Nick Alilovic's
# Armbian A733 approach and ensures the FAT32 boot partition is
# GPT partition 1 (which is what U-Boot's distro_bootcmd scans first).
#
# Raw offsets (written by post-image script):
# boot0: 0x20000 (128KB, sector 256) — eGON.BT0 magic
# boot_package: 0xC00000 (12MB, sector 24576) — sunxi-package magic

partition boot {
partition-type-uuid = "EBD0A0A2-B9E5-4433-87C0-68B6B72699C7"
image = "boot.vfat"
offset = 20M
}

partition userdata {
partition-type-uuid = "0FC63DAF-8483-4772-8E79-3D69D8477DE4"
image = "userdata.ext4"
}
}
Loading