Compare commits
8 Commits
2023-07-29
...
master
Author | SHA1 | Date |
---|---|---|
Takumi Sueda | 0c7861189b | |
Takumi Sueda | 4257f2465a | |
Takumi Sueda | 24e5428c62 | |
Takumi Sueda | 086c5b08f5 | |
Takumi Sueda | 9d65cf08dd | |
Takumi Sueda | 68e6e1091e | |
Takumi Sueda | ce8d780b33 | |
Takumi Sueda | b561fdaec9 |
|
@ -45,7 +45,7 @@ jobs:
|
|||
with:
|
||||
submodules: true
|
||||
- name: Workaround for apt update failure
|
||||
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
||||
run: sudo rm -f /etc/apt/sources.list.d/github_git-lfs.*
|
||||
- name: Install deps
|
||||
run: sudo apt update && sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi qemu-user-static debootstrap python3-pip
|
||||
- name: Upgrade pip and setuptools
|
||||
|
@ -95,7 +95,7 @@ jobs:
|
|||
with:
|
||||
submodules: true
|
||||
- name: Workaround for apt update failure
|
||||
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
||||
run: sudo rm -f /etc/apt/sources.list.d/github_git-lfs.*
|
||||
- name: Install deps
|
||||
run: sudo apt update && sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabihf libssl-dev lzop qemu-user-static debootstrap
|
||||
- name: Configure for Linux
|
||||
|
@ -131,6 +131,9 @@ jobs:
|
|||
- model: a7200
|
||||
nk: edna3exe.bin
|
||||
lilo: gen2.bin
|
||||
- model: a7400
|
||||
nk: edna3exe.bin
|
||||
lilo: gen2_7400.bin
|
||||
- model: sh1
|
||||
nk: edsa1exe.bin
|
||||
lilo: gen3_1.bin
|
||||
|
@ -158,7 +161,7 @@ jobs:
|
|||
with:
|
||||
submodules: true
|
||||
- name: Workaround for apt update failure
|
||||
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
||||
run: sudo rm -f /etc/apt/sources.list.d/github_git-lfs.*
|
||||
- name: Install deps
|
||||
run: sudo apt update && sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi qemu-user-static debootstrap
|
||||
- name: Build nkbin-maker
|
||||
|
@ -204,7 +207,7 @@ jobs:
|
|||
with:
|
||||
submodules: true
|
||||
- name: Workaround for apt update failure
|
||||
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
||||
run: sudo rm -f /etc/apt/sources.list.d/github_git-lfs.*
|
||||
- name: Install deps
|
||||
run: sudo apt update && sudo apt install build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabihf libssl-dev lzop qemu-user-static debootstrap
|
||||
- name: Configure for U-Boot
|
||||
|
@ -245,7 +248,7 @@ jobs:
|
|||
unzip -q cegcc.zip
|
||||
cp -r cegcc /opt/
|
||||
- name: Workaround for apt update failure
|
||||
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
||||
run: sudo rm -f /etc/apt/sources.list.d/github_git-lfs.*
|
||||
- name: Install deps
|
||||
run: sudo apt update && sudo apt install kpartx build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabi qemu-user-static debootstrap
|
||||
- name: Configure for Linux
|
||||
|
@ -281,7 +284,7 @@ jobs:
|
|||
with:
|
||||
submodules: true
|
||||
- name: Workaround for apt update failure
|
||||
run: sudo rm /etc/apt/sources.list.d/github_git-lfs.*
|
||||
run: sudo rm -f /etc/apt/sources.list.d/github_git-lfs.*
|
||||
- name: Install deps
|
||||
run: sudo apt update && sudo apt install kpartx build-essential bison flex libncurses5-dev gcc-arm-linux-gnueabihf libssl-dev lzop qemu-user-static debootstrap
|
||||
- name: Upgrade pip and setuptools
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 0ef73cdeb41b6d56538fa0739210f935eb9f2768
|
||||
Subproject commit 2ec8f7827e40ec8dfe6b7f5b0200e1effaf1b855
|
|
@ -1 +1 @@
|
|||
Subproject commit e39044fa44394042e22f503fb53ba96122956bce
|
||||
Subproject commit cf3ea901082f470449bd174272d8407e039522b2
|
|
@ -14,7 +14,7 @@ export CROSS_COMPILE=arm-linux-gnueabi-
|
|||
mkdir -p ${WORK}
|
||||
mkdir -p ${WORK}/lilobin
|
||||
|
||||
for i in "a7200" "sh1" "sh2" "sh3" "sh4" "sh5" "sh6" "sh7"; do
|
||||
for i in "a7200" "a7400" "sh1" "sh2" "sh3" "sh4" "sh5" "sh6" "sh7"; do
|
||||
NUM=$(echo $i | sed -E 's/sh//g')
|
||||
|
||||
make -C ${REPO}/u-boot-brain distclean pw${i}_defconfig
|
||||
|
@ -25,6 +25,8 @@ for i in "a7200" "sh1" "sh2" "sh3" "sh4" "sh5" "sh6" "sh7"; do
|
|||
"a7200")
|
||||
mv ${REPO}/nk.bin ${WORK}/edna3exe.bin
|
||||
mv ${REPO}/u-boot-brain/u-boot.bin ${WORK}/lilobin/gen2.bin;;
|
||||
"a7400")
|
||||
mv ${REPO}/u-boot-brain/u-boot.bin ${WORK}/lilobin/gen2_7400.bin;;
|
||||
"sh1" | "sh2" | "sh3")
|
||||
mv ${REPO}/nk.bin ${WORK}/edsa${NUM}exe.bin
|
||||
mv ${REPO}/u-boot-brain/u-boot.bin ${WORK}/lilobin/gen3_${NUM}.bin;;
|
||||
|
|
|
@ -1 +1 @@
|
|||
Subproject commit 60e1cb92ee16b5ecf61baccdc19c4821d6b15aee
|
||||
Subproject commit afbb7e017623f0963270cbad512f1d83b83a3d5b
|
|
@ -80,9 +80,8 @@ apt update -y
|
|||
DEBIAN_FRONTEND=noninteractive \
|
||||
apt install -y dialog sudo \
|
||||
libjpeg-dev libfreetype6 libfreetype6-dev zlib1g-dev \
|
||||
xserver-xorg xserver-xorg-video-fbdev xserver-xorg-dev xserver-xorg-input-evdev xinput-calibrator xorg-dev x11-apps xinit \
|
||||
xserver-xorg xserver-xorg-video-fbdev xserver-xorg-dev xserver-xorg-input-evdev xinput-calibrator xorg-dev x11-apps x11-ico-dvd xinit \
|
||||
jwm \
|
||||
weston xwayland \
|
||||
bash tmux vim htop \
|
||||
midori pcmanfm lxterminal xterm gnome-terminal fbterm uim-fep uim-anthy fonts-noto-cjk \
|
||||
dbus udev alsa-utils usbutils iw fake-hwclock systemd-timesyncd\
|
||||
|
|
|
@ -0,0 +1,112 @@
|
|||
#!/bin/sh
|
||||
set -u
|
||||
|
||||
VERBOSE=0
|
||||
PIN=""
|
||||
SLEEP=1
|
||||
GPIOS=""
|
||||
|
||||
while getopts "hvr:p:s:" OPT; do
|
||||
case "$OPT" in
|
||||
h)
|
||||
echo "Usage: blink.sh [-hv] [-r PIN_RANGE_FROM-PIN_RANGE_TO] [-p PIN] [-s SLEEP_SEC]"
|
||||
echo "Example: blink.sh -r 0-10 -p 12"
|
||||
echo " (blink from GPIO 0 to 10 and 12)"
|
||||
exit 0
|
||||
;;
|
||||
v)
|
||||
VERBOSE=1
|
||||
;;
|
||||
r)
|
||||
RE='^([0-9]+)-([0-9]+)$'
|
||||
if echo $OPTARG | grep -qvE $RE; then
|
||||
echo "Error: invalid range: $OPTARG"
|
||||
exit 1
|
||||
fi
|
||||
FROM=$(echo $OPTARG | sed -E "s/$RE/\\1/")
|
||||
TO=$(echo $OPTARG | sed -E "s/$RE/\\2/")
|
||||
GPIOS="$GPIOS$(seq -s " " $FROM $TO) "
|
||||
;;
|
||||
p)
|
||||
if echo $OPTARG | grep -qvE "^[0-9]+$"; then
|
||||
echo "Error: invalid pin number: $OPTARG"
|
||||
exit 1
|
||||
fi
|
||||
GPIOS="$GPIOS$OPTARG "
|
||||
;;
|
||||
s)
|
||||
if echo $OPTARG | grep -qvE "^[0-9]+$"; then
|
||||
echo "Error: invalid sleep duration: $OPTARG"
|
||||
exit 1
|
||||
fi
|
||||
SLEEP=$OPTARG
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
if [ $VERBOSE -eq 1 ]; then
|
||||
echo "Pins to iterate over: $GPIOS"
|
||||
fi
|
||||
|
||||
if [ "$(id -u)" -ne "0" ]; then
|
||||
echo "Error: please run as root"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
AVAILABLE_GPIOS=""
|
||||
|
||||
export_gpio() {
|
||||
echo $1 > /sys/class/gpio/export
|
||||
}
|
||||
|
||||
set_direction() {
|
||||
echo out > /sys/class/gpio/gpio$1/direction
|
||||
}
|
||||
|
||||
set_value() {
|
||||
echo $2 > /sys/class/gpio/gpio$1/value
|
||||
}
|
||||
|
||||
for i in $GPIOS; do
|
||||
if [ ! -e "/sys/class/gpio/gpio$i" ]; then
|
||||
export_gpio $i 2>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Error: failed to export the pin $i"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
set_direction $i 2>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
# Ignore the failure if the actual direction is out
|
||||
if grep -vq "out" /dsys/class/gpio/gpio$i/direction; then
|
||||
echo "Error: failed to set the direction of the pin $i to out"
|
||||
continue
|
||||
fi
|
||||
fi
|
||||
|
||||
AVAILABLE_GPIOS="$AVAILABLE_GPIOS$i "
|
||||
done
|
||||
|
||||
echo "Available GPIOs: $AVAILABLE_GPIOS"
|
||||
|
||||
while [ 1 ]; do
|
||||
for i in $AVAILABLE_GPIOS; do
|
||||
set_value $i 1 2>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Warning: failed to set the value of the pin $i to high"
|
||||
fi
|
||||
done
|
||||
|
||||
sleep $SLEEP
|
||||
|
||||
for i in $AVAILABLE_GPIOS; do
|
||||
set_value $i 0 2>/dev/null
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Warning: failed to set the value of the pin $i to low"
|
||||
fi
|
||||
done
|
||||
|
||||
sleep $SLEEP
|
||||
done
|
||||
|
|
@ -1 +1 @@
|
|||
Subproject commit 783749833dcc9fd1cd318af7750c2b17be182852
|
||||
Subproject commit e8fc0d0cf39d9cd06245ef1777d1cf54258e5cb6
|
Loading…
Reference in New Issue