CORE MP135
https://gyazo.com/98db2037c850c60ee74041c8008a55fa https://docs.m5stack.com/en/core/M5CoreMP135
ファクトリイメージ
rootのパスワードはroot
code:/etc/rc.local
/sbin/modprobe fb_ili9341
echo 1 4 1 7 > /proc/sys/kernel/printk
ip link set can0 up type can bitrate 250000
ip link set can1 up type can bitrate 250000
/usr/local/m5stack/lt8618sxb_mcu_config &> /dev/null &
tinyplay /usr/local/m5stack/chexian.wav &> /dev/null &
/usr/local/m5stack/dist/core135_start_ui 2>&1 > /dev/null &
# otg master usb
# echo 130 > /sys/class/gpio/export && echo out > /sys/class/gpio/gpio130/direction && echo 1 > /sys/class/gpio/gpio130/value
# echo "host" >/sys/class/usb_role/49000000.usb-otg-role-switch/role
echo "device" >/sys/class/usb_role/49000000.usb-otg-role-switch/role
# open bus 5V out
echo 131 > /sys/class/gpio/export && echo out > /sys/class/gpio/gpio131/direction && echo 1 > /sys/class/gpio/gpio131/value
code:console
# root@CoreMP135:~# uname -a
Linux CoreMP135 5.15.24 #1 SMP PREEMPT Tue Apr 23 15:40:09 CST 2024 armv7l GNU/Linux # cat /etc/os-release
NAME=Buildroot
VERSION=2022.11.2
ID=buildroot
VERSION_ID=2022.11.2
PRETTY_NAME="Buildroot 2022.11.2"
CoreMP135_buildroot_20240418
ファクトリと同じだが,設定がいろいろ異なる
rootのパスワードはなし
code:console
# # ####### ##### ####### # ##### # #
## ## # # # # # # # # # #
# # # # # # # # # # # #
# # # ###### ##### # # # # ###
# # # # # ####### # # #
# # # # # # # # # # # # #
# # ##### ##### # # # ##### # #
Welcome to CoreMP135, Powered by M5Stack.
CoreMP135 login:
code:/etc/rc.local
modprobe fb_ili9341_m5
FRAMEBUFFER=/dev/fb1 fbv /usr/local/m5stack/logo.jpg &> /dev/null &
echo 1 4 1 7 > /proc/sys/kernel/printk
tinyplay /usr/local/m5stack/logo.wav &> /dev/null &
# set otg master
# echo 130 > /sys/class/gpio/export && echo out > /sys/class/gpio/gpio130/direction && echo 1 > /sys/class/gpio/gpio130/value
# echo "host" >/sys/class/usb_role/49000000.usb-otg-role-switch/role
echo "device" >/sys/class/usb_role/49000000.usb-otg-role-switch/role
# set bus 5V out
# echo 131 > /sys/class/gpio/export && echo out > /sys/class/gpio/gpio131/direction && echo 1 > /sys/class/gpio/gpio131/value
code:console
root@CoreMP135:~# uname -a
Linux CoreMP135 5.15.24 #1 SMP PREEMPT Tue Apr 23 15:40:09 CST 2024 armv7l GNU/Linux # cat /etc/os-release
NAME=Buildroot
VERSION=2021.05-10169-gb885d5525a
ID=buildroot
VERSION_ID=2023.02.2
PRETTY_NAME="Buildroot 2023.02.2"
CoreMP135_debian12_20240418
rootのパスワードはroot
code:/etc/rc.local
modprobe fb_ili9341
FRAMEBUFFER=/dev/fb1 fbv /usr/local/m5stack/logo.jpg &> /dev/null &
echo 1 4 1 7 > /proc/sys/kernel/printk
usr/local/m5stack/lt8618sxb_mcu_config &> /dev/null &
tinyplay /usr/local/m5stack/logo.wav &> /dev/null &
# set otg master
# echo 130 > /sys/class/gpio/export && echo out > /sys/class/gpio/gpio130/direction && echo 1 > /sys/class/gpio/gpio130/value
# echo "host" >/sys/class/usb_role/49000000.usb-otg-role-switch/role
echo "device" >/sys/class/usb_role/49000000.usb-otg-role-switch/role
# set bus 5V out
# echo 131 > /sys/class/gpio/export && echo out > /sys/class/gpio/gpio131/direction && echo 1 > /sys/class/gpio/gpio131/value
code:console
root@CoreMP135:~# uname -a
Linux CoreMP135 5.15.24-g89a51e8ac898-dirty #28 PREEMPT Tue Apr 16 10:49:21 CST 2024 armv7l GNU/Linux root@CoreMP135:~# cat /etc/debian_version
12.1
buildrootのビルド
WSL2環境でビルド
カレントを~/srcと想定する
Core135_buildroot→CoreMP135_buildroot
Core135_buildroot-external-st→CoreMP135_buildroot-external-st
/usr/local/m5stack/dist/core135_start_ui(ファクトリで起動するUI)は入らないので要確認
m5stack_coremp135_defconfigはカーネルv6.1ベース,m5stack_coremp135_5_15はカーネルv5.15ベース
CoreMP135_buildroot-external-st/board/m5stack/coremp135/overlay/etc/rc.localが/etc/rc.localになる
tinyplayをコメントしておけば音が出ない
code:console
cd ~/src
cd CoreMP135_buildroot
make BR2_EXTERNAL=../CoreMP135_buildroot-external-st/ m5stack_coremp135_defconfig
make -j4
output/images/sdcard.imgにイメージが生成される
code:console
#
# # ####### ##### ####### # ##### # #
## ## # # # # # # # # # #
# # # # # # # # # # # #
# # # ###### ##### # # # # ###
# # # # # ####### # # #
# # # # # # # # # # # # #
# # ##### ##### # # # ##### # #
Welcome to CoreMP135, Powered by M5Stack.
CoreMP135 login: root
# uname -a
Linux CoreMP135 6.1.28 #1 SMP PREEMPT Mon May 6 18:43:16 JST 2024 armv7l GNU/Linux # cat /etc/os-release
NAME=Buildroot
VERSION=-gb885d5525a
ID=buildroot
VERSION_ID=2023.02.2
PRETTY_NAME="Buildroot 2023.02.2"
パーティションサイズの拡張
Core MP135の中にあるfdisk(Busybox)ではできないので,別のLinuxマシンでやる必要がある?
code:console
# fdisk /dev/mmcblk0
Found valid GPT with protective MBR; using GPT
Command (m for help): p
Disk /dev/mmcblk0: 61022208 sectors, 1124M
Logical sector size: 512
Disk identifier (GUID): f09afa2f-5924-4118-b0fa-ba2fbe79671d
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 61022174
Number Start (sector) End (sector) Size Name
1 34 199 84992 fsbl1
2 200 365 84992 fsbl2
3 366 3686 1660K fip
4 3687 7782 2048K u-boot-env
5 7783 253542 120M rootfs
Command (m for help):