Initial commit

This commit is contained in:
domenico
2025-06-24 13:14:22 +02:00
commit 4002f145fc
9002 changed files with 1731834 additions and 0 deletions

View File

@@ -0,0 +1,13 @@
do_sysinfo_layerscape_fixup() {
[ -e /tmp/sysinfo/board_name ] || return
[ -e /proc/cmdline ] || return
cmdline=$(strings /proc/cmdline)
case "${cmdline}" in
*root=/dev/mmcblk*)
board="$(strings /tmp/sysinfo/board_name)-sdboot"
echo ${board} > /tmp/sysinfo/board_name
;;
esac
}
boot_hook_add preinit_main do_sysinfo_layerscape_fixup

View File

@@ -0,0 +1,26 @@
reorder_layerscape_interfaces() {
if [ ! -f /tmp/sysinfo/board_name ]; then
echo "No board name found, not doing reorder_layerscape_interfaces"
return 0
fi
board=$(cat /tmp/sysinfo/board_name)
case "$board" in
traverse,ls1043v|\
traverse,ls1043s)
# Reorder ethernet interfaces to match the physical order
ip link set eth2 name fm1-mac3
ip link set eth4 name eth2
ip link set eth3 name fm1-mac4
ip link set eth5 name eth3
ip link set fm1-mac3 name eth4
ip link set fm1-mac4 name eth5
;;
default)
echo "Unknown board $board"
;;
esac
}
boot_hook_add preinit_main reorder_layerscape_interfaces

View File

@@ -0,0 +1,27 @@
. /lib/functions.sh
. /lib/upgrade/common.sh
BOOTPART=/dev/mmcblk0p1
move_config() {
local board=$(board_name)
case "$board" in
fsl,ls1012a-frwy-sdboot | \
fsl,ls1021a-iot-sdboot | \
fsl,ls1021a-twr-sdboot | \
fsl,ls1043a-rdb-sdboot | \
fsl,ls1046a-frwy-sdboot | \
fsl,ls1046a-rdb-sdboot | \
fsl,ls1088a-rdb-sdboot)
if [ -b $BOOTPART ]; then
mkdir -p /boot
mount -t ext4 -o rw,noatime $BOOTPART /boot 2>&1
[ -f "/boot/$BACKUP_FILE" ] && mv -f "/boot/$BACKUP_FILE" /
umount /boot
fi
;;
esac
}
boot_hook_add preinit_mount_root move_config