[Bug 2052693] Re: u-boot-starfive does not contain a postinst script to update the board after package installation
scottfk
2052693 at bugs.launchpad.net
Thu Feb 8 12:31:22 UTC 2024
Heya, Heinrich.
That device in the by-name seems to get created by
/usr/lib/udev/rules.d/60-persistent-storage-mtd.rules (from package
udev):
# do not edit this file, it will be overwritten on update
# persistent storage links: /dev/mtd/by-name
ACTION=="remove", GOTO="persistent_storage_mtd_end"
SUBSYSTEM!="mtd", GOTO="persistent_storage_mtd_end"
KERNEL!="mtd[0-9]*", GOTO="persistent_storage_mtd_end"
KERNEL=="mtd[0-9]*ro", GOTO="persistent_storage_mtd_end"
ATTR{name}=="?*", SYMLINK+="mtd/by-name/$attr{name}"
LABEL="persistent_storage_mtd_end"
udevadm info /dev/mtd/by-name/uboot
P: /devices/platform/soc/13010000.spi/spi_master/spi0/spi0.0/mtd/mtd2
M: mtd2
R: 2
U: mtd
T: mtd
D: c 90:4
N: mtd2
L: 0
S: mtd/by-name/uboot
E: DEVPATH=/devices/platform/soc/13010000.spi/spi_master/spi0/spi0.0/mtd/mtd2
E: DEVNAME=/dev/mtd2
E: DEVTYPE=mtd
E: OF_NAME=uboot
E: OF_FULLNAME=/soc/spi at 13010000/flash at 0/partitions/uboot at 100000
E: OF_COMPATIBLE_N=0
E: MAJOR=90
E: MINOR=4
E: SUBSYSTEM=mtd
E: USEC_INITIALIZED=19728429
E: DEVLINKS=/dev/mtd/by-name/uboot
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu Noble Numbat (development branch)
Release: 24.04
Codename: noble
$ apt policy udev
udev:
Installed: 255.2-3ubuntu2
Candidate: 255.2-3ubuntu2
Version table:
*** 255.2-3ubuntu2 500
500 http://ports.ubuntu.com/ubuntu-ports noble-proposed/main riscv64 Packages
100 /var/lib/dpkg/status
253.5-1ubuntu7 500
500 http://ports.ubuntu.com/ubuntu-ports noble/main riscv64 Packages
Maybe I am getting the device mapping because I am running a 6.8.0-rc3
kernel I compiled myself? I will reboot into the Ubuntu 6.5.0.14.14.1
kernel and check.
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to u-boot in Ubuntu.
https://bugs.launchpad.net/bugs/2052693
Title:
u-boot-starfive does not contain a postinst script to update the board
after package installation
Status in u-boot package in Ubuntu:
New
Bug description:
u-boot-starfive distributes updates to SPL and U-Boot, but it does
not flash them to the board. I think it would be useful if it
followed the pattern of u-boot-sifive and included a postinst script
to update the board.
The script could look something like this. NB: I only have access to
a StarFive VisionFive 2 v1.3B board. Not sure if the other revisions
are compatible with the SPL and U-Boot images in the u-boot-starfive
package:
#!/bin/sh
##
set -e
case "$1" in
configure)
target=""
if grep -q '^StarFive VisionFive 2 v1.3B$' /sys/firmware/devicetree/base/model; then
target="starfive_visionfive2"
fi
if [ -n "$target" ] && [ -e /dev/mtd/by-name/spl ] && [ -e /dev/mtd/by-name/uboot ]; then
flashcp -v /usr/lib/u-boot/$target/u-boot-spl.bin.normal.out /dev/mtd/by-name/spl
flashcp -v /usr/lib/u-boot/$target/u-boot.itb /dev/mtd/by-name/uboot
fi
;;
esac
exit 0
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/u-boot/+bug/2052693/+subscriptions
More information about the foundations-bugs
mailing list