Skip to content

Commit c7d7781

Browse files
committed
Add persistent mac address for eth0
1 parent ca23ba7 commit c7d7781

File tree

3 files changed

+9
-4
lines changed

3 files changed

+9
-4
lines changed
Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
#!/bin/sh
22

3-
set -x
3+
set -ex
44

5-
# TODO(longsleep): pin eth0 mac address to uboot environment.
5+
# Pin eth0 mac address to uboot environment.
6+
7+
MAC=$(cat /sys/class/net/eth0/address)
8+
cat <<EOF | /usr/bin/fw_setenv -s -
9+
ethaddr ${MAC}
10+
EOF

snappy/gadget/meta/snap.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: pine64
2-
version: 16.04-2
2+
version: 16.04-3
33
summary: Pine64 support package
44
description: |
55
Support files for booting Pine64

snappy/gadget/uboot.env.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ snappy_trial_boot=0
2424

2525
console=ttyS0,115200
2626
mmcrootfstype=ext4 rootwait
27-
mmcargs=setenv bootargs console=${console} earlycon=uart,mmio32,0x01c28000 root=${mmcroot} rootfstype=${mmcrootfstype}
27+
mmcargs=setenv bootargs console=${console} earlycon=uart,mmio32,0x01c28000 root=${mmcroot} rootfstype=${mmcrootfstype} mac_addr=${ethaddr} sunxi_serial=${sunxi_serial}
2828

2929
mmcbootcmd=run snappy_boot
3030
bootcmd=run mmcbootcmd

0 commit comments

Comments
 (0)