Re: [RAUC] mark-active
Hi Leif, On Tue, Dec 05, 2017 at 08:01:11AM +, Middelschulte, Leif wrote: > I was wondering about the intention of `mark-active [booted]`. Maybe I'm > misinterpreting the docs[0] though. > > So here is the paragraph in question: > "Last but not least, after switching to a different slot by mistake, this can > be remedied by choosing booted as the argument which is, by the way, the > default if the optional argument has been omitted." > > To me this appears missleading, as it reads like: > "You (unintentionally) managed to boot the wrong slot and want to go back? Use > `rauc status mark-active booted`!" > > But instead it will mark the currently (unintentionally booted) slot as the > permanent primary [1], won't it? > > Maybe I'm just missing something here though. you are right, the documentation leaves enough room to interpret it like you did. What I intended to say was that one can utilize the shortcut "booted" to revoke an erroneous modification of the bootloader's state if one recognizes it early enough and the system has not yet been shut down already. Hence the docs should be updated to read "Last but not least, after switching to a different slot by mistake, before having rebooted this can be remedied by choosing booted as the argument which is, by the way, the default if the optional argument has been omitted." This should be precise enough to put away the ambiguity that you stumbled over. Do you agree? Best regards Ulrich -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | ___ RAUC mailing list
Re: [RAUC] mark-active
On Tue, Dec 05, 2017 at 10:55:18AM +, Middelschulte, Leif wrote: > Am Dienstag, den 05.12.2017, 10:14 +0100 schrieb Ulrich Ölmann: > > On Tue, Dec 05, 2017 at 08:01:11AM +, Middelschulte, Leif wrote: > > > I was wondering about the intention of `mark-active [booted]`. Maybe I'm > > > misinterpreting the docs[0] though. > > > > > > So here is the paragraph in question: > > > "Last but not least, after switching to a different slot by mistake, this > > > can > > > be remedied by choosing booted as the argument which is, by the way, the > > > default if the optional argument has been omitted." > > > > > > To me this appears missleading, as it reads like: > > > "You (unintentionally) managed to boot the wrong slot and want to go > > > back? Use > > > `rauc status mark-active booted`!" > > > > > > But instead it will mark the currently (unintentionally booted) slot as > > > the > > > permanent primary [1], won't it? > > > > > > Maybe I'm just missing something here though. > > > > you are right, the documentation leaves enough room to interpret it like you > > did. What I intended to say was that one can utilize the shortcut "booted" > > to > > revoke an erroneous modification of the bootloader's state if one > > recognizes it > > early enough and the system has not yet been shut down already. Hence the > > docs > > should be updated to read > > > > "Last but not least, after switching to a different slot by mistake, > > before > > having rebooted this can be remedied by choosing booted as the argument > > which > > is, by the way, the default if the optional argument has been omitted." > > > > This should be precise enough to put away the ambiguity that you stumbled > > over. > > Do you agree? > Sounds good to me. Created a corresponding pull request, see [1]. Best regards Ulrich [1] https://github.com/rauc/rauc/pull/194 -- Pengutronix e.K. | | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | ___ RAUC mailing list
Re: [RAUC] U-Boot Offset for RAW Image on Slot Update
Hi Steffen, On Tue, Apr 16 2019 at 14:53 +0200, Steffen Kothe wrote: > I try to update the U-Boot Loader on two different partitions. > > /dev/mmcblk3boot0 > /dev/mmcblk3boot1 > > A restriction on our i.Mx6 platform is location of the u-boot entry on > the partition. > > Offset: 1024 Byte Address: 0x400 > > So a raw copy would start at address 0x00, but we have to start 0x400 > for the entry point. > > Does rauc provides any options to customize the startaddress for a raw > copy/install of a binary file (u-boot binary)? > > I have took a look into the source code, but found out, that there is > no option to customize the default offset address for a write on a > partition. > > > Could you provide some help in this case? take a look at hooks, especially the subsubsection "Install Hook": https://rauc.readthedocs.io/en/latest/using.html#slot-hooks . Best regards Ulrich -- Pengutronix e.K. | Ulrich Ölmann | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | ___ RAUC mailing list
Re: [RAUC] U-Boot Offset for RAW Image on Slot Update
On Tue, Apr 16 2019 at 15:51 +0200, Ulrich Ölmann wrote: > Hi Steffen, > > On Tue, Apr 16 2019 at 14:53 +0200, Steffen Kothe > wrote: >> I try to update the U-Boot Loader on two different partitions. >> >> /dev/mmcblk3boot0 >> /dev/mmcblk3boot1 >> >> A restriction on our i.Mx6 platform is location of the u-boot entry on >> the partition. >> >> Offset: 1024 Byte Address: 0x400 >> >> So a raw copy would start at address 0x00, but we have to start 0x400 >> for the entry point. >> >> Does rauc provides any options to customize the startaddress for a raw >> copy/install of a binary file (u-boot binary)? >> >> I have took a look into the source code, but found out, that there is >> no option to customize the default offset address for a write on a >> partition. >> >> >> Could you provide some help in this case? > > take a look at hooks, especially the subsubsection "Install Hook": > https://rauc.readthedocs.io/en/latest/using.html#slot-hooks . ... and use your own logic for updating the bootloader (forgot to mention that): write a script that switches the eMMC's bootloader partition from read-only to read-write and use the mmc-utils (see [1] & [2]) to atomically switch the eMMC's partition once it was written. Best regards Ulrich [1] git://git.kernel.org/pub/scm/linux/kernel/git/cjb/mmc-utils.git [2] https://github.com/torvalds/linux/blob/master/Documentation/mmc/mmc-tools.txt -- Pengutronix e.K. | Ulrich Ölmann | Industrial Linux Solutions | http://www.pengutronix.de/ | Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0| Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917- | ___ RAUC mailing list