Last active
May 26, 2022 23:50
-
-
Save takeru/81388bfca3643eb3febacb54340b55b4 to your computer and use it in GitHub Desktop.
QuaStation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// QuaStationのシリアル通信のコネクタにいつものM5のGROVEケーブルがぴったり。 | |
// GROVEケーブルのツメを持ち上げて赤と黒を抜く、赤のところに黒をいれる。赤は入れないでテープで絶縁 | |
// 改造したほうをQuaに指して、反対側はそのままM5StickCに。 | |
// screen `ls -1 /dev/cu.usbserial-*` 115200 | |
// https://lang-ship.com/blog/work/m5stickc-uartserial/ | |
#include <M5StickC.h> | |
#define LED_BUILTIN 10 | |
void setup() { | |
M5.begin(); | |
Serial1.begin(115200, SERIAL_8N1, 32, 33); // GROVE rx=32, tx=33 | |
pinMode(LED_BUILTIN, OUTPUT); | |
} | |
int led_count = 0; | |
void loop() { | |
if (Serial.available()) { | |
int inByte = Serial.read(); | |
Serial1.write(inByte); | |
led_count = 0; | |
} | |
if (Serial1.available()) { | |
int inByte = Serial1.read(); | |
Serial.write(inByte); | |
led_count = 0; | |
} | |
if(led_count < 10000){ | |
digitalWrite(LED_BUILTIN, LOW); | |
led_count++; | |
}else{ | |
digitalWrite(LED_BUILTIN, HIGH); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ESC連打してたらubootにはいれた | |
https://old.haruroid.com/haruroid.0t0.jp/blog/archives/1509.html | |
... | |
... | |
CPU : Cortex-A53 quad core - AARCH32 | |
Board: Realtek QA Board | |
DRAM: 0 Bytes | |
Watchdog: Disabled | |
Cache: Enabled | |
Non-Cache Region: 1 MB@0x07900000 | |
MMC: RTD1295 eMMC: 0 | |
mmc->version=0x00010000 | |
version=0x00000004 | |
[LY] cardtype=57, mmc->card_caps=0f | |
[LY] freq = 00464388, clk diver = 00000080 | |
[LY] speed up emmc at HS-200 | |
[LY] HS-200 bus width=2 | |
[LY] mmc->boot_caps = 20b | |
TEMP TX_WINDOW=0x7ffffffe, TX_best=0xf | |
RX_WINDOW=0xffff807f, RX_best=0x1a | |
TX1_WINDOW=0x3fffff80, TX_best=0x12 | |
[LY] hs200 : 0 | |
[HC] WPG_SIZE = 8388608 | |
Device: RTD1295 eMMC | |
Manufacturer ID: 15 | |
OEM: 100 | |
Name: 8GME4 | |
Tran Speed: 5f5e100 | |
Rd Block Len: 512 | |
MMC version 4.0 | |
High Capacity: No | |
Capacity: 7.3 GiB | |
Bus Width: 8-bit | |
Speed: HS200 | |
Factory: MMC | |
Factory: pp:1, seq#:0x39, size:0x22000 | |
------------can't find tmp/factory/000BootParam.h | |
In: serial | |
Out: serial | |
Err: serial | |
Net: Realtek PCIe GBE Family Controller mcfg = 0024 | |
dev->name=r8168#0 | |
Hit Esc or Tab key to enter console mode or rescue linux: 0 | |
------------can't find tmp/factory/recovery | |
Press Esc Key | |
WPS button => 1 | |
reset button => 1 | |
Current AdbStatus=off | |
Current Power status 1 =off | |
Current Power status 2 =off | |
Enter console mode, disable watchdog ... | |
Realtek> | |
Realtek> help | |
b2ndbc - load 2nd stage bootcode | |
bdinfo - print Board Info structure | |
bootm - boot application image from memory | |
bootr - boot realtek platform | |
dcache - enable or disable data cache | |
env - environment handling commands | |
factory - FACTORY sub system | |
fatinfo - print information about filesystem | |
fatload - load binary file from a dos filesystem | |
fatls - list files in a directory (default /) | |
fdt - flattened device tree utility commands | |
gettime - get timer val elapsed | |
go - start application at address 'addr' or start running fw | |
goru - start rescue linux from usb | |
help - print command description/usage | |
icache - enable or disable instruction cache | |
keyset - keyset - write keyset file into factory area | |
led - led - [0|all] [on|off|toggle] | |
loady - load binary file over serial line (ymodem mode) | |
md - memory display | |
mmc - MMC sub system (patch for rtd299x) | |
mtest - simple RAM read/write test | |
mtest2 - simple RAM read/write test | |
mw - memory write (fill) | |
ping - send ICMP ECHO_REQUEST to network host | |
reset - Perform RESET of the CPU | |
rtkemmc - RTK EMMC functions | |
rtkgpio - rtk gpio access | |
saveenv - save environment variables to persistent storage | |
source - run script from memory | |
tftp - download image from TFTP server | |
tftpput - TFTP put command, for uploading files to a server | |
uart_write- for uart mp tool burn mac and sn key | |
unzip - unzip a memory region | |
usb - USB sub-system | |
version - print monitor, compiler and linker version |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
https://u-haru.com/post/quastation%E7%94%A8%E3%81%AE%E3%82%AB%E3%83%BC%E3%83%8D%E3%83%AB%E3%82%92%E3%83%93%E3%83%AB%E3%83%89%E3%81%99%E3%82%8B/ | |
https://github.com/BPI-SINOVOIP/BPI-W2-bsp | |
docker run -v /home/takeru/proj/qua-station/bpi:/bpi -t -i sinovoip/bpi-build-linux-4.4:ubuntu16.04 /bin/bash | |
wget https://github.com/BPI-SINOVOIP/BPI-W2-bsp/archive/refs/tags/w2-4.9-v1.0.tar.gz | |
tar xvzf w2-4.9-v1.0.tar.gz | |
wget https://gist.githubusercontent.com/u-haru/237072dd7847cbe6c4695d5d67d623e7/raw/8f622ad4dd8d8480d2ff95b1b4dec6b4bc09c72d/BPI-Qua.conf | |
cp BPI-Qua.conf ./BPI-W2-bsp-w2-4.9-v1.0/linux-rt/.config | |
cd ./BPI-W2-bsp-w2-4.9-v1.0 | |
./build.sh | |
(3. Build kernel only. を選ぶ) | |
root@7e81bc0389a5:/bpi/BPI-W2-bsp-w2-4.9-v1.0# ls -l ./linux-rt/arch/arm64/boot/Image | |
-rwxr-xr-x 1 root root 21281280 May 28 02:36 ./linux-rt/arch/arm64/boot/Image | |
root@7e81bc0389a5:/bpi/BPI-W2-bsp-w2-4.9-v1.0# ls -l ./linux-rt/arch/arm64/boot/dts/realtek/rtd129x/rtd-1296-bananapi-w2-2GB-HDMI.dtb | |
-rw-r--r-- 1 root root 46741 May 28 02:31 ./linux-rt/arch/arm64/boot/dts/realtek/rtd129x/rtd-1296-bananapi-w2-2GB-HDMI.dtb | |
41e57044b1664e7e442b029a13b6b3b7bf1ab320 ./linux-rt/arch/arm64/boot/Image | |
aeea4c423126433b6d6eb219c9623f6855eee622 ./linux-rt/arch/arm64/boot/dts/realtek/rtd129x/rtd-1296-bananapi-w2-2GB-HDMI.dtb | |
root@7e81bc0389a5:/bpi/BPI-W2-bsp-w2-4.9-v1.0# ls -l ./linux-rt/output/lib/modules/ | |
total 4 | |
drwxr-xr-x 3 root root 4096 May 28 02:38 4.9.119-BPI-W2-Kernel |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment