JetHub H1: dirty userland fix for net interface does not up at boot (#3507)
This commit is contained in:
parent
3da96b2d77
commit
5d3271dc3a
@ -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
|
||||
|
||||
3
packages/bsp/jethub/jethubj80/jethub-ethreset
Executable file
3
packages/bsp/jethub/jethubj80/jethub-ethreset
Executable file
@ -0,0 +1,3 @@
|
||||
#!/bin/bash
|
||||
/usr/sbin/ethtool -r eth0
|
||||
exit 0
|
||||
12
packages/bsp/jethub/jethubj80/jethub-ethreset.service
Normal file
12
packages/bsp/jethub/jethubj80/jethub-ethreset.service
Normal 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
|
||||
Loading…
Reference in New Issue
Block a user