1) Armbian focal (or any good/stable desktop environment that allows me to use a wacom tablet I have, tested official ubuntu and despite the wacom driver present in the kernel , it didn t work ad hoc)
2) Android (tried the official one so far but not succesful )
3) Batocera (to avoid configuring too much in the linux desktop environment)
3) OpenElec (optionnal since I am unsure if there would be any benefit against installing kodi on a linux desktop environment)
So apart from my usecases I am interested in undertanding how this whole partition/booting works here.
I have petitboot 20201020 flashed on SPI at the moment and it is pretty great to be able to use only the remote to select any kernel).
I have attempted to adapt the dualos_compose.sh for my purpose and not sure first if my code is 100% correct (I have a doubt in the amount of partitions).
Code: Select all
#!/bin/sh
image1="selfinstall-odroidn2-119-64bit-20210108.img"
rate1=40
image2="ubuntu-20.04-4.9-mate-odroid-n2-20200716.img"
rate2=40
image3="batocera-29-odroidn2-20201203.img"
rate3=13
image4="CoreELEC-Amlogic-ng.arm-9.2.5-Odroid_N2.img"
disk=/dev/disk/by-id/usb-Generic_USB_Flash_Disk_000000001532-0:0
[ "${BASH_VERSION}" = '' ] || BACKSLASH_ESCAPE="-e"
abort() {
echo ${1}
exit 1
}
fusing() {
local disk=${1}
local offset=${2}
local image=${3}
while read part; do
line=$(echo ${part} | tr -s ' ')
start=$(echo ${line} | cut -d' ' -f2)
end=$(echo ${line} | cut -d' ' -f3)
ptype=$(echo ${line} | cut -d' ' -f6)
sectors=$((${end} - ${start}))
seek=$((${offset} + ${start}))
[ ${partnum} -lt 4 ] && newpart='\n' || newpart=""
if [ ${partnum} -eq 1 ]; then
parttype="t\n${ptype}\n"
else
parttype="t\n${partnum}\n${ptype}\n"
fi
echo ${BACKSLASH_ESCAPE} \
"n\np\n${newpart}${seek}\n+${sectors}\n${parttype}w" \
| fdisk ${disk}
dd if=${image} of=${disk} bs=512 conv=fsync \
skip=${start} seek=${seek} count=${sectors}
partnum=$((${partnum} + 1))
done << __EOF
$(fdisk -l ${image} | grep ^${image} | tr '*' ' ')
__EOF
}
unmount_part() {
local disk=${1}
for part in $(sudo fdisk -l ${disk} | grep ${disk} | cut -d' ' -f1 | tr '\n' ' '); do
umount -f ${part}
done
}
[ -z ${disk} ] && abort "Must need a target device node of a storage"
[ -z ${image1} -o -z ${image2} ] && abort "Please give me two images!!"
[ -z ${rate} ] && rate=50
total_sectors=$(($(fdisk -s ${disk}) * 2))
part1_offset=0
part2_offset=$((${total_sectors} / 100 * ${rate1}))
part3_offset=$(((${part2_offset}) + ${total_sectors} / 100 * ${rate2}))
part4_offset=$(((${part3_offset}) + ${total_sectors} / 100 * ${rate3}))
partnum=1
unmount_part ${disk}
dd if=/dev/zero of=${disk} bs=512 count=1 conv=fsync
fusing ${disk} ${part1_offset} ${image1}
fusing ${disk} ${part2_offset} ${image2}
fusing ${disk} ${part3_offset} ${image3}
fusing ${disk} ${part4_offset} ${image4}
1) Official ubuntu mate : seen by petit boot and booting
2) Batocera : seen by petitboot and booting
3) OpenElec : seen by petitboot not booting properly
4) Official android : not seen by petitboot (I undesrtand here the autoinstall wont work anyway adhoc)
5) Armbian focal : not seen by petitboot.
Best Regards