Skip to content

Instantly share code, notes, and snippets.

View networkextension's full-sized avatar
🎯
Focusing

abigt networkextension

🎯
Focusing
View GitHub Profile
@networkextension
networkextension / emag8180_serial_BMC.txt
Created March 22, 2023 04:39
emag8180_serial_BMC.txt
DRAM Init-V11-DDR4
0abc1-4Gb-Done
Read margin-DL:0.3980/DH:0.3882 CK (min:0.30)
U-Boot 2013.07 (Feb 22 2019 - 14:35:28)
I2C: ready
DRAM: 496 MiB
Flash: Found SPI Chip Winbond W25Q256(0x1940) 3-RD 0-WR
#include <stdio.h>
#include <linux/if_vlan.h>
#include <netinet/ether.h>
#include <stdlib.h>
#include <string.h>
#include <unistd.h>
#include <sys/socket.h>
#include <sys/mman.h>
#include <sys/ioctl.h>
#include <arpa/inet.h>
root@localhost:~# lspci -vvv -s 0001:01:00.0
0001:01:00.0 Network controller: Mellanox Technologies MT27500 Family [ConnectX-3]
Subsystem: Hewlett-Packard Company InfiniBand FDR/EN 10/40Gb Dual Port 544FLR-QSFP Adapter (Rev Cx)
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 120
Region 0: Memory at a040000000 (64-bit, non-prefetchable) [size=1M]
Region 2: Memory at a400000000 (64-bit, prefetchable) [size=32M]
Expansion ROM at a040100000 [disabled] [size=1M]
@networkextension
networkextension / r6300v2_auto_reboot.log
Created November 10, 2022 10:33
r6300v2_auto_reboot.log
noname ~ % sudo cu -s 115200 -l /dev/cu.usbserial-1130
Connected.
CFE for Foxconn Router R6300v2 version: v1.0.15
Build Date: Fri May 24 13:47:09 CST 2013
Init Arena
Init Devs.
Boot up from NAND flash...
Boot partition size = 262144(0x40000)
@networkextension
networkextension / ip_in_cidr.swift
Created October 29, 2022 03:50
find ip in ip cidr
func ipv4_StringToInt(_ value: String) -> UInt32? {
var addr = in_addr()
return inet_aton(value.cString(using: .ascii), &addr) != 0
? UInt32(addr.s_addr)
: nil
}
func ipv4_IntToString(_ value: UInt32) -> String {
let addr = in_addr(s_addr: value)
return String(cString:inet_ntoa(addr))
@networkextension
networkextension / love.md
Created September 14, 2022 02:34
love.md

Love

$${\color{white} In business efforts, touch the fireworks on the life of people, }$$

$${\color{white} constantly cognitive growing ~Support we move forward, always }$$

$${\color{white} a two-way to at the same time, the soul and economic independence. }$$

@networkextension
networkextension / boot.log
Created September 2, 2022 01:55
iBoot-1219.60.76 DEVELOPMENT
image 0xbff547e0: bdev 0xbff5e4e0 type SCAB offset 0x2000
image 0xbff76200: bdev 0xbff5e4e0 type ibot offset 0x4000 len 0x401f8
image 0xbff76280: bdev 0xbff5e4e0 type dtre offset 0x46000 len 0x106b8
image 0xbff76300: bdev 0xbff5e4e0 type logo offset 0x58000 len 0x52b8
image 0xbff76380: bdev 0xbff5e4e0 type bat0 offset 0x5e000 len 0xb178
image 0xbff76400: bdev 0xbff5e4e0 type bat1 offset 0x6a000 len 0x3cf8
image 0xbff76480: bdev 0xbff5e4e0 type glyC offset 0x70000 len 0xff8
image 0xbff76500: bdev 0xbff5e4e0 type chg0 offset 0x72000 len 0xbb8
image 0xbff76560: bdev 0xbff5e4e0 type chg1 offset 0x74000 len 0x3638
image 0xbff765c0: bdev 0xbff5e4e0 type glyP offset 0x78000 len 0xbb8
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>com.apple.AppleNVMeEAN.allow</key>
<true/>
<key>com.apple.CommCenter.fine-grained</key>
<array>
<string>spi</string>
<string>identity</string>
fio --loops=5 --size=1000m --filename=/mnt/fs/fiotest.tmp --stonewall --ioengine=libaio --direct=1 --name=Seqread --bs=1m --rw=read --name=Seqwrite --bs=1m --rw=write --name=512Kread --bs=512k --rw=randread --name=512Kwrite --bs=512k --rw=randwrite --name=4kQD32read --bs=4k --iodepth=32 --rw=randread --name=4kQD32write --bs=4k --iodepth=32 --rw=randwrite^C
dev@w510:~$ fio --loops=5 --size=1000m --filename=fiotest.tmp --stonewall --ioengine=libaio --direct=1 \
> --name=Seqread --bs=1m --rw=read \
> --name=Seqwrite --bs=1m --rw=write \
> --name=512Kread --bs=512k --rw=randread \
> --name=512Kwrite --bs=512k --rw=randwrite \
> --name=4kQD32read --bs=4k --iodepth=32 --rw=randread \
> --name=4kQD32write --bs=4k --iodepth=32 --rw=randwrite
Seqread: (g=0): rw=read, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=libaio, iodepth=1
Seqwrite: (g=1): rw=write, bs=(R) 1024KiB-1024KiB, (W) 1024KiB-1024KiB, (T) 1024KiB-1024KiB, ioengine=libaio, iodepth=1
3bbc3afa7664ae1b0dd533cae5952dfc