JetHub H1: dirty userland fix for net interface does not up at boot (#3507)

This commit is contained in:
Vyacheslav 2022-02-25 21:27:57 +03:00 committed by GitHub
parent 3da96b2d77
commit 5d3271dc3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 23 additions and 0 deletions

View File

@ -153,6 +153,9 @@ family_tweaks() {
# Hardware init
chroot "${SDCARD}" /bin/bash -c "systemctl --no-reload enable jethub-initer.service >/dev/null 2>&1"
# AR-1098 userland fix for net interface does not up at boot
chroot "${SDCARD}" /bin/bash -c "systemctl --no-reload enable jethub-ethreset.service >/dev/null 2>&1"
# pip3 packages
chroot "${SDCARD}" /bin/bash -c "pip3 install pyserial intelhex python-magic" >>"${DEST}"/debug/install.log 2>&1
@ -184,7 +187,12 @@ family_tweaks_bsp() {
cp "$SRC/packages/bsp/jethub/jethub-initer.service" "$destination/lib/systemd/system/" || exit_with_error "Unable to copy jethub-initer.service"
cp "$SRC/packages/bsp/jethub/${BOARD}/jethub-init" "$destination/usr/lib/armbian/" || exit_with_error "Unable to copy jethub-init"
if [[ "$BOARD" == jethubj80 ]]; then
# AR-1098 userland fix for net interface does not up at boot
cp "$SRC/packages/bsp/jethub/jethubj80/jethub-ethreset.service" "$destination/lib/systemd/system/" || exit_with_error "Unable to copy jethub-ethreset.service"
cp "$SRC/packages/bsp/jethub/jethubj80/jethub-ethreset" "$destination/usr/lib/armbian/" || exit_with_error "Unable to copy jethub-ethreset"
# Ethernet LED setup
cp "$SRC/packages/bsp/jethub/$BOARD/05-jethub_set_eth_leds.rules" "$destination/etc/udev/rules.d/"
fi

View File

@ -0,0 +1,3 @@
#!/bin/bash
/usr/sbin/ethtool -r eth0
exit 0

View File

@ -0,0 +1,12 @@
[Unit]
Description=test service
Wants=network.target
After=network.target
[Service]
Type=oneshot
ExecStartPre=/usr/bin/sleep 20
ExecStart=/usr/lib/armbian/jethub-ethreset
[Install]
WantedBy=multi-user.target