Compare commits

..

11 Commits

Author SHA1 Message Date
Takumi Sueda
cf7cc41efe Merge pull request #58 from brain-hackers/ci-enable-serial
Enable USB UART converter drivers
2024-12-23 20:19:19 +09:00
Takumi Sueda
17c4c8b5a7 Specify the version of setuptools
to avoid failing installing listconfig due to the old Python
2024-12-23 19:13:03 +09:00
Takumi Sueda
924216b934 Update linux-brain: enable USB UART converter 2024-12-23 18:42:49 +09:00
Takumi Sueda
0c7861189b Merge pull request #57 from brain-hackers/ci-next
Upgrade submodules etc.
2024-02-03 23:26:06 -08:00
Takumi Sueda
4257f2465a Workaround workaround 2024-02-04 16:13:11 +09:00
Takumi Sueda
24e5428c62 Build U-Boot specially made for PW-A7400 2024-02-04 16:13:11 +09:00
Takumi Sueda
086c5b08f5 Add x11-ico-dvd, remove weston and xwayland 2024-02-04 16:13:11 +09:00
Takumi Sueda
9d65cf08dd Update linux-brain, u-boot-brain, and brainlilo 2024-02-04 16:13:08 +09:00
Takumi Sueda
68e6e1091e Merge pull request #56 from brain-hackers/buildroot-experiment
Enhance buildroot rootfs
2023-07-31 22:24:07 +09:00
Takumi Sueda
ce8d780b33 Enhance blink.sh 2023-07-31 22:09:11 +09:00
Takumi Sueda
b561fdaec9 buildroot: specify an override directory to add files into the buildroot rootfs 2023-07-31 18:34:50 +09:00
8 changed files with 130 additions and 14 deletions

View File

@@ -45,11 +45,11 @@ 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
run: pip3 install -U pip setuptools
run: pip3 install -U pip 'setuptools<71'
- name: Install listconfig
run: pip3 install listconfig
- name: Configure for Linux
@@ -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

View File

@@ -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;;

View File

@@ -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\

View File

@@ -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