Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sync #503

Merged
merged 6 commits into from
Jun 20, 2024
Merged

sync #503

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
64 changes: 64 additions & 0 deletions bcm27xx-utils/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
# SPDX-License-Identifier: GPL-2.0-only

include $(TOPDIR)/rules.mk

PKG_NAME:=bcm27xx-utils
PKG_VERSION:=2024-04-24
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/raspberrypi/utils.git
PKG_SOURCE_VERSION:=451b9881b72cb994c102724b5a7d9b93f97dc315
PKG_MIRROR_HASH:=b453976171187e0ffe7cacfdcab36cec6b5d02db8b6d978cb9afbbcafcfcff9d

PKG_FLAGS:=nonshared
PKG_BUILD_FLAGS:=no-lto

PKG_LICENSE:=BSD-3-Clause
PKG_LICENSE_FILES:=LICENCE

CMAKE_INSTALL:=1

include $(INCLUDE_DIR)/package.mk
include $(INCLUDE_DIR)/cmake.mk

define Package/bcm27xx-utils
SECTION:=utils
CATEGORY:=Utilities
DEPENDS:=@TARGET_bcm27xx +libfdt
TITLE:=BCM27xx scripts and simple applications
PROVIDES:=bcm27xx-userland
endef

define Package/bcm27xx-utils/description
BCM27xx scripts and simple applications.
Replaces bcm27xx-userland scripts and applications.
endef

define Package/bcm27xx-utils/install
$(INSTALL_DIR) $(1)/usr/bin

$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtmerge $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtoverlay $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/dtparam $(1)/usr/bin

$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/eepdump $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/eepflash.sh $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/eepmake $(1)/usr/bin

$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/otpset $(1)/usr/bin

$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/overlaycheck $(1)/usr/bin
$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/bin/overlaycheck_exclusions.txt $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/ovmerge $(1)/usr/bin

$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/pinctrl $(1)/usr/bin

$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/raspinfo $(1)/usr/bin

$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcgencmd $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vclog $(1)/usr/bin
$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/vcmailbox $(1)/usr/bin
endef

$(eval $(call BuildPackage,bcm27xx-utils))
255 changes: 255 additions & 0 deletions bcm27xx-utils/patches/0001-raspinfo-adapt-to-OpenWrt.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,255 @@
From 0db3fb3119eda8c2360454c2a01f84602a879c38 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <[email protected]>
Date: Tue, 16 Jan 2024 15:32:12 +0100
Subject: [PATCH] raspinfo: adapt to OpenWrt
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

Signed-off-by: Álvaro Fernández Rojas <[email protected]>
---
raspinfo/raspinfo | 186 ++++------------------------------------------
1 file changed, 13 insertions(+), 173 deletions(-)

--- a/raspinfo/raspinfo
+++ b/raspinfo/raspinfo
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh

# Some of the regex's used in sed
# Catch basic IP6 address "s/\([0-9a-fA-F]\{1,4\}:\)\{7,7\}[0-9a-fA-F]\{1,4\}/y.y.y.y.y.y.y.y/g"
@@ -6,147 +6,6 @@
# IP4 d.d.d.d decimal "s/\([0-9]\{1,3\}\.\)\{3,3\}[0-9]\{1,3\}/x.x.x.x/g"
# mac address "s/\([0-9a-fA-F]\{2,2\}\:\)\{5,5\}[0-9a-fA-F]\{2,2\}/m.m.m.m/g"

-
-display_info_drm() {
- # If running X then can use xrandr, otherwise
- # dump the /sys/class entries for the displays
- if command -v xrandr > /dev/null &&
- DISPLAY=${DISPLAY:-:0} xrandr --listmonitors &>/dev/null;
- then
- echo "Running (F)KMS and X"
- echo
-
- DISPLAY=${DISPLAY:-:0} xrandr --verbose
- else
- echo "Running (F)KMS, console"
- echo
-
- for card in /sys/class/drm/card[0-9]-*;
- do
- echo $card
-
- # if kmsprint isn't installed print basic mode info
- if ! command -v kmsprint > /dev/null; then
- if [ -f $card/modes ];
- then
- cat $card/modes
- else
- echo "No modes found"
- fi
- fi
-
- if [ -f $card/edid ];
- then
- base64 $card/edid
- else
- echo "No EDID found"
- fi
- echo
- done
- fi
-
- # kmsprint is more useful, but not always installed
- echo
- if command -v kmsprint > /dev/null; then
- kmsprint
- echo
- kmsprint -m
- else
- echo "kmsprint is not installed. Install with: sudo apt install kms++-utils"
- fi
-
- echo
-
- # dump the /sys/class entries for the displays
- cardfound=0
- for card in `seq 0 9`;
- do
- if sudo test -f "/sys/kernel/debug/dri/${card}/state";
- then
- for hdmi in 0 1;
- do
- if sudo test -f "/sys/kernel/debug/dri/${card}/hdmi${hdmi}_regs";
- then
- echo "HDMI${hdmi}: $(sudo cat /sys/kernel/debug/dri/$card/hdmi${hdmi}_regs | grep HOTPLUG)"
- fi
- done
- echo
- echo "/sys/kernel/debug/dri/$card/state:"
- sudo cat "/sys/kernel/debug/dri/$card/state"
- echo
- cardfound=1
- fi
- done
- if [ "$cardfound" == "0" ];
- then
- echo "kms state not found"
- fi
- echo
-
-}
-
-display_info_legacy() {
- # Legacy mode
- echo "Running Legacy framebuffer"
- echo
-
- for card in `seq 0 9`;
- do
- F="/dev/fb${card}"
- if test -e $F;
- then
- echo Framebuffer: $F
- fbset -s -fb $F
- fi
- done
-
- disps=`tvservice -l | awk '/Display Number/{print substr($3,1,1)}'`
-
- tmp=$(mktemp)
-
- for display in $disps
- do
- echo
- echo "Display: " $display
-
- tvservice -v $display -s
- tvservice -v $display -n
- tvservice -v $display -m CEA
- tvservice -v $display -m DMT
-
- echo
- tvservice -v $display -d $tmp > /dev/null
- base64 $tmp
- done
-
- rm $tmp
-}
-
-display_info() {
- # Check if we are running a KMS/DRM system
-
- if [ -d "/dev/dri" ];
- then
- display_info_drm
- else
- display_info_legacy
- fi
-}
-
-audio_info() {
- aplay -l
- echo
- aplay -L
- echo
- systemctl --user status pipewire.socket pipewire.service pulseaudio.service pulseaudio.socket
- echo
- if command -v pactl > /dev/null; then
- pactl info
- else
- echo pactl not installed
- fi
-}
-
OUT=raspinfo.txt

rm -f $OUT
@@ -163,8 +22,6 @@ echo
cat /etc/os-release | head -4
echo

-cat /etc/rpi-issue
-echo
uname -a

cat /proc/cpuinfo | tail -3
@@ -190,17 +47,6 @@ echo
cat /proc/swaps

echo
-echo "Package version information"
-echo "---------------------------"
-
-apt-cache policy raspberrypi-ui-mods | head -2
-apt-cache policy raspberrypi-sys-mods | head -2
-apt-cache policy openbox | head -2
-apt-cache policy lxpanel | head -2
-apt-cache policy pcmanfm | head -2
-apt-cache policy rpd-plym-splash | head -2
-
-echo
echo "Networking Information"
echo "----------------------"
echo
@@ -212,21 +58,11 @@ echo "USB Information"
echo "---------------"
echo

-lsusb -t
-
-echo
-echo "Display Information"
-echo "-------------------"
-echo
-
-display_info
-
-echo
-echo "Audio Information"
-echo "-------------------"
-echo
-
-audio_info
+if command -v lsusb > /dev/null; then
+ lsusb -t
+else
+ echo usbutils not installed
+fi

echo
echo "config.txt"
@@ -250,7 +86,7 @@ echo "-----------------"
echo

if command -v pinctrl > /dev/null; then
- sudo pinctrl 2>&1
+ pinctrl 2>&1
elif command -v raspi-gpio > /dev/null; then
raspi-gpio get 2>&1
else
@@ -263,9 +99,9 @@ echo "------------------"
echo

if command -v vcdbg > /dev/null; then
- sudo vcdbg log msg 2>&1
+ vcdbg log msg 2>&1
elif command -v vclog > /dev/null; then
- sudo vclog --msg 2>&1
+ vclog --msg 2>&1
else
echo "vcdbg not found"
fi
@@ -284,5 +120,9 @@ echo
echo "EEPROM"
echo "------"
echo
-sudo rpi-eeprom-update
+if command -v rpi-eeprom-update > /dev/null; then
+ rpi-eeprom-update
+else
+ echo bcm27xx-eeprom not installed
+fi
fi
4 changes: 2 additions & 2 deletions libmbim/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
include $(TOPDIR)/rules.mk

PKG_NAME:=libmbim
PKG_SOURCE_VERSION:=1.31.3-dev
#PKG_SOURCE_VERSION:=1.30.0
#PKG_SOURCE_VERSION:=1.31.4-dev
PKG_SOURCE_VERSION:=651107e95859103d8b4966acfcf82498a869301d
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
Expand Down
2 changes: 1 addition & 1 deletion libqmi/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk

PKG_NAME:=libqmi
#PKG_SOURCE_VERSION:=1.34.0
PKG_SOURCE_VERSION:=1.35.4-dev
PKG_SOURCE_VERSION:=1.35.5-dev
PKG_RELEASE:=1

PKG_SOURCE_PROTO:=git
Expand Down
Loading