The first script to create multiboot partitions was made for device sda of the Octagon sf8008 boxes:
@listener has updated the automount file to make sure that the multiboot partitions on all devices are not mounted. (well done)
The script in this thread is to create multiboot partitions on the device of your choice and other boxes then the Octagon sf8008.
That means that the boot args (for the STARTUP files) have to change, depending of the boxtype.
To get the right boot args i will need the help of the users because i only have Octagon boxes to test multiboot.
The Octagon sf8008 is a Uclan clone and there are other brands that are also Uclan clones and i have to add all these boxtypes in the script to make the script work for these boxes too/again.
The boot args of the Uclan boxes and clones should be the same, but have to be sure about that before i add those boxtypes to the script.
These telnet commands, should give enough information to figure out what to part of the boot args is needed, the info is saved in: /tmp/boot_args_boxtype.txt
Code: Alles auswählen
BOXTYPE=$(cat /proc/stb/info/boxtype)
echo -e "Boxtype: $BOXTYPE\n" > /tmp/boot_args_$BOXTYPE.txt
echo -e "cmdline: $(cat /proc/cmdline)\n" >> /tmp/boot_args_$BOXTYPE.txt
echo -e "STARTUP*1: $(cat /boot/STARTUP*1)\n" >> /tmp/boot_args_$BOXTYPE.txt
echo -e "STARTUP*5: $(cat /boot/STARTUP*5)\n" >> /tmp/boot_args_$BOXTYPE.txt
echo -e "/boot:\n$(ls -v /boot)\n" >> /tmp/boot_args_$BOXTYPE.txt
So, if you want te help then post the boot_args info file or the content here.
This is how it works in the script:
The boot args that are needed for the sf8008 boxes are these:
Code: Alles auswählen
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)
When i read out the boot args from /proc/cmdline i get this:
Code: Alles auswählen
console=ttyAMA0,115200 root=/dev/sda2 rootfstype=ext4 kernel=/dev/sda1 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) coherent_pool=2M mem=1G mmz=ddr,0,0,72M vmalloc=500M MACHINEBUILD=sf8008 OEM=octagon MODEL=sf8008
To strip the boot args from the read out, i delete the parts that i don't need with the use of 2 delimiters. (<start_delimiter> and <end_delimiter>)
This code reads the boot args from /proc/cmdline and deletes everything before the start delimiter rootwait and everything after the end delimiter (userdata):
Code: Alles auswählen
cat /proc/cmdline | sed -e 's/.*\(rootwait.*(userdata)\).*/\1/')
So, if you know what part of the read out that you need for the boot args, you can set the delimiters for the boot args of your box.
In the beta script v1.6 you can see the code sofar with comments to help explain things.
When all boxtypes and boot args are added i will clean up and simplify the code where possible and make a final version 1.6 of this beta script.
@listener, when i was working on creating multiboot partitions i also got some graet help from someone who helped developing the current multiboot system.
He told me that the place to read out the boot args is /proc/cmdline , that's why i'm using this.
I know you get a different output with your sf8008 supreme when you read out the boot args from sys/firmware/devicetree/base/chosen/bootargs but the difference is just one string (root) at the end and it is not needed for the sf8008 supreme.
I have used the multiboot partitioning script v1.5 also with my sf8008 supreme and everything works fine with the current boot args for the sf8008 models.
The difference in the boot arg output is also depending on the image that is running on the box because i get the same boot arg output when i test this with my sf8008 supreme using openeight.
It would be great if you can get the boot args for your zgemma and gb 4k with this code: cat /proc/cmdline | sed -e 's/.*\(<start_delimiter>.*<end_delimiter>\).*/\1/')
I know that you are an experienced coder, so if you know how to simplify or improve things then your suggestions are always welcome.
Regards,
Lucifer
EDIT: script removed, not usable for other Multiboot systems and a new script will be made.