Autem vel eum iriure dolor in hendrerit in vulputate velit esse molestie consequat, vel illum dolore eu feugiat nulla facilisis at vero eros et dolore feugait.
xiaobao@Newu:~/hdd/tmp$ fdisk AB-small-S-lvm-A03-other-armbian-1.1.100.57.9.img
Welcome to fdisk (util-linux 2.34).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.
Command (m for help): p
Disk AB-small-S-lvm-A03-other-armbian-1.1.100.57.9.img: 2.77 GiB, 2956984320 bytes, 5775360 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
AB-small-S-lvm-A03-other-armbian-1.1.100.57.9.img1 8192 530431 522240 255M c W95 FAT32 (LBA)
AB-small-S-lvm-A03-other-armbian-1.1.100.57.9.img2 532480 5775359 5242880 2.5G 83 Linux
2、挂载分区
sudo mount -o loop,offset=4194304 AB-small-S-lvm-A03-other-armbian-1.1.100.57.9.img /mnt/tmp/
local WebService = {}
function WebService.Run()
local client = os.getenv("REMOTE_ADDR")
local GET = os.getenv("QUERY_STRING")
local POST = nil
local POSTLength = tonumber(os.getenv("CONTENT_LENGTH")) or 0
if (POSTLength > 0) then
POST = io.read(POSTLength)
--POST = io.read("*a")
end
-- Fast-CGI+HTTP require HEADER
-- enable cache
--io.write("Content-type: text/html\n\n")
-- disable cache, especially for Internet Explorer
io.write("Content-type: text/html\nPragma: no-cache\n\n")
local reply = string.format("Client %s said: url: [%s], data: [%s]\n", client or '-', GET or '-', POST or '-')
io.write(reply)
end
return WebService
function WebService.uartWrite(msg)
local uartConfig = 'stty -F /dev/ttyS0 raw speed 9600\n'
os.execute(uartConfig)
local cmd = string.format("echo '%s' > /dev/ttyS0\n", msg or '')
os.execute(cmd)
end