MassMesh / meta-imagebuilder

10 stars 4 forks source link

MIB: Support EdgeRouter (3-port Router&Switch) #86

Closed wfleurant closed 4 years ago

wfleurant commented 4 years ago

investigate supporting EdgeRouter

wfleurant commented 4 years ago
root@OpenWrt:~# cat /etc/board.json 
{
    "model": {
        "id": "erlite",
        "name": "UBNT_E100 (CN5020p1.1-500-SCP)"
    },
    "network": {
        "lan": {
            "ifname": "eth0",
            "protocol": "static"
        },
        "wan": {
            "ifname": "eth1",
            "protocol": "dhcp"
        }
    }
}

untested snippet/notes for flashing to usb

# disk=/dev/sdb
# kernel_part=/dev/sdb1
# rootfs_part=/dev/sdb2
# cat sdb.dump 
label: dos
label-id: 0x1e0148a0
device: /dev/sdb
unit: sectors

/dev/sdb1 : start=        2048, size=      290816, type=c
/dev/sdb2 : start=      292864, size=     8388608, type=83

# cat sdb.dump | sudo sfdisk ${disk}
# sudo mkfs.vfat ${kernel_part}
# mkdir kernel
# sudo mount ${kernel_part} kernel

# wget https://downloads.openwrt.org/snapshots/targets/octeon/generic/openwrt-octeon-ubnt_edgerouter-lite-squashfs-sysupgrade.tar
# tar xf *.tar
# tree -h sysupgrade-erlite/
sysupgrade-erlite/
├── [   13]  CONTROL
├── [ 8.3M]  kernel
└── [ 1.9M]  root

# sudo cp ./sysupgrade-erlite/kernel kernel/vmlinux.64
# kernel_md5sum=$(md5sum kernel/vmlinux.64 | awk '{print $1}')
# echo ${kernel_md5sum} | sudo tee kernel/vmlinux.64.md5
# dd_opts="bs=4096 conv=fsync status=progress"
# sudo dd if=sysupgrade-erlite/root of=${rootfs_part} ${dd_opts}
wfleurant commented 4 years ago

profiles from IB

Current Target: "octeon"
Current Revision: "r13573-03a0b7b7e5"
Default Packages: base-files libc libgcc busybox dropbear mtd uci opkg netifd fstools uclient-fetch logd urandom-seed urngd mkf2fs e2fsprogs dnsmasq iptables ip6tables ppp ppp-mod-pppoe firewall odhcpd-ipv6only odhcp6c kmod-ipt-offload
Available Profiles:

Default:
    Default Profile
    Packages: 
    hasImageMetadata: 0
generic:
    Generic Octeon
    Packages: 
    hasImageMetadata: 0
ubnt_edgerouter:
    Ubiquiti EdgeRouter
    Packages: 
    hasImageMetadata: 0
ubnt_edgerouter-lite:
    Ubiquiti EdgeRouter Lite
    Packages: 
    hasImageMetadata: 0