终端工具有很多。
用过Xshell,不是免费的。
用过MobaXterm,也许是我使用方法有问题,会破坏windows配置文件。
用过Finalshell,太复杂。
我只是想用SSH和SFTP 功能。
幸好看到了链接1这里推送的另一款开源的终端工具Tabby,到目前为止,使用感觉不错!
Tabby是一款现代化的终端连接工具,开源并且跨平台,支持在Windows、MacOS、Linux系统下使用。Tabby在Github上已有20k+Star,可见它是一款非常流行的终端工具!
Tabby的安装非常简单,直接下载安装包解压即可,这里我下载的是Windows下的便携版本,下载地址。
新建 ssh 连接
新建ssh连接不像其他软件那么直观,需要在 Settings下,新建profile
快捷键for split/pane
split to the right: ctrl+shift+e
split to the bottom: ctrl+shift+d
close focused pane: ctrl+shift+Q:
唯一吐槽的是,不能SFTP传输文件夹,只能传输单个文件。
参考:
diagrams.net(前身是draw.io)是开源免费的流程图绘制工具,非常好用。但给出的默认模板里没有思维导图。
插件名称:Draw.io Integration
安装完成后,新建文件,扩展名为”*.drawio”,
绘制思维导图的元素:Central Idea,Branch,Sub Topic,OrgChart,Organization,Division,Sub Sections
专为 VSCode 设计的轻量级脑图插件。
安装:搜索并安装插件 Mindmap。
特点:
使用:
包括以下内容:
大多数eMMC存在以下分区:
每个分区都是单独编址,起始地址都是0x00000000.
要想访问访问某个分区,首先需要通过EXT_CSD[179]的[2:0]来选择分区。
使用FlashWriter可以查看不同分区的实际大小:
Flash writer for R-Car H3/M3/M3N Series V1.09 Apr.17,2019
>em_w
EM_W Start --------------
---------------------------------------------------------
Please select,eMMC Partition Area.
0:User Partition Area : 30535680 KBytes
eMMC Sector Cnt : H'0 - H'03A3DFFF
1:Boot Partition 1 : 32640 KBytes
eMMC Sector Cnt : H'0 - H'0000FEFF
2:Boot Partition 2 : 32640 KBytes
eMMC Sector Cnt : H'0 - H'0000FEFF
在Android或者Linux启动后,终端查看现有分区状态以及各分区类型。
如果没有现成的FAT分区,要想在eMMC上使用FatFs文件系统,首先需要进行分区(命令:fdisk),然后将分区格式化为Fat分区(命令:mkfs.fat)。
(读者可以自行查询该命令的具体使用。)
格式化命令:mkfs.fat 或者 mkfs.vfat
Android BSP中缺省没有该命令。
用户可以从这里下载,然后编译。
然后,在Ubuntu虚拟机下将编译好的mkfs.fat push 到板载android下的/data目录。
$ adb root
$ adb push mkfs.fat /data
然后,重新给板子上电,启动Android,终端下:
console:/data # ./mkfs.fat /dev/block/mmcblk0p10
mkfs.fat 4.2+git (2021-01-31)
console:/data # blkid
/dev/block/mmcblk0p10: SEC_TYPE="msdos" UUID="8D0B-CB9B" TYPE="vfat"
/dev/block/mmcblk0p12: LABEL="/" UUID="6edfb94d-d96c-4819-9eaf-b1ef6845c12a" TYPE="ext4"
/dev/block/mmcblk0p14: LABEL="vendor" UUID="a4ee7a24-223f-4461-9c46-03e5607855de" TYPE="ext4"
/dev/block/mmcblk0p16: LABEL="product" UUID="076206b9-a1be-48ab-974d-06c351ebe192" TYPE="ext4"
/dev/block/mmcblk0p18: UUID="2de4cd99-a81f-48de-a702-a2aa5adcc298" TYPE="ext4"
MBR、GPT都是在User Data Area上实现的。
LBA——Logical block addressing , here you can look it as sector, which size is 512 Bytes please refer https://en.wikipedia.org/wiki/Logical_block_addressing
MBR——Master Boot Record The data structure that resides on the LBA 0 of a hard disk and defines the partitionson the disk.”
GPT——GUID Partition Table
A data structure that describes one or more partitions.
“It consists of a GPTHeaderand, typically, at least one GPTPartition Entry.”
“There are two GUID partition tables:” (1)the Primary Partition Table (located in LBA 1 of the disk) and (2)”a Backup Partition Table(located in the last LBA of the disk). The Backup Partition Table is a copy of the Primary Partition Table.”
EFI——Extensible Firmware Interface “An interface between the operating system (OS) andthe platform firmware.”
UEFI——Unified Extensible Firmware Interface. “The interface between the operating system(OS) and the platform firmware defined by this specification.”
BPB——BIOS Parameter Block “The first block (sector) of a partition. It defines the type and location of the FAT FileSystem on a drive.”
FAT——File Allocation Table
A table that is used to identify the clusters that make up a disk file.
“File allocationtables come in three flavors: “
_FAT12, which uses 12 bits for cluster numbers;
_“FAT16, which uses 16 bits;”
_“FAT32, which allots 32 bits but only uses 28 (the other 4 bitsare reserved for future use).”
GPTHeader—— The header in a GUID Partition Table (GPT). “Among other things, it contains thenumber of GPT Partition Entries and the first and last LBAs that can be used for the entries.”
GPT Partition Entry—— “A data structure that characterizes a Partition in the GPT disk layout. Among otherthings, it specifies the starting and ending LBA of the partition.”
这里,需要重点关注LBA0:
针对Android,不同分区,用途不同,参见下表。
分区名 | 描述及存储的img |
---|---|
misc | For recovery storage bootloader message, reserve |
psr | |
vbmeta_a | To store the verify boot’s meta data |
vbmeta_b | To store the verify boot’s meta data |
dtb_a | dtbo.img |
dtb_b | |
dtbo_a | |
dtbo_b | dtbo.img |
boot_a | boot.img |
boot_b | boot.img |
metadata | meta data of OTA update, remount, etc |
system_a | |
system_b | |
vendor_a | vendor_boot.img |
vendor_b | vendor_boot.img |
product_a | |
product_b | |
userdata | system.img, system_ext.img, vendor.img, product.img |
以上分区信息也可以在u-boot下用命令显示:
=> mmc dev 1
=> mmc part
Partition Map for MMC device 1 -- Partition Type: EFI
Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
1 0x00000400 0x000007ff "misc"
attrs: 0x0000000000000000
type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
guid: 00042021-0408-4601-9dcc-a8c51255994f
2 0x00000800 0x00000bff "pst"
attrs: 0x0000000000000000
type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
guid: 8ef917d1-2c6f-4bd0-a5b2-331a19f91cb2
......
18 0x00bd6c00 0x03a3dfde "userdata"
attrs: 0x0000000000000000
type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7
guid: 7bfe05ed-d33c-41cc-adaf-be8e55b00591
=>
FAT分区的第一sector内容解析参考上图,根据不同的内容可以区分不同的分区类型:FAT16,FAT32,NTFS.
(1)首先,要设置NotePad++能显示换行符,这个才能看到效果,
View - Show Symbol - Show End of Line
{2}设置行尾符格式:
Edit - EOL Conversion - Unix(可选Windows、Unix、Mac中的一种)
Yann LeCun主讲的纽约大学《深度学习》2021春季新版课程已全部上线!
相关链接:https://cds.nyu.edu/deep-learning/
英文版讲义链接:https://atcold.github.io/NYU-DLSP21/en/week12/12/
YouTube视频:https://www.youtube.com/playlist?list=PLLHTzKZzVU9e6xUfG10TkTWApKSZCzuBI