How to compile OpenWrt18.06 to BIT5

Ready?

Solve the necessary dependencies!

$ sudo apt-get update 
$ sudo apt-get install git g++ make libncurses5-dev subversion libssl-dev gawk libxml-parser-perl unzip wget python xz-utils vim zlibc zlib1g zlib1g-dev openjdk-8-jdk build-essential ccache gettext xsltproc

refer from https://cn.widora.io/compile

Download (20190227)

$ git clone https://github.com/openwrt/openwrt.git

Checkout 18.06

$ git checkout openwrt-18.06

feeds update

$ ./scripts/feeds update -a
$ ./scripts/feeds install -a

change dts

Openwrt official dts configuration is NEO (32 + 128), and the BIT5 configuration is (32 + 64), so you need to modify the RAM configuration from the DTS file.

$ vi target/linux/ramips/dts/WIDORA-NEO.dtsi 

line 15: reg = <0x0 0x8000000>;
change into
reg = <0x0 0x4000000>;

make menuconfig

$  make menuconfig

select below:
Target System (MediaTek Ralink MIPS) —>
Subtarget (MT76x8 based boards) —>
Target Profile (Widora-NEO (32M)) —>

save and compile

1551247094890-openwrt-ramips-mt76x8-widora_neo-32m-squashfs-sysupgrade.bin (3.5 MB)

@roel
No, biT5 itself is already CPU master, it just uses the NGFF connector. :smile:

So a BIT5 can be put in a mpcie slot and serves as a PC in a PC? How does it communicate with the PC, just as a wireless device or can it share storage to?

@neige I am still not sure about this.

Can I change IoT gateway mode or IoT Device mode (1port/ 5port) in dts?

dmesg

[    0.000000] Linux version 4.14.103 (mango@mangodeMBP.lan) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7123-5a9
[    0.000000] Board has DDR2
[    0.000000] Analog PMU set to hw control
[    0.000000] Digital PMU set to hw control
[    0.000000] SoC Type: MediaTek MT7628AN ver:1 eco:2
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019655 (MIPS 24KEc)
[    0.000000] MIPS: machine is Widora-NEO (32M)
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, PIPT, no aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 804448a0, node_mem_map 81000040
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] random: get_random_bytes called from start_kernel+0x8c/0x474 with crng_init=0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=000530c0
[    0.000000] Readback ErrCtl register=000530c0
[    0.000000] Memory: 60104K/65536K available (3388K kernel code, 164K rwdata, 820K rodata, 164K init, 200)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS: 256
[    0.000000] intc: using register map from devicetree
[    0.000000] CPU Clock: 580MHz
[    0.000000] timer_probe: no matching timers found
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 6590553264 ns
[    0.000013] sched_clock: 32 bits at 290MHz, resolution 3ns, wraps every 7405115902ns
[    0.007535] Calibrating delay loop... 385.84 BogoMIPS (lpj=1929216)
[    0.073494] pid_max: default: 32768 minimum: 301
[    0.078192] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.084538] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.097267] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 1911260446275000s
[    0.106759] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.112703] pinctrl core: initialized pinctrl subsystem
[    0.118279] NET: Registered protocol family 16
[    0.149104] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.154718] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.160311] mt7621_gpio 10000600.gpio: registering 32 gpios
[    0.169928] clocksource: Switched to clocksource MIPS
[    0.175992] NET: Registered protocol family 2
[    0.181050] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.187744] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.193924] TCP: Hash tables configured (established 1024 bind 1024)
[    0.200174] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.205776] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.212116] NET: Registered protocol family 1
[    0.216292] PCI: CLS 0 bytes, default 32
[    0.219655] Crashlog allocated RAM at address 0x3f00000
[    0.226251] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    0.238190] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.243810] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, I.
[    0.263035] io scheduler noop registered
[    0.266767] io scheduler deadline registered (default)
[    0.272700] Serial: 8250/16550 driver, 3 ports, IRQ sharing disabled
[    0.280059] console [ttyS0] disabled
[    0.283495] 10000c00.uartlite: ttyS0 at MMIO 0x10000c00 (irq = 28, base_baud = 2500000) is a 16550A
[    0.292234] console [ttyS0] enabled
[    0.299228] bootconsole [early0] disabled
[    0.307996] 10000d00.uart1: ttyS1 at MMIO 0x10000d00 (irq = 29, base_baud = 2500000) is a 16550A
[    0.317585] 10000e00.uart2: ttyS2 at MMIO 0x10000e00 (irq = 30, base_baud = 2500000) is a 16550A
[    0.327099] cacheinfo: Failed to find cpu0 device node
[    0.332349] cacheinfo: Unable to detect cache hierarchy for CPU 0
[    0.339318] spi-mt7621 10000b00.spi: sys_freq: 193333333
[    0.361258] m25p80 spi0.0: w25q256 (32768 Kbytes)
[    0.366084] 4 fixed-partitions partitions found on MTD device spi0.0
[    0.372542] Creating 4 MTD partitions on "spi0.0":
[    0.377409] 0x000000000000-0x000000030000 : "u-boot"
[    0.383375] 0x000000030000-0x000000040000 : "u-boot-env"
[    0.389588] 0x000000040000-0x000000050000 : "factory"
[    0.395674] 0x000000050000-0x000002000000 : "firmware"
[    0.471120] 2 uimage-fw partitions found on MTD device firmware
[    0.477149] 0x000000050000-0x0000001b62ed : "kernel"
[    0.483107] 0x0000001b62ed-0x000002000000 : "rootfs"
[    0.488970] mtd: device 5 (rootfs) set to be root filesystem
[    0.496191] 1 squashfs-split partitions found on MTD device rootfs
[    0.502529] 0x0000003b0000-0x000002000000 : "rootfs_data"
[    0.509996] libphy: Fixed MDIO Bus: probed
[    0.524222] rt3050-esw 10110000.esw: link changed 0x00
[    0.532470] mtk_soc_eth 10100000.ethernet eth0: mediatek frame engine at 0xb0100000, irq 5
[    0.542722] NET: Registered protocol family 10
[    0.551042] Segment Routing with IPv6
[    0.554875] NET: Registered protocol family 17
[    0.559425] 8021q: 802.1Q VLAN Support v1.8
[    0.571195] VFS: Mounted root (squashfs filesystem) readonly on device 31:5.
[    0.579242] Freeing unused kernel memory: 164K
[    0.583808] This architecture does not have kernel memory protection.
[    1.331193] init: Console is alive
[    1.334875] init: - watchdog -
[    2.142345] random: fast init done
[    2.229684] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.378665] usbcore: registered new interface driver usbfs
[    2.384402] usbcore: registered new interface driver hub
[    2.389906] usbcore: registered new device driver usb
[    2.401122] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.409504] ehci-platform: EHCI generic platform driver
[    2.425192] phy phy-10120000.usbphy.0: remote usb device wakeup disabled
[    2.432004] phy phy-10120000.usbphy.0: UTMI 16bit 30MHz
[    2.437320] ehci-platform 101c0000.ehci: EHCI Host Controller
[    2.443191] ehci-platform 101c0000.ehci: new USB bus registered, assigned bus number 1
[    2.451353] ehci-platform 101c0000.ehci: irq 26, io mem 0x101c0000
[    2.479965] ehci-platform 101c0000.ehci: USB 2.0 started, EHCI 1.00
[    2.487322] hub 1-0:1.0: USB hub found
[    2.491626] hub 1-0:1.0: 1 port detected
[    2.498916] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    2.506901] ohci-platform: OHCI generic platform driver
[    2.512563] ohci-platform 101c1000.ohci: Generic Platform OHCI controller
[    2.519498] ohci-platform 101c1000.ohci: new USB bus registered, assigned bus number 2
[    2.527669] ohci-platform 101c1000.ohci: irq 26, io mem 0x101c1000
[    2.605083] hub 2-0:1.0: USB hub found
[    2.609273] hub 2-0:1.0: 1 port detected
[    2.616664] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.625385] init: - preinit -
[    3.843192] rt3050-esw 10110000.esw: link changed 0x00
[    7.026085] mount_root: jffs2 not ready yet, using temporary tmpfs overlay
[    7.061764] urandom-seed: Seed file not found (/etc/urandom.seed)
[    7.104315] procd: - early -
[    7.107347] procd: - watchdog -
[    7.282132] rt3050-esw 10110000.esw: link changed 0x01
[    7.827875] procd: - watchdog -
[    7.831413] procd: - ubus -
[    7.959655] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.101186] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.108189] random: ubusd: uninitialized urandom read (4 bytes read)
[    8.115724] procd: - init -
[    8.651475] kmodloader: loading kernel modules from /etc/modules.d/*
[    8.663165] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    8.681133] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[    8.689258] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[    8.699542] ip_tables: (C) 2000-2006 Netfilter Core Team
[    8.714394] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[    8.786150] xt_time: kernel timezone is -0000
[    8.849830] mt76_wmac 10300000.wmac: ASIC revision: 76280001
[    9.872135] mt76_wmac 10300000.wmac: Firmware Version: 20151201
[    9.878158] mt76_wmac 10300000.wmac: Build Time: 20151201183641
[    9.899941] mt76_wmac 10300000.wmac: firmware init done
[   10.076340] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   10.123094] PPP generic driver version 2.4.2
[   10.134050] NET: Registered protocol family 24
[   10.228549] kmodloader: done loading kernel modules from /etc/modules.d/*
[   11.506447] urandom_read: 5 callbacks suppressed
[   11.506456] random: jshn: uninitialized urandom read (4 bytes read)
[   11.663478] random: jshn: uninitialized urandom read (4 bytes read)
[   16.477823] rt3050-esw 10110000.esw: link changed 0x00
[   19.335565] jffs2_scan_eraseblock(): End of filesystem marker found at 0x0
[   19.355449] jffs2_build_filesystem(): unlocking the mtd device... 
[   19.355510] done.
[   19.363803] jffs2_build_filesystem(): erasing all blocks after the end marker... 
[   19.504313] rt3050-esw 10110000.esw: link changed 0x01
[   24.644164] br-lan: port 1(eth0) entered blocking state
[   24.649478] br-lan: port 1(eth0) entered disabled state
[   24.655208] device eth0 entered promiscuous mode
[   24.707212] br-lan: port 1(eth0) entered blocking state
[   24.712583] br-lan: port 1(eth0) entered forwarding state
[   24.718271] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   25.700029] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[  127.609990] random: crng init done
[  139.310744] done.
[  139.312746] jffs2: notice: (910) jffs2_build_xattr_subsystem: complete building xattr subsystem, 0 of xd.
[  139.482265] overlayfs: upper fs does not support tmpfile.
[  260.278734] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  260.289546] br-lan: port 2(wlan0) entered blocking state
[  260.295035] br-lan: port 2(wlan0) entered disabled state
[  260.300785] device wlan0 entered promiscuous mode
[  260.318983] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready
[  260.325719] br-lan: port 2(wlan0) entered blocking state
[  260.331143] br-lan: port 2(wlan0) entered forwarding state
[  270.468795] device wlan0 left promiscuous mode
[  270.473491] br-lan: port 2(wlan0) entered disabled state
[  271.032798] IPv6: ADDRCONF(NETDEV_UP): wlan0: link is not ready
[  271.057355] br-lan: port 2(wlan0) entered blocking state
[  271.062828] br-lan: port 2(wlan0) entered disabled state
[  271.068570] device wlan0 entered promiscuous mode
[  271.073475] br-lan: port 2(wlan0) entered blocking state
[  271.078866] br-lan: port 2(wlan0) entered forwarding state
[  271.137618] IPv6: ADDRCONF(NETDEV_CHANGE): wlan0: link becomes ready