U-Boot / mmcblkXboot0
#1
Hello,

I want to update my installation of u-boot. (I already asked some questions in the Manjaro Forum because its their u-boot update which asks to be dd'ed to a target, but I am left with some open questions.) Where exactly does u-boot reside when using a standard Linux like in this case Manjaro, installed to the eMMC? When I want to update u-boot, do I simply need to write it to the eMMC device or do mmcblkXboot0 and mmcblkXboot1 play any role in the booting process of Linux on the Pinebook? The information in https://wiki.pine64.org/index.php/Pinebook_Pro does not answer my questions and the documentation of u-boot is somewhat inaccessible even for someone who works with Linux for a living.

Yours
Stefan
#2
At present, both "mmcblkXboot0" & "mmcblkXboot1" serve no purpose. Our U-Boot is located directly on the normal eMMC storage. Basically U-Boot starts at sector 64, for 3 sections, (8MB, 4MB & 4MB), and then normal partitions can start after that.

Below is an example where I've created reserved partitions entries for U-Boot. Followed by "/boot", swap and "/". (Note that U-Boot expects "/boot" to be the first partition, so I have it installled that way.)
Code:
Device            Start       End  Sectors  Size Type
/dev/mmcblk1p1    32768    557055   524288  256M Microsoft basic data
/dev/mmcblk1p2       64     16383    16320    8M Linux reserved
/dev/mmcblk1p3    16384     24575     8192    4M Linux reserved
/dev/mmcblk1p4    24576     32767     8192    4M Linux reserved
/dev/mmcblk1p5   557056   8945663  8388608    4G Linux swap
/dev/mmcblk1p6  8945664  65544144 56598481   27G Linux root (ARM-64)

This means that the exact same U-Boot code and layout works for SD cards as it does for eMMCs. And also SPI flash as well.
--
Arwen Evenstar
Princess of Rivendale
#3
I'm not sure why you are going on about this
Partitions don't matter, as long as the 1st (user) doesn't overlap ATF
The command line given by manjaro is correct, you do have to
replace the "X" with the right number
As long as idbloader, uboot, ATF are in the right place,
that is all that matters, partitions don't matter AT ALL
AND, you don't really have to do this, maybe the update
gives something "extra", this has not been stated
Now, if you are trying to write a BSP uboot for the
other sleep method, well that might be worthwhile,
I, as of yet, have heard no reports, pro or con
#4
arwen is right, what linux calls mmcblkXbootY now is not and looks like cannot be used*. flash the uboot pieces in the general area (mmcblkX) where they are expected to reside.

* - these special purpose storage subdevices of an emmc module are for the platform firmware, but for being used and usable, the initial start up code of the SoC (ROM code), needs to try them in its boot sequence. does it? looks like not, or rockchip forgot to tell about it. you might try by yourself, would make a favor, Big Grin it's really interesting, but I don't have the emmc. zero the first megabyte of the GP area and write uboot (all its pieces) into mmcblkXboot0, attach terminal to your board, make sure you don't have anything written in SPI and SD, and look what you see in the output. most probably nothing more than scarce ROM code babbling, but if uboot starts, it will be well seen, then wahoo, we all may use boot areas for the firmware! so cool.
ANT - my hobby OS for x86 and ARM.
#5
(03-22-2020, 05:02 PM)wdt Wrote: I'm not sure why you are going on about this
Partitions don't matter, as long as the 1st (user) doesn't overlap ATF
The command line given by manjaro is correct, you do have to
replace the "X" with the right number
As long as idbloader, uboot, ATF are in the right place,
that is all that matters, partitions don't matter AT ALL
AND, you don't really have to do this, maybe the update
gives something "extra", this has not been stated
Now, if you are trying to write a BSP uboot for the
other sleep method, well that might be worthwhile,
I, as of yet, have heard no reports, pro or con

If the comment about partitions was directed at me, the answer is simple. With partitions in place, I know where things are and where the 1st user partition must start. It's nothing more than built in documentation. (Though it does ease copying or updates because I don't have to remember sector offsets.)
--
Arwen Evenstar
Princess of Rivendale
#6
@Arwen
>If the comment about partitions was directed at me
No, the other guy, who didn't seem to be listening ----to anyone
To have a placeholder is conveint I guess, , but
64 sectors, 8M, 12M, 16M(user) doesn't seem that hard to remember either
You do have to multiply by 2048


Possibly Related Threads…
Thread Author Replies Views Last Post
  Cant boot into an OS trashtendenz 3 690 10-23-2024, 03:49 AM
Last Post: chaylengordon
  3 days in, slow/stuck or no boot. lgmpbp2 30 3,771 09-05-2024, 08:49 AM
Last Post: lgmpbp2
  Unable to boot? YossiS 4 397 09-04-2024, 10:35 AM
Last Post: wdt
  upgrading u-boot--what version? where to get it? bsammon 11 2,735 05-22-2024, 09:33 AM
Last Post: wdt
  uboot wont boot to SD card after upgrade jbradley419 7 2,318 01-19-2024, 02:29 PM
Last Post: wdt
  Video Flashing/adjusting on boot and reboot jbradley419 0 636 01-16-2024, 09:17 AM
Last Post: jbradley419
  Brand new Pinebook Pro doesn't boot after Manjaro update johnboiles 8 3,758 12-15-2023, 02:11 PM
Last Post: wdt
  PBP won't boot after trying to reinstall Manjaro ARM soupgirl 3 1,473 12-13-2023, 08:17 PM
Last Post: trillobite
  Various freezes during boot & while running several Linux distros - hardware error? donuts 1 1,057 11-22-2023, 11:47 AM
Last Post: fxc
  Cannot boot to Kali SD card after uboot upgrade jbradley419 4 1,946 09-19-2023, 08:48 AM
Last Post: dachalife

Forum Jump:


Users browsing this thread: 1 Guest(s)