From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Date: Thu, 26 Nov 2020 12:20:01 +0100 From: Michael Tretter Message-ID: <20201126112001.GD9315@pengutronix.de> References: MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: Subject: Re: [RAUC] boot-mbr-switch from u-boot List-Id: RAUC Project - Discussion List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: rauc-bounces@pengutronix.de Sender: "RAUC" To: Martin Hollingsworth Cc: "rauc@pengutronix.de" Hello Martin, On Thu, 26 Nov 2020 08:57:49 +0000, Martin Hollingsworth wrote: > I am integrating RAUC into a Xilinx ZynqMP device and using boot-mbr-switch > method according to documentation chapter 7.6.2. Bootloader is u-boot, RAUC > u-boot scripts are from contrib/uboot.sh, RAUC is v1.2 (upgrade planned). > > When switching between slots from within u-boot the MBR partition table is > not altered. So when installing a new system (inclduing new bootloader > partition content) which doesn't boot 3 times, after the fallback we run the > new bootloader partition with the old rootfs. Do I understand this from the > source code correctly? Correct. > > In my opinion this is a major problem, because on Xilinx ZynqMP the > bootloader partition contains the Xilinx bootbin, a first stage bootloader > which flashes the FPGA firmware before starting u-boot. In this case we run > the old linux against a new FPGA and have an inconsistent system after the > RAUC fallback. How do you tell Linux, what is contained in the FPGA firmware? Linux should not make any assumptions about the loaded FPGA firmware. > > Does anyone have a solution for this problem? There are a few solutions: You could use a different mechanism to load the firmware. Instead of the boot.bin, put the bitstream into the rootfs (or another partition) and load it from the bootloader (I'm not sure, if U-Boot supports this, but Barebox does.) or from Linux. If it is mandatory to load the firmware from the FSBL (or the bootloader partition in general), you would need a means to tell Linux, which firmware was loaded. That information has to be stored in the updated bootloader partition. Michael _______________________________________________ RAUC mailing list