|
| 1 | +--- |
| 2 | +layout: post |
| 3 | +title: "LinuxLab 真板开发:arm/ebf-imx6ull" |
| 4 | +author: iosdevlog |
| 5 | +date: 2020-12-30 13:33:51 +0800 |
| 6 | +description: "" |
| 7 | +cover-img: /assets/images/LinuxLab/IMX6ULL/GUI.jpg |
| 8 | +category: |
| 9 | +tags: [LinuxLab, IMX6ULL] |
| 10 | +--- |
| 11 | + |
| 12 | +目前是开发的初始阶段,文档也时刻在变,这里只记录部分开发测试过程,请以最新文档主准。 |
| 13 | + |
| 14 | +昨天是 **ebf-imx6ul**,今天的多加了一个 `l`。 |
| 15 | + |
| 16 | +## [按文档操作](https://gitee.com/tinylab/linux-lab/issues/I28KSD) |
| 17 | + |
| 18 | +```sh |
| 19 | +git checkout ebf |
| 20 | +git pull |
| 21 | +sed -i -e "s/nand/mmc/g" boards/arm/ebf-imx6ull/Makefile |
| 22 | +make BOARD=arm/ebf-imx6ull |
| 23 | +make kernel-build |
| 24 | +``` |
| 25 | + |
| 26 | +使用 COM 串口 |
| 27 | + |
| 28 | +```bash |
| 29 | +root@npi:~# passwd |
| 30 | +New password: |
| 31 | +Retype new password: |
| 32 | +passwd: Authentication token manipulation error |
| 33 | +passwd: password unchanged |
| 34 | +``` |
| 35 | + |
| 36 | +[Getting an "Authentication token manipulation" error when trying to change my user password](/assets/images/LinuxLab/IMX6ULL/https://askubuntu.com/questions/57620/getting-an-authentication-token-manipulation-error-when-trying-to-change-my-us) |
| 37 | + |
| 38 | +```bash |
| 39 | +root@npi:/home/debian# pwconv |
| 40 | +pwconv: /etc/passwd.843: No space left on device |
| 41 | +pwconv: cannot lock /etc/passwd; try again later. |
| 42 | +``` |
| 43 | + |
| 44 | +看看空间 |
| 45 | + |
| 46 | +```bash |
| 47 | +root@npi:/home/debian# df -h |
| 48 | +Filesystem Size Used Avail Use% Mounted on |
| 49 | +udev 82M 0 82M 0% /dev |
| 50 | +tmpfs 50M 5.3M 44M 11% /run |
| 51 | +/dev/mmcblk1p2 6.5G 6.5G 0 100% / |
| 52 | +tmpfs 246M 0 246M 0% /dev/shm |
| 53 | +tmpfs 5.0M 0 5.0M 0% /run/lock |
| 54 | +tmpfs 246M 0 246M 0% /sys/fs/cgroup |
| 55 | +tmpfs 40K 0 40K 0% /mnt/.psplash |
| 56 | +tmpfs 50M 0 50M 0% /run/user/0 |
| 57 | +tmpfs 50M 0 50M 0% /run/user/1000 |
| 58 | +``` |
| 59 | + |
| 60 | + |
| 61 | + |
| 62 | +应该是没有空间了,删除一些文件。 |
| 63 | + |
| 64 | +```bash |
| 65 | +rm -rf /home/debian/qt-app-static/video/ |
| 66 | +root@npi:~# sed -i -e "s/#PermitRootLogin prohibit-password/PermitRootLogin yes/g" /etc/ssh/sshd_config |
| 67 | +root@npi:~# |
| 68 | +``` |
| 69 | + |
| 70 | +改完密码后,macOS 和 windows 10 下的 Docker 都找不到 `/dev/ttyUSB0` 串口。 |
| 71 | + |
| 72 | +`make boot` 失败。 |
| 73 | + |
| 74 | +``` |
| 75 | +ubuntu@linux-lab:/labs/linux-lab$ make boot |
| 76 | +Makefile:49: WARN: Lab should **NOT** belong to 'root', please change their owne |
| 77 | +r in host: 'sudo chown $USER:$USER -R /path/to/cloud-lab/{*,.git}' |
| 78 | +Makefile:50: WARN: Cancel this warning via: 'export WARN_ON_USER=0' |
| 79 | +minicom -D /dev/ttyUSB0 -b 115200 |
| 80 | +minicom: cannot open /dev/ttyUSB0: No such file or directory |
| 81 | +make: *** [Makefile:3651: _boot] Error 1 |
| 82 | +``` |
| 83 | + |
| 84 | +Windows 10 串口 应该是 **COM[0-9*]**,macOS 下可能是 `/dev/tty.usbserial-144410`。 |
| 85 | + |
| 86 | +但是 Docker 下不知道怎么找了。 |
| 87 | + |
| 88 | +我们切换到 VirtualBox。 |
| 89 | + |
| 90 | +### Windows 10 下使用 VirtualBox。 |
| 91 | + |
| 92 | + |
| 93 | + |
| 94 | +上传 zImage, dtb, modules。 |
| 95 | + |
| 96 | +```bash |
| 97 | +make kernel-upload |
| 98 | +make dtb-upload |
| 99 | +make modules-upload |
| 100 | +``` |
| 101 | + |
| 102 | +新 Image 启动。 |
| 103 | + |
| 104 | +```bash |
| 105 | +make boot |
| 106 | +``` |
| 107 | + |
| 108 | + |
| 109 | + |
| 110 | +@吴章金 @杨森 Windows 10 下,VituralBox Ubuntu ,终于可以了。 |
| 111 | + |
| 112 | +可能是我删除了 QT 下面的一些东西,启动后画面不动了。 |
| 113 | + |
| 114 | + |
| 115 | + |
| 116 | +触摸屏也不能工作,使用 `evtest` 测试一下。 |
| 117 | + |
| 118 | +```bash |
| 119 | +sudo apt install evtest |
| 120 | +sudo evtest |
| 121 | +``` |
| 122 | + |
| 123 | +好像没有反应。 |
| 124 | + |
| 125 | + |
| 126 | + |
| 127 | +``` |
| 128 | +No device specified, trying to scan all of /dev/input/event* |
| 129 | +Available devices: |
| 130 | +/dev/input/event0: 20cc000.snvs:snvs-powerkey |
| 131 | +/dev/input/event1: gpio-keys |
| 132 | +Select the device event number [0-1]: |
| 133 | +``` |
| 134 | + |
| 135 | +看下触摸屏内核模块有没有自动加载 `lsmod`。 |
| 136 | + |
| 137 | + |
| 138 | + |
| 139 | +看下驱动 log: `dmesg|grep Goodix`。 |
| 140 | + |
| 141 | +```bash |
| 142 | +debian@npi:~$ dmesg|grep Goodix |
| 143 | +[ 19.968983] Goodix-TS 0-005d: i2c test failed attempt 1: -6 |
| 144 | +[ 20.066545] Goodix-TS 0-005d: i2c test failed attempt 2: -6 |
| 145 | +[ 20.159219] Goodix-TS 0-005d: I2C communication failure: -6 |
| 146 | +``` |
| 147 | + |
| 148 | + |
| 149 | + |
| 150 | +新的 qt app 还在处理一些 bug,到时直接装就行了。 |
| 151 | + |
| 152 | +## 试试 macOS |
| 153 | + |
| 154 | +macOS Docker 找不到串口,试着改了一下 `.labinit`,还是不行,估计要用 `ssh` 连接了。 |
| 155 | + |
| 156 | +```bash |
| 157 | +ubuntu@linux-lab:/labs/linux-lab$ vi .labinit |
| 158 | +ubuntu@linux-lab:/labs/linux-lab$ make boot |
| 159 | +minicom -D /dev/cu.usbserial-144410 -b 115200 |
| 160 | +minicom: cannot open /dev/cu.usbserial-144410: No such file or directory |
| 161 | +make: *** [Makefile:3651: _boot] Error 1 |
| 162 | +ubuntu@linux-lab:/labs/linux-lab$ ls /dev/cu.usbserial-144410 |
| 163 | +ls: cannot access '/dev/cu.usbserial-144410': No such file or directory |
| 164 | +ubuntu@linux-lab:/labs/linux-lab$ |
| 165 | +``` |
| 166 | + |
| 167 | +切换到 `next` 分支。 |
| 168 | + |
| 169 | +```bash |
| 170 | +git checkout next |
| 171 | +git pull |
| 172 | +``` |
| 173 | + |
| 174 | +试试 login。 |
| 175 | + |
| 176 | +```bash |
| 177 | +ubuntu@linux-lab:/labs/linux-lab$ make login |
| 178 | +LOG: Login via ssh protocol |
| 179 | +/bin/sh: 1: sshpass: not found |
| 180 | +make: *** [Makefile:3678: _boot] Error 127 |
| 181 | +``` |
| 182 | + |
| 183 | +下面是一些无用功。 |
| 184 | + |
| 185 | +```bash |
| 186 | +# http://forum.ubuntu.org.cn/viewtopic.php?f=80&t=372236 |
| 187 | + |
| 188 | +sudo apt-get clean |
| 189 | +cd /var/lib/apt |
| 190 | +sudo mv lists lists.old |
| 191 | +sudo mkdir -p lists/partial |
| 192 | +sudo apt-get clean |
| 193 | +sudo apt-get update |
| 194 | + |
| 195 | +make packages-install |
| 196 | +``` |
| 197 | + |
| 198 | +提示没有安装 `sshpass`,改了大半天,还是觉得是网络的问题,最后用连接 `iPhone` 热点,就能正常了。 |
| 199 | + |
| 200 | +所以要尽量保证环境一致:Docker 就是你。 |
| 201 | + |
| 202 | +`make boot` 成功过一次,board 重新启动后就卡住不动了。 |
| 203 | + |
| 204 | +后来就一直连接不上,可能还是网络问题。 |
| 205 | + |
| 206 | +```bash |
| 207 | +ubuntu@linux-lab:/labs/linux-lab$ make boot |
| 208 | +LOG: Configure new kernel and dtbs images |
| 209 | +LOG: Rebooting via ssh |
| 210 | +Connection to 192.168.1.132 closed by remote host. |
| 211 | +LOG: Login via ssh protocol |
| 212 | +make: *** [Makefile:3678: _boot] Error 255 |
| 213 | +``` |
| 214 | + |
| 215 | + |
| 216 | + |
| 217 | +## 总结 |
| 218 | + |
| 219 | +一句话,为了少折腾,还是 Windows -> VirtualBox -> Ubuntu -> LinuxLab。 |
0 commit comments