Skip to content
Open
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
1 change: 1 addition & 0 deletions .github/scripts/ci-matrix.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,7 @@
"xm530_lite_anbiux-a8b-3mp", # Xiongmai
"nt98566_lite_xm-ivg-n8s", # Novatek
"fh8852v200_lite_tuya-f1602-d2", # Fullhan
"rv1109_lite_mbk-ip4510a", # Rockchip, the only eMMC/ext4 target
]

# LICENSE and README anchored to whole filenames; unanchored they would also
Expand Down
7 changes: 4 additions & 3 deletions .github/scripts/enrich_manifest.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,10 @@
# also publishes ...-nor-split.tgz (compound) or openipc.<soc>-nor-<variant>-split.tgz
# (simple), beside the plain package or instead of it. As in firmware's index it
# is listed under its own flash key, nor_split, which sysupgrade falls back to
# when a build has no plain nor package for the camera.
COMPOUND_RE = re.compile(r"^(?P<platform>[a-z0-9]+_[a-z0-9]+_[a-z0-9_.-]+)-(?P<flash>nor|nand)(?P<split>-split)?\.tgz$")
SIMPLE_RE = re.compile(r"^openipc\.(?P<soc>[^.]+)-(?P<flash>nor|nand)-(?P<variant>\w+)(?P<split>-split)?\.tgz$")
# when a build has no plain nor package for the camera. eMMC boards publish a
# single ...-emmc.tgz (no -split form).
COMPOUND_RE = re.compile(r"^(?P<platform>[a-z0-9]+_[a-z0-9]+_[a-z0-9_.-]+)-(?P<flash>nor|nand|emmc)(?P<split>-split)?\.tgz$")
SIMPLE_RE = re.compile(r"^openipc\.(?P<soc>[^.]+)-(?P<flash>nor|nand|emmc)-(?P<variant>\w+)(?P<split>-split)?\.tgz$")

# Retry budget for transient GitHub API failures (mirrors firmware/#2129).
GH_RETRY_DELAYS = (0, 5, 15, 40)
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/build-one.yml
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,19 @@ jobs:
fi
fi

if [ -z "${NORFW}" ] && [ -z "${NORSPLIT}" ] && [ -z "${NANDFW}" ]; then
# eMMC boards (rv1109 boot_android) ship one package: the kernel
# boot image, the ext4 rootfs and the web-UI FLS.
EMMCFW=$(find output/images -name 'openipc*emmc*.tgz' | head -n 1)
if [ -n "${EMMCFW}" ]; then
if [ ${COMMON} -eq 1 ]; then
echo EMMCFW=openipc/${EMMCFW} >> ${GITHUB_ENV}
else
mv ${EMMCFW} ../${NAME}-emmc.tgz
echo EMMCFW=${NAME}-emmc.tgz >> ${GITHUB_ENV}
fi
fi

if [ -z "${NORFW}" ] && [ -z "${NORSPLIT}" ] && [ -z "${NANDFW}" ] && [ -z "${EMMCFW}" ]; then
exit 1
fi

Expand All @@ -269,7 +281,7 @@ jobs:
fi

- name: Upload firmware
if: env.NORFW || env.NORSPLIT || env.NANDFW
if: env.NORFW || env.NORSPLIT || env.NANDFW || env.EMMCFW
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ needs.resolve.outputs.tag_name }}
Expand All @@ -288,6 +300,7 @@ jobs:
${{env.NORFW}}
${{env.NORSPLIT}}
${{env.NANDFW}}
${{env.EMMCFW}}

- name: Reply on the build request
if: always() && inputs.request_issue != ''
Expand Down
26 changes: 19 additions & 7 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -385,12 +385,24 @@ jobs:
fi
fi

if [ -z "${NORFW}" ] && [ -z "${NORSPLIT}" ] && [ -z "${NANDFW}" ]; then
# eMMC boards (rv1109 boot_android) ship one package: the kernel
# boot image, the ext4 rootfs and the web-UI FLS.
EMMCFW=$(find output/images -name 'openipc*emmc*.tgz' | head -n 1)
if [ -n "${EMMCFW}" ]; then
if [ ${COMMON} -eq 1 ]; then
echo EMMCFW=openipc/${EMMCFW} >> ${GITHUB_ENV}
else
mv ${EMMCFW} ../${NAME}-emmc.tgz
echo EMMCFW=${NAME}-emmc.tgz >> ${GITHUB_ENV}
fi
fi

if [ -z "${NORFW}" ] && [ -z "${NORSPLIT}" ] && [ -z "${NANDFW}" ] && [ -z "${EMMCFW}" ]; then
exit 1
fi

- name: Build size report
if: env.NORFW || env.NORSPLIT || env.NANDFW
if: env.NORFW || env.NORSPLIT || env.NANDFW || env.EMMCFW
run: |
cd openipc
NAME=${{matrix.platform}}
Expand Down Expand Up @@ -421,7 +433,7 @@ jobs:
# had the tab. Best-effort like the size report: an image never fails
# for want of its graph.
- name: Build kconfig graph
if: env.NORFW || env.NORSPLIT || env.NANDFW
if: env.NORFW || env.NORSPLIT || env.NANDFW || env.EMMCFW
run: |
python3 -m pip install --user --break-system-packages kconfiglib || \
{ echo "::warning::kconfiglib install failed for ${{matrix.platform}}"; exit 0; }
Expand Down Expand Up @@ -460,7 +472,7 @@ jobs:
# image and then discards it, so they cannot test their own device profile
# without asking a maintainer to dispatch build-one for them.
- name: Stage artifacts
if: env.NORFW || env.NORSPLIT || env.NANDFW
if: env.NORFW || env.NORSPLIT || env.NANDFW || env.EMMCFW
run: |
mkdir -p dist reports
# The size report goes to its own artifact below, not with the image.
Expand All @@ -472,7 +484,7 @@ jobs:
cp -a "$f" reports/
fi
done
for f in "${NORFW:-}" "${NORSPLIT:-}" "${NANDFW:-}"; do
for f in "${NORFW:-}" "${NORSPLIT:-}" "${NANDFW:-}" "${EMMCFW:-}"; do
# An `if` rather than a `&&` chain: the step runs under `bash -e`,
# where a trailing `&&` that tests false is only harmless because
# something after it resets the status.
Expand Down Expand Up @@ -501,7 +513,7 @@ jobs:
# builds a handful and has a person waiting on them, plausibly in another
# timezone, so one day is too short a window there.
- name: Upload build artifacts
if: env.NORFW || env.NORSPLIT || env.NANDFW
if: env.NORFW || env.NORSPLIT || env.NANDFW || env.EMMCFW
uses: actions/upload-artifact@v4
with:
name: fw-${{ matrix.platform }}
Expand All @@ -515,7 +527,7 @@ jobs:
# consumes within the run -- so a push that could not reach openipc.org
# can be re-run days later. Optional, so is this.
- name: Upload report
if: github.event_name != 'pull_request' && (env.NORFW || env.NORSPLIT || env.NANDFW)
if: github.event_name != 'pull_request' && (env.NORFW || env.NORSPLIT || env.NANDFW || env.EMMCFW)
uses: actions/upload-artifact@v4
continue-on-error: true
with:
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ Jooan Q3R-U T23N SC1346 ATBM6012B_USB NOR_8M **INI
JVS INGT10 GQS60EP T10A OV9750 - NOR_8M done
Lenovo Snowman 1080P HI3518EV200 SC2035 RTL8188EUS_USB NOR_16M in progress, LightSensor-no
LSC 3215672 T23N SC2331 ATBM6012B_USB NOR_8M **INIT** - progress
MBK-IP4510A RV1109 IMX335 - eMMC in progress: base OpenIPC, stock-web-UI FLS, eth/ssh/ipctool; video-no (OpenIPC/majestic#427); zoom/focus-no
Meari Speed 6S SSC333 JXF37 RTL8188FU_USB NOR_16M video-yes, wifi-yes, motors-no
Misecu XM-63-AI-50W XM550 SC5332 ATBM603X_USB NOR_8M testing, video-ok, wifi-ok (several-day owner test), ircut-ok, irled-ok, day/night-ok (exposure), speaker-ok, mic-ok
Night Owl WCM-PWNVR20W-BU HI3518EV200 SC2135 RTL8188EUS_USB NOR_8M testing, video-ok, wifi-ok (several-day owner test), ircut-ok, irled-ok, audio-ok, lightsensor-ok
Expand Down
28 changes: 20 additions & 8 deletions builder.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,28 @@ autoup_rootfs() {

copy_to_archive() {
echo_c 32 "Copying files to local archive"
mkdir -p "${BUILDER_DIR}/archive/${DEVICE}/${TIMESTAMP}"
cp -a \
${FIRMWARE_DIR}/output/images/rootfs.squashfs.* \
${FIRMWARE_DIR}/output/images/uImage.* \
${FIRMWARE_DIR}/output/images/*.tar \
${FIRMWARE_DIR}/output/images/openipc.*.tgz \
${BUILDER_DIR}/archive/${DEVICE}/${TIMESTAMP}
DEST="${BUILDER_DIR}/archive/${DEVICE}/${TIMESTAMP}"
mkdir -p "${DEST}"
# Each pattern is optional: a NOR board ships squashfs + uImage, while an
# SD/eMMC board ships a single .tgz. For the RV1109 eMMC target also keep
# the boot image and rootfs that go into that package, so a local archive
# is usable without unpacking it. Unmatched patterns are skipped instead of
# handing the literal glob to cp.
for pattern in \
"${FIRMWARE_DIR}/output/images/rootfs.squashfs."* \
"${FIRMWARE_DIR}/output/images/uImage."* \
"${FIRMWARE_DIR}/output/images/"*.tar \
"${FIRMWARE_DIR}/output/images/openipc."*.tgz \
"${FIRMWARE_DIR}/output/images/zboot.img" \
"${FIRMWARE_DIR}/output/images/rootfs.ext2" \
"${FIRMWARE_DIR}/output/images/flash.fls"; do
if [ -e "${pattern}" ]; then
cp -a "${pattern}" "${DEST}/"
fi
done

cp -a ${FIRMWARE_DIR}/output/images/sizes.*.json \
${BUILDER_DIR}/archive/${DEVICE}/${TIMESTAMP} 2>/dev/null || true
"${DEST}" 2>/dev/null || true

if [ -f "${FIRMWARE_DIR}/output/images/autoupdate-kernel.img" ]; then
cp -a ${FIRMWARE_DIR}/output/images/autoupdate* ${BUILDER_DIR}/archive/${DEVICE}/${TIMESTAMP}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Architecture
BR2_arm=y
BR2_cortex_a7=y
BR2_ARM_FPU_NEON_VFPV4=y

# Toolchain
BR2_TOOLCHAIN_EXTERNAL=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM=y
BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y
BR2_TOOLCHAIN_EXTERNAL_URL="https://github.com/openipc/firmware/releases/download/$(OPENIPC_TOOLCHAIN).tgz"
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_PREFIX="arm-openipc-linux-gnueabihf"
BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_19=y
BR2_TOOLCHAIN_EXTERNAL_CUSTOM_GLIBC=y
# BR2_TOOLCHAIN_EXTERNAL_INET_RPC is not set
BR2_TOOLCHAIN_EXTERNAL_CXX=y
BR2_TOOLCHAIN_EXTERNAL_OPENMP=y

# Kernel: the eMMC DTS and the vendor U-Boot's Android boot.img flow.
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="https://github.com/openipc/linux/archive/$(OPENIPC_KERNEL).tar.gz"
BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y
BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/rv1126.generic.config"
BR2_LINUX_KERNEL_IMAGE_TARGET_CUSTOM=y
BR2_LINUX_KERNEL_XZ=y
BR2_LINUX_KERNEL_IMAGE_TARGET_NAME="rv1109-38x38-v10-emmc.img"
BR2_LINUX_KERNEL_IMAGE_NAME="zboot.img"

# Filesystem: writable ext4 on system_a (736 MiB); zboot.img/flash.fls are
# built by post-image-emmc.sh from zImage + rv1109-38x38-v10-emmc.dtb.
BR2_PACKAGE_BUSYBOX_CONFIG="$(BR2_EXTERNAL)/package/busybox/busybox.config"
BR2_PACKAGE_MTD=y
BR2_PACKAGE_UBOOT_TOOLS=y
BR2_PACKAGE_ZLIB=y
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
BR2_PACKAGE_WIREGUARD_LINUX_COMPAT=y
BR2_PACKAGE_WIREGUARD_TOOLS=y
# BR2_TARGET_ROOTFS_UBI is not set
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_GEN=4
BR2_TARGET_ROOTFS_EXT2_SIZE="32M"
BR2_TARGET_ROOTFS_EXT2_LABEL="OPENIPC"
BR2_ROOTFS_POST_IMAGE_SCRIPT="$(EXTERNAL_VENDOR)/board/$(OPENIPC_SOC_FAMILY)/post-image-emmc.sh"

# OpenIPC
BR2_OPENIPC_SOC_VENDOR="rockchip"
BR2_OPENIPC_SOC_MODEL="rv1109"
BR2_OPENIPC_SOC_FAMILY="rv11xx"
BR2_OPENIPC_SNS_MODEL="IMX335"
BR2_OPENIPC_VARIANT="lite"
BR2_OPENIPC_FLASH_SIZE="8"

# Packages
BR2_PACKAGE_DROPBEAR_OPENIPC=y
BR2_PACKAGE_IPCTOOL=y
BR2_PACKAGE_LIBCURL_OPENIPC=y
BR2_PACKAGE_LIBCURL_OPENIPC_CURL=y
# BR2_PACKAGE_LIBCURL_OPENIPC_PROXY_SUPPORT is not set
# BR2_PACKAGE_LIBCURL_OPENIPC_COOKIES_SUPPORT is not set
# BR2_PACKAGE_LIBCURL_OPENIPC_EXTRA_PROTOCOLS_FEATURES is not set
BR2_PACKAGE_LIBEVENT_OPENIPC=y
BR2_PACKAGE_LIBOGG_OPENIPC=y
BR2_PACKAGE_MAJESTIC_WEBUI=y
BR2_PACKAGE_MBEDTLS_OPENIPC=y
BR2_PACKAGE_MOTORS=y
BR2_PACKAGE_OPUS_OPENIPC=y
BR2_PACKAGE_OPUS_OPENIPC_FIXED_POINT=y
BR2_PACKAGE_VTUND_OPENIPC=y
BR2_PACKAGE_YAML_CLI=y
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
case "$1" in
start)
ifconfig lo 127.0.0.1 up
ifup eth0 2>/dev/null || true
;;
esac
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#!/bin/sh
# Copy the vendor updateEngine from the stock slot and mark the current
# OpenIPC slot successful. The vendor stock on the other slot is the only
# source of the tool; if it is gone, the A/B retry eventually falls back.
case "$1" in
start)
case "$(cat /proc/cmdline 2>/dev/null)" in
*slot_suffix=_a*) OTHER=p7 ;;
*slot_suffix=_b*) OTHER=p6 ;;
*) OTHER=p7 ;;
esac
mkdir -p /mnt/vendor /usr/local/ue /usr/local/sbin /dev/block/by-name
mount -t squashfs -o ro "/dev/mmcblk0${OTHER}" /mnt/vendor 2>/dev/null || true
if [ -x /mnt/vendor/usr/bin/updateEngine ]; then
cp -f /mnt/vendor/usr/bin/updateEngine /usr/local/ue/ 2>/dev/null
cp -f /mnt/vendor/usr/lib/libssl.so.1.0.0 \
/mnt/vendor/usr/lib/libcrypto.so.1.0.0 \
/mnt/vendor/usr/lib/libcurl.so.4.5.0 /usr/local/ue/ 2>/dev/null
ln -sf libcurl.so.4.5.0 /usr/local/ue/libcurl.so.4
ln -sf libssl.so.1.0.0 /usr/local/ue/libssl.so
ln -sf libcrypto.so.1.0.0 /usr/local/ue/libcrypto.so
fi
ln -sf /dev/mmcblk0p3 /dev/block/by-name/misc
if [ -x /usr/local/ue/updateEngine ]; then
LD_LIBRARY_PATH=/usr/local/ue /usr/local/ue/updateEngine --misc=now >/dev/null 2>&1 || true
fi
;;
esac
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet dhcp
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/sh
set -e
mkdir -p /dev/block/by-name
ln -sf /dev/mmcblk0p3 /dev/block/by-name/misc
exec env LD_LIBRARY_PATH=/usr/local/ue /usr/local/ue/updateEngine --misc=other --reboot
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#!/bin/sh
# MBK-IP4510A (RV1109 eMMC, IMX335): base OpenIPC.
# Network: /etc/init.d/S39net (DHCP on eth0).
# Slot success: /etc/init.d/S39slot (copies vendor updateEngine from the
# stock slot and runs --misc=now).
# No U-Boot environment on eMMC; no majestic/rkvenc backend yet
# (OpenIPC/majestic#427); zoom/focus is not supported by the OpenIPC kernel.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# rv1109_lite / MBK-IP4510A eMMC: the vendor-env network script is replaced
# by the device overlay's S39net (DHCP on eth0).
/etc/init.d/S40network