BTRFS file system for MAIN and rootfs partition (#65)

* BTRFS file system for MAIN and rootfs partition
This commit is contained in:
tiopex
2023-12-13 07:14:00 +01:00
committed by GitHub
parent 2f89873479
commit 130d2be1f3
33 changed files with 165 additions and 162 deletions
+2 -2
View File
@@ -91,7 +91,7 @@ jobs:
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: rootfs (uClibc) name: rootfs (uClibc)
path: ${{ inputs.submodule || '.' }}/output/images/rootfs.ext4 path: ${{ inputs.submodule || '.' }}/output/images/rootfs.btrfs
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn` if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
build-image-musl: build-image-musl:
@@ -175,7 +175,7 @@ jobs:
- uses: actions/upload-artifact@v3 - uses: actions/upload-artifact@v3
with: with:
name: rootfs (musl) name: rootfs (musl)
path: ${{ inputs.submodule || '.' }}/output/images/rootfs.ext4 path: ${{ inputs.submodule || '.' }}/output/images/rootfs.btrfs
if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn` if-no-files-found: error # 'error', 'warn', 'ignore'; defaults to `warn`
build-sdk-uclibc-static: build-sdk-uclibc-static:
-11
View File
@@ -1,11 +0,0 @@
! manifest
! format: each line corresponds to one file to be copied over
! from_file(as_appears_in_this_directory) to_file(relative_to_root_of_main_partition)
! to_file is optional; if missing will use from_file
.backlight.conf
.volume.conf
.buttons.conf
.batterylow.conf
gmenu2x.conf gmenu2x/gmenu2x.conf
input.conf gmenu2x/input.conf
! leave this last line here
+18 -50
View File
@@ -154,6 +154,7 @@ console_unknown_func(){
## Default CONSOLE_VARIANT for st7789s screens ## Default CONSOLE_VARIANT for st7789s screens
default_console_func(){ default_console_func(){
echo "CONSOLE_VARIANT=pocketgo" > ${MOUNTDIR}/console.cfg echo "CONSOLE_VARIANT=pocketgo" > ${MOUNTDIR}/console.cfg
cp ${MOUNTDIR}/suniv-f1c100s-miyoo-4bit.dtb ${MOUNTDIR}/suniv-f1c100s-miyoo.dtb
# No need to overwrite uboot FORCE version for default so continue procedure # No need to overwrite uboot FORCE version for default so continue procedure
CONSOLE_OVERWRITE=false CONSOLE_OVERWRITE=false
} }
@@ -375,18 +376,22 @@ if ! $FOUND_CONSOLE && $FOUND_CONSOLE_AUTO && $CONSOLE_DETECTED; then
case $CHOICE in case $CHOICE in
1) 1)
echo "CONSOLE_VARIANT=q20" > ${MOUNTDIR}/console.cfg echo "CONSOLE_VARIANT=q20" > ${MOUNTDIR}/console.cfg
cp ${MOUNTDIR}/suniv-f1c100s-miyoo-4bit.dtb ${MOUNTDIR}/suniv-f1c100s-miyoo.dtb
;; ;;
2) 2)
echo "CONSOLE_VARIANT=q90" > ${MOUNTDIR}/console.cfg echo "CONSOLE_VARIANT=q90" > ${MOUNTDIR}/console.cfg
cp ${MOUNTDIR}/suniv-f1c100s-miyoo-4bit.dtb ${MOUNTDIR}/suniv-f1c100s-miyoo.dtb
;; ;;
3) 3)
echo "CONSOLE_VARIANT=v90" > ${MOUNTDIR}/console.cfg echo "CONSOLE_VARIANT=v90" > ${MOUNTDIR}/console.cfg
cp ${MOUNTDIR}/suniv-f1c100s-miyoo-4bit.dtb ${MOUNTDIR}/suniv-f1c100s-miyoo.dtb
;; ;;
4) 4)
default_console_func default_console_func
;; ;;
5) 5)
echo "CONSOLE_VARIANT=pocketgo_TE" > ${MOUNTDIR}/console.cfg echo "CONSOLE_VARIANT=pocketgo_TE" > ${MOUNTDIR}/console.cfg
cp ${MOUNTDIR}/suniv-f1c100s-miyoo-4bit.dtb ${MOUNTDIR}/suniv-f1c100s-miyoo.dtb
;; ;;
*) *)
dialog --timeout 4 --msgbox "Invalid choice. Exiting and selecting default device from autodetection." 0 0 dialog --timeout 4 --msgbox "Invalid choice. Exiting and selecting default device from autodetection." 0 0
@@ -518,21 +523,8 @@ SD_MAX_AVAIL_SIZE_IN_KiB=$((SD_MAX_AVAIL_SIZE * 512 / 1024))
RESIZE_COMMENCED=false RESIZE_COMMENCED=false
if (dialog --clear --stdout --ok-label YES --cancel-label NO --title " AUTO-RESIZE" \ if (dialog --clear --stdout --ok-label YES --cancel-label NO --title " AUTO-RESIZE" \
--colors --pause "\n\n \ZuExpand MAIN partition?\Zn\n\n Select an option & press START --colors --pause "\n\n \ZuExpand MAIN partition?\Zn\n\n Select an option & press START
\n\n \ZbWARNING:\Zn\n After 10s auto-resize\n of FAT32 partition will begin." 15 60 10); then \n\n \ZbWARNING:\Zn\n After 10s auto-resize\n of BTRFS partition will begin." 15 60 10); then
clear clear
RESIZE_ABORT=false
if test "$SD_SIZE_IN_GiB" -gt 128; then
if (dialog --clear --stdout --ok-label NO --cancel-label YES --title " \Zb\Z1WARNING!\Zn" \
--colors --pause "\nYour SD card exceeds max. size for auto-resizing!
\n\nWe could however expand it to 118GB. \n\n \ZuDo you AGREE?\Zn
\n\n\ZbINFO: For microSD >128GB big we\n recommend to use your PC!\Zn" 0 0 30 || test $? -eq 255); then
dialog --clear --colors --timeout 2 --msgbox " FAT resizing \ZuABORTED!\Zn" 5 27
clear
RESIZE_ABORT=true
else
SD_MAX_AVAIL_SIZE_IN_KiB=123731968
fi
fi
SD_MAX_AVAIL_SIZE_IN_GiB=$(echo "scale=1; ${SD_MAX_AVAIL_SIZE_IN_KiB} / 1024 / 1024" | bc) #only to inform user about end point for resize SD_MAX_AVAIL_SIZE_IN_GiB=$(echo "scale=1; ${SD_MAX_AVAIL_SIZE_IN_KiB} / 1024 / 1024" | bc) #only to inform user about end point for resize
SD_MAX_AVAIL_SIZE_IN_GB=$(echo "scale=1; ${SD_MAX_AVAIL_SIZE_IN_KiB} * 1024 / 1000 / 1000 / 1000" | bc) SD_MAX_AVAIL_SIZE_IN_GB=$(echo "scale=1; ${SD_MAX_AVAIL_SIZE_IN_KiB} * 1024 / 1000 / 1000 / 1000" | bc)
P4_SIZE_IN_GB=$(echo "scale=1; ${P4_SIZE} * 512 / 1000 / 1000 / 1000" | bc) P4_SIZE_IN_GB=$(echo "scale=1; ${P4_SIZE} * 512 / 1000 / 1000 / 1000" | bc)
@@ -548,21 +540,15 @@ if (dialog --clear --stdout --ok-label YES --cancel-label NO --title " AUTO-RE
echo "The full size of your SD is ${SD_SIZE_IN_MiB}MB large" | tee -a ${LOG} echo "The full size of your SD is ${SD_SIZE_IN_MiB}MB large" | tee -a ${LOG}
echo "Unallocated space available for resizing equals ${SD_MAX_UNALL_SIZE_IN_GiB}GB," | tee -a ${LOG} echo "Unallocated space available for resizing equals ${SD_MAX_UNALL_SIZE_IN_GiB}GB," | tee -a ${LOG}
echo "and more precisely it's ${SD_MAX_UNALL_SIZE_IN_MiB}MB big" | tee -a ${LOG} echo "and more precisely it's ${SD_MAX_UNALL_SIZE_IN_MiB}MB big" | tee -a ${LOG}
if ! $RESIZE_ABORT; then
echo "Resizing the MAIN partition to ${SD_MAX_AVAIL_SIZE_IN_GiB}GB." | tee -a ${LOG} echo "Resizing the MAIN partition to ${SD_MAX_AVAIL_SIZE_IN_GiB}GB." | tee -a ${LOG}
echo "This can take A LONG TIME, so be patient." | tee -a ${LOG} echo "This can take a few seconds." | tee -a ${LOG}
umount /dev/mmcblk0p4 | tee -a ${LOG} umount /dev/mmcblk0p4 | tee -a ${LOG}
fsck.fat -y /dev/mmcblk0p4 | tee -a ${LOG} P4_START_POINT=` parted /dev/mmcblk0 unit MB print | grep '4' | tail -n1 | awk '{print $2}'`
#TODO: fix outputting logs from fatresize stdout parted -a optimal /dev/mmcblk0 --script rm 4 | tee -a ${LOG}
fatresize --size="${SD_MAX_AVAIL_SIZE_IN_KiB}"ki -v -p /dev/mmcblk0p4 -n4 | tee -a ${LOG} parted -a optimal /dev/mmcblk0 --script mkpart primary $P4_START_POINT 100% | tee -a ${LOG}
fsck.fat -y /dev/mmcblk0p4 | tee -a ${LOG} partx -u /dev/mmcblk0 | tee -a ${LOG}
echo -n -e \\xEB\\x58\\x90 > /dev/mmcblk0p4 mount /dev/mmcblk0p4 ${HOME} | tee -a ${LOG}
sync btrfs filesystem resize max ${HOME} | tee -a ${LOG}
mount -t vfat -o rw,sync,utf8 /dev/mmcblk0p4 ${HOME} | tee -a ${LOG}
else
echo "MAIN fat partition resizing was aborted!" | tee -a ${LOG}
sleep 2
fi
RESIZE_COMMENCED=true RESIZE_COMMENCED=true
fi fi
@@ -577,32 +563,14 @@ mv "${MOUNTDIR}/firstboot" "${MOUNTDIR}/firstboot.done" | tee -a ${LOG}
# copy over the config files # copy over the config files
echo "Copying default configuration files into place..." | tee -a ${LOG} echo "Copying default configuration files into place..." | tee -a ${LOG}
if $BITTBOY_CONFIG; then if $BITTBOY_CONFIG; then
cp "${HOME}/gmenu2x/input_bittboy.conf" "${MOUNTDIR}/configs/input.conf" cp "${HOME}/gmenu2x/input_bittboy.conf" "${HOME}/gmenu2x/input.conf"
elif $MIYOO_CONFIG; then elif $MIYOO_CONFIG; then
cp "${HOME}/gmenu2x/input_miyoo.conf" "${MOUNTDIR}/configs/input.conf" cp "${HOME}/gmenu2x/input_miyoo.conf" "${HOME}/gmenu2x/input.conf"
fi fi
mount -o remount,ro "${MOUNTDIR}" | tee -a ${LOG} mount -o remount,ro "${MOUNTDIR}" | 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 ${HOME}/$TO..." | tee -a ${LOG}
cp -f "${BASEDIR}/configs/$1" "${HOME}/$TO" | tee -a ${LOG}
fi
fi
done
fi
echo "Renaming ${HOME}/retroarch directory to ${HOME}/.retroarch" | tee -a ${LOG}
mv "${HOME}/retroarch" "${HOME}/.retroarch" | tee -a ${LOG}
echo echo "fix permsissions" | tee -a ${LOG}
chmod -R +x /mnt/ | tee -a ${LOG}
sync sync
echo "firstboot script finished." | tee -a ${LOG} echo "firstboot script finished." | tee -a ${LOG}
@@ -610,7 +578,7 @@ touch ${HOME}/firstboot.completed
echo echo
# Reboot device if CONSOLE_VARIANT was overwritten from $CHOICE so that it could be applied in u-boot by readID # Reboot device if CONSOLE_VARIANT was overwritten from $CHOICE so that it could be applied in u-boot by readID
## or resizing FAT partition has completed / found firstboot custom script ## or resizing BTRFS partition has completed / found firstboot custom script
if ($CONSOLE_OVERWRITE || $RESIZE_COMMENCED || test -r "${BASEDIR}/firstboot.custom.sh"); then if ($CONSOLE_OVERWRITE || $RESIZE_COMMENCED || test -r "${BASEDIR}/firstboot.custom.sh"); then
safe_reboot_func safe_reboot_func
else else
+4 -25
View File
@@ -4,6 +4,7 @@ image bootfs.vfat {
files = { files = {
"zImage", "zImage",
"suniv-f1c100s-miyoo.dtb", "suniv-f1c100s-miyoo.dtb",
"suniv-f1c100s-miyoo-4bit.dtb",
"boot.scr", "boot.scr",
"boot/miyoo-boot.bmp", "boot/miyoo-boot.bmp",
"boot/autorun.inf", "boot/autorun.inf",
@@ -14,32 +15,10 @@ image bootfs.vfat {
"boot/modules.custom.sh", "boot/modules.custom.sh",
"boot/normalboot.custom.sh", "boot/normalboot.custom.sh",
} }
file configs/manifest {
image = "boot/configs/manifest"
}
file configs/.volume.conf {
image = "boot/configs/.volume.conf"
}
file configs/.buttons.conf {
image = "boot/configs/.buttons.conf"
}
file configs/.batterylow.conf {
image = "boot/configs/.batterylow.conf"
}
file configs/.backlight.conf {
image = "boot/configs/.backlight.conf"
}
} }
size = 8M size = 8M
} }
image mainfs.vfat {
vfat {
label = "MAIN"
}
mountpoint = "../../../images/main/"
size = 640M
}
image ${IMAGE_NAME:-miyoo-cfw-2.0.0.img} { image ${IMAGE_NAME:-miyoo-cfw-2.0.0.img} {
@@ -60,7 +39,7 @@ image ${IMAGE_NAME:-miyoo-cfw-2.0.0.img} {
partition rootfs { partition rootfs {
partition-type = 0x83 partition-type = 0x83
image = "rootfs.ext4" image = "rootfs.btrfs"
} }
partition swap { partition swap {
@@ -70,8 +49,8 @@ image ${IMAGE_NAME:-miyoo-cfw-2.0.0.img} {
} }
partition main { partition main {
partition-type = 0xc partition-type = 0x83
bootable = "false" bootable = "false"
image = "mainfs.vfat" image = "main.img"
} }
} }
View File
View File
View File
View File
-33
View File
@@ -1,33 +0,0 @@
#!/bin/sh
sync
echo " "
echo "Checking FAT filesystem..."
echo " "
sleep 2
if dmesg | grep "mmcblk0p1"; then
echo -e "\e[31mUnclean shutdown detected.\e[0m"
echo -e "\e[32mChecking FAT32 (BOOT) partition...\e[0m"
fsck.vfat -a /dev/mmcblk0p1
fi
if dmesg | grep "mmcblk0p4"; then
echo -e "\e[31mUnclean shutdown detected.\e[0m"
echo -e "\e[32mChecking FAT32 (MAIN) partition...\e[0m"
fsck.vfat -a /dev/mmcblk0p4
echo " "
echo "Rebooting device, please wait..."
echo " "
sleep 2
sync
reboot
fi
echo "Finished!"
echo " "
echo " "
sync
read -t 2
sleep 1
View File
View File
View File
View File
View File
+4 -10
View File
@@ -5,20 +5,14 @@ st_error_func(){
st_exec_func(){ st_exec_func(){
st -k -e "/bin/sh" "-c" "${1}" st -k -e "/bin/sh" "-c" "${1}"
} }
echo peripheral > /sys/devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/mode
MUSB_MODE=$(cat /sys/devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/mode) killall umtprd
if ! (test "${MUSB_MODE}" = "b_peripheral"); then modprobe -r g_serial
st_error_func "\n\n\n\n\n\n\n\n First connect handheld to device!" mount none /sys/kernel/config -t configfs
exit
else
gadget-vid-pid-remove 0x1d6b:0x0104
gadget-hid gadget-hid
st_exec_func "\ st_exec_func "\
echo -e \"\e[32m\n\n\n\n\n\n Starting USB-HID mode\e[0m\n\n\n\"; \ echo -e \"\e[32m\n\n\n\n\n\n Starting USB-HID mode\e[0m\n\n\n\"; \
sleep 1; \ sleep 1; \
python /mnt/apps/usb-hid/usb-hid.py" python /mnt/apps/usb-hid/usb-hid.py"
gadget-vid-pid-remove 0x1d6b:0x0104 gadget-vid-pid-remove 0x1d6b:0x0104
gadget-ms /dev/mmcblk0p1 /dev/mmcblk0p4
fi
View File
+6
View File
@@ -0,0 +1,6 @@
#!/bin/busybox sh
echo peripheral > /sys/devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/mode
modprobe -r g_serial
killall umtprd
umtprd &
@@ -1,2 +1,4 @@
#!/bin/busybox sh #!/bin/busybox sh
echo peripheral > /sys/devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/mode echo peripheral > /sys/devices/platform/soc/1c13000.usb/musb-hdrc.1.auto/mode
killall umtprd
modprobe g_serial
@@ -1,3 +0,0 @@
title=File System Check
exec=/usr/bin/st
params=-k -e /mnt/apps/fsck/fsck.sh
@@ -0,0 +1,3 @@
title=USB MTD
description=USB MTD mass storage
exec=/mnt/apps/usb-mtd/usb-mtd.sh
@@ -0,0 +1,3 @@
title=USB serial console
description=USB Serial console
exec=/mnt/apps/usb-serial-console/usb-serial.sh
@@ -1,3 +0,0 @@
title=USB serial MS
description=USB Serial mass storage mode
exec=/mnt/apps/usb-serial-mass-storage/usb-serial-mass-storage.sh
+1 -1
View File
@@ -20,7 +20,7 @@
::sysinit:/bin/mkdir -p /dev/shm ::sysinit:/bin/mkdir -p /dev/shm
::sysinit:/bin/mount -a ::sysinit:/bin/mount -a
::sysinit:/bin/hostname -F /etc/hostname ::sysinit:/bin/hostname -F /etc/hostname
::sysinit:/bin/mount /dev/mmcblk0p4 /mnt -t vfat -o rw,sync,utf8 ::sysinit:/bin/mount /dev/mmcblk0p4 /mnt -o discard=async,noatime,nodiratime,exec
::sysinit:/bin/mount /dev/mmcblk0p1 /boot -t vfat -o ro,exec,sync,utf8 ::sysinit:/bin/mount /dev/mmcblk0p1 /boot -t vfat -o ro,exec,sync,utf8
::sysinit:/sbin/mkswap /dev/mmcblk0p3 ::sysinit:/sbin/mkswap /dev/mmcblk0p3
::sysinit:/sbin/swapon /dev/mmcblk0p3 ::sysinit:/sbin/swapon /dev/mmcblk0p3
+10 -11
View File
@@ -26,9 +26,9 @@ fi
# load kernel modules # load kernel modules
# load usb gadget # load usb gadget
mount -t configfs none /sys/kernel/config >> "${LOGS}" 2>&1 modprobe g_ffs idVendor=0x1fc9 idProduct=0x0146 iSerialNumber="01234567" iProduct="Miyoo CFW 2.0" iManufacturer="Miyoo Handheld" functions=mtp >> "${LOGS}" 2>&1
gadget-ms /dev/mmcblk0p1 /dev/mmcblk0p4 >> "${LOGS}" 2>&1 mkdir /dev/ffs-mtp && mount -t functionfs mtp /dev/ffs-mtp >> "${LOGS}" 2>&1
umtprd >> "${LOGS}" 2>&1 &
# Load the expected one screen driver from here with modprobe # Load the expected one screen driver from here with modprobe
## automatically from rootfs/lib/modules/VERSION ## automatically from rootfs/lib/modules/VERSION
@@ -77,19 +77,18 @@ elif test -r "${HOME}/firstboot.completed"; then
fi fi
if !(grep -q FAT_CHECK\=\0 "${HOME}/options.cfg"); then if !(grep -q FAT_CHECK\=\0 "${HOME}/options.cfg"); then
##Check if fat32 is flagged as "dirty", and if so unmount, repair, remount ##Check if FAT16 is flagged as "dirty", and if so unmount, repair, remount
if dmesg | grep "mmcblk0p4" > /dev/null; then if dmesg | grep "mmcblk0p1" > /dev/null; then
echo -e "\e[31mUnclean shutdown detected.\e[0m" echo -e "\e[31mDirty sectors detected.\e[0m"
echo -e "\e[32mChecking FAT32 partition...\e[0m" echo -e "\e[32mChecking&Repairing FAT16 BOOT partition...\e[0m"
umount /dev/mmcblk0p4 umount /dev/mmcblk0p1
fsck.vfat -y /dev/mmcblk0p4 > /dev/null; fsck.vfat -y /dev/mmcblk0p1 > /dev/null;
mount /dev/mmcblk0p4 "${HOME}" -t vfat -o rw,sync,utf8 mount /dev/mmcblk0p1 "${BOOTDIR}" -t vfat -o ro,exec,sync,utf8
echo -e "\e[32mCheck complete.\e[0m" echo -e "\e[32mCheck complete.\e[0m"
fi fi
fi fi
clear clear
# try to read what handheld we're on # try to read what handheld we're on
if test -r "${BOOTDIR}/console.cfg"; then if test -r "${BOOTDIR}/console.cfg"; then
source "${BOOTDIR}/console.cfg" source "${BOOTDIR}/console.cfg"
+88
View File
@@ -0,0 +1,88 @@
#
# uMTP Responder config file
# Must be copied to /etc/umtprd/umtprd.conf
#
# Loop / daemon mode
# Set to 1 to don't shutdown uMTPrd when the link is disconnected.
loop_on_disconnect 1
#storage command : Create add a storage entry point. Up to 16 entry points supported
#Syntax : storage "PATH" "NAME"
storage "/" "rootfs" "ro"
storage "/mnt" "MAIN" "rw"
storage "/boot" "BOOT" "ro"
#
# Uncomment the following line if you want to
# override the system default umask value for
# the uploaded files.
#
umask 000
# Set the USB manufacturer string
manufacturer "Miyoo CFW 2.0"
# Set the USB Product string
product "Miyoo Handheld"
# Set the USB Serial number string
serial "01234567"
# Set the USB interface string. Should be always "MTP"
interface "MTP"
# Set the USB Vendor ID, Product ID and class
usb_vendor_id 0x1D6B # Linux Foundation
usb_product_id 0x0100 # PTP Gadget
usb_class 0x6 # Image
usb_subclass 0x1 # Still Imaging device
usb_protocol 0x1 #
# Device version
usb_dev_version 0x3008
# inotify support
# If you want disable the events support (beta), uncomment the following line :
# no_inotify 0x1
#
# Internal buffers size
#
# Internal default usb_max_rd_buffer_size and usb_max_wr_buffer_size value set to 0x10000.
# Internal default read_buffer_cache_size value set to 0x100000.
# Uncomment the following lines to reduce the buffers sizes to fix USB issues on iMX6 based systems.
usb_max_rd_buffer_size 0x8000 # MAX usb read size. Must be a multiple of 512 and be less than read_buffer_cache_size
usb_max_wr_buffer_size 0x8000 # MAX usb write size. Must be a multiple of 512.
# read_buffer_cache_size 0x8000 # Read file cache buffer. Must be a 2^x value.
#
# USB gadget device driver path
#
########################################################################
#
# -- Generic FunctionFS Mode --
#
########################################################################
usb_functionfs_mode 0x1
usb_dev_path "/dev/ffs-mtp/ep0"
usb_epin_path "/dev/ffs-mtp/ep1"
usb_epout_path "/dev/ffs-mtp/ep2"
usb_epint_path "/dev/ffs-mtp/ep3"
usb_max_packet_size 0x200
+6 -1
View File
@@ -17,7 +17,7 @@ cp -r board/miyoo/main "${BINARIES_DIR}"
test -d "${BINARIES_DIR}/gmenu2x" && cp -r "${BINARIES_DIR}/gmenu2x/" "${BINARIES_DIR}/main/" test -d "${BINARIES_DIR}/gmenu2x" && cp -r "${BINARIES_DIR}/gmenu2x/" "${BINARIES_DIR}/main/"
test -d "${BINARIES_DIR}/emus" && cp -r "${BINARIES_DIR}/emus/" "${BINARIES_DIR}/main/" test -d "${BINARIES_DIR}/emus" && cp -r "${BINARIES_DIR}/emus/" "${BINARIES_DIR}/main/"
if test -d "${BINARIES_DIR}/retroarch";then if test -d "${BINARIES_DIR}/retroarch";then
cp -r "${BINARIES_DIR}/retroarch/" "${BINARIES_DIR}/main/" rsync -avzh "${BINARIES_DIR}/retroarch/" "${BINARIES_DIR}/main/.retroarch/"
## Generate list of cores to be used ## Generate list of cores to be used
CORES_DIR="${BINARIES_DIR}/retroarch/cores" CORES_DIR="${BINARIES_DIR}/retroarch/cores"
for file in $CORES_DIR/*; do for file in $CORES_DIR/*; do
@@ -47,4 +47,9 @@ fi
# Write CFW version to splash image # Write CFW version to splash image
convert board/miyoo/miyoo-boot.png -pointsize 12 -fill white -annotate +10+230 "v${CFW_RELEASE} ${CFW_VERSION} (${LIBC}) ${STATUS}" -alpha off -type truecolor -strip -define bmp:format=bmp4 -define bmp:subtype=RGB565 "${BINARIES_DIR}"/boot/miyoo-boot.bmp convert board/miyoo/miyoo-boot.png -pointsize 12 -fill white -annotate +10+230 "v${CFW_RELEASE} ${CFW_VERSION} (${LIBC}) ${STATUS}" -alpha off -type truecolor -strip -define bmp:format=bmp4 -define bmp:subtype=RGB565 "${BINARIES_DIR}"/boot/miyoo-boot.bmp
# Generate MAIN BTRFS partition
image="${BINARIES_DIR}/main.img"
label="MAIN"
sudo mkfs.btrfs -r "${BINARIES_DIR}/main/" --shrink -v -f -L ${label} ${image}
support/scripts/genimage.sh ${1} -c board/miyoo/genimage-sdcard.cfg support/scripts/genimage.sh ${1} -c board/miyoo/genimage-sdcard.cfg
+6 -3
View File
@@ -56,6 +56,7 @@ BR2_PACKAGE_BINUTILS=y
BR2_PACKAGE_BINUTILS_TARGET=y BR2_PACKAGE_BINUTILS_TARGET=y
BR2_PACKAGE_GETTEXT=y BR2_PACKAGE_GETTEXT=y
BR2_PACKAGE_LIBTOOL=y BR2_PACKAGE_LIBTOOL=y
BR2_PACKAGE_BTRFS_PROGS=y
BR2_PACKAGE_DOSFSTOOLS=y BR2_PACKAGE_DOSFSTOOLS=y
BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y
BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y
@@ -228,10 +229,11 @@ BR2_PACKAGE_OPKG=y
BR2_PACKAGE_OPKG_UTILS=y BR2_PACKAGE_OPKG_UTILS=y
BR2_PACKAGE_DIALOG=y BR2_PACKAGE_DIALOG=y
BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y
BR2_PACKAGE_UTIL_LINUX_PARTX=y
BR2_PACKAGE_NANO=y BR2_PACKAGE_NANO=y
BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_BTRFS=y
BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_BTRFS_LABEL="rootfs"
BR2_TARGET_ROOTFS_EXT2_SIZE="256M" BR2_TARGET_ROOTFS_BTRFS_SIZE="256M"
# BR2_TARGET_ROOTFS_TAR is not set # BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
@@ -243,6 +245,7 @@ BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_E2FSPROGS=y
BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y BR2_PACKAGE_HOST_UBOOT_TOOLS=y
+6 -3
View File
@@ -55,6 +55,7 @@ BR2_PACKAGE_LTRACE=y
BR2_PACKAGE_STRACE=y BR2_PACKAGE_STRACE=y
BR2_PACKAGE_GETTEXT=y BR2_PACKAGE_GETTEXT=y
BR2_PACKAGE_LIBTOOL=y BR2_PACKAGE_LIBTOOL=y
BR2_PACKAGE_BTRFS_PROGS=y
BR2_PACKAGE_DOSFSTOOLS=y BR2_PACKAGE_DOSFSTOOLS=y
BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y BR2_PACKAGE_DOSFSTOOLS_FATLABEL=y
BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y BR2_PACKAGE_DOSFSTOOLS_FSCK_FAT=y
@@ -205,10 +206,11 @@ BR2_PACKAGE_OPKG=y
BR2_PACKAGE_OPKG_UTILS=y BR2_PACKAGE_OPKG_UTILS=y
BR2_PACKAGE_DIALOG=y BR2_PACKAGE_DIALOG=y
BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y BR2_PACKAGE_UTIL_LINUX_LIBMOUNT=y
BR2_PACKAGE_UTIL_LINUX_PARTX=y
BR2_PACKAGE_NANO=y BR2_PACKAGE_NANO=y
BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_BTRFS=y
BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_ROOTFS_BTRFS_LABEL="rootfs"
BR2_TARGET_ROOTFS_EXT2_SIZE="256M" BR2_TARGET_ROOTFS_BTRFS_SIZE="256M"
# BR2_TARGET_ROOTFS_TAR is not set # BR2_TARGET_ROOTFS_TAR is not set
BR2_TARGET_UBOOT=y BR2_TARGET_UBOOT=y
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
@@ -220,6 +222,7 @@ BR2_TARGET_UBOOT_NEEDS_DTC=y
BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL=y
BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin" BR2_TARGET_UBOOT_SPL_NAME="u-boot-sunxi-with-spl.bin"
BR2_PACKAGE_HOST_DOSFSTOOLS=y BR2_PACKAGE_HOST_DOSFSTOOLS=y
BR2_PACKAGE_HOST_E2FSPROGS=y
BR2_PACKAGE_HOST_GENIMAGE=y BR2_PACKAGE_HOST_GENIMAGE=y
BR2_PACKAGE_HOST_MTOOLS=y BR2_PACKAGE_HOST_MTOOLS=y
BR2_PACKAGE_HOST_UBOOT_TOOLS=y BR2_PACKAGE_HOST_UBOOT_TOOLS=y