add build image
@@ -11,7 +11,7 @@ on:
|
||||
type: string
|
||||
|
||||
jobs:
|
||||
rootfs-uclibc:
|
||||
build-image-uclibc:
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
FORCE_UNSAFE_CONFIGURE: 1
|
||||
@@ -30,7 +30,7 @@ jobs:
|
||||
- uses: actions/cache@v3
|
||||
if: inputs.submodule
|
||||
with:
|
||||
path: ${{ inputs.submodule || '.' }}/output/images/rootfs.tar.xz
|
||||
path: ${{ inputs.submodule || '.' }}/output/images/miyoo-cfw-2.0.0.img
|
||||
key: ${{ steps.cache-key.outputs.key }}
|
||||
id: cache
|
||||
|
||||
@@ -47,32 +47,8 @@ jobs:
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: rootfs (uClibc)
|
||||
path: ${{ inputs.submodule || '.' }}/output/images/rootfs.tar.xz
|
||||
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: suniv-f1c500s-miyoo-4bit.dtb (uClibc)
|
||||
path: ${{ inputs.submodule || '.' }}/output/images/suniv-f1c500s-miyoo-4bit.dtb
|
||||
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: suniv-f1c500s-miyoo.dtb (uClibc)
|
||||
path: ${{ inputs.submodule || '.' }}/output/images/suniv-f1c500s-miyoo.dtb
|
||||
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: u-boot-sunxi-with-spl.bin (uClibc)
|
||||
path: ${{ inputs.submodule || '.' }}/output/images/u-boot-sunxi-with-spl.bin
|
||||
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: zImage (uClibc)
|
||||
path: ${{ inputs.submodule || '.' }}/output/images/zImage
|
||||
name: build image (uClibc)
|
||||
path: ${{ inputs.submodule || '.' }}/output/images/miyoo-cfw-2.0.0.img
|
||||
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
@@ -81,7 +57,7 @@ jobs:
|
||||
path: /opt/sdk.tar
|
||||
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
|
||||
|
||||
rootfs-musl:
|
||||
build-image-musl:
|
||||
runs-on: ubuntu-22.04
|
||||
env:
|
||||
FORCE_UNSAFE_CONFIGURE: 1
|
||||
@@ -100,7 +76,7 @@ jobs:
|
||||
- uses: actions/cache@v3
|
||||
if: inputs.submodule
|
||||
with:
|
||||
path: ${{ inputs.submodule || '.' }}/output/images/rootfs.tar.xz
|
||||
path: ${{ inputs.submodule || '.' }}/output/images/miyoo-cfw-2.0.0.img
|
||||
key: ${{ steps.cache-key.outputs.key }}
|
||||
id: cache
|
||||
|
||||
@@ -109,39 +85,15 @@ jobs:
|
||||
run: |
|
||||
cd ${{ inputs.submodule || '.' }}
|
||||
apt update && apt install -y wget unzip build-essential git bc swig libncurses-dev libpython3-dev libssl-dev cpio rsync subversion
|
||||
make miyoo_defconfig
|
||||
make miyoo_musl_defconfig
|
||||
make
|
||||
cd /opt
|
||||
tar cf sdk.tar miyoo
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: rootfs (musl)
|
||||
path: ${{ inputs.submodule || '.' }}/output/images/rootfs.tar.xz
|
||||
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: suniv-f1c500s-miyoo-4bit.dtb (musl)
|
||||
path: ${{ inputs.submodule || '.' }}/output/images/suniv-f1c500s-miyoo-4bit.dtb
|
||||
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: suniv-f1c500s-miyoo.dtb (musl)
|
||||
path: ${{ inputs.submodule || '.' }}/output/images/suniv-f1c500s-miyoo.dtb
|
||||
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: u-boot-sunxi-with-spl.bin (musl)
|
||||
path: ${{ inputs.submodule || '.' }}/output/images/u-boot-sunxi-with-spl.bin
|
||||
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
with:
|
||||
name: zImage (musl)
|
||||
path: ${{ inputs.submodule || '.' }}/output/images/zImage
|
||||
name: build image (musl)
|
||||
path: ${{ inputs.submodule || '.' }}/output/images/miyoo-cfw-2.0.0.img
|
||||
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
/.idea
|
||||
/output
|
||||
/dl
|
||||
/.auto.deps
|
||||
|
||||
@@ -1,27 +0,0 @@
|
||||
Buildroot is a simple, efficient and easy-to-use tool to generate embedded
|
||||
Linux systems through cross-compilation.
|
||||
|
||||
The documentation can be found in docs/manual. You can generate a text
|
||||
document with 'make manual-text' and read output/docs/manual/manual.text.
|
||||
Online documentation can be found at http://buildroot.org/docs.html
|
||||
|
||||
To build and use the buildroot stuff, do the following:
|
||||
|
||||
0) run 'make miyoo_defconfig'
|
||||
1) run 'make menuconfig'
|
||||
2) select the target architecture and the packages you wish to compile
|
||||
3) run 'make'
|
||||
4) wait while it compiles
|
||||
5) find the kernel, bootloader, root filesystem, etc. in output/images
|
||||
|
||||
You do not need to be root to build or run buildroot. Have fun!
|
||||
|
||||
Buildroot comes with a basic configuration for a number of boards. Run
|
||||
'make list-defconfigs' to view the list of provided configurations.
|
||||
|
||||
Please feed suggestions, bug reports, insults, and bribes back to the
|
||||
buildroot mailing list: buildroot@buildroot.org
|
||||
You can also find us on #buildroot on OFTC IRC.
|
||||
|
||||
If you would like to contribute patches, please read
|
||||
https://buildroot.org/manual.html#submitting-patches
|
||||
@@ -0,0 +1,48 @@
|
||||
# Buildroot Package for Miyoo CFW 2.0.0
|
||||
Opensource development package for Miyoo handhelds
|
||||
|
||||
## Install
|
||||
|
||||
### Install necessary packages
|
||||
``` shell
|
||||
sudo apt install -y wget unzip build-essential git bc swig libncurses-dev libpython3-dev libssl-dev cpio rsync subversion
|
||||
```
|
||||
|
||||
### Download BSP
|
||||
```shell
|
||||
git clone https://github.com/MiyooCFW/buildroot
|
||||
```
|
||||
|
||||
## Make the first build
|
||||
|
||||
### Apply defconfig uClibc
|
||||
|
||||
```shell
|
||||
cd buildroot
|
||||
make miyoo_uclibc_defconfig
|
||||
```
|
||||
|
||||
### Or apply defconfig musl
|
||||
|
||||
```shell
|
||||
cd buildroot
|
||||
make miyoo_musl_defconfig
|
||||
```
|
||||
|
||||
### Regular build
|
||||
```shell
|
||||
make
|
||||
```
|
||||
|
||||
## Speed up build progress
|
||||
|
||||
### Compile speed
|
||||
If you have a multicore CPU, you can try
|
||||
```
|
||||
make -j ${YOUR_CPU_COUNT}
|
||||
```
|
||||
or buy a powerful PC for yourself.
|
||||
|
||||
## Flashing firmware to target
|
||||
|
||||
load output/images/miyoo-cfw-2.0.0.img on sdcard
|
||||
@@ -0,0 +1,6 @@
|
||||
fatload mmc 0:1 0x80008000 uEnv.txt
|
||||
env import -t 0x80008000 ${filesize}
|
||||
run bootcmd_args
|
||||
load mmc 0:1 0x80C00000 suniv-f1c500s-miyoo-4bit.dtb
|
||||
load mmc 0:1 0x80008000 zImage
|
||||
bootz 0x80008000 - 0x80C00000
|
||||
@@ -0,0 +1,6 @@
|
||||
setenv bootargs console=tty0 console=ttyS1,115200 panic=5 rootwait root=/dev/mmcblk0p2 rw miyoo_kbd.miyoo_ver=2 miyoo_kbd.miyoo_layout=1 miyoo.miyoo_snd=1
|
||||
fatload mmc 0:1 0x80008000 console.cfg
|
||||
env import -t 0x80008000 ${filesize}
|
||||
load mmc 0:1 0x80C00000 suniv-f1c500s-miyoo.dtb
|
||||
load mmc 0:1 0x80008000 zImage
|
||||
bootz 0x80008000 - 0x80C00000
|
||||
@@ -0,0 +1,6 @@
|
||||
fatload mmc 0:1 0x80008000 uEnv.txt
|
||||
env import -t 0x80008000 ${filesize}
|
||||
run bootcmd_args
|
||||
load mmc 0:1 0x80C00000 suniv-f1c500s-miyoo.dtb
|
||||
load mmc 0:1 0x80008000 zImage
|
||||
bootz 0x80008000 - 0x80C00000
|
||||
@@ -0,0 +1,2 @@
|
||||
[autorun]
|
||||
icon=boot.ico
|
||||
|
After Width: | Height: | Size: 112 KiB |
@@ -0,0 +1 @@
|
||||
CONSOLE_VARIANT=v90_q90
|
||||
@@ -0,0 +1,103 @@
|
||||
#!/bin/busybox sh
|
||||
|
||||
MOUNTDIR=/boot
|
||||
# expect to be run from /boot, where the boot partition is mounted (readonly)
|
||||
|
||||
# also expect CONSOLE_VARIANT to be passed in = already set from /etc/main
|
||||
# also expect the screen driver to be loaded in /etc/main
|
||||
|
||||
# create swap
|
||||
mkswap /dev/mmcblk0p3 | tee -a ${LOG}
|
||||
swapon /dev/mmcblk0p3 | tee -a ${LOG}
|
||||
|
||||
LOG=/dev/null
|
||||
|
||||
BINDIR="${MOUNTDIR}/misc/bin"
|
||||
FATFSCK="${BINDIR}/fsck.fat"
|
||||
|
||||
# high brightness
|
||||
echo '10' > /sys/devices/platform/backlight/backlight/backlight/brightness
|
||||
|
||||
#echo -e "\e[?3c"
|
||||
echo -e "\e[32m" # green
|
||||
|
||||
# action time - copy over the kernel and the config files
|
||||
|
||||
echo "firstboot script running..." | tee -a ${LOG}
|
||||
echo
|
||||
|
||||
BASEDIR="${MOUNTDIR}"
|
||||
|
||||
# action time
|
||||
|
||||
# copy over the config files
|
||||
echo "Copying default configuration files into place..." | tee -a ${LOG}
|
||||
mount -t vfat -o rw,sync,utf8 /dev/mmcblk0p4 /mnt | tee -a ${LOG}
|
||||
if test -r "${BASEDIR}/configs/manifest"; then
|
||||
cat "${BASEDIR}/configs/manifest" | while read -r LINE; do
|
||||
if test "${LINE}" == "${LINE#!}" -a "${LINE}" != "" ; then
|
||||
set -- ${LINE}
|
||||
# 1 2
|
||||
# source_filename target_filename/inside main/
|
||||
if test -r "${BASEDIR}/configs/$1"; then
|
||||
TO="$2"
|
||||
if test "${TO}" == ""; then
|
||||
TO="$1"
|
||||
fi
|
||||
echo "Copying $1 to /mnt/$TO..." | tee -a ${LOG}
|
||||
cp -f "${BASEDIR}/configs/$1" "/mnt/$TO" | tee -a ${LOG}
|
||||
fi
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
echo
|
||||
|
||||
# run a custom script if present - could be used to fix u-boot and such
|
||||
if test -r "${BASEDIR}/firstboot.custom.sh"; then
|
||||
echo "Running a specific firstboot script..." | tee -a ${LOG}
|
||||
(cd "${BASEDIR}" && sh firstboot.custom.sh) | tee -a ${LOG}
|
||||
echo "Finished running a specific firstboot script." | tee -a ${LOG}
|
||||
fi
|
||||
|
||||
|
||||
echo
|
||||
|
||||
# resize the main partition if requested
|
||||
if test -e "${MOUNTDIR}/resize"; then
|
||||
echo "Going to resize the MAIN partition." | tee -a ${LOG}
|
||||
echo "This can take A LONG TIME, so be patient." | tee -a ${LOG}
|
||||
umount /dev/mmcblk0p4 | tee -a ${LOG}
|
||||
"${FATFSCK}" -y /dev/mmcblk0p4 | tee -a ${LOG}
|
||||
"${BINDIR}/fatresize_hc" | tee -a ${LOG}
|
||||
"${FATFSCK}" -y /dev/mmcblk0p4 | tee -a ${LOG}
|
||||
echo -n -e \\xEB\\x58\\x90 > /dev/mmcblk0p4
|
||||
sync
|
||||
mount -t vfat -o rw,sync,utf8 /dev/mmcblk0p4 /mnt | tee -a ${LOG}
|
||||
fi
|
||||
|
||||
# do some more stuff here ??
|
||||
|
||||
|
||||
mount -o remount,rw "${MOUNTDIR}" | tee -a ${LOG}
|
||||
# disable this script
|
||||
echo "Disabling the firstboot script." | tee -a ${LOG}
|
||||
mv "${MOUNTDIR}/firstboot" "${MOUNTDIR}/firstboot.done" | tee -a ${LOG}
|
||||
if test -e "${MOUNTDIR}/resize"; then rm "${MOUNTDIR}/resize"; fi
|
||||
mount -o remount,ro "${MOUNTDIR}" | tee -a ${LOG}
|
||||
|
||||
echo
|
||||
|
||||
sync
|
||||
echo "firstboot script finished." | tee -a ${LOG}
|
||||
|
||||
echo
|
||||
|
||||
#REBOOT device if firstboot.custom script detected - for e.g. u-boot
|
||||
if test -r "${BASEDIR}/firstboot.custom.sh"; then
|
||||
echo "please wait a few seconds for shutdown...." | tee -a ${LOG}
|
||||
umount /dev/mmcblk0p4 | tee -a ${LOG}
|
||||
#umount /dev/mmcblk0p1 | tee -a ${LOG} # this fails
|
||||
sleep 3
|
||||
reboot
|
||||
fi
|
||||
@@ -0,0 +1,2 @@
|
||||
echo "Writing U-BOOT - DO NOT TURN OFF THE HANDHELD!!!"
|
||||
dd if=./misc/u-boot-bins/u-boot.bin of=/dev/mmcblk0 bs=1024 seek=8
|
||||
@@ -0,0 +1,5 @@
|
||||
# expected to be run from this directory
|
||||
# LOGS variable is set, but it should usually be /dev/null
|
||||
# CONSOLE_VARIANT is also set
|
||||
#
|
||||
daemon >> "${LOGS}" 2>&1
|
||||
@@ -0,0 +1,60 @@
|
||||
image bootfs.vfat {
|
||||
vfat {
|
||||
label = "BOOT"
|
||||
files = {
|
||||
"zImage",
|
||||
"suniv-f1c500s-miyoo.dtb",
|
||||
"boot.scr",
|
||||
"boot/autorun.inf",
|
||||
"boot/boot.ico",
|
||||
"boot/console.cfg",
|
||||
"boot/firstboot",
|
||||
"boot/firstboot.custom.sh-OFF",
|
||||
"boot/normalboot.custom.sh"
|
||||
}
|
||||
}
|
||||
size = 8M
|
||||
}
|
||||
|
||||
image mainfs.vfat {
|
||||
vfat {
|
||||
label = "MAIN"
|
||||
}
|
||||
mountpoint = "../../../images/main/"
|
||||
size = 512M
|
||||
}
|
||||
|
||||
|
||||
image miyoo-cfw-2.0.0.img {
|
||||
hdimage {}
|
||||
|
||||
partition u-boot {
|
||||
in-partition-table = "no"
|
||||
image = "u-boot-sunxi-with-spl.bin"
|
||||
offset = 0x2000
|
||||
size = 1016K # 1MB - 8192
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xB
|
||||
bootable = "true"
|
||||
image = "bootfs.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
|
||||
partition swap {
|
||||
partition-type = 0x82
|
||||
bootable = "false"
|
||||
size = 128M
|
||||
}
|
||||
|
||||
partition main {
|
||||
partition-type = 0xc
|
||||
bootable = "false"
|
||||
image = "mainfs.vfat"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
9
|
||||
|
After Width: | Height: | Size: 9.8 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 8.0 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 5.6 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 8.0 KiB |
|
After Width: | Height: | Size: 6.8 KiB |
|
After Width: | Height: | Size: 9.7 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 8.1 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 9.3 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 9.4 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 7.2 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 4.5 KiB |
|
After Width: | Height: | Size: 6.2 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 7.3 KiB |
|
After Width: | Height: | Size: 18 KiB |
|
After Width: | Height: | Size: 7.7 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 7.4 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 4.9 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 6.7 KiB |
|
After Width: | Height: | Size: 6.0 KiB |
|
After Width: | Height: | Size: 6.1 KiB |
|
After Width: | Height: | Size: 9.5 KiB |
|
After Width: | Height: | Size: 9.0 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 7.1 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 15 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 7.8 KiB |
|
After Width: | Height: | Size: 9.1 KiB |
|
After Width: | Height: | Size: 16 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 12 KiB |
|
After Width: | Height: | Size: 13 KiB |
|
After Width: | Height: | Size: 17 KiB |
|
After Width: | Height: | Size: 8.7 KiB |
|
After Width: | Height: | Size: 14 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 11 KiB |
|
After Width: | Height: | Size: 10 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 6.5 KiB |
|
After Width: | Height: | Size: 6.6 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 2.7 KiB |
|
After Width: | Height: | Size: 7.0 KiB |
|
After Width: | Height: | Size: 4.8 KiB |
|
After Width: | Height: | Size: 2.6 KiB |
|
After Width: | Height: | Size: 2.8 KiB |