Skip to content
Snippets Groups Projects
Unverified Commit 0c6620f7 authored by David Furey's avatar David Furey Committed by Pablo Correa Gomez
Browse files

Allow the USB network host address to be configured rather than random

The USB network host address is used by some hosts to define the interface
name. Making the host address deterministic can simplify host network
configuration.

Part-of: !6232
[ci:skip-build]: already built successfully in CI
parent 5a65176f
No related branches found
No related tags found
1 merge request!6232Allow the USB network host address to be configured rather than random
Pipeline #218168 passed
# Maintainer: Caleb Connolly <caleb@postmarketos.org>
# Co-Maintainer: Clayton Craft <clayton@craftyguy.net>
pkgname=postmarketos-initramfs
pkgver=3.8.1
pkgver=3.8.2
pkgrel=0
pkgdesc="Base files for the postmarketOS initramfs / initramfs-extra"
url="https://postmarketos.org"
......@@ -109,7 +109,7 @@ sha512sums="
c0233d22858a5901db64e1d2fe1f6d39a2e2cfd1b94a10932483f55fed9461e9b8aa2d73b154b9d99a7a8b49ee02abfbddfe917ce0c6d7576601ba2668589c01 00-initramfs-base.files
d0f35562365756d93066ce45924d17fb347b54095179c3262daa2f073e12743505cd5d9372ad30485915ca754d95a8edba9a74314e7949e0b3cf6978a87d03a5 00-initramfs-extra-base.files
7ec5e9596b27f48d3abe51bc92d70d9708479b5e7df5fa9903d9e58f5945f2a7de5c390cc2d82842b899dfc9fa9bdb2b84b29cc1daf5d534861cf1324628d57b init.sh
0581202eabe4edd4735d29b04f4da2a7a0fcce240a93d9e65d90d84e7e693b5ea28eec80b03783d1905a2e0ebfb5f2a266aa422525a5336eb8569fb37c2c7a33 init_functions.sh
08f9df46c584ebc0c8dc2042ae5cd466714b61977d3550d22e912fbeb513d902ef2d18e51f6d91f40f0e9386048512a45d867ad6f14d5e91d471208a26149150 init_functions.sh
7cf0b1e7511bf289a90ed6cf3190a78119be46e2d885ee3af2dd1fb048eaac7c0875bfd74cc576dd062d17c5fae23f7e721b86f8d71d2b3fb2917bcc184390c1 init_2nd.sh
8072562c74c92e040b90c8d5baf60073ebc058bc43576287dc30b9a2d9048d127d7997a0192ad81113c045510db0b83279004e8c3b973224c3398e2c1f0ce130 init_functions_2nd.sh
675e7d5bee39b2df7d322117f8dcaccc274d61beaf4d50ead19bbf2109446d64b1c0aa0c5b4f9846eb6c1c403418f28f6364eff4537ba41120fbfcbc484b7da7 mdev.conf
......
......@@ -786,6 +786,7 @@ setup_usb_network_configfs() {
usb_serialnumber="${deviceinfo_usb_serialnumber:-postmarketOS}"
usb_network_function="${deviceinfo_usb_network_function:-ncm.usb0}"
usb_network_function_fallback="rndis.usb0"
usb_network_host_addr="${deviceinfo_usb_network_host_addr:-}"
echo " Setting up USB gadget through configfs"
# Create an usb gadet configuration
......@@ -817,6 +818,11 @@ setup_usb_network_configfs() {
|| echo " Couldn't create $CONFIGFS/g1/configs/c.1/strings/0x409"
echo "USB network" > $CONFIGFS/g1/configs/c.1/strings/0x409/configuration \
|| echo " Couldn't write configration name"
if [ -n "$usb_network_host_addr" ]; then
echo "$usb_network_host_addr" > $CONFIGFS/g1/functions/"$usb_network_function"/host_addr \
|| echo " Couldn't write host addr"
fi
# Link the network instance to the configuration
ln -s $CONFIGFS/g1/functions/"$usb_network_function" $CONFIGFS/g1/configs/c.1 \
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment