mirror of
https://github.com/kernelkit/infix.git
synced 2026-07-31 04:53:01 +02:00
@@ -0,0 +1,220 @@
|
||||
name: Create SD Card Images
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
board:
|
||||
description: 'Board to create image for'
|
||||
type: choice
|
||||
required: true
|
||||
options:
|
||||
- raspberry-pi-4
|
||||
default: 'raspberry-pi-4'
|
||||
use_latest_release:
|
||||
description: 'Use latest release artifacts instead of workflow artifacts'
|
||||
type: boolean
|
||||
default: false
|
||||
|
||||
jobs:
|
||||
create-image:
|
||||
name: Create SD Card Image for ${{ inputs.board }}
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
clean: true
|
||||
fetch-depth: 0
|
||||
submodules: recursive
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y \
|
||||
genimage \
|
||||
u-boot-tools \
|
||||
parted \
|
||||
gdisk \
|
||||
qemu-utils \
|
||||
dosfstools \
|
||||
e2fsprogs \
|
||||
genext2fs \
|
||||
mtools \
|
||||
jq
|
||||
|
||||
- name: Prepare build environment
|
||||
run: |
|
||||
# Set up directory structure similar to buildroot build
|
||||
mkdir -p output/images
|
||||
mkdir -p build
|
||||
|
||||
- name: Set bootloader and target based on board
|
||||
run: |
|
||||
case "${{ inputs.board }}" in
|
||||
raspberry-pi-4)
|
||||
echo "BOOTLOADER=rpi4_boot" >> $GITHUB_ENV
|
||||
echo "TARGET=aarch64" >> $GITHUB_ENV
|
||||
;;
|
||||
*)
|
||||
echo "Error: Unknown board ${{ inputs.board }}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
echo "Using bootloader: $BOOTLOADER and target: $TARGET for board: ${{ inputs.board }}"
|
||||
|
||||
- name: Download bootloader artifacts
|
||||
if: ${{ !inputs.use_latest_release }}
|
||||
run: |
|
||||
# Download from latest bootloader build workflow on main branch
|
||||
gh run list --workflow=build-boot.yml --branch=main --limit=1 --status=success --json databaseId --jq '.[0].databaseId' > latest_boot_run_id
|
||||
BOOT_RUN_ID=$(cat latest_boot_run_id)
|
||||
|
||||
gh run download ${BOOT_RUN_ID} --name artifact-${BOOTLOADER} --dir temp_bootloader/
|
||||
|
||||
# Extract bootloader directly to output/images
|
||||
cd temp_bootloader/
|
||||
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
|
||||
cd ../
|
||||
rm -rf temp_bootloader/
|
||||
|
||||
echo "Bootloader files extracted to output/images:"
|
||||
ls -la output/images/
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Download Infix artifacts
|
||||
if: ${{ !inputs.use_latest_release }}
|
||||
run: |
|
||||
# Download from latest Kernelkit Trigger workflow for main branch
|
||||
gh run list --workflow=164295764 --branch=main --limit=1 --status=success --json databaseId --jq '.[0].databaseId' > latest_infix_run_id
|
||||
INFIX_RUN_ID=$(cat latest_infix_run_id)
|
||||
|
||||
gh run download ${INFIX_RUN_ID} --name artifact-${TARGET} --dir temp_infix/
|
||||
|
||||
# Extract Infix directly to output/images
|
||||
cd temp_infix/
|
||||
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
|
||||
cd ../
|
||||
rm -rf temp_infix/
|
||||
|
||||
echo "Infix files extracted to output/images:"
|
||||
ls -la output/images/
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Download from latest releases
|
||||
if: ${{ inputs.use_latest_release }}
|
||||
run: |
|
||||
# Download latest bootloader release
|
||||
gh release download latest-boot --pattern "*${BOOTLOADER}*" --dir temp_bootloader/
|
||||
cd temp_bootloader/
|
||||
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
|
||||
cd ../
|
||||
rm -rf temp_bootloader/
|
||||
|
||||
# Download latest Infix release
|
||||
gh release download latest --pattern "*${TARGET}*" --dir temp_infix/
|
||||
cd temp_infix/
|
||||
tar -xzf *.tar.gz --strip-components=1 -C ../output/images/
|
||||
cd ../
|
||||
rm -rf temp_infix/
|
||||
|
||||
echo "All files extracted to output/images:"
|
||||
ls -la output/images/
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: Verify extracted files
|
||||
run: |
|
||||
echo "Files available for mkimage.sh:"
|
||||
ls -la output/images/
|
||||
echo ""
|
||||
echo "File types:"
|
||||
file output/images/* || true
|
||||
|
||||
- name: Create SD card image
|
||||
run: |
|
||||
export BINARIES_DIR=$PWD/output/images
|
||||
export BUILD_DIR=$PWD/build
|
||||
export BR2_EXTERNAL_INFIX_PATH=$PWD
|
||||
export RELEASE=""
|
||||
export INFIX_ID="infix"
|
||||
|
||||
# Use the standardized mkimage.sh path for the selected board
|
||||
# BOARD_SCRIPT="src/board/${{ inputs.board }}/mkimage.sh"
|
||||
BOARD_SCRIPT="src/board/raspberry-pi-4/mkimage.sh"
|
||||
|
||||
if [ -f "$BOARD_SCRIPT" ]; then
|
||||
echo "Using board-specific image creation script: $BOARD_SCRIPT"
|
||||
chmod +x "$BOARD_SCRIPT"
|
||||
"$BOARD_SCRIPT"
|
||||
else
|
||||
echo "Error: Board script $BOARD_SCRIPT not found!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Verify created image
|
||||
run: |
|
||||
echo "Contents of output/images after mkimage.sh:"
|
||||
ls -lh output/images/
|
||||
|
||||
# Look for SD card image with pattern: *-sdcard.img
|
||||
if ls output/images/*-sdcard.img 1> /dev/null 2>&1; then
|
||||
echo "Found SD card image(s):"
|
||||
for img in output/images/*-sdcard.img; do
|
||||
echo "- $(basename $img)"
|
||||
file "$img"
|
||||
fdisk -l "$img" 2>/dev/null || true
|
||||
done
|
||||
else
|
||||
echo "No SD card image found matching pattern: *-sdcard.img"
|
||||
echo "Available files:"
|
||||
ls -la output/images/
|
||||
exit 1
|
||||
fi
|
||||
|
||||
- name: Upload SD card image
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: sdcard-image-${{ inputs.board }}-${{ env.BOOTLOADER }}
|
||||
path: |
|
||||
output/images/*-sdcard.img
|
||||
retention-days: 30
|
||||
|
||||
- name: Create checksums
|
||||
run: |
|
||||
cd output/images/
|
||||
for file in *-sdcard.img; do
|
||||
if [ -f "$file" ]; then
|
||||
sha256sum "$file" > "$file.sha256"
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Upload to release
|
||||
uses: ncipollo/release-action@v1
|
||||
with:
|
||||
allowUpdates: true
|
||||
omitName: true
|
||||
omitBody: true
|
||||
omitBodyDuringUpdate: true
|
||||
prerelease: true
|
||||
tag: "latest-boot"
|
||||
token: ${{ secrets.GITHUB_TOKEN }}
|
||||
artifacts: "output/images/*-sdcard.img*"
|
||||
|
||||
- name: Generate summary
|
||||
run: |
|
||||
cat <<EOF >> $GITHUB_STEP_SUMMARY
|
||||
# SD Card Image Build Complete! 🚀
|
||||
|
||||
**Board:** ${{ inputs.board }}
|
||||
**Target:** ${{ env.TARGET }}
|
||||
**Bootloader:** ${{ env.BOOTLOADER }}
|
||||
**Artifact Source:** ${{ inputs.use_latest_release && 'Latest Release' || 'Latest Workflow Run' }}
|
||||
|
||||
## Created Images
|
||||
$(find output/images/ -name "*.img" -o -name "*.qcow2" -o -name "*.raw" | xargs ls -lh 2>/dev/null | sed 's/^/- /' || echo "- No images found")
|
||||
|
||||
## Download
|
||||
The SD card image is available as a workflow artifact above.
|
||||
EOF
|
||||
Binary file not shown.
|
After Width: | Height: | Size: 1.1 MiB |
@@ -14,6 +14,8 @@ BR2_SYSTEM_BIN_SH_NONE=y
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="${BR2_EXTERNAL_INFIX_PATH}/board/common/post-image.sh"
|
||||
# BR2_PACKAGE_BUSYBOX is not set
|
||||
BR2_PACKAGE_RPI_FIRMWARE=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE_VARIANT_PI4_X=y
|
||||
BR2_PACKAGE_RPI_FIRMWARE_CONFIG_FILE="${BR2_EXTERNAL_INFIX_PATH}/src/board/raspberry-pi-4/config.txt"
|
||||
BR2_PACKAGE_RPI_FIRMWARE_CMDLINE_FILE="${BR2_EXTERNAL_INFIX_PATH}/src/board/raspberry-pi-4/cmdline.txt"
|
||||
# BR2_PACKAGE_IFUPDOWN_SCRIPTS is not set
|
||||
@@ -34,4 +36,5 @@ BR2_PACKAGE_HOST_RAUC=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SUPPORT=y
|
||||
BR2_PACKAGE_HOST_UBOOT_TOOLS_FIT_SIGNATURE_SUPPORT=y
|
||||
BR2_PACKAGE_BOOTLOADER_SPLASHSCREEN=y
|
||||
# GNS3_APPLIANCE is not set
|
||||
|
||||
@@ -42,4 +42,5 @@ source "$BR2_EXTERNAL_INFIX_PATH/package/rousette/Config.in"
|
||||
source "$BR2_EXTERNAL_INFIX_PATH/package/nghttp2-asio/Config.in"
|
||||
source "$BR2_EXTERNAL_INFIX_PATH/package/date-cpp/Config.in"
|
||||
source "$BR2_EXTERNAL_INFIX_PATH/package/rauc-installation-status/Config.in"
|
||||
source "$BR2_EXTERNAL_INFIX_PATH/package/bootloader-splashscreen/Config.in"
|
||||
endmenu
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
config BR2_PACKAGE_RASPBERRY_PI_4
|
||||
bool "Raspberry Pi 4"
|
||||
depends on BR2_aarch64
|
||||
select SDCARD_AUX
|
||||
select BR2_PACKAGE_FEATURE_WIFI
|
||||
select BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI
|
||||
select BR2_PACKAGE_BRCMFMAC_SDIO_FIRMWARE_RPI_WIFI
|
||||
|
||||
@@ -0,0 +1,12 @@
|
||||
config BR2_PACKAGE_BOOTLOADER_SPLASHSCREEN
|
||||
bool "bootloader-splashscreen"
|
||||
help
|
||||
Install a BMP splash screen image for bootloader.
|
||||
|
||||
config BR2_PACKAGE_BOOTLOADER_SPLASHSCREEN_PATH
|
||||
string "Path to BMP image"
|
||||
default "$(BR2_EXTERNAL_INFIX_PATH)/board/common/uboot/splash.bmp"
|
||||
depends on BR2_PACKAGE_BOOTLOADER_SPLASHSCREEN
|
||||
help
|
||||
Path to the BMP image file to be used as bootloader splash screen.
|
||||
The image will be installed to output/images/.
|
||||
@@ -0,0 +1,19 @@
|
||||
################################################################################
|
||||
#
|
||||
# bootloader-splashscreen
|
||||
#
|
||||
################################################################################
|
||||
|
||||
BOOTLOADER_SPLASHSCREEN_VERSION = 1.0
|
||||
BOOTLOADER_SPLASHSCREEN_SOURCE =
|
||||
BOOTLOADER_SPLASHSCREEN_SITE =
|
||||
|
||||
define BOOTLOADER_SPLASHSCREEN_BUILD_CMDS
|
||||
# Nothing to build
|
||||
endef
|
||||
|
||||
define BOOTLOADER_SPLASHSCREEN_INSTALL_TARGET_CMDS
|
||||
$(INSTALL) -D -m 0644 $(call qstrip,$(BR2_PACKAGE_BOOTLOADER_SPLASHSCREEN_PATH)) $(BINARIES_DIR)/splash.bmp
|
||||
endef
|
||||
|
||||
$(eval $(generic-package))
|
||||
@@ -0,0 +1,41 @@
|
||||
From 989ef8436df2ee48d308981098c44b1b8257c23b Mon Sep 17 00:00:00 2001
|
||||
From: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
Date: Mon, 10 Jun 2024 13:25:31 +0200
|
||||
Subject: [PATCH 8/8] hush: Remove Ctrl-C detection in loops
|
||||
Organization: Addiva Elektronik
|
||||
|
||||
Assume that the original intent was to emulate SIGINT to a shell. This
|
||||
only works as expected if the loop in question is the ouermost, and
|
||||
last, statement. In all other cases, it completely breaks the expected
|
||||
execution flow. It more or less resurrects Visual Basic's "On Error
|
||||
Resume Next".
|
||||
|
||||
Disable this behavior and delegate the problem of loop termination to
|
||||
the writer of the script instead.
|
||||
|
||||
Signed-off-by: Tobias Waldekranz <tobias@waldekranz.com>
|
||||
---
|
||||
common/cli_hush.c | 7 -------
|
||||
1 file changed, 7 deletions(-)
|
||||
|
||||
diff --git a/common/cli_hush.c b/common/cli_hush.c
|
||||
index 171069f5f4..d6d487893f 100644
|
||||
--- a/common/cli_hush.c
|
||||
+++ b/common/cli_hush.c
|
||||
@@ -1796,13 +1796,6 @@ static int run_list_real(struct pipe *pi)
|
||||
for (; pi; pi = (flag_restore != 0) ? rpipe : pi->next) {
|
||||
if (pi->r_mode == RES_WHILE || pi->r_mode == RES_UNTIL ||
|
||||
pi->r_mode == RES_FOR) {
|
||||
-#ifdef __U_BOOT__
|
||||
- /* check Ctrl-C */
|
||||
- ctrlc();
|
||||
- if ((had_ctrlc())) {
|
||||
- return 1;
|
||||
- }
|
||||
-#endif
|
||||
flag_restore = 0;
|
||||
if (!rpipe) {
|
||||
flag_rep = 0;
|
||||
--
|
||||
2.34.1
|
||||
|
||||
@@ -0,0 +1,132 @@
|
||||
diff --git a/cmd/Kconfig b/cmd/Kconfig
|
||||
index 1d7ddb4ed36..8572dc4353e 100644
|
||||
--- a/cmd/Kconfig
|
||||
+++ b/cmd/Kconfig
|
||||
@@ -176,6 +176,20 @@ config CMD_CPU
|
||||
internal name) and clock frequency. Other information may be
|
||||
available depending on the CPU driver.
|
||||
|
||||
+config CMD_RPI_DISPLAY
|
||||
+ bool "rpidisplay"
|
||||
+ depends on ARCH_BCM283X
|
||||
+ help
|
||||
+ Enable commands to detect Raspberry Pi 7" DSI display connection.
|
||||
+
|
||||
+ This provides two commands:
|
||||
+ - rpidisplay: Shows detailed detection information
|
||||
+ - testrpidisplay: Silent test for use in boot scripts
|
||||
+
|
||||
+ Detection is performed by querying the VideoCore GPU for the
|
||||
+ active display resolution. The official Raspberry Pi 7" DSI
|
||||
+ display uses 800x480 resolution.
|
||||
+
|
||||
config CMD_FWU_METADATA
|
||||
bool "fwu metadata read"
|
||||
depends on FWU_MULTI_BANK_UPDATE
|
||||
diff --git a/cmd/Makefile b/cmd/Makefile
|
||||
index d1f369deec0..033ea1312ed 100644
|
||||
--- a/cmd/Makefile
|
||||
+++ b/cmd/Makefile
|
||||
@@ -48,6 +48,7 @@ obj-$(CONFIG_CMD_CLK) += clk.o
|
||||
obj-$(CONFIG_CMD_CLS) += cls.o
|
||||
obj-$(CONFIG_CMD_CONFIG) += config.o
|
||||
obj-$(CONFIG_CMD_CONITRACE) += conitrace.o
|
||||
+obj-$(CONFIG_CMD_RPI_DISPLAY) += rpi_display.o
|
||||
obj-$(CONFIG_CMD_CONSOLE) += console.o
|
||||
obj-$(CONFIG_CMD_CPU) += cpu.o
|
||||
obj-$(CONFIG_CMD_DATE) += date.o
|
||||
@@ -201,7 +202,6 @@ obj-$(CONFIG_CMD_LZMADEC) += lzmadec.o
|
||||
obj-$(CONFIG_CMD_UFS) += ufs.o
|
||||
obj-$(CONFIG_CMD_USB) += usb.o disk.o
|
||||
obj-$(CONFIG_CMD_VIDCONSOLE) += video.o
|
||||
-
|
||||
obj-$(CONFIG_CMD_FASTBOOT) += fastboot.o
|
||||
obj-$(CONFIG_CMD_FS_UUID) += fs_uuid.o
|
||||
|
||||
diff --git a/cmd/rpi_display.c b/cmd/rpi_display.c
|
||||
new file mode 100644
|
||||
index 00000000000..07abdc08552
|
||||
--- /dev/null
|
||||
+++ b/cmd/rpi_display.c
|
||||
@@ -0,0 +1,81 @@
|
||||
+// SPDX-License-Identifier: GPL-2.0+
|
||||
+/*
|
||||
+ * Raspberry Pi 7" DSI Display Detection Command
|
||||
+ * Detects if the official Raspberry Pi 7" DSI display is connected
|
||||
+ */
|
||||
+
|
||||
+#include <command.h>
|
||||
+#include <asm/arch/msg.h>
|
||||
+
|
||||
+static int do_rpi_display(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||
+{
|
||||
+ int width, height;
|
||||
+ int ret;
|
||||
+
|
||||
+ printf("=== Raspberry Pi 7\" DSI Display Detection ===\n");
|
||||
+
|
||||
+ /* Use official VideoCore mailbox interface to get display resolution */
|
||||
+ ret = bcm2835_get_video_size(&width, &height);
|
||||
+ if (ret) {
|
||||
+ printf("Failed to query VideoCore display size (ret=%d)\n", ret);
|
||||
+ printf("Display Status: NOT DETECTED\n");
|
||||
+ return 2;
|
||||
+ }
|
||||
+
|
||||
+ printf("VideoCore reports display: %dx%d", width, height);
|
||||
+
|
||||
+ /* Official Raspberry Pi 7" DSI display is 800x480 */
|
||||
+ if (width == 800 && height == 480) {
|
||||
+ printf(" - RASPBERRY PI 7\" DSI DISPLAY DETECTED!\n");
|
||||
+ printf("Display Status: CONNECTED\n");
|
||||
+ return 0;
|
||||
+ }
|
||||
+ /* No resolution could indicate no display */
|
||||
+ else if (width == 0 || height == 0) {
|
||||
+ printf(" - No active display\n");
|
||||
+ printf("Display Status: NOT DETECTED\n");
|
||||
+ return 1;
|
||||
+ }
|
||||
+ else {
|
||||
+ printf(" - Not Raspberry Pi DSI display (resolution %dx%d)\n", width, height);
|
||||
+ printf("Display Status: NOT DETECTED\n");
|
||||
+ return 1;
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+static int do_test_rpi_display(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[])
|
||||
+{
|
||||
+ int width, height;
|
||||
+ int ret;
|
||||
+
|
||||
+ /* Silent test using VideoCore mailbox interface */
|
||||
+ ret = bcm2835_get_video_size(&width, &height);
|
||||
+ if (ret) {
|
||||
+ return 2; /* Failed to query VideoCore */
|
||||
+ }
|
||||
+
|
||||
+ /* Check for Raspberry Pi DSI display resolutions */
|
||||
+ if ((width == 800 && height == 480)) {
|
||||
+ return 0; /* DSI display found */
|
||||
+ }
|
||||
+
|
||||
+ return 1; /* DSI display not found */
|
||||
+}
|
||||
+
|
||||
+U_BOOT_CMD(
|
||||
+ rpidisplay, 1, 1, do_rpi_display,
|
||||
+ "detect Raspberry Pi DSI display",
|
||||
+ "\n"
|
||||
+ "Detects Raspberry Pi 7\" DSI display by checking resolution:\n"
|
||||
+ " - 800x480 = Official Raspberry Pi 7\" DSI display\n"
|
||||
+ "Returns: 0=connected, 1=not detected, 2=no video"
|
||||
+);
|
||||
+
|
||||
+U_BOOT_CMD(
|
||||
+ testrpidisplay, 1, 1, do_test_rpi_display,
|
||||
+ "silent test for Raspberry Pi DSI display",
|
||||
+ "\n"
|
||||
+ "Silent test for Raspberry Pi DSI display (for use in scripts):\n"
|
||||
+ "Returns: 0=connected, 1=not detected, 2=no video\n"
|
||||
+ "Usage: if testrpidisplay; then echo DSI found; fi"
|
||||
+);
|
||||
@@ -13,9 +13,11 @@ device_tree=bcm2711-rpi-4-b.dtb
|
||||
dtoverlay=rpi-env
|
||||
dtoverlay=infix-key
|
||||
dtoverlay=vc4-kms-v3d-pi4
|
||||
dtoverlay=vc4-kms-dsi-7inch
|
||||
lcd_rotate=2
|
||||
|
||||
#ignore_lcd=0
|
||||
|
||||
# Prevent console on DSI
|
||||
console=map:0
|
||||
|
||||
# To use an external initramfs file
|
||||
#initramfs rootfs.cpio.gz
|
||||
|
||||
@@ -1 +1 @@
|
||||
dtb-y += broadcom/bcm2711-rpi-4-b.dtb
|
||||
dtb-y += broadcom/bcm2711-rpi-4-b.dtb broadcom/bcm2711-rpi-4-b-dsi.dtb
|
||||
|
||||
@@ -0,0 +1,88 @@
|
||||
#include "bcm2711-rpi-4-b.dts"
|
||||
|
||||
/ {
|
||||
panel_disp: panel_disp@1 {
|
||||
reg = <1>;
|
||||
compatible = "raspberrypi,7inch-dsi", "simple-panel";
|
||||
backlight = <®_display>;
|
||||
power-supply = <®_display>;
|
||||
port {
|
||||
panel_in: endpoint {
|
||||
remote-endpoint = <&bridge_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
reg_bridge: reg_bridge@1 {
|
||||
reg = <1>;
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "bridge_reg";
|
||||
gpio = <®_display 0 0>;
|
||||
vin-supply = <®_display>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&i2c0mux {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
reg_display: reg_display@45 {
|
||||
compatible = "raspberrypi,7inch-touchscreen-panel-regulator";
|
||||
reg = <0x45>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
};
|
||||
|
||||
ft5406: ts@38 {
|
||||
compatible = "edt,edt-ft5506";
|
||||
reg = <0x38>;
|
||||
touchscreen-size-x = < 800 >;
|
||||
touchscreen-size-y = < 480 >;
|
||||
vcc-supply = <®_display>;
|
||||
reset-gpio = <®_display 1 1>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
&dsi1 {
|
||||
status = "okay";
|
||||
port {
|
||||
dsi_out: endpoint {
|
||||
remote-endpoint = <&bridge_in>;
|
||||
};
|
||||
};
|
||||
bridge@0 {
|
||||
reg = <0>;
|
||||
compatible = "toshiba,tc358762";
|
||||
vddc-supply = <®_bridge>;
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
bridge_in: endpoint {
|
||||
remote-endpoint = <&dsi_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
bridge_out: endpoint {
|
||||
remote-endpoint = <&panel_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&hdmi0 {
|
||||
status = "disabled";
|
||||
};
|
||||
&hdmi1 {
|
||||
status = "disabled";
|
||||
};
|
||||
@@ -18,27 +18,6 @@
|
||||
reusable;
|
||||
};
|
||||
|
||||
panel_disp: panel_disp@1 {
|
||||
reg = <1>;
|
||||
compatible = "raspberrypi,7inch-dsi", "simple-panel";
|
||||
backlight = <®_display>;
|
||||
power-supply = <®_display>;
|
||||
port {
|
||||
panel_in: endpoint {
|
||||
remote-endpoint = <&bridge_out>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
reg_bridge: reg_bridge@1 {
|
||||
reg = <1>;
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "bridge_reg";
|
||||
gpio = <®_display 0 0>;
|
||||
vin-supply = <®_display>;
|
||||
enable-active-high;
|
||||
};
|
||||
|
||||
chosen {
|
||||
/* 8250 auxiliary UART instead of pl011 */
|
||||
stdout-path = "serial1:115200n8";
|
||||
@@ -54,66 +33,3 @@
|
||||
&vc4 {
|
||||
status = "okay";
|
||||
};
|
||||
&i2c0mux {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
reg_display: reg_display@45 {
|
||||
compatible = "raspberrypi,7inch-touchscreen-panel-regulator";
|
||||
reg = <0x45>;
|
||||
gpio-controller;
|
||||
#gpio-cells = <2>;
|
||||
};
|
||||
|
||||
ft5406: ts@38 {
|
||||
compatible = "edt,edt-ft5506";
|
||||
reg = <0x38>;
|
||||
touchscreen-size-x = < 800 >;
|
||||
touchscreen-size-y = < 480 >;
|
||||
vcc-supply = <®_display>;
|
||||
reset-gpio = <®_display 1 1>;
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
&dsi1 {
|
||||
status = "okay";
|
||||
port {
|
||||
dsi_out: endpoint {
|
||||
remote-endpoint = <&bridge_in>;
|
||||
};
|
||||
};
|
||||
bridge@0 {
|
||||
reg = <0>;
|
||||
compatible = "toshiba,tc358762";
|
||||
vddc-supply = <®_bridge>;
|
||||
ports {
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
port@0 {
|
||||
reg = <0>;
|
||||
bridge_in: endpoint {
|
||||
remote-endpoint = <&dsi_out>;
|
||||
};
|
||||
};
|
||||
|
||||
port@1 {
|
||||
reg = <1>;
|
||||
bridge_out: endpoint {
|
||||
remote-endpoint = <&panel_in>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/*
|
||||
&hdmi0 {
|
||||
status = "disabled";
|
||||
};
|
||||
&hdmi1 {
|
||||
status = "disabled";
|
||||
};*/
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
#. "$BR2_CONFIG" 2>/dev/null
|
||||
|
||||
BOARD_DIR=$(dirname "$0")
|
||||
GENIMAGE_CFG="${BUILD_DIR}/genimage.cfg"
|
||||
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
|
||||
|
||||
# Device trees are installed for distro boot (syslinux.conf), but on RPi
|
||||
# we need them for the SPL, which feeds the TPL (U-Boot) for use instead
|
||||
# of the (built-in) control DT other platforms use.
|
||||
find "${TARGET_DIR}/boot" -type f -name '*.dtb' -exec cp '{}' "${BINARIES_DIR}/" \;
|
||||
|
||||
# We've asked U-Boot previously to build overlays for us: Infix signing
|
||||
# key and our ixboot scripts. Make sure here they are installed in the
|
||||
# proper directory so genimage can create the DOS partition the SPL
|
||||
@@ -26,15 +20,16 @@ for f in "${BINARIES_DIR}"/rpi-firmware/*; do
|
||||
echo "${FILES}" | grep -q `basename $f` && continue # If already exist it has been added by us.
|
||||
FILES="${FILES}\t\t\t\"${f#"${BINARIES_DIR}/"}\",\n"
|
||||
done
|
||||
|
||||
FILES="${FILES}\t\t\t\"splash.bmp\",\n"
|
||||
echo $FILES
|
||||
KERNEL=$(sed -n 's/^kernel=//p' "${BINARIES_DIR}/rpi-firmware/config.txt")
|
||||
FILES="${FILES}\t\t\t\"${KERNEL}\""
|
||||
|
||||
|
||||
sed "s|#BOOT_FILES#|${FILES}|" "${BOARD_DIR}/genimage.cfg.in" | \
|
||||
sed "s|#VERSION#|${RELEASE}|" | \
|
||||
sed "s|#INFIX_ID#|${INFIX_ID}|" > "${GENIMAGE_CFG}"
|
||||
sed "s|#INFIX_ID#|${INFIX_ID}|" | \
|
||||
sed "s|#VERSION#|${RELEASE}|" > "${GENIMAGE_CFG}"
|
||||
|
||||
|
||||
ROOTPATH_TMP=$(mktemp -d)
|
||||
trap 'rm -rf \"$ROOTPATH_TMP\"' EXIT
|
||||
@@ -1,3 +1,11 @@
|
||||
# CONFIG_MMC_PCI is not set
|
||||
CONFIG_OF_OVERLAY_LIST="rpi-env infix-key"
|
||||
# CONFIG_ENV_IS_IN_FAT is not set
|
||||
CONFIG_CMD_BMP=y
|
||||
CONFIG_CMD_RPI_DISPLAY=y
|
||||
CONFIG_SPLASH_SCREEN=y
|
||||
CONFIG_SPLASH_SCREEN_ALIGN=y
|
||||
CONFIG_BMP=y
|
||||
CONFIG_BMP_24BPP=y
|
||||
CONFIG_VIDEO=y
|
||||
CONFIG_VIDEO_BMP_RLE8=y
|
||||
|
||||
@@ -11,7 +11,14 @@
|
||||
bootmenu_delay = "10";
|
||||
boot_targets = "mmc0";
|
||||
ethprime = "eth0";
|
||||
bootcmd = "run ixboot";
|
||||
|
||||
stdout = "serial";
|
||||
stderr = "serial";
|
||||
stdin = "serial";
|
||||
splashpos = "m,m";
|
||||
splashfile = "splash.bmp";
|
||||
checkdisplay = "if testrpidisplay; then; setenv fdtfile broadcom/bcm2711-rpi-4-b-dsi.dtb; else; setenv fdtfile broadcom/bcm2711-rpi-4-b.dtb; fi";
|
||||
bootcmd = "fatload mmc 0:1 ${loadaddr} ${splashfile}; bmp display ${loadaddr}; run checkdisplay; run ixboot";
|
||||
|
||||
ixpreboot = /incbin/("scripts/ixpreboot.sh");
|
||||
ixbtn-devmode = "setenv dev_mode yes; echo Enabled";
|
||||
|
||||
Reference in New Issue
Block a user