Multiboot Partitioning script for various devices and boxes.

Hier kommen die Skripte rein, die von euch erstellt wurden.
Nachricht
Autor
Benutzeravatar
Lucifer
Member
Member
Beiträge: 232
Registriert: 01 Feb 2015 12:30
Hat gedankt: 159 Mal
Hat Dank erhalten: 155 Mal

#21

Beitrag von Lucifer »

urie hat geschrieben:Here is report from zgemma h9 combo which I thought more like octagon and gbtrio4k unlike gbquad4k and gbue4k



@urie,
Thank you for the feedback.
The output is not the same as the sf8008, but think the script can work for your box.
To be sure about that, i also need the content of the STARTUP_5 file.

In post#1 of this thread, i changed the code to create the file that you posted.
Can you run the new code and post the file here?


listener hat geschrieben:I don't think we should pay so much attention to the bootatgs

The system multiboot loader does adjust that according to
the data in STARTUP_xxxx_x file

the boot arguments are hardcoded in system multiboot loader.


Do you mean that the STARTUP_xxxx_x files are created automatically, or corrected automatically?


listener hat geschrieben:Think we should also move away from the method for each kernel and each rootfs one partition

Now they use 1 partition for multiple rootfilesystems which makes it
advantage that the size of rootfs is limited by large partition which is bigger than by one rootfs on one partition


You mean to create external mutiboot slots just like it's done in the emmc with a main root directory and root sub directories?
root=/dev/mmcblk0p16 rootsubdir=linuxrootfs1
listener
Developer
Developer
Beiträge: 946
Registriert: 19 Aug 2021 14:24
Wohnort: Belgien
Receiver 1: vuultimo4k
Receiver 2: sf8008
Receiver 3: GBquad4k
Receiver 4: GBue4k
Receiver 5: h9se
Hat gedankt: 73 Mal
Hat Dank erhalten: 237 Mal

#22

Beitrag von listener »

Lucifer hat geschrieben:You mean to create external mutiboot slots just like it's done in the emmc with a main root directory and root sub directories?
root=/dev/mmcblk0p16 rootsubdir=linuxrootfs1


correct the new way
urie
Senior member
Senior member
Beiträge: 1115
Registriert: 07 Mai 2019 13:52
Wohnort: Scotland
Receiver 1: Gigablue Quad UHD 4K Pro
Receiver 2: Gigablue Quad UHD 4K
Receiver 3: Zgemma H9 Combo
Hat gedankt: 214 Mal
Hat Dank erhalten: 233 Mal
Geschlecht:

#23

Beitrag von urie »

output file from new script

Code: Alles auswählen

root@zgemmah9combo:~# echo -e "STARTUP*5: $(cat /boot/STARTUP*5)\n" >> /tmp/boot_args_$BOXTYPE.txt
cat: can't open '/boot/STARTUP*5': No such file or directory
Dateianhänge
boot_args_H9Combo.txt
(952 Bytes) 34-mal heruntergeladen
Benutzeravatar
Lucifer
Member
Member
Beiträge: 232
Registriert: 01 Feb 2015 12:30
Hat gedankt: 159 Mal
Hat Dank erhalten: 155 Mal

#24

Beitrag von Lucifer »

listener hat geschrieben:correct the new way


If that means that this new way only works for the latest and future images and not compatible with the 'older' images, then it might be better to make a new parttioning script instead of modifing the script that was made for the 'classic' multiboot partitions.
One script for the 'classic' way of multiboot partitions and one script for the 'new' way of multiboot partitions.

But what about the STARTUP files, are they created/corrected automatically?

urie hat geschrieben:output file from new script

Code: Alles auswählen

root@zgemmah9combo:~# echo -e "STARTUP*5: $(cat /boot/STARTUP*5)\n" >> /tmp/boot_args_$BOXTYPE.txt
cat: can't open '/boot/STARTUP*5': No such file or directory


The file names in /boot are different then i expected, i to need know the names of the of the files first.
Can you post the output file ( /tmp/boot.txt) here?

Code: Alles auswählen

echo -e "/boot:\n$(ls -v /boot)" > /tmp/boot.txt
listener
Developer
Developer
Beiträge: 946
Registriert: 19 Aug 2021 14:24
Wohnort: Belgien
Receiver 1: vuultimo4k
Receiver 2: sf8008
Receiver 3: GBquad4k
Receiver 4: GBue4k
Receiver 5: h9se
Hat gedankt: 73 Mal
Hat Dank erhalten: 237 Mal

#25

Beitrag von listener »

Most boxes use that methode
also zgemma gbquad4k gbue4k.
I believe that those boxes not accept single partition by rootfs
it is also easier to use the existing START
adapted to new device.
It may be that the emmc booter only accepts 4 slots then
you can have multiple partitions with 4 rootfs directories
Gelöschter Benutzer 153799

#26

Beitrag von Gelöschter Benutzer 153799 »

Ist nur eine vermutung...
Vieleicht macht bei der ue4k der interne swap da probleme? Oder generell bei boxen mit eigenem swap.
Dateianhänge
1_0_19_5274_41D_1_C00000_0_0_0_20240630133533.jpg
Benutzeravatar
Lucifer
Member
Member
Beiträge: 232
Registriert: 01 Feb 2015 12:30
Hat gedankt: 159 Mal
Hat Dank erhalten: 155 Mal

#27

Beitrag von Lucifer »

listener hat geschrieben:Most boxes use that methode
also zgemma gbquad4k gbue4k.
I believe that those boxes not accept single partition by rootfs
it is also easier to use the existing START
adapted to new device.
It may be that the emmc booter only accepts 4 slots then
you can have multiple partitions with 4 rootfs directories


I'm not familiar with that multiboot system, but i understand it sofar.
What about the kernel partitions, are they in a main directory or also in sub directories?
listener
Developer
Developer
Beiträge: 946
Registriert: 19 Aug 2021 14:24
Wohnort: Belgien
Receiver 1: vuultimo4k
Receiver 2: sf8008
Receiver 3: GBquad4k
Receiver 4: GBue4k
Receiver 5: h9se
Hat gedankt: 73 Mal
Hat Dank erhalten: 237 Mal

#28

Beitrag von listener »

The kernels are in single partitions just like sf8008
Benutzeravatar
Lucifer
Member
Member
Beiträge: 232
Registriert: 01 Feb 2015 12:30
Hat gedankt: 159 Mal
Hat Dank erhalten: 155 Mal

#29

Beitrag von Lucifer »

And the names of the kernel partitions, are they also the same as they are now?
kernel2, kernel3, kernel4, ...
With the current script the first kernel partition is kernel2, not kernel1, is that the same too?

This is the eMMc of the sf8008:

Code: Alles auswählen

# /dev/mmcblk0      7.3G  ## Total size.
# /dev/mmcblk0boot0   4M  ## One or more small partitions intended for boot firmware (eMMC 4.3 spec requires 2 boot and 1 user partition)
# /dev/mmcblk0boot1   4M  ## One or more small partitions intended for boot firmware (eMMC 4.3 spec requires 2 boot and 1 user partition)
# /dev/mmcblk0p1      1M  ## boot
# /dev/mmcblk0p2      1M  ## bootargs
# /dev/mmcblk0p3      1M  ## bootoptions (partition with STARTUP files for /boot)
# /dev/mmcblk0p4      3M  ## baseparam
# /dev/mmcblk0p5      4M  ## pqparam
# /dev/mmcblk0p6      4M  ## logo (splash screen)
# /dev/mmcblk0p7      4M  ## deviceinfo
# /dev/mmcblk0p8      4M  ## softwareinfo
# /dev/mmcblk0p9      4M  ## loaderdb
# /dev/mmcblk0p10    32M  ## loader
# /dev/mmcblk0p11     8M  ## trustedcore
# /dev/mmcblk0p12    16M  ## linuxkernel1 (partition for the kernel of slot 1)
# /dev/mmcblk0p13    16M  ## linuxkernel2 (partition for the kernel of slot 2)
# /dev/mmcblk0p14    16M  ## linuxkernel3 (partition for the kernel of slot 3)
# /dev/mmcblk0p15    16M  ## linuxkernel4 (partition for the kernel of slot 4)
# /dev/mmcblk0p16   7.2G  ## userdata: linuxrootfs1, linuxrootfs2, linuxrootfs3, linuxrootfs4 (partition with the rootfs directories for slot 1 to 4)
# /dev/mmcblk0rpmb  512K  ## Replay Protected Memory Block - intended to store secure data. (eMMC 4.4 spec adds the requirement of an RPMB partition)


So, i think the names should be linuxkernel1, linuxkernel2, linuxkernel3 and linuxkernel4
Benutzeravatar
Lucifer
Member
Member
Beiträge: 232
Registriert: 01 Feb 2015 12:30
Hat gedankt: 159 Mal
Hat Dank erhalten: 155 Mal

#30

Beitrag von Lucifer »

First i need to know what partitions need to be made, what size they have and what name they have.
If you can give me a read out of your device that has the extra multiboot partitions with parted (after setting the correct device), then i can see everything at once.

Code: Alles auswählen

DEV=sda
echo -e "\npartitions list in KiB;\n\n$(parted -s /dev/$DEV unit KiB print free)\n" > /tmp/partitions_$DEV.txt


And then i need to know in wich partition the root directory with root sub directories have to be made and what name they have.

With that information, i can work on a script for that.
listener
Developer
Developer
Beiträge: 946
Registriert: 19 Aug 2021 14:24
Wohnort: Belgien
Receiver 1: vuultimo4k
Receiver 2: sf8008
Receiver 3: GBquad4k
Receiver 4: GBue4k
Receiver 5: h9se
Hat gedankt: 73 Mal
Hat Dank erhalten: 237 Mal

#31

Beitrag von listener »

on zgemma h9se

rootfs partition
blkid /dev/mmcblk0p23
/dev/mmcblk0p23: LABEL="userdata" UUID="6ab44e88-28a7-4aad-aeaf-5ddaab7eb516" BLOCK_SIZE="4096" TYPE="ext4"

kernel partition
blkid /dev/mmcblk0p19 is empty only raw partition
listener
Developer
Developer
Beiträge: 946
Registriert: 19 Aug 2021 14:24
Wohnort: Belgien
Receiver 1: vuultimo4k
Receiver 2: sf8008
Receiver 3: GBquad4k
Receiver 4: GBue4k
Receiver 5: h9se
Hat gedankt: 73 Mal
Hat Dank erhalten: 237 Mal

#32

Beitrag von listener »

first test failed on h9se
what I did
(parted) rm 1
(parted) mklabel gpt
Warning: The existing disk label on /dev/mmcblk1 will be destroyed and all data
on this disk will be lost. Do you want to continue?
Yes/No? Yes
(parted) mkpart rootfs2 ext4 1 21145
(parted) mkpart kernel5 21145 21161
(parted) mkpart kernel6 21161 21178
(parted) mkpart kernel7 21178 21194
(parted) mkpart kernel8 21194 21211
(parted) mkpart mmc ext4 21211 62366
exit
mkfs.ext4 /dev/mmcblk1p1
mkfs.ext4 /dev/mmcblk1p6

mkdir /media/tmp
mount /dev/mmcblk1p1 /media/tmp
cd /media/tmp
mkdir linuxrootfs5
mkdir linuxrootfs6
mkdir linuxrootfs7
mkdir linuxrootfs8
cd /
umount /media/tmp
rm /media/tmp

/boot/STARTUP_LINUX_5
bootcmd=setenv notee y; setenv bootargs $(bootargs) $(bootargs_common); mmc read 0 0x1000000 0x3D5000 0x8000; bootm 0x1000000; run bootcmd_fallback
bootargs=root=/dev/mmcblk1p1 rootsubdir=linuxrootfs5 rootfstype=ext4 kernel=/dev/mcblk1p2

/dev/mmcblk1 is sd

parted /dev/mmcblk1
GNU Parted 3.6
Using /dev/mmcblk1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: SD SR64G (sd/mmc)
Disk /dev/mmcblk1: 63.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 21.1GB 21.1GB ext4 rootfs2
2 21.1GB 21.2GB 16.8MB kernel5
3 21.2GB 21.2GB 16.8MB kernel6
4 21.2GB 21.2GB 15.7MB kernel7
5 21.2GB 21.2GB 16.8MB kernel8
6 21.2GB 62.4GB 41.2GB ext4 mmc

blkid /dev/mmcblk1p1
/dev/mmcblk1p1: UUID="dd7f3240-b663-4224-8d49-e53761ad0c24" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="rootfs2" PARTUUID="8f437efd-0d44-48f2-ba15-9ed0e8ed8df1"

Maybe it has something to do with partition name or
emmc has limits or ???? help

Maybe i need to patch MutiBoot.py again
urie
Senior member
Senior member
Beiträge: 1115
Registriert: 07 Mai 2019 13:52
Wohnort: Scotland
Receiver 1: Gigablue Quad UHD 4K Pro
Receiver 2: Gigablue Quad UHD 4K
Receiver 3: Zgemma H9 Combo
Hat gedankt: 214 Mal
Hat Dank erhalten: 233 Mal
Geschlecht:

#33

Beitrag von urie »

listener hat geschrieben:first test failed on h9se
what I did
(parted) rm 1
(parted) mklabel gpt
Warning: The existing disk label on /dev/mmcblk1 will be destroyed and all data
on this disk will be lost. Do you want to continue?
Yes/No? Yes
(parted) mkpart rootfs2 ext4 1 21145
(parted) mkpart kernel5 21145 21161
(parted) mkpart kernel6 21161 21178
(parted) mkpart kernel7 21178 21194
(parted) mkpart kernel8 21194 21211
(parted) mkpart mmc ext4 21211 62366
exit
mkfs.ext4 /dev/mmcblk1p1
mkfs.ext4 /dev/mmcblk1p6

mkdir /media/tmp
mount /dev/mmcblk1p1 /media/tmp
cd /media/tmp
mkdir linuxrootfs5
mkdir linuxrootfs6
mkdir linuxrootfs7
mkdir linuxrootfs8
cd /
umount /media/tmp
rm /media/tmp

/boot/STARTUP_LINUX_5
bootcmd=setenv notee y; setenv bootargs $(bootargs) $(bootargs_common); mmc read 0 0x1000000 0x3D5000 0x8000; bootm 0x1000000; run bootcmd_fallback
bootargs=root=/dev/mmcblk1p1 rootsubdir=linuxrootfs5 rootfstype=ext4 kernel=/dev/mcblk1p2

/dev/mmcblk1 is sd

parted /dev/mmcblk1
GNU Parted 3.6
Using /dev/mmcblk1
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) print
Model: SD SR64G (sd/mmc)
Disk /dev/mmcblk1: 63.9GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:

Number Start End Size File system Name Flags
1 1049kB 21.1GB 21.1GB ext4 rootfs2
2 21.1GB 21.2GB 16.8MB kernel5
3 21.2GB 21.2GB 16.8MB kernel6
4 21.2GB 21.2GB 15.7MB kernel7
5 21.2GB 21.2GB 16.8MB kernel8
6 21.2GB 62.4GB 41.2GB ext4 mmc

blkid /dev/mmcblk1p1
/dev/mmcblk1p1: UUID="dd7f3240-b663-4224-8d49-e53761ad0c24" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="rootfs2" PARTUUID="8f437efd-0d44-48f2-ba15-9ed0e8ed8df1"

Maybe it has something to do with partition name or
emmc has limits or ???? help

Maybe i need to patch MutiBoot.py again


I don't have any reason to change partitions on zgemma h9 combo , I was only trying to contrbute as you asked for output from other stb's if posssible :)
listener
Developer
Developer
Beiträge: 946
Registriert: 19 Aug 2021 14:24
Wohnort: Belgien
Receiver 1: vuultimo4k
Receiver 2: sf8008
Receiver 3: GBquad4k
Receiver 4: GBue4k
Receiver 5: h9se
Hat gedankt: 73 Mal
Hat Dank erhalten: 237 Mal

#34

Beitrag von listener »

Yes thanks I (we) wil make mutiboot extended more slots

I am now looking for problem ofgwrite sucks
have to look in MultiBoot.py

20:03:04.7747 [Console] Processing command '/usr/bin/ofgwrite' with arguments ['/usr/bin/ofgwrite', '-r', '-k', '-m5', '/media/hdd/images/openatv-7.4-zgemmah92hse-20240630_multi.unzipped/h9se'].
20:03:04.7748 [eConsoleAppContainer] Starting /usr/bin/ofgwrite
20:03:04.7758 [eDVBPESReader] ERROR reading PES (fd=100): Function not implemented
20:03:04.8612 [Console] Command '/usr/bin/ofgwrite' finished.

ofgwrite get -m5 that is flash in slot 5

Ik think missing info over slot 5

Where get ofgwrite slot information there mus the extended
slot info added
urie
Senior member
Senior member
Beiträge: 1115
Registriert: 07 Mai 2019 13:52
Wohnort: Scotland
Receiver 1: Gigablue Quad UHD 4K Pro
Receiver 2: Gigablue Quad UHD 4K
Receiver 3: Zgemma H9 Combo
Hat gedankt: 214 Mal
Hat Dank erhalten: 233 Mal
Geschlecht:

#35

Beitrag von urie »

I thought this tread started with restricions on octagon devices , but what still gets me is example :
GigaBlue UHD QUAD 4K only three slots with a device that does have 4GB eMMC flash first slot is larger,

personally not needed now because images are smaller now no default plugins installed i,e Chromium and YoutubeTV
listener
Developer
Developer
Beiträge: 946
Registriert: 19 Aug 2021 14:24
Wohnort: Belgien
Receiver 1: vuultimo4k
Receiver 2: sf8008
Receiver 3: GBquad4k
Receiver 4: GBue4k
Receiver 5: h9se
Hat gedankt: 73 Mal
Hat Dank erhalten: 237 Mal

#36

Beitrag von listener »

Yes correct for you.
There are also people who like to experiment and get more
out of the box.
On the forum, there are people who have all e2 images on the box
until now only possible on sf8008 on sd card now also on
usb stick.
now we are trying to extend it on all multiboot boxes.
It looks good that it will work.
urie
Senior member
Senior member
Beiträge: 1115
Registriert: 07 Mai 2019 13:52
Wohnort: Scotland
Receiver 1: Gigablue Quad UHD 4K Pro
Receiver 2: Gigablue Quad UHD 4K
Receiver 3: Zgemma H9 Combo
Hat gedankt: 214 Mal
Hat Dank erhalten: 233 Mal
Geschlecht:

#37

Beitrag von urie »

listener hat geschrieben:Yes correct for you.
There are also people who like to experiment and get more
out of the box.
On the forum, there are people who have all e2 images on the box
until now only possible on sf8008 on sd card now also on
usb stick.
now we are trying to extend it on all multiboot boxes.
It looks good that it will work.


Excuse me , but I don't know where you may get your attitude from just because I mentioned I personally have no need,
Why do you think I even posted results from zgemma h9 combo it was because
@ Lucifer asked for reports from other devices that may help if any new developments.

but enough said you can carry on.
airforce
Beginners
Beginners
Beiträge: 21
Registriert: 27 Jan 2019 05:59
Hat gedankt: 252 Mal
Hat Dank erhalten: 4 Mal

#38

Beitrag von airforce »

box uClan Ustym 4K S2 OTT X (E2 multiboot)
4GB eMMC flash memory, Hi3798MV300H processor
SD card slot - no
USB2.0 + USB2.0 ports only
multiboot in eMMC slot 1-slot 4
When using script 1.5 with a 16GB USB drive we get slot5-slot10
But when you select slot5-slot10 in multiload, slot1 is loaded
Dateianhänge
mb-partitioning_on_device_2024.07.01_07-44-31.log
(16.05 KiB) 26-mal heruntergeladen
partitions_sda.txt
(1.2 KiB) 35-mal heruntergeladen
boot_args_ustym4ks2ottx.txt
(1.42 KiB) 35-mal heruntergeladen
listener
Developer
Developer
Beiträge: 946
Registriert: 19 Aug 2021 14:24
Wohnort: Belgien
Receiver 1: vuultimo4k
Receiver 2: sf8008
Receiver 3: GBquad4k
Receiver 4: GBue4k
Receiver 5: h9se
Hat gedankt: 73 Mal
Hat Dank erhalten: 237 Mal

#39

Beitrag von listener »

exactly thank you good info

Have the same problem ofgwrite use not the right
place to flash and it doesn't do that here either.
Somewhere on the box there must be info that ofgwrite use for flash.

Your START file is not correct
your box use
blkdevparts=mmcblk0:1M(boot),1M(bootargs),1M(bootoptions),3M(baseparam),4M(pqparam),4M(logo),4M(deviceinfo),4M(softwareinfo),4M(loaderdb),32M(loader),8M(trustedcore),16M(linuxkernel1),16M(linuxkernel2),16M(linuxkernel3),16M(linuxkernel4),-(userdata)'

You use
rootwait blkdevparts=mmcblk0:1M(boot),1M(bootargs),1M(bootoptions),3M(baseparam),4M(pqparam),4M(logo),4M(deviceinfo),4M(softwareinfo),4M(loaderdb),32M(loader),8M(trustedcore),16M(linuxkernel1),16M(linuxkernel2),16M(linuxkernel3),16M(linuxkernel4),-(userdata)'
listener
Developer
Developer
Beiträge: 946
Registriert: 19 Aug 2021 14:24
Wohnort: Belgien
Receiver 1: vuultimo4k
Receiver 2: sf8008
Receiver 3: GBquad4k
Receiver 4: GBue4k
Receiver 5: h9se
Hat gedankt: 73 Mal
Hat Dank erhalten: 237 Mal

#40

Beitrag von listener »

Problem
It looks like
ofgwrite only look to 1 device
which has rootfs and kernel
Find it boot info on mmcblk0 looks it
no more whether on mmcblk1 also has boot info is.
Problem is difficult to solve because it uses
many global variables.
Antworten

Zurück zu „Skripte“