telnet

./configure –host=arm –disable-clients –disable-ipv6 –disable-ncurses CC=arm-himix200-linux-gcc

cp inetd /usr/sbin
cp telnetd /usr/sbin

vi /etc/inetd.conf /*此文件为inetd 的配置文件,加入要开启的服务*/
telnet stream tcp nowait root /usr/sbin/telnetd telnetd

mkdir /etc/inetd.d

执行 inetd -d
加上-d参数,程序以前台方式运行,并输出日志信息,调试时很方便

Related: mulege real estate craigslist, madewell swot analysis, why did jaime p gomez leave nash bridges, is newington edinburgh a good place to live, switchback filming locations, republican governors association meeting 2022, seneca east high school, homes for sale in pelican point gonzales, la, the rawlings company subrogation address, what to wear to a hot baseball game, bachelor apartment windsor kijiji, act of man halimbawa, jessica and christina psychic sisters, nrcs eqip payment rates 2022, how to get knockback 1000 stick in minecraft,Related: yugioh 5ds world championship 2011 cyber dragon deck, best jobs for adults with slow processing speed, tupperware jobs hemingway, sc, david shipley obituary, rodney dangerfield heart attack tonight show, houses for rent in san diego under $1,000, whitney cummings podcast benton, what does the name asha mean in the bible, senator james clayborne south carolina, all nations church matthew stevenson, samoan girl names, rittany dancing dolls net worth, little stoke sort it centre, florida man december 18, 2005, did richard m daley remarry,Related: superpowers associated with colors, nhl 22 expansion draft best players, do gas stations sell maple syrup, chester, south carolina obituary, what happens to a private mortgage when the lender dies, stabbing in mitcham today, chevy trax dash light car with lock, la sonora dinamita concert, black country dialect translator, custom peterbilt headliner, intoxalock tips tricks, shark robot vacuum error 2 obstruction, solstice outdoorsman 12000 motor mount, cedar point corkscrew death, liberty german funeral scarf,Related: mobile homes for sale in stagecoach, nv, verizon vaccine mandate, what does the name carter mean in hebrew, signs of approaching death from glioblastoma, ronner williams age, parore fish legal size, property onesite realpage resident portal, john t fuller & associates, sks stocks with spike bayonet cut, dr hammoud endocrinologist, ksua hangar space, kwik trip driving jobs, homes for rent by owner in wallingford, ct, susan richardson obituary, evil ways to get revenge on someone,Related: cardinals front office, 1914 mini mercury dime, there’s a skeeter on my peter yes dear, remington 7400 243 twist rate, where is the settings button on my spectrum remote, aruba airline tickets, slendytubbies 3 gamejolt, indigiearth skincare, how many countries does tesco operate in, neighbourhood festival 2022 manchester, downtown houston apartments under $1,000, put neutralizer on before perm solution, hannah shapiro survivor wedding, is reese’s outrageous discontinued, how much is a guinea worth in us dollars,Related: mclaughlin undertakers dungiven death notices, gametime fnf character test, saugus police accident report, wild kratts animal names, how to beat a fleeing and eluding charge, leroy raffel obituary, how to read cloverhill expiration date, five benefits of the new covenant, news channel 3 weatherman, burbank police department inmate search, is neil cavuto in a wheelchair 2020, bedford, nh fire department log, rockin r ranch palmer texas, palace theatre albany seating view, misty harris illness,Related: odeon nuneaton silver screen, bonneville salt flats speed week 2022 tickets, married dr elizabeth yardley husband, hialeah zip codes map, distal biceps tendon repair cpt code, celebration pointe gainesville, yokozuna best matches, excellus bcbs financial statements, g gordon liddy son navy seal, is tom clarkson related to jeremy, ranchos de venta en stockton, ca, cerritos youth basketball club, dekalb county police department tucker, general mills severance package, jackson funeral home tampa obituaries,Related: scott barry fashion designer, baumgartner funeral home, chipmunk 22 pistol, leewood golf club membership cost, black mountain school of natural healing, robin arzon marathon results, lds relief society birthday gift ideas, how to change text size on tiktok, love’s rewards add receipt, melody cristea age, barclays center seat numbers, david jefferies injuries, which of the following is true about algorithms quizlet psychology, oliver sykes daughter, charlotte weather forecast,Related: how many vietnam veterans are still alive in 2021, can a felon have a knife in nebraska, montgomery county election endorsements, lamar county grand jury indictments 2022, zodiac signs act around their crush, agnes hailstone daughters, arthur dantchik net worth, amos decker is he black, facts about distance in science, lewisham hospital accommodation for staff, que contestar cuando te dicen chaparrita, dwayne the rock johnson official website, missouri teacher salaries by name, why do my eyelids burn when i apply moisturizer, macho man miss elizabeth funeral,Related: naruto neglected by family runs away fanfiction, analogy for overcoming obstacles, azur lane medal of honor farm, bridge of nose hurts covid, nyc taxi medallion for sale 2021, celebrities who died from seizures, why are my messenger messages purple, lighting catalogs for 2020 design, we’ve been texting everyday for a month, abc nightlife duchess of dubbo, tua tagovailoa endorsements, heidi brevet oakland, ca obituary, lisandro martinez transfer oddschecker, city of chicago department of finance utility billing, pleasant city ohio from my location,Related: wabi channel 5 news bangor me, was charles nelson reilly married to liz, plane crash beaufort sc 1955, jim o’brien daughter, harlequins rugby camps 2022, washington university football record, badminton court penang, which sentence has captions broken at logical places rev, highest playoff win percentage nba player, sacramento radio contests, claire smith monash, munich agreement cartoon analysis, psychological facts about crying left eye, johnny michael allen autopsy, columbus, ga shooting,Related: brian mcgee anchorage, problems with titanium rods in back, meldon reservoir to high willhays, john boy and billy cancelled, my husband resents my chronic illness, justin thomas trackman numbers, who owns balistreri’s pizza on 68th, florida death row inmates photo gallery, oxford, ma obituaries, 1992 syracuse lacrosse roster, directions to north springs marta station, microbiology: an evolving science 5th edition ebook, mcnab puppies for sale in washington, walnut creek country club south lyon membership fees, nc association of realtors residential lease agreement,Related: local man paralyzed after eating 413 chicken nuggets, lake county obituaries, keep seeing 33 and 333, why did judy stab allie in wentworth, is buster edwards wife june still alive, atreus voice actor aang, nicknames for ciara, midge 1962 barbie 1958 by mattel inc patented, clam digging in galveston texas, schaumburg dmv schedule appointment, grendel finally shows fear when, weeki wachee mermaid show 2022, shatterbelt region ap human geography, jagjit singh son death photos, what is juan martinez doing now,Related: jim courier family photos, robert cabal net worth, chris taylor blown glass, billy bishop airport covid testing, johnny carson’s granddaughter, alabama volleyball: schedule 2022, prince william of gloucester plane crash cause, sixfields stadium usa, lake george depth map, empress wu primary sources, mcdowell county, nc mugshots, ruby’s pantry schedule, lily armstrong curtis, rdr2 how to dodge melee, uc davis economics major,Related: how to display google maps on car screen, how to read white claw expiration date code, average infield velocity by age, liborio bellomo new rochelle ny, costo operazione menisco clinica privata, shipley family houston, car accident waltham, ma today, micki nolan obituary, veneno’s three funerals, tina childress dillon, bank of america stadium covid policy concerts, which country is known as the land of tulips, erie frost softball tournament, stone brick wall hypixel skyblock, capital university football coach fired,Related: mixed doubles curling olympics 2022 standings, who killed kirby in bones, hoover high school class of 1997, clare stoner hume biography, how to change zotac gpu color, power bi multiply column by measure, briggs beach ri membership, rose and quesenberry funeral home, beckley, wv obits, lawful and unlawful orders, zealsound microphone drivers, travel document number used at last arrival, carscan 3013 codes, musk foundation grant application, , empoleon nicknames,Related: houses for sale whitchurch, cardiff, current picture of kc and the sunshine band, principal diagnosis quizlet, inbred horse problems, can i use otomize ear spray on my dog, department of developmental services community care facility rates 2022, pinched nerve causing numbness on right side of body, friends who aren’t happy for your success, d billions girl name, verge ausberry resigns, resurrection potion terraria calamity, mshda payment standards 2021, nottingham police alex belfield, wattisham airfield address postcode, heavy period after failed iui,Related: who toxicity grading scale adverse events, right lane ends merge left rules, big rock swimming hole santa cruz, ted kaczynski 2019, sunset funeral home northport, al, recent fatal car accident in orlando florida yesterday, haflinger horses for sale in kansas, tycely williams husband, damon stoudamire cousin, george graham obituary, michael maxwell coma, zeno’s paradox solution, playbook urgent team login, karen wright obituary, evan post rochester nh dead,Related: galveston county arrests, what to wear in europe in june, patricia marcil ortiz, chicago police helmet, bulldog vault replacement key, grafting frame holder, what happened to sir timothy in lark rise, carle dermatology on windsor, original pancake house mushroom omelette recipe, fire department new member checklist, ice sickle or icicle, california rent control disclosure, catherine murphy abc irish, mobile homes for rent in richland, wa, salyards middle school football,Related: casetify promo code bailey sarian, pasadena tx obituaries 2021, flemington nj police blotter, herb sandker biography, account nintendo com login device, atlanta gymnastics meet 2022, can boric acid stop your period, barometric pressure and wind speed chart, mod 4 british army survival knife, get expiry date from jwt token c#, poe maps with multiple bosses, iranian solicitor in manchester, caliber collision wiki, cook house italian style simmer sauce marsala, sequoyah high school basketball schedule,Related: merrick credit card application, alaska avalanche fatality, wyoming trespass fee antelope hunts, does harris faulkner have cancer, what happened to joey pants on wmmq, hughes county sheriff, ruger mark iv rear sight, battle of the bands 2022 san antonio, hanes barely there vs little color, michigan blasters softball, who was vicki stubing’s mother, ohsu badge office hours, the california real estate commissioner is appointed by, 6d carbon fiber vinyl wrap, uncle kracker tour manager,Related: the hierophant and the lovers combination, dylan hunt sheesh net worth, pros and cons of larch decking, metlife dental fee schedule 2020 for providers, 4 bloques del proceso de cambio cozijnsen, pure country little white speck, is cheech and chong still alive, what is the next festival in prodigy, can lmhc diagnose in florida, psi fingerprinting baton rouge, , replacements, ltd return policy, crossroads school college matriculation, was fidel castro parents italian, 54th engineer battalion wildflecken germany,Related: mahjong solitaire arkadium, tyler bingham prisoner, affirm training manager salary, how to get the celestial armor in prodigy, shipwreck coins for sale florida, , ch robinson load board for box trucks, jackie lawrence cards login uk, st francis catholic church mass schedule, abandoned places in folkestone, dunedin high school baseball coach fired, engaged columns egypt, volvox globator classification, hellofresh chicken parmesan spaghetti, spring break new jersey 2021,Related: lake homes for sale by owner in alabama, benj cave and hazal, italian names in new york, hyper tough automotive code reader ht100, madden packs simulator, where to get a pet snail, what to say to an estranged, dying parent, used porsche panamera under 20k, council properties to rent in bromyard, is shirley jones still alive from the partridge family, pil pil nyc reservations, what drugs are legal in canada 2022, was fidel castro parents italian, las vegas to california border checkpoint, charles huff wife jessica,Related: caleb mclaughlin meet and greet nobody came, ford wreckers penrith, where is brian encinia now 2020, linda goodwin obituary, lauren levian, christine remake 2022 cast, coupe singapore recipe, david loca accusations, thomas merton prayer of abandonment, maling af glasfiber indvendig, sally frei obituary, funerals in liverpool today, emerson glazer beverly hills, mcdonald’s sausage beef, cabins for sale in newport tennessee,Related: what is the falling action of the breakfast club, if you surrender a cat can you adopt again, dallas cowboys score by quarter today, bodies found with missing organs 2020, when will i hear back from tapif, python intersection of two lists, paul sullivan obituary st george utah, george clooney sister disabled, , how old is mary saban, town of berthoud building department, lake geneva country club membership cost, german nobility family names, paleto bay police station interior fivem, best mana accessories terraria calamity,Related: arizona governor election 2022 polls, did cheryl casone have a stroke, ludwig merch password, turner field location, how to equip mummy wraps in rust, wfaa staff changes, jessamine county busted mugshots, ualbany lecture center map, inches to radians calculator, sclaressence for cramps, 1991 d dime errors, ronnie rivers, fresno state nfl draft, muhammad ali house chicago, dan word crossword solver sunday times, marcos gold deposit in switzerland,Related: randall watts new orleans, diptyque philosykos shampoo and conditioner, papillon breeders in georgia, yardley commons condominium, single family homes for rent florence, al, genesis hernando ocampo, erc20 wallet address example, are clorox pool chemicals good, dendy engelman husband, in 1919 the red scare in the united states quizlet, tennessee baseball roster with pictures, what do you say when receiving ashes on ash wednesday, what kind of sharks in fort myers beach, pomegranate blossom tattoo, ian alexander before transition,Related: ka akureyri valur reykjavik prediction, 2022 score football checklist, cleive and candy adams, jim baxter sits on ball, what characteristic make these similar in terms of structure, williams advanced engineering salary, molkerei asylum denver, cerama bryte cooktop cleaner ingredients, donkey singing all by myself quarantine, iran awakening sparknotes, oath or affirmation of citizenship form cit 0049, fettes college university destinations, santa cruz midtown fridays, jesters southampton worst nightclub, crazylegs rowena,Related: best air force bases for fire protection, regional manager heartland dental salary, elixir sofa harveys, police incident in walthamstow today, spx to spy conversion calculator, how many years between adam and moses, dunkin liquid sugar, taylor digital scale 7433 manual, cone rod dystrophy diagnosis, sonia deol leaves global news, trolls tickle fanfic, woolworth building medford oregon, are autopsy reports public record in florida, madam secretary stevie and dmitri, anz stadium best seats for concert,Related: jacks creek bbq sauce recipe, james hewitt funeral, anoka county employment verification, are simon baker and robin tunney still friends, what is antonella nester from qvc doing now, lindsey management golf courses, is there school on columbus day in illinois, brenda wilson george rogers, fruta o verdura de color gris, recteq bullseye deluxe, car accident crystal lake, il today, restaurant impossible pittsburgh, 2022 rose parade bands, gravity falls avatars vrchat, demande manuscrite pdf,Related: how far is baker nevada from las vegas, canterbury townhomes hoa, pamela gregg foxworthy louisiana, mini cooper check engine light car shaking, minecraft op sword command bedrock, new york state office of professional discipline, usd 501 staff directory, the paseo wedding cost, dequeen police report, university of san diego softball coaches, 55 gallon drum apple cider vinegar, siesta key cast net worth 2021, shooting on oakland park blvd today, traits of an emotionally draining person quotes, how much tordon per gallon of water,Related: beach volleyball tournaments florida 2022, who does colin bridgerton marry, synchrony home retailers, first baptist orlando pastor salary, raw brisket left out overnight, duck creek apartments, andreas greiner nicole fosse, bernalillo county commission district 4, columbus country club membership cost, new homes in virginia under $300k, lasa high school student death, dougherty dozen how do they afford, silver dollar city secrets, northwell health physician partners medicine at woodbury, kevin frazier son tony tull,Related: fred jackson house ankeny, iowa, allen iverson high school football teammates, matt lanter political views, prairie du chien correctional institution inmate list, carl martin shai, rate my professor uncc, joe and esther ripa, paul ackland death, evaluate the strengths and weakness of specialist communication systems, is severance pay considered earned income, texas tech rodeo coach, uk literary agents accepting submissions 2022, extreme makeover: home edition updates on families, does livonia require a certificate of occupancy, yakov smirnoff wife,

wpa

参考:https://blog.csdn.net/u011003120/article/details/90175648

2 libnl编译
2.1 下载
下载链接:
http://www.linuxfromscratch.org/blfs/view/svn/basicnet/libnl.html

2.2 编译
解压进入主目录,使用如下命令编译:

#mkdir _install
#./configure –host=arm-himix200-linux –prefix=/home/leon/Workspace/opensshd/output
#make
#make install

3 wpa_supplicant
3.1 下载
下载链接:http://w1.fi/releases/
http://w1.fi/releases/wpa_supplicant-2.9.tar.gz

3.2 编译
解压并进入主目录
使用如下命令编译

#cd wpa_supplicant/
#cp defconfig .config

CFLAGS += -I/home/leon/Workspace/opensshd/output/include/
LIBS += -L/home/leon/Workspace/opensshd/output/lib
CFLAGS += -I/home/leon/Workspace/opensshd/output/include/libnl3
LIBS += -L/home/leon/Workspace/opensshd/output/lib

make CC=arm-himix200-linux-gcc

出现:
Package libnl-3.0 was not found in the pkg-config search path

mkdir -p /data/misc/wifi
./wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -O/data/misc/wifi/sockets &

如果出现以下问错误,是因为内核RFKILL选项没有打开

rfkill: Cannot open RFKILL control device
D/wpa_supplicant( 1152): nl80211: RFKILL status not available

在内核目录make menuconfig
networking support–>
RF switch subsystem support–>
<>GPIO RFKILL driver
打开后重新编译烧录内核即可

获取wifi状态
wpa_cli status -iwlan0 -p/data/misc/wifi/sockets

bssid=e4:95:6e:40:34:4c
freq=2462
ssid=OCEIOT
id=1
mode=station
pairwise_cipher=CCMP
group_cipher=CCMP
key_mgmt=WPA2-PSK
wpa_state=COMPLETED
ip_address=192.168.8.225
address=08:ea:40:fc:38:a5

断开连接
wpa_cli disconnect -iwlan0 -p/data/misc/wifi/sockets
重新连接
wpa_cli reconnect -iwlan0 -p/data/misc/wifi/sockets

#!/bin/sh

#ifconfig eth0 up

#udhcpc

export LD_LIBRARY_PATH=’/usr/local/lib:/usr/lib’

insmod /komod/mt7601u.ko

export

sleep 1

wpa_supplicant -Dnl80211 -iwlan0 -c/etc/wpa_supplicant/wpa_supplicant.conf -O/data/misc/wifi/sockets &

sleep 2

count=1
while true
do
cmdRet=`wpa_cli status -iwlan0 -p/data/misc/wifi/sockets | grep wpa_state`
cmdRet=${cmdRet:10}

echo $cmdRet

#count=$(($count+1));
let count++
if [ $count -gt 10 ];then
break;
elif [ “$cmdRet” = “COMPLETED” ];then
echo “wifi connected!”;
break;
fi
sleep 1
done

mount /dev/mmcblk0p1 /mnt/sd/

if [ “$cmdRet” = “COMPLETED” ];then
udhcpc -i wlan0
cmdRet=`ifconfig wlan0 | grep “inet addr”`
echo $cmdRet
if [ -n “$cmdRet” ];then
mount -t nfs -o nolock 192.168.8.200:/media/server_disk/nfs /mnt/nfs
else
echo “failed to get ip”
fi
fi

HI3516备份Flash

(dd if=/dev/mtd0; dd if=/dev/mtd1; dd if=/dev/mtd2; dd if=/dev/mtd3; dd if=/dev/mtd4; dd if=/dev/mtd5) > /mnt/sd/hisi_flash.bin

(dd if=/dev/mtd0; dd if=/dev/mtd1; dd if=/dev/mtd2) > /mnt/sd/hisi_flash.bin

(dd if=/dev/mtd0; dd if=/dev/mtd1; dd if=/dev/mtd2) > /mnt/nfs/hisi_flash.binRelated: sarpy county assessor gis property search, snejana jens before surgery, what happens if a teacher gets a dui, cochise steele burrows, atlantic mills grand rapids, mi, marie from cartel crew goes to jail, dandy nicholls cause of death, bertha rogers well, list of doctors at etobicoke medical centre, edsby regina public schools, lab day 6: solubility behavior of various organic compounds, stouffer’s meatloaf copycat recipe, town of wells maine new building permits, marie and bruce monologue, ultraviolet node replit,Related: describe two features of stretcher bearers, security forces brevity codes, mercedes benz gear shifter 2021, jump around royalties, tweaked apps without verification, rp33 sonar manual pdf, pierre edwards parents, land of confusion drinking game, dog friendly walks glasshouse mountains, is bo hopkins related to anthony hopkins, , manger avec un ami murphy harry potter, pete beale yamaha, viral video of man jumping off roof, why did charlotte tilbury discontinue magic foundation,Related: who played grady in catch and release, soundcloud image resizer, toothpaste face mask benefits, journal entry for purchasing equipment with note payable, james sterling shawn williams, scott corrigan name change, atlantic, iowa funeral announcements, does ammonia repel snakes, cfs relapse after covid vaccine, earhart expressway ambush, traditional mexican furniture manufacturers in guadalajara mexico, david wilson homes upgrade packages, protected birds in tennessee, guilford county elections 2022, coriolanus snow family tree,Related: how old was queen esther when she died, midheaven in pisces 10th house, why can’t i find rold gold pretzel rods, venezuela crime rate by year, silly podcast names, jackson public schools job application, 4 bedroom house for rent in lewistown, pa, figwort magical properties, how to make maple syrup candle, craig gibson folbigg now, stocks with weekly options under $20, chuck yeager death covid, how to fix dried out magnetic eyeliner, music education conferences 2022, syracuse, ny obituaries this past week,Related: is gabapentin a controlled substance in oregon, old celebrities still alive 2022, how long do elf bars take to charge, cid warrant officer requirements, brannon family murders, abandoned places in medford oregon, harris wedding hashtag, abigail morgan sellers barnett, has anyone received a 4464c letter, are william and harold castro brothers, brian peters obituary nahant, mobile homes for rent wilson county, nc, legend of legaia gameshark codes quick level up, sol pelicanos email address, daryl ann denner net worth,Related: culture bound crime examples, signos que dominan a otros signos, may allah protect us in arabic, list of ofac general licenses, charles sebastian houseman, is sophie ecclestone related to bernie, miss truth ending explained, leonard lake and charles ng videos, spiritual jobs remote, ludwig and qtcinderella, france sworn statement covid, river trails school district 26 salary schedule, what size shed requires a permit in florida, data togel taiwan sahabat4d, dad when are you coming back with the milk it’s been 4 months text,Related: chase hudson girlfriend, barnett funeral home obits, jess harnell wife age, all the light we cannot see ending explained, does valdosta state accept florida bright futures, oceanside unified school district superintendent, north yorkshire coroners inquests, mmo champion guild recruitment, how to use smoker on dcs grill, ruston high school football state championships, prolific prep basketball players, hardy williams obituary, madison county dump jackson, tn, snap jacket piling for sale, duggar grandchildren in heaven,

交叉编译NTP

下载源代码
wget https://www.eecis.udel.edu/\~ntp/ntp_spool//ntp4/ntp-4.2/ntp-4.2.8p15.tar.gz

配置静态编译
./configure –prefix=/media/server_disk/nfs/ntp/output –host=arm-linux-gnueabi CC=arm-himix200-linux-gcc –enable-static –with-yielding-select=no –with-openssl-incdir=/home/leon/Workspace/opensshd/output/include/openssl –with-openssl-libdir=/home/leon/Workspace/opensshd/output/lib

make

make install

在output/bin文件夹找到ntpdate文件,拷贝到目标板,

首先确定目标板可正常联网,比如ping baidu.com可以ping通,然后

执行:ntpdate stdtime.gov.hk
或者:ntpdate time.nist.gov
成功获取时间
Dec 02:14:43 ntpdate[910]: adjust time server 223.255.185.2 offset -0.001138 sec
使用date命令检查系统时间,发现时区不对

从别的机器上拷贝/usr/localtime 文件到目标板
再运行 date -R查看:
Thu, 03 Dec 2020 10:34:48 +0800

大功造成

Makefile

cc = arm-himix200-linux-gcc
prom = psdk_com
deps = $(shell find ./ -name “*.h”)
src = $(shell find ./ -name “*.c”)
obj = $(src:%.c=%.o)

root_dir = $(shell pwd)

ccflags = -lpthread -I$(root_dir)

$(prom): $(obj)
$(cc) $(ccflags) -o $(prom) $(obj)

%.o: %.c $(deps)
$(cc) $(ccflags) -c $< -o $@ clean: rm -rf $(obj) $(prom)

串口文件传输协议

所有数据以小端模式传输,字符串为UTF8编码

报文格式定义
命令 长度 数据 校验
uint8 uint8 uint16 uint8[] uint16
0xAA 见命令定义 后面数据段的长度0~65535 数据内容,字节数组 标准modbusCRC16校验
基础命令定义
命令名称 命令值 数据内容 数据长度 响应命令 响应内容 响应长度 备注
握手 0x01 0xAA 0xBB 0xCC 0xDD 固定长度4 0x81 0xAA 0xBB 0xCC 0xDD 固定长度4
时间同步 0x10 unix时间戳(uint32) 固定长度4 0x90 成功返回1,失败返回0(uint8) 固定长度1 此命令一般由主机每秒发一次,可以回复,也可以不回复
文件命令定义
命令名称 命令值 数据内容 数据长度 响应命令 响应内容 响应长度 备注
打开文件 0x02 完整的文件路径,字符串形式 字符串长度 0x82 文件描述符,sint32,<0表示打开失败 固定长度4 以读写方式打开文件,文件不存在则返回-1
读取文件 0x03 文件描述符(sint32)+读取位置(uint32)+读取数据最大长度(uint16) 固定长度10 0x83 实际数据长度(uint16)+数据内容 2+数据长度
创建文件 0x04 完整的文件路径,字符串形式 字符串长度 0x84 文件描述符,sint32,<0表示创建失败 固定长度4 文件存在则以读方式直接打开,不存在则创建
写入文件 0x05 文件描述符(sint32)+写入数据长度(uint16)+写入数据 6+数据长度 0x85 实际写入数据长度(uint16) 固定长度2 以追加方式写入
删除文件 0x06 完整的文件路径,字符串形式 字符串长度 0x86 uint8,1代表成功,0代表失败 固定长度1
关闭文件 0x07 文件描述符(sint32) 固定长度4 0x87 uint8,1代表成功,0代表失败 固定长度1
获取文件信息 0x08 完整的文件路径,字符串形式 字符串长度 0x88 文件是否可用(uint8)+文件大小(uint32)+创建时间戳(uint32)+修改时间戳(uint32) 固定长度13 如果文件不可用,则其他信息无效
控制命令定义
命令名称 命令值 数据内容 数据长度 响应命令 响应内容 响应长度 备注
通道触发指令 0x11 通道(uint8)+触发序号(uint32),每位代表一个通道 固定长度1 0x91 返回(uint8),成功相应通道置1,失败为置0 固定长度1 此命令必须回复,执行失败则主机会重发
反馈事件上报 0x12 事件个数(uint8)+[触发序号(uint32)+反馈通道(uint8)+反馈时间(uint32)] 1+事件个数*5 0x92 成功返回1,失败返回0(uint8) 固定长度1 此命令必须回复,执行失败需要重发
云台控制 0x13 待定 待定 0x93 待定 待定 此命令必须回复,执行失败需要重发

linux nfs

服务端:
安装
sudo apt-get install nfs-kernel-server # 安装 NFS服务器端
sudo apt-get install nfs-common # 安装 NFS客户端

修改
sudo vim /etc/exports
如下:
/media/server_disk/nfs *(rw,sync,no_root_squash,no_subtree_check)

客户端:
mount -t nfs 192.168.8.200:/media/server_disk/nfs /mnt/nfs

由于ubuntu上mount -tcifs 必须使用sudo,挂载后目录属于root,其他用户无写入权限
可以挂载指定用户来解决:
sudo mount -t cifs //192.168.8.200/OfficeServer ./OfficeServer -o username=leon,password=123456,uid=1000,gid=1000

HI3516EV300 开启串口1和串口2

参考:https://blog.csdn.net/sbddbfm/article/details/100883650
SDK默认只打开了uart0,但我实际上要用三个串口。
ls /dev/ttyAMA*可以看到:
/dev/ttyAMA0 /dev/ttyAMA1
看实际只有ttyAMA0可以用,也就是上电默认的终端
使用echo测试:
~ # echo 123 > /dev/ttyAMA0
123

~ # echo 123 > /dev/ttyAMA1
can not create file:/dev/ttyAMA1

首先看内核配置文件arch/arm/boot/dts/hi3516ev300.dtsi:
uart0: uart@12040000 {
compatible = “arm,pl011”, “arm,primecell”;
reg = <0x12040000 0x1000>;
interrupts = <0 7 4>;
clocks = <&clock HI3516EV300_UART0_CLK>;
clock-names = “apb_pclk”;
status = “disabled”;
};

uart1: uart@12041000 {
compatible = “arm,pl011”, “arm,primecell”;
reg = <0x12041000 0x1000>;
interrupts = <0 8 4>;
clocks = <&clock HI3516EV300_UART1_CLK>;
clock-names = “apb_pclk”;
status = “disabled”;
};

uart2: uart@12042000 {
compatible = “arm,pl011”, “arm,primecell”;
reg = <0x12042000 0x1000>;
interrupts = <0 9 4>;
clocks = <&clock HI3516EV300_UART2_CLK>;
clock-names = “apb_pclk”;
status = “disabled”;
};
可见是有个串口的,但都是disable的状态,其实起作用的是另一个文件: arch/arm/boot/dts/hi3516ev300-demb.dts:
&uart0 {
status = “okay”;
};
所以再copy两份就可以了,在下面添加:
&uart1 {
status = “okay”;
};
&uart2 {
status = “okay”;
};
重新编译内核,下载到目标板,启动后ls /dev/ttyAMA*可以看到:
/dev/ttyAMA0 /dev/ttyAMA1 /dev/ttyAMA2
echo测试都可以成功,但与实际串口相连的设备没有收到数据,查资料得知,还得配置引脚复用寄存器。

使用hisi工具btools,具体使用方法可参考另一文章:

我的板子串口发送接在E1脚
查文档如下:

默认值为0x1E00,应该修改为0x1E04
使用himd.l读取寄存器的值:
~ # himd.l 0x120C0014
*** Board tools : ver0.0.1_20121120 ***
[debug]: {source/utils/cmdshell.c:168}cmdstr:himd.l
====dump memory 0x120C0014====
0000: 00001e00 00001d00 00001400 00001d00
0010: 00000000 00000000 00000000 00000000
0020: 00000000 00000000 00000000 00000000
0030: 00000000 00000000 00000000 00000000
0040: 00000000 00000000 00000000 00000000
0050: 00000000 00000000 00000000 00000000
0060: 00000000 00000000 00000000 00000000
0070: 00000000 00000000 00000000 00000000
0080: 00000000 00000000 00000000 00000000
0090: 00000000 00000000 00000000 00000000
00a0: 00000000 00000000 00000000 00000000
00b0: 00000000 00000000 00000000 00000000
00c0: 00000000 00000000 00000000 00000000
00d0: 00000000 00000000 00000000 00000000
00e0: 00000000 00000000 00000000 00000000
00f0: 00000000 00000000 00000000 00000000
[END]
寄存器的值还是默认值,修改它:
~ # himm 0x120C0014 0x00001e04
*** Board tools : ver0.0.1_20121120 ***
[debug]: {source/utils/cmdshell.c:168}cmdstr:himm
0x120C0014: 0x00001E00 –> 0x00001E04
[END]

再次echo测试:
~ # echo 123 > /dev/ttyAMA2
不成功,为什么呢?收发接反了!!!再次尝试,乱码,波特率不对,初始波特率是9600

UART1&UART2引脚复用寄存器
信号 UART1_TXD UART1_RXD UART2_TXD UART2_RXD
引脚 F17 F16 E1 D2
寄存器地址 0x100C000C 0x100C0010 0x120C0014 0x120C0010
寄存器初始值 0x1000 0x1000 0x1E00 0x1E00
寄存器设定值 0x1002 0x1002 0x1E04 0x1E04

hisi btools

1、编译
进入Hi3516EV200_SDK_V1.0.0.2/osdrv/tools/board/reg-tools-1.0.0
修改Makefile中的目标芯片的目标编译器,我的是3516EV300,对应编译器是himix200
ifndef CHIP
CHIP = hi3516ev300
endif

ifndef OSDRV_CROSS
OSDRV_CROSS ?= arm-himix200-linux
endif
保存直接make即可在bin文件夹下生成btools文件和几个软件连接
2、拷贝
把生成的btools文件拷贝到目标板,我放在sbin目录下了
3、软连接
以下是手工生成,太笨了,搞完才发现,可以自动
~ # ln -s /sbin/btools /sbin/himc
~ # ln -s /sbin/btools /sbin/himd
~ # ln -s /sbin/btools /sbin/himd.l
~ # ln -s /sbin/btools /sbin/himm
~ # ln -s /sbin/btools /sbin/hivd
~ # ln -s /sbin/btools /sbin/himdb
~ # ln -s /sbin/btools /sbin/hiddrs
~ # ln -s /sbin/btools /sbin/i2c_read
~ # ln -s /sbin/btools /sbin/i2c_write
~ # ln -s /sbin/btools /sbin/ssp_read
~ # ln -s /sbin/btools /sbin/ssp_write
自动生成命令:
进入/sbin目录,执行:btools -i
4、使用
himc : memory clear
himd : memory display (8bit)
himd.l : memory display (32bit)
himm : memory modify
hivd : video dump
himdb : video dump
hiddrs : ddr statistic
i2c_read : i2c device read
i2c_write : i2c device read
ssp_read : ssp device read
ssp_write : ssp device read

以下是修改E1引脚的复用功能为UART2_TXD
himd.l 0x120C0014
*** Board tools : ver0.0.1_20121120 ***
[debug]: {source/utils/cmdshell.c:168}cmdstr:himd.l
====dump memory 0x120C0014====
0000: 00001e00 00001d00 00001400 00001d00
0010: 00000000 00000000 00000000 00000000
0020: 00000000 00000000 00000000 00000000
0030: 00000000 00000000 00000000 00000000
0040: 00000000 00000000 00000000 00000000
0050: 00000000 00000000 00000000 00000000
0060: 00000000 00000000 00000000 00000000
0070: 00000000 00000000 00000000 00000000
0080: 00000000 00000000 00000000 00000000
0090: 00000000 00000000 00000000 00000000
00a0: 00000000 00000000 00000000 00000000
00b0: 00000000 00000000 00000000 00000000
00c0: 00000000 00000000 00000000 00000000
00d0: 00000000 00000000 00000000 00000000
00e0: 00000000 00000000 00000000 00000000
00f0: 00000000 00000000 00000000 00000000
[END]

himm 0x120C0014 0x00001e04
*** Board tools : ver0.0.1_20121120 ***
[debug]: {source/utils/cmdshell.c:168}cmdstr:himm
0x120C0014: 0x00001E00 –> 0x00001E04
[END]

HI3516EV300编译环境搭建(三)

单独编译U-boot
注意:发布包默认按照DMEB板的配置发布,如果客户单板和DEMB板不一致,需要根据客户自己的单板环境修改uboot表格才能使用,否则可能导致uboot无法启动或者其他问题。

待进入boot源代码目录后,执行以下操作
make ARCH=arm CROSS_COMPILE=arm-himix100-linux- hi3516ev300_defconfig
(emmc启动时执行如下操作:make ARCH=arm CROSS_COMPILE=arm-himix200-linux- hi3516ev300_emmc_defconfig)

make ARCH=arm CROSS_COMPILE=arm-himix100-linux- -j 20

make -C ../../../tools/pc/hi_gzip

cp ../../../tools/pc/hi_gzip/bin/gzip arch/arm/cpu/armv7/hi3516ev200/hw_compressed/ -rf

Windowns下进入到osdrv/tools/pc/uboot_tools/目录下打开对应单板的Excel文件,在main标签中点击”Generate reg bin file”按钮,生成reg_info.bin即为对应平台的表格文件。
从osdrv/tools/pc/uboot_tools目录拷贝reg_info.bin到boot源代码目录,重命名为.reg
cp ../../../tools/pc/uboot_tools/reg_info.bin .reg

make ARCH=arm CROSS_COMPILE=arm-himix200-linux- u-boot-z.bin

opensource/uboot/u-boot-2016.11下生成的u-boot-hi3516ev300.bin即为可用的u-boot镜像