mail archive of the rauc mailing list
 help / color / mirror / Atom feed
From: "Stefan Riedmüller" <s.riedmueller@phytec.de>
To: Hans-Ulrich Schlieben <hu.schlieben@codewrights.de>
Cc: "yocto@lists.yoctoproject.org" <yocto@lists.yoctoproject.org>,
	"barebox@lists.infradead.org" <barebox@lists.infradead.org>,
	"rauc@pengutronix.de" <rauc@pengutronix.de>,
	"Enrico Jörns" <ejo@pengutronix.de>
Subject: Re: [RAUC] Private: Re: [yocto] #yocto update the kernel with a rauc bundle
Date: Thu, 27 Feb 2020 15:51:25 +0100	[thread overview]
Message-ID: <a82d2697-2bc8-961d-9aa1-1bc32521f09f@phytec.de> (raw)
In-Reply-To: <AM0PR03MB37148B7E327DE4FE9ED57F56FEEA0@AM0PR03MB3714.eurprd03.prod.outlook.com>

Hi Hans-Ulrich,

On 26.02.20 17:03, Hans-Ulrich Schlieben wrote:
> Hi Stefan,
> 
> thank you for your help.
> 
> automount changed from formerly
> 
> /mnt/eeprom0.update-eeprom mount eeprom0.update-eeprom
> /mnt/mmc0            mount mmc0
> /mnt/mmc0.0          mount mmc0.0
> /mnt/mmc0.1          mount mmc0.1
> /mnt/mmc0.2          mount mmc0.2
> /mnt/mmc0.3          mount mmc0.3
> /mnt/mmc0.barebox    mount mmc0.barebox
> /mnt/mmc0.barebox-environment mount mmc0.barebox-environment
> /mnt/tftp            ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp
> /mnt/mmc             mmc0.probe=1 && [ -e /dev/mmc0.0 ] && mount /dev/mmc0.0 /mnt/mmc
> /mnt/emmc            mmc3.probe=1 && [ -e /dev/mmc3.0 ] && mount /dev/mmc3.0 /mnt/emmc
> /mnt/ratp            mount -t ratpfs none /mnt/ratp
> 
> to
> 
> /mnt/eeprom0.update-eeprom mount eeprom0.update-eeprom
> /mnt/mmc0            mount mmc0
> /mnt/mmc0.0          mount mmc0.0
> /mnt/mmc0.1          mount mmc0.1
> /mnt/mmc0.2          mount mmc0.2
> /mnt/mmc0.3          mount mmc0.3
> /mnt/mmc0.barebox    mount mmc0.barebox
> /mnt/mmc0.barebox-environment mount mmc0.barebox-environment
> /mnt/tftp            ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp
> /mnt/mmc             mmc2.probe=1 && [ -e /dev/mmc2.0 ] && mount /dev/mmc2.0 /mnt/mmc
> /mnt/ratp            mount -t ratpfs none /mnt/ratp
> 
> so my removing of automount worked changed something. I had to remove the other automount file too to get here
> 
> /mnt/eeprom0.update-eeprom mount eeprom0.update-eeprom
> /mnt/mmc0            mount mmc0
> /mnt/mmc0.0          mount mmc0.0
> /mnt/mmc0.1          mount mmc0.1
> /mnt/mmc0.2          mount mmc0.2
> /mnt/mmc0.3          mount mmc0.3
> /mnt/mmc0.barebox    mount mmc0.barebox
> /mnt/mmc0.barebox-environment mount mmc0.barebox-environment
> /mnt/tftp            ifup eth0 && mount -t tftp $eth0.serverip /mnt/tftp
> /mnt/nfs             ifup eth0 && mount -t nfs ${eth0.serverip}:/home/${global.user}/nfsroot/${global.hostname} /mnt/nfs
> /mnt/ratp            mount -t ratpfs none /mnt/ratp
> 
> But the result was the same. Same log output as before, three failing boot attempts on mmc0.0 and then booting from mmc0.1.
> 
> (I'm not shure whether i remember right that I had a config where the boot to mmc0.0
> from the image worked and the rauc update only failed to boot from mmc0.0.
> Now directly the image fails too.)
> 
> Even if this failed to help just for my understanding, how could I remove / override these automount files in a recipe?

You can create a patch from your changes in the barebox which remove/modify 
the automount file and add it to the barebox recipes SRC_URI in an append 
file. See 
https://www.yoctoproject.org/docs/latest/kernel-dev/kernel-dev.html#applying-patches

Best regards,
Stefan

> 
> Thank you and best regards
> 
> hu
> 
> 
>> -----Original Message-----
>> From: Stefan Riedmüller <s.riedmueller@phytec.de>
>> Sent: Wednesday, 26 February 2020 14:24
>> To: Hans-Ulrich Schlieben <hu.schlieben@codewrights.de>
>> Cc: Enrico Jörns <ejo@pengutronix.de>; yocto@lists.yoctoproject.org; barebox@lists.infradead.org; rauc@pengutronix.de
>> Subject: Re: [RAUC] Private: Re: [yocto] #yocto update the kernel with a rauc bundle
>>
>> Hi Hans-Ulrich,
>>
>> On 26.02.20 13:19, Hans-Ulrich Schlieben wrote:
>>> Hi Stefan,
>>>
>>> same result without the automount files. > I'm not really shure
>>> whether I built barebox the intended way. What I did
>> was to add RM_WORK_EXCLUDE += " barebox" to local.conf,
>>> Rebuild barebox with bitbake -c cleansstate barebox, removed the three
>>> automount files below the imx6 folders and run bitbake -f -c compile
>>> barebox and built the image. Did this disable the automount?
>>
>> Looks OK to me. Did you check the content of the automount file in the booted environment?
>>
>> Stefan
>>
>>>
>>> Best regards
>>>
>>> hu
>>>
>>>
>>>
>>>
>>>> -----Original Message-----
>>>> From: Stefan Riedmüller <s.riedmueller@phytec.de>
>>>> Sent: Tuesday, 25 February 2020 16:16
>>>> To: Hans-Ulrich Schlieben <hu.schlieben@codewrights.de>
>>>> Cc: Enrico Jörns <ejo@pengutronix.de>; yocto@lists.yoctoproject.org;
>>>> barebox@lists.infradead.org; rauc@pengutronix.de
>>>> Subject: Re: [RAUC] Private: Re: [yocto] #yocto update the kernel
>>>> with a rauc bundle
>>>>
>>>> Hi Hans-Ulrich,
>>>>
>>>> On 24.02.20 13:12, Hans-Ulrich Schlieben wrote:
>>>>> Hi Enrico,
>>>>>
>>>>> the boot log looks like this:
>>>>>
>>>>>
>>>>> barebox 2017.12.0 #1 Tue Feb 18 09:49:36 UTC 2020
>>>>>
>>>>>
>>>>> Board: Phytec phyCORE-i.MX6 Quad with NAND detected i.MX6 Quad
>>>>> revision 1.5
>>>>> i.MX6 unique ID: ee803c540f2359d4
>>>>> mdio_bus: miibus0: probed
>>>>> eth0: got preset MAC address: 50:2d:f4:1b:af:b1
>>>>> nand: ONFI flash detected
>>>>> nand: NAND device: Manufacturer ID: 0xef, Chip ID: 0xd3 (Winbond
>>>>> W29N08GV), 1024MiB, page size: 2048, OOB size: 64 Bad block table
>>>>> found at page 524224, version 0x01 Bad block table found at page
>>>>> 524160, version 0x01
>>>>> m25p80 flash@00: n25q128a13 (16384 Kbytes) imx-usb 2184200.usb: USB
>>>>> EHCI 1.00 imx-esdhc 2190000.usdhc: registered as 2190000.usdhc
>>>>> da9063 da90620: da9062 with id 62.22.ff.1a detected
>>>>> state: New state registered 'state'
>>>>> state: Using bucket 0@0x00000000
>>>>> netconsole: registered as netconsole-1
>>>>> phySOM-i.MX6: Using environment in MMC malloc space: 0x2fefb480 ->
>>>>> 0x4fdf68ff (size 511 MiB)
>>>>> mmc0: detected SD card version 2.0
>>>>> mmc0: registered mmc0
>>>>> envfs: no envfs (magic mismatch) - envfs never written?
>>>>> running /env/bin/init...
>>>>>
>>>>> Hit m for menu or any other key to stop autoboot:    0
>>>>> ext4 ext40: EXT2 rev 1, inode_size 256, descriptor size 64 testing
>>>>> for update
>>>>> ubi0: scanning is finished
>>>>> ubi0 error: ubi_read_volume_table: the layout volume was not found
>>>>> ubi0 error: ubi_attach_mtd_dev: failed to attach mtd0, error -22
>>>>> failed to attach: Invalid argument booting 'bootchooser'
>>>>> booting 'mmc0.0'
>>>>> mounted /dev/mmc0.0 on /mnt/mmc
>>>>> mounted /dev/mmc0.0 on /mnt/mmc
>>>>> mounted /dev/mmc0.0 on /mnt/mmc
>>>>> could not open /mnt/mmc0.0/boot/zImage: No such file or directory
>>>>> Booting 'mmc0.0' failed: No such file or directory booting 'mmc0.0'
>>>>> failed: No such file or directory booting 'mmc0.0'
>>>>> mounted /dev/mmc0.0 on /mnt/mmc
>>>>> mounted /dev/mmc0.0 on /mnt/mmc
>>>>> mounted /dev/mmc0.0 on /mnt/mmc
>>>>> could not open /mnt/mmc0.0/boot/zImage: No such file or directory
>>>>> Booting 'mmc0.0' failed: No such file or directory booting 'mmc0.0'
>>>>> failed: No such file or directory booting 'mmc0.0'
>>>>> mounted /dev/mmc0.0 on /mnt/mmc
>>>>> mounted /dev/mmc0.0 on /mnt/mmc
>>>>> mounted /dev/mmc0.0 on /mnt/mmc
>>>>> could not open /mnt/mmc0.0/boot/zImage: No such file or directory
>>>>> Booting 'mmc0.0' failed: No such file or directory booting 'mmc0.0'
>>>>> failed: No such file or directory booting 'mmc0.1'
>>>>>
>>>>>
>>>>> -> booting mmc0.1 works
>>>>>
>>>>> So the problem is that barebox mounts /dev/mmc0.0 on /mnt/mmc and
>>>>> not on /mnt/mmc0.0. But what configuration tells barebox to mount
>>>>> /dev/mmc0.0 on /mnt/mmc
>>>>> and
>>>>> /dev/mmc0.1 on /mnt/mmc0.1?
>>>>
>>>> There is a /env/init/automount file installed on PHYTEC SOMs which
>>>> comes from
>>>> arch/arm/boards/phytec-som-imx6/defaultenv-physom-imx6-phycore/init/a
>>>> utomount and triggers an automount from /dev/mmc0.0 on /mnt/mmc.
>>>>
>>>> I'm not sure if this conflicts with the internal automount on /mnt/mmc0.0 but removing our automount script could be worth a try.
>>>>
>>>> Stefan
>>>>
>>>>>
>>>>> The configuration parameters are this:
>>>>> * bootchooser.system0.boot: mmc0.0
>>>>> * bootchooser.system1.boot: mmc0.1
>>>>> * bootchooser.targets: system0 system1
>>>>>
>>>>> Best regards
>>>>>
>>>>> hu
>>>>>
>>>>>
>>>>> -----Original Message-----
>>>>> From: Enrico Jörns <ejo@pengutronix.de>
>>>>> Sent: Wednesday, 19 February 2020 17:28
>>>>> To: Hans-Ulrich Schlieben <hu.schlieben@codewrights.de>
>>>>> Cc: yocto@lists.yoctoproject.org; barebox@lists.infradead.org;
>>>>> rauc@pengutronix.de
>>>>> Subject: Re: [RAUC] Private: Re: [yocto] #yocto update the kernel
>>>>> with a rauc bundle
>>>>>
>>>>> Hi Hans,
>>>>>
>>>>> Am 18.02.20 um 15:06 schrieb Hans-Ulrich Schlieben:
>>>>>> Hi Enrico,
>>>>>>
>>>>>> I just answered your first mail on the website and thought that will automatically reply to all. Added all lists now, hope these are correct.
>>>>>
>>>>> ah, I wasn't even aware that there is a website for this ;)
>>>>>
>>>>>> Thanks to you I found the custom automount in the providers recipes. This mounts /dev/mmc0.0 to /mnt/mmc.
>>>>>
>>>>> Ok, good that we clarified this. The script should not be required in a modern barebox as it has a lot of built-in automounting magic on board.
>>>>>
>>>>>> After the mount it seems that only when I install a new image the barebox mount /dev/mmc0.0 to /mnt/mmc0.0 works.
>>>>>
>>>>> This is the point that sounds a little strange, yes.
>>>>>
>>>>>> Rauc / barebox seems something to change after a bundle update whereas mount /dev/mmc0.0 to /mnt/mmc0.0 fails and the files are only visible in /mnt/mmc.
>>>>>>
>>>>>> /mnt/mmc works in both cases so I have now /mnt/mmc/boot... for
>>>>>> system0 and /mnt/mmc0.1/boot... for system1
>>>>>
>>>>> Would be great to see a log of such a failed mount to get a more concrete idea what 'failed' actually means.
>>>>>
>>>>> Best regards, Enrico
>>>>>
>>>>>> -----Original Message-----
>>>>>> From: Enrico Jörns <ejo@pengutronix.de>
>>>>>> Sent: Tuesday, 18 February 2020 01:12
>>>>>> To: Hans-Ulrich Schlieben <hu.schlieben@codewrights.de>
>>>>>> Subject: Re: Private: Re: [yocto] #yocto update the kernel with a
>>>>>> rauc bundle
>>>>>>
>>>>>> Hi hu,
>>>>>>
>>>>>> please keep at least any list in CC so that others can benefit from this discussion, too (Both RAUC and barebox ML would fit here). It also increases the range and thus potential people that > may > help here.>
>>>>>>
>>>>>>   Am 17.02.20 um 13:58 schrieb Hans-Ulrich Schlieben:
>>>>>>> Hi Enrico,
>>>>>>>
>>>>>>> thank you very much for your help with IMAGE_INSTALL_append = "
>>>>>>> kernel-image kernel-devicetree"
>>>>>>> that did the trick.
>>>>>>>
>>>>>>> What i do not understand is how barebox handles the mount names
>>>>>>> for my two alternate boot partitions.
>>>>>>> The boot on the first partition works only under /mnt/mmc/:
>>>>>>>
>>>>>>> global.bootm.image="/mnt/mmc/boot/zImage"
>>>>>>> global.bootm.oftree="/mnt/mmc/boot/imx6q-phytec-ksp0663.dtb"
>>>>>>> global.linux.bootargs.dyn.root="root=/dev/mmcblk0p1
>>>>>>> rootflags='data=journal' wd=60 ipv6.disable=1"
>>>>>>>
>>>>>>> whereas the second works with /mnt/mmc1/:
>>>>>>> global.bootm.image="/mnt/mmc0.1/boot/zImage"
>>>>>>> global.bootm.oftree="/mnt/mmc0.1/boot/imx6q-phytec-ksp0663.dtb"
>>>>>>> global.linux.bootargs.dyn.root="root=/dev/mmcblk0p2
>>>>>>> rootflags='data=journal' wd=60 ipv6.disable=1"
>>>>>>>
>>>>>>> In barebox i see both root filesystems under /mnt/mmc0.0 and
>>>>>>> /mnt/mmc0.1/.
>>>>>>>
>>>>>>> When i try to have a symmetrical configuration and rename /mmc/
>>>>>>> into /mmc0.0/ boot on mmc0.0 does not work because it still mounts
>>>>>>> the first partition ar /mnt/mmc/.
>>>>>>
>>>>>>   Which version of barebox?
>>>>>>
>>>>>>   It should be sufficient to either say
>>>>>>
>>>>>>       boot mmc0.0
>>>>>>
>>>>>>   or
>>>>>>
>>>>>>       boot mmc0.1
>>>>>>
>>>>>>   and barebox will automatically mount the partition, look for a bootspec file under /loader/entries and assemble the required boot options and kernel command line automatically.
>>>>>>
>>>>>>> What tells barebox to mount during boot mmc and mmc0.1 instead of
>>>>>>> mmc0.0 and mmc0.1?
>>>>>>
>>>>>>   Is there any custom automount unit located in you built-in env probably?
>>>>>>
>>>>>>
>>>>>>   Best regards, Enrico
>>>>>>

_______________________________________________
RAUC mailing list

      reply	other threads:[~2020-02-27 14:51 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <f52c462f-8f88-f953-7383-18633de010ff@pengutronix.de>
     [not found] ` <21810.1581944282288454644@lists.yoctoproject.org>
     [not found]   ` <8178103e-c35d-461d-c485-d6b64753641b@pengutronix.de>
2020-02-18 14:06     ` Hans-Ulrich Schlieben
2020-02-19 16:27       ` Enrico Jörns
2020-02-24 12:12         ` Hans-Ulrich Schlieben
2020-02-25 15:16           ` Stefan Riedmüller
2020-02-26 12:19             ` Hans-Ulrich Schlieben
2020-02-26 13:23               ` Stefan Riedmüller
2020-02-26 16:03                 ` Hans-Ulrich Schlieben
2020-02-27 14:51                   ` Stefan Riedmüller [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a82d2697-2bc8-961d-9aa1-1bc32521f09f@phytec.de \
    --to=s.riedmueller@phytec.de \
    --cc=barebox@lists.infradead.org \
    --cc=ejo@pengutronix.de \
    --cc=hu.schlieben@codewrights.de \
    --cc=rauc@pengutronix.de \
    --cc=yocto@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox