Cov txheej txheem:

Kev Nkag Mus Rau Cov Hauv Paus Cov Hauv Paus Cov Ntaub Ntawv Siv DB410 Raws Li Ethernet Dongle: 6 Cov Kauj Ruam
Kev Nkag Mus Rau Cov Hauv Paus Cov Hauv Paus Cov Ntaub Ntawv Siv DB410 Raws Li Ethernet Dongle: 6 Cov Kauj Ruam

Video: Kev Nkag Mus Rau Cov Hauv Paus Cov Hauv Paus Cov Ntaub Ntawv Siv DB410 Raws Li Ethernet Dongle: 6 Cov Kauj Ruam

Video: Kev Nkag Mus Rau Cov Hauv Paus Cov Hauv Paus Cov Ntaub Ntawv Siv DB410 Raws Li Ethernet Dongle: 6 Cov Kauj Ruam
Video: Saib Mis paub Poj niam (hluas nkauj) tus yam ntxwv lub siab 2024, Hlis ntuj nqeg
Anonim
Kev Nkag Mus Rau Cov Hauv Paus Cov Hauv Paus Cov Ntaub Ntawv Siv DB410 Raws Li Ethernet Dongle
Kev Nkag Mus Rau Cov Hauv Paus Cov Hauv Paus Cov Ntaub Ntawv Siv DB410 Raws Li Ethernet Dongle

Lub Hom Phiaj:

  • Nruab toolchain thiab rov ua dua cov ntsiav tshuaj rau ntxig USB Ethernet CDC Gadget txhawb nqa;
  • Rov tsim boot.img los ntawm Linaro rau khau raj USB Ethernet CDC;
  • Tsim NFS server los tuav lub hauv paus cov ntaub ntawv system;
  • IP teeb tsa hauv DEVICE thiab HOST.

Kauj ruam 1: Cov kev xav tau

Koj yuav xav tau cov hauv qab no:

  1. DragonBoard ™ 410c (lub npe no NTAWV);
  2. Ib lub PC siv Ubuntu 16.04.3 hloov kho tshiab (lub npe no HOST) nrog internet txuas thiab SDCard qhov;
  3. Kev teeb tsa huv ntawm Linaro -tus tsim tawm 431 - Txuas: Snapshot Linaro Debian v431
  4. HDMI saib;
  5. USB keyboard;
  6. A 8Gb SDCard;
  7. USB cable, uUSB USB txhawm rau txuas DEVICE ntawm HOST.

Kauj Ruam 2: Kho Tus Kheej kom Tsim Kernel thiab Tsim Kernel hauv HOST

Ua ntej, peb yuav tsim txhua phau ntawv ua ntej mus txuas ntxiv. Yog li:

$ cd ~ ib

$ mkdir db410remoteroot $ cd db410remoteroot $ mkdir toolchain $ mkdir db410c-modules

Hmoov tsis zoo, linux kernel siv los ntawm Linaro (Version 431) tsis muaj kev txhawb nqa rau USB Ethernet gadget, vim li ntawd, Linux kernel yuav tsum tau rov tsim dua rau qhov tshwj xeeb no. Rub tawm Linaro toolchain los tsim thiab xa tawm Linux kernel ntawm Dragonboard410c los ntawm x86 tus tswv tsev tshuab.

$ wget

$ tar -xf gcc-*-x86_64_aarch64-linux-gnu.tar.xz -C./toolchain --strip-components = 1

Tam sim no teeb tsa pob khoom uas xav tau los tsim lub kernel:

$ sudo apt hloov tshiab && sudo apt-tau nruab git tsim-qhov tseem ceeb abootimg ntsiav-pob fakeroot libncurses5-dev libssl-dev ccache

Tau txais Linux Kernel qhov chaw Clone Qualcomm tsaws pab Linux chaw cia khoom:

$ git clone

$ cd ntsiav $ git checkout keeb kwm/tso tawm/qcomlt-4.14 -b my-custom-4.14

Tam sim no, teeb tsa kev suav sau ib puag ncig hloov pauv:

$ xa tawm ARCH = arm64

$ export CROSS_COMPILE = $ (pwd) /../ toolchain/bin/aarch64-linux-gnu-

Txog tam sim no, peb yuav tsum tau ntxiv cov qauv rau USB Ethernet CDC hauv cov ntsiav. Kuv tau ua qhov ntawd ua ntej thiab koj tuaj yeem tau txais qhov no thaum kawg ntawm cov kauj ruam no. Kuv tshem tawm qee qhov tab sis nws ua haujlwm.

Ua ntej suav sau, thov kho kab mob kernel rau hauv cov tsav tsheb/mmc/host/sdhci-msm.c hloov cov qauv hauv kab 1150 rau:

static const struct sdhci_ops sdhci_msm_ops = {

.reset = sdhci_reset,.set_clock = sdhci_msm_set_clock,.get_min_clock = sdhci_msm_get_min_clock,.get_max_clock = sdhci_msm_get_max_clock,.set_bus_width = sdhci_set_bus_width,.set_uhs_signaling = sdhci_msm_set_uhs_signaling,.voltage_switch = sdhci_msm_voltage_switch, #ifdef CONFIG_MMC_SDHCI_IO_ACCESSORS.write_w = sdhci_msm_write_w, #endif};

Uncompress configfile.zip, luam.config cov ntaub ntawv rau cov npe ntsiav, tsim cov ntsiav, cov qauv thiab teeb tsa cov qauv hauv cov npe:

$ ua -j $ (nproc) Image.gz dtbs

$ ua -j $ (nproc) modules $ ua modules_install INSTALL_MOD_PATH =../db410c -modules

Siv: 96Boards Cov Ntaub Ntawv

Kauj Ruam 3: Rov tsim Boot.img hauv HOST

Hauv cov kauj ruam no, peb yuav tsum qhib lub hauv paus duab, muab cov qauv tsim hauv cov duab, teeb tsa cov txheej txheem kom pib qhov qauv ntawd thiab rov tsim dua ib lub initrd.img nrog kab ntawv tshiab hais kom ua rau khau raj cov hauv paus filesystem nyob deb.

Yog li, thawj zaug, peb yuav tsum rub tawm initrd.img los ntawm linaro lub vev xaib:

cd ua $..

$ mkdir inird_nfs $ cd initrd_nfs $ wget -O ramdisk.img

Tam sim no, tom qab rub tawm, uncompress thiab rho tawm qhov pib:

$ zcat ramdisk.img | cpio -idmv

Hauv cov npe no, peb muaj cov hauv paus ntaub ntawv system siv los ntawm cov ntsiav hauv kev pib, yog li peb yuav teeb tsa USB Ethernet CDC cov qauv thiab NFS cov chaw tsis xws li NFS server IP thiab ethernet (usb) xav tau ntawm no.

Tam sim no, cia teeb tsa qee cov ntaub ntawv:

conf/initramfs.conf:

MODULES = feem ntau

BUSYBOX = pib COMPRESS = gzip DEVICE = usb0 NFSROOT = pib RUNSIZE = 10%

Tsim cov npe init-premount hauv cov ntawv sau/

$ mkdir cov ntawv sau/pib ua ntej

thiab ntxiv cov ntaub ntawv hauv cov no nyuam qhuav tsim cov npe:

TSO CAI

/scripts/init-premount/usb "$@"

[-e /conf/param.conf] &&. /conf/param.conf

usb

#!/bin/sh

PREREQ = "" prereqs () {echo "$ PREREQ"} rooj plaub $ 1 hauv # tau txais kev xav tau ua ntej prereqs) prereqs tawm 0;; esac modprobe usb_f_ecm modprobe libcomposite modprobe usb_f_rndis modprobe g_ether

Tsis txhob hnov qab siv chmod hauv cov ntaub ntawv usb kom nws ua tiav:

$ chmod +x scripts/init-premount/usb

Tam sim no, theej tag nrho cov npe nrog cov qauv los ntawm db410c-modules (KAUJ RUAM 2) rau lib/modules hauv initrd:

$ cp -R../db410-modules/lib usr/

Tshem tawm txhua cov ntaub ntawv hauv lib/modules/4.14.96-xxxx-qias neeg tshwj tsis yog txhua cov ntaub ntawv module.* Thiab daim ntawv teev npe:

kernel/drivers/usb/gadget/legacy/g_ether.ko

kernel/drivers/usb/gadget/legacy/g_mass_storage.ko kernel/drivers/usb/gadget/legacy/g_cdc.ko kernel/drivers/usb/gadget/legacy/g_serial.ko kernel/drivers/usb/gadget/function/usb_f_mass_storage.ko kernel/drivers/usb/gadget/function/usb_f_acm.ko kernel/drivers/usb/gadget/function/u_ether.ko kernel/drivers/usb/gadget/function/usb_f_obex.ko kernel/drivers/usb/gadget/function /usb_f_serial.ko kernel/drivers/usb/gadget/function/usb_f_ecm.ko kernel/drivers/usb/gadget/function/usb_f_rndis.ko kernel/drivers/usb/gadget/function/u_serial.ko kernel/drivers/usb/gadget /function/usb_f_fs.ko kernel/drivers/usb/gadget/function/usb_f_ecm_subset.ko kernel/drivers/usb/gadget/libcomposite.ko

Cov ntaub ntawv no yog txhua qhov qauv xav tau los pib USB Ethernet CDC.

Thaum kawg rov ntim thiab ntim cov duab initrd:

$ nrhiav. | cpio -o -H newc | gzip -9>../kernel/initrd_nfs.img

Tsawg kawg, cov duab kernel thiab DTB cov ntaub ntawv yuav tsum tau ntim rau hauv Android duab khau raj. Cov duab zoo li no tuaj yeem tsim nrog cov cuab yeej abootimg.

Wb nyob hauv phau ntawv teev npe thiab siv cov lus txib hauv qab no los tsim cov duab thiab txuas ntxiv DTB hauv cov duab kernel compressed:

$ cd../cernel

$ cat arch/$ ARCH/boot/Image.gz arch/$ ARCH/boot/dts/qcom/apq8016-sbc.dtb> Image.gz+dtb

Thiab thaum kawg, tsim cov duab khau raj (ntawm no peb cov rootfs nyob hauv qhov chaw muab faib hauv 10.42.0.1)

abootimg -tsim boot -db410c.img -k Image.gz+dtb -r initrd_nfs.img -c nplooj ntawv = 2048

-c kerneladdr = 0x80008000 -c ramdiskaddr = 0x81000000 -c cmdline = "hauv paus =/dev/nfs nfsroot = 10.42.0.1:/srv/nfs/rootfs ip = 10.42.0.2: 10.42.0.1: 10.42.0.1: 255.255.255.0: db410c: usb0: tawm rw rootwait console = tty0 console = ttyMSM0, 115200n8"

Cov ntaub ntawv:

  • https://access.redhat.com/solutions/24029
  • 96Boards Cov Ntaub Ntawv

Kauj Ruam 4: Tsim Cov Hauv Paus Cov Ntaub Ntawv hauv HOST

Tam sim no, peb tau txais cov duab khau raj tshiab los hloov kho zaj zaj 410c. Tab sis peb xav tau lub hauv paus cov ntaub ntawv kaw lus nyob hauv cov neeg rau zaub mov nyob deb rau khau raj modules, cov kev pabcuam thiab daim ntawv thov. Hauv theem no, peb yuav tsim cov npe sib koom hauv tus tswv kom txuag tau txhua cov ntaub ntawv no. Txoj kev ntawd, cia peb rub lub rootfs filesystem los ntawm linaro qhov chaw nrog tib qho siv hauv initrd. Yog li, rov qab ib phau ntawv teev npe thiab rub tawm linaro-tus tsim tawm rootfs duab nrog version 431.

cd ua $..

$ wget

Uncompress cov ntaub ntawv no

$ unzip dragonboard-410c-sdcard-developer-buster-431.zip

Siv cov ntawv no, cia peb sau txhua daim duab hauv sdcard kom nkag tau rau txhua ntu thiab luam cov ntawv rootfs. Yog li, xyuas kom cov ntaub ntawv los ntawm uSDCard tau thim rov qab vim tias txhua yam ntawm SDCard yuav ploj.

Txhawm rau nrhiav koj lub npe SDCard, tshem SDCard thiab khiav cov lus txib hauv qab no:

$ lsblk

Txuag hauv koj lub siab txhua tus paub lub npe disk. Tam sim no ntxig SDCard, tos ib pliag thiab ua cov lus txib dua:

$ lsblk

Nco tseg cov ntawv tshiab uas tau lees paub. Qhov no yuav yog koj daim npav SDCard. Nco ntsoov koj lub npe thiab hloov pauv qhov ntsuas "ntawm =" rau koj lub npe SDCard lub cuab yeej thiab nco ntsoov siv lub npe ntaus ntawv yam tsis muaj kev faib, xws li: /dev /mmcblk0

$ sudo dd yog = dragonboard-410c-sdcard-developer-buster-431.img ntawm =/dev/XXX bs = 4M oflag = sync xwm txheej = vam meej

Sau ntawv:

  • Cov lus txib no yuav siv qee lub sijhawm los ua. Ua siab ntev thiab zam kev cuam tshuam nrog lub davhlau ya nyob twg kom txog thaum txheej txheem tiav.
  • Thaum SD daim npav ua tiav flashing, tshem tawm los ntawm lub computer host.

Siv: 96 cov ntaub ntawv pov thawj

Kauj Ruam 5: Tsim Server NFS hauv HOST thiab Luam Cov Ntaub Ntawv

Hauv qhov no, peb muaj cov duab khau raj kom ua rau pom hauv zaj duab xis 410c thiab SDCard nrog lub hauv paus cov ntaub ntawv system rau peb cov qauv, kev pabcuam thiab kev siv. Cov kauj ruam tom ntej yog tsim cov npe chaw nyob deb los txuas rau USB Ethernet DEVICE toguther nrog HOST rootfs filesystem. Qhov ntawd tuaj yeem ua tiav siv pob los ntawm Ubuntu lub npe nfs-kernel-server.

Cov pob no teeb tsa NFS cov kev pabcuam rau hauv Ubuntu tso cai sib qhia qee cov npe rau qee cov khoom siv hauv lub network, peb tuaj yeem teeb tsa cov npe twg uas yuav siv rau txhua lub cuab yeej los ntawm kev siv koj li IP.

Yog li, cia peb nruab pob thiab teeb tsa nws.

$ sudo apt-tau nruab nfs-kernel-server

Qhov kev pabcuam NFS pib ua haujlwm. Txhawm rau tswj NFS cov kev pabcuam siv:

$ sudo kev pabcuam nfs-kernel-server restart // kom rov pib dua, lossis siv 'nres', lossis 'pib' raws li xav tau.

Txhawm rau txheeb xyuas qhov xwm txheej ntawm NFS cov kev pabcuam los ntawm kab hais kom siv:

$ sudo kev pabcuam nfs-kernel-server xwm txheej

nfsd khiav // Kev pabcuam tau nce nfsd tsis ua haujlwm // Kev pabcuam poob qis

Tam sim no, cia peb tsim cov npe saum toj kawg nkaus /srv /nfs, thiab tsim cov npe me me hauv qab qhov ntawd rau txhua NFS ntsia cov hauv paus cov ntaub ntawv system. Ntawm no peb suav nrog kev sib koom hauv paus filesystem kom khaws peb cov hauv paus filesystem:

$ sudo mkdir -p /srv /nfs

$ sudo mkdir -p/srv/nfs/rootfs

Tam sim no, NFS server xav tau /lwm yam /xa tawm kom raug teeb tsa kom raug, los tswj kev nkag mus rau txhua NFS cov ntaub ntawv kab ke kab ke rau cov tswv tshwj xeeb. Hauv qhov no tus tswv tau txheeb xyuas los ntawm lawv tus IP chaw nyob. Yog li, rau txhua lub hauv paus filesystem uas tau tsim, ntxiv cov kab tswj kev xa tawm mus rau /lwm yam /xa tawm, kho rau koj tus IP chaw nyob hauv zos thiab cov npe npe txheej txheem yog tias tsim nyog. Hauv qhov kev qhia no, peb ib txwm siv qhov ntawd:

/srv/nfs/rootfs 10.42.0.2 (rw, sync, no_root_squash, no_subtree_check)

Ntxig dua koj daim npav SDCard, teeb nws thiab luam tag nrho cov rootfs filesystem rau hauv/srv/nfs/rootfs, rov ua haujlwm NFS txhawm rau hloov kho cov npe siv cov ntawv theej tshiab.

Ntxiv rau, peb xav tau theej cov ntawv tshiab cov ntaub ntawv rau hauv rootfs filesystem vim tias peb suav cov ntsiav ntawm cov kauj ruam 2. Yog li, theej tag nrho cov npe hauv ~/db410c-modules/to/srv/nfs/rootfs.

$ sudo cp -R ~/db410c -modules/*/srv/nfs/rootfs/

Ua kom ntseeg tau tias cov npe no tau pom los ntawm NFS cov kev pabcuam. Tog twg los:

$ sudo exportfs -a

Siv: TFTP/NFS Root Filesystem

Kauj Ruam 6: Hloov kho Dragonboard 410c khau raj duab thiab teeb tsa Network cuam tshuam

Peb tau ua tag nrho cov kauj ruam los siv lub hauv paus rootfs filesystem nyob deb, tam sim no peb xav tau hloov kho cov duab khau raj hauv dragonboard 410c, rau qhov ntawd, txuas koj li USB cable ntawm PC thiab ntawm dragonboard uUSB txuas. Yog li xyuas kom fastboot tau teeb tsa ntawm lub computer host, yog tias tsis nruab siv:

$ sudo apt nruab fastboot

Tam sim no hloov kho duab, pib de dragonboard rau hauv hom fastboot raws li cov kauj ruam no:

  • Nias thiab tuav Vol (-) khawm ntawm DragonBoard 410c, qhov no yog S4 khawm. DragonBoard ™ 410c yuav tsum tseem TSIS tau qhib
  • Thaum tuav lub Vol (-) khawm, lub zog ntawm DragonBoard 410c los ntawm kev ntsaws nws
  • Thaum DragonBoard 410c tau txuas rau lub hwj chim, tso koj tuav ntawm Vol (-) khawm.
  • Tos txog 20 vib nas this.
  • Pawg thawj coj yuav tsum khau raj rau hom fastboot.

Los ntawm cov tswv tsev txuas nrog lub davhlau ya nyob twg qhov rai, khiav cov lus txib hauv qab no:

$ sudo fastboot khoom siv

Feem ntau nws yuav qhia raws li hauv qab no

de82318 fastboot

Txog tam sim no koj yuav tsum txuas nrog koj DragonBoard 410c nrog USB rau microUSB cable. Koj DragonBoard 410c yuav tsum tau khau raj rau hauv hom fastboot thiab npaj kom ua rau pom nrog cov duab tsim nyog. Cia peb hloov kho duab khau raj nrog peb cov duab khau raj:

$ sudo fastboot flash boot ~/db410remoteroot/ntsiav/initrd_nfs.img

Thiab, rov pib dua lub rooj tsavxwm

$ sudo fastboot reboot

Tam sim no, koj HOST yuav txheeb xyuas lub interface tshiab hu ua usb0, tab sis nws tseem tsis tau tus IP tseem. Yog li, ntxiv tus IP zoo li qub rau lub interface no siv:

$ sudo ifconfig usb0 10.42.0.1 netmask 255.255.255.0 nce

Los yog nkag mus rau hauv "Kev teeb tsa" ntawm HOST, hauv cov khoom "network", teeb USB Ethernet tus IP zoo li qub rau lub interface ntawd.

Tam sim no, rov pib dua zaj dab neeg thiab txheeb xyuas qhov pib ua haujlwm, sim txuas nrog siv ssh:

$ ssh [email protected]

Cov ntaub ntawv:

  • 96 cov ntaub ntawv pov thawj
  • HowtoForge - Yam 6

Pom zoo: