Tartarus changed the topic of #u-boot to: SOURCE MOVED TO https://source.denx.de/u-boot/u-boot.git / U-Boot v2023.10, v2024.01-rc3 are OUT / Merge Window is CLOSED, next branch is OPEN / Release v2024.01 is scheduled for 08 January 2024 / Channel archives at https://libera.irclog.whitequark.org/u-boot
Mis012 has joined #u-boot
<Tartarus> Thanks
vagrantc has quit [Quit: leaving]
vagrantc has joined #u-boot
pgreco_ has joined #u-boot
pgreco has quit [Ping timeout: 268 seconds]
macromorgan has quit [Quit: Leaving]
qschulz has quit [Remote host closed the connection]
qschulz has joined #u-boot
goliath has quit [Quit: SIGSEGV]
macromorgan has joined #u-boot
persmule has quit [Remote host closed the connection]
vagrantc has quit [Quit: leaving]
Mis012 has quit [Remote host closed the connection]
LeSpocky has quit [Ping timeout: 252 seconds]
LeSpocky has joined #u-boot
<marex> Tartarus: the bdinfo patches passed CI just fine when I submitted them, did something change in those months since ?
thopiekar has quit [Ping timeout: 256 seconds]
thopiekar has joined #u-boot
<marex> drat, sandbox doesnt even build with SDL2
pbsds has quit [Quit: The Lounge - https://thelounge.chat]
pbsds has joined #u-boot
pbsds has quit [Quit: The Lounge - https://thelounge.chat]
pbsds has joined #u-boot
mmu_man has quit [Ping timeout: 276 seconds]
jaganteki has joined #u-boot
Stat_headcrabed has joined #u-boot
Clamor has joined #u-boot
pbsds has quit [Quit: The Lounge - https://thelounge.chat]
pbsds has joined #u-boot
mwalle has quit [Quit: WeeChat 3.8]
Clamor has quit [Ping timeout: 256 seconds]
Clamor has joined #u-boot
<mps> marex: I've built sandbox on aarch64 from master 2-3 days ago
<sjg1> Tartarus: It looks like you sent a patch to fix the pylint failure
<sjg1> marex: What error do you get? There might be a new library needed, perhaps?
Stat_headcrabed has quit [Quit: Stat_headcrabed]
Mis012 has joined #u-boot
<marex> sjg1: something about missing SDL2 headers , which is odd, since the header is installed
<marex> and uh, it apparently went away after update and sleep, so nevermind
<marex> except ut bdinfo shows no failures
<marex> huh
dsimic has quit [Ping timeout: 264 seconds]
dsimic has joined #u-boot
stefanro has joined #u-boot
mmu_man has joined #u-boot
gsz has joined #u-boot
goliath has joined #u-boot
camus has quit [Ping timeout: 255 seconds]
camus has joined #u-boot
goliath has quit [Ping timeout: 245 seconds]
alpernebbi has quit [Ping timeout: 276 seconds]
alpernebbi has joined #u-boot
<Tartarus> sjg1: Well, I disabled the check
persmule has joined #u-boot
qqq has quit [Ping timeout: 256 seconds]
<marex> Tartarus: so what is it with the bdinfo ?
<Tartarus> commit b68fd7b960b09bf440b1283034269c5a6b695e5a
<Tartarus> Author: Marek Vasut <marek.vasut+renesas@mailbox.org>
<Tartarus> Date: Sat Oct 7 23:41:04 2023 +0200
<Tartarus> test: bdinfo: Test bdinfo -h
<Tartarus> breaks sandbox_flattree
<Tartarus> (hash is wrong, I had to make a rebase tree to run a bisect)
<Tartarus> Or more clearly, doesn't work on sandbox_flattree, nor do the next 2 other tests
qqq has joined #u-boot
<marex> Tartarus: oh, I know what it is
Clamor has quit [Ping timeout: 264 seconds]
Clamor has joined #u-boot
<Tartarus> Ah, thanks, doing a quick CI run and then pushing
stefanro has quit [Quit: Leaving.]
goliath has joined #u-boot
<marex> jaganteki: would be good to discuss the HDMI stuff here instead of PM
<marex> jaganteki: esp. if that's U-Boot question and I have no experience with rockchip HDMI , so maybe someone can help here
<jaganteki> marex: thanks
bradfa has quit [Read error: Connection reset by peer]
bradfa has joined #u-boot
<jaganteki> I believe the question is real and generic. do we have any existing solution that possible to register a clock and use in another u-class driver like phy
<jaganteki> this generally useful in clock-output-names
<jaganteki> clocks = <&cru PCLK_HDMIPHY>, <&xin24m>, <&cru DCLK_HDMIPHY>;
<jaganteki> clock-names = "sysclk", "refoclk", "refpclk";
<jaganteki> clock-output-names = "hdmi_phy";
<jaganteki> here, the phy driver need to register the hdmi_phy clock and resue the ops with in the driver as refoclk 24MHz is parent.
<jaganteki> It is possible to register clk uclass driver in phy driver via bind. the question that possible to use it as it is clock-output not a real clock that can get it from clock-names
davlefou has quit [Ping timeout: 256 seconds]
Stat_headcrabed has joined #u-boot
* marex unpacks rk3588 orangepi 5 plus and just ... cries
<marex> archaic software, blobs, all the wrongness, sigh
<Clamor> jaganteki: if you have a dm clock driver it should handle clocks well.
<Clamor> marex: ptsd :(
<Forty-Bot> neat, someone using getopt :)
<marex> Forty-Bot: I live in the future :)
<jaganteki> clamor: point is phy driver to register output clock and reuse it. rk3328. This output clock is not clock driver assignee
<Clamor> Refoclk?
<Forty-Bot> that reminds me that I should probably look at whether we can use getopt instead of open-coding it everywhere
<Forty-Bot> it's possibly a size reduction, but only if a lot of commands get converted
<Forty-Bot> jaganteki: maybe create a second driver and bind it to the same ofnode
<jaganteki> problem is this is a direct clock within phy node but mine is clock-output which is referred to another clock xin24m
prabhakar has quit [Quit: Connection closed]
<Forty-Bot> sorry, I don't understand what you mean by "mine"
<Forty-Bot> oh, you mean that this example is not what you are doing?
Stat_headcrabed has quit [Quit: Stat_headcrabed]
<Forty-Bot> can you send an example of the devicetree?
prabhakar has joined #u-boot
prabhakarlad has joined #u-boot
<Forty-Bot> ok, so where does this get used?
<Forty-Bot> anyway, as a general comment clock-output-names is not useful in U-Boot
<Forty-Bot> since U-Boot does not require all clocks to have a globally-unique name
<jaganteki> problem comes when we compute the output clock configuration. here the hdmi_phy must have a clock set, round rates that compute the negotible HDMI TDMS clock based on the parent rates.
<jaganteki> s/TDMS/TMDS
davlefou has joined #u-boot
camus has quit [Ping timeout: 260 seconds]
<Forty-Bot> jaganteki: ok, so pass the phy driver data to the clock
<Forty-Bot> *phy private data
<Forty-Bot> the easiest way is probably to pass the phy dev to the clock as driver data
<Forty-Bot> and then just access the phy dev's private data
sarg has joined #u-boot
<marex> Forty-Bot: ew ? Looks like separation violation, no driver should access other drivers' private data like that
<Forty-Bot> they are the same device
<Forty-Bot> and probably live in the same file
<Forty-Bot> in Linux this would be one driver
<Forty-Bot> so I don't really see a problem
<Forty-Bot> the main purpose of not accessing other driver's private data is that it makes it difficult to modify the driver's private data without introducing bugs
<Forty-Bot> but that is not an issue here
<marex> oh ok
<marex> seems like rk3588 somehow needs tee, but there is no mention of tee in the docs, joy
<marex> oh ok, seems like I got it somehow booting, SPL is still ancient, but U-Boot seems to be up to date now
<marex> so ... ethernet, broken ... OK, that rules out network boot, but let's try USB
<marex> OK ... usb reset ... hangs, that rules out USB
<marex> lets try b51cf8bb09b6 ("board: rockchip: Add Xunlong Orange Pi 5 Plus")
<marex> that claims both should work
<marex> ok ... ethernet does not work, USB still hangs ...
<marex> Kwiboo: ^
slobodan has joined #u-boot
<marex> oh 'pci enum' , that is where the ethernet is
mirko has joined #u-boot
<mirko> i figured in order to read (raw) from an (e)MMC partition, i could do: `mmc dev 0 $PART ; mmc read $LOADADDR 0 128` - however followed `md $LOADADDR` does not show me the expected results (but only NULLs)
<mirko> how can I read N blocks from the very beginning os a specific DOS/MBR partition?
<marex> mirko: mmc dev 0 1 ; mmc read $loadaddr 0 0x10 ... will read 16x512 Bytes from eMMC BOOT HW partition 1 (the first one, A) to $loadaddr
<marex> the var names are case sensitive, it is $loadaddr , not $LOADADDR
<mirko> marex: this is my understanding, however either i'm missing something or it's not: https://paste.nanl.de/?8277f0978398d8e1#BC1EQap883wCwqriZ937ANUL2bxKNtgcwFAjP8ce2yLz
<marex> mirko: U-Boot version ?
<Tartarus> mirko: Er, you're confusing HW partitions and SW partitions?
<mirko> based on v2023.10
<mirko> Tartarus: elaborate please?
<Tartarus> So if you want to read:
<Tartarus> 2 22528 30720 40643955-02 83
<marex> mirko: eMMC has support for hardware partitioning , and within those hardware partitions, you can have software partitions
<Tartarus> That's SW partition #2, and so 0:2
<Tartarus> not HW partition number 2
<Tartarus> ie in Linux, /dev/mmcblk0p2 is 0:2 in U-Boot (more or less)
<Tartarus> but /dev/mmcblk0boot0 is `mmc dev 0 1` (confusing? Yes, eMMC is confusing and I'm only pretty sure I'm right about that being 1 and not 0 0, heh)
<mirko> so `mmc dev 0 0:2` is what i'm supposed to do?
<Tartarus> no, mmc dev 0
<Tartarus> mmc read $loaddaddr 0:2 ...
<Tartarus> er
<mirko> `mmc read 11000000 0:2 8` in my case?
<Tartarus> no
<Tartarus> Sec..
<marex> mirko: what are you trying to do, read content of a software partition ?
<Tartarus> Why are you trying to read the filesystem itself in to memory?
<mirko> marex: no filesystem on that partition but a uImage
<Tartarus> I'm not immediately sure we outright support that outside of sandbox
<mirko> when i talk about partition i mean MBD/DOS partition
<Tartarus> mirko: Then you want to use the fs loading commands
<Tartarus> not the raw read an mmc device commands
<marex> mirko: is there a filesystem on that partition ?
<Tartarus> ie load mmc 0:2 $loadaddr /boot/uImage
<mirko> marex: "< mirko> marex: no filesystem on that partition but a uImage"
<marex> mirko: can you make one and place the image into it ?
sarg has quit [Ping timeout: 256 seconds]
<mirko> there's no filesystem - the uImage id dumped directly into/onto the partition
<marex> mirko: that will make things easier, since the fs provides size info of that file
<mirko> marex: technically, yes, but it's not really an option in this case
<Tartarus> mirko: Ok, so, uh
<Tartarus> you want to do something like
<mirko> i'm wondering, why is raw-reading from a partition so hard?
<Tartarus> mmc dev 0
<marex> mirko: because nobody implemented it or nobody cares enough to make it easier, send patch ?
<Tartarus> mmc read $loadaddr ...block number that your Image starts at, starting from zero of the eMMC user area... number-of-blocks
<Tartarus> That's how you would handle this odd case
<mirko> marex: i wasn't complaining, i just wonder that it's not a thing. would have figured it's quite common.
<marex> mirko: people mostly use filesystem instead of raw files, simply because the filesystem gives them the file metadata (size mostly)
<Tartarus> If you can change this setup, do so
<Tartarus> otherwise you can do it via mmc read
<mirko> Tartarus: that's how i know i can do it (and did, see above pastebin) - i just figured i'd be more flexible in terms of partitzion size changes if i'd address the partition instead of an sbolute addr in flash
<marex> Forty-Bot: ^ you once mentioned there was some generic specifier for partitions
<Tartarus> You just need to calculate the starting block number
<Tartarus> based on sectors/sizes
<Tartarus> mirko: Oh
<Tartarus> Yeah, the flexible option is to use a filesystem :)
<Tartarus> lets see
<mirko> can i extract the partition starting points somehow within the shell?
<Tartarus> Yeah, if you want to be smarter about sizes, use "part" to get some of that informaiton
<mirko> i mean, technically, `mmc part` provides this info already
<Tartarus> "part start <interface> <dev> <part> <varname>\n"
<Tartarus> " - set environment variable to the start of the partition (in blocks)\n"
<marex> Tartarus: more like part list
<Tartarus> marex: Yeah, but I think mirko wants to script things?
<marex> Tartarus: doesn't part list give you that listing and store it into env var too ?
<mirko> ah, i didn#t see `part` - only `mmc part`
<marex> but part start/part size looks like it, you're right
<Tartarus> marex: Ah, yeah, the help message for that should be cleaned up a bit
<marex> Tartarus: true
<mirko> awesome, thanks!
gsz has quit [Ping timeout: 264 seconds]
<mirko> that was extremely helpful, `part` does the job - thank again Tartarus and marex !
<Tartarus> Welcome
mmu_man has quit [Ping timeout: 268 seconds]
thopiekar has quit [Ping timeout: 256 seconds]
mmu_man has joined #u-boot
thopiekar has joined #u-boot
<mirko> just playing around with `part` and "part type <interface> <dev>:<part> <varname>" does not seem to work according help
vagrantc has joined #u-boot
<mirko> expectation would be that `part type mmc 0:2 var` works - but it only prints the help text
vagrantc has quit [Client Quit]
<Clamor> marex: is software subpartitioning supported by u-boot?
<marex> mirko: is CONFIG_PARTITION_TYPE_GUID enabled in your config ?
<marex> Clamor: I think for mbr it is
<marex> for gpt I dunno
<Clamor> Interesting. Thanks
GNUtoo has quit [Remote host closed the connection]
GNUtoo has joined #u-boot
thopiekar has quit [Ping timeout: 260 seconds]
<sjg1> Tartarus: Disabling the fs_helper pylint error seems OK to me. I suppose we could put the helps in a different directory, but let's worry about it if it comes up again
<mirko> marex: no, but why would i need it for an mbr/dos partition?
<marex> mirko: see end of cmd/part.c
<mirko> i see the ifdef, still confused, but will give it a try - thanks
<marex> 280 #ifdef CONFIG_PARTITION_TYPE_GUID
<marex> 281 else if (!strcmp(argv[1], "type"))
<marex> 282 return do_part_type(argc - 2, argv + 2);
<marex> 283 #endif
<marex> 284 return CMD_RET_USAGE;
<marex> if not enabled, you get USAGE
<mirko> i meant, confused by why i'd need guid support for basic part types on an MBR partition table
<mirko> the code is obvious
<marex> you probably dont need GPT support for it, seems like a legacy ifdef, send a patch to fix it?
<mirko> happy to do so once confirmed working
<marex> thanks
<mirko> but wait..
<mirko> i do *see* the `part type` command in my uboot CLI
<mirko> which i shouldn't if CONFIG_PARTITION_TYPE_GUID is unset
<mirko> ah, no, it only covers part of it
<mirko> interesting
vagrantc has joined #u-boot
<mirko> cmd/part.c:231:38: error: ‘struct disk_partition’ has no member named ‘type_guid’
<mirko> so i guess it does indeed depent on GUID support
<marex> hmmm, so the last endif in the help text needs to be moved two lines lower
<mirko> marex: yip
<mirko> but only that, because *setting* type would probably workl
persmule has quit [Remote host closed the connection]
<mirko> but that's also not available due to the ifdef above
Mis012 has quit [Remote host closed the connection]
persmule has joined #u-boot
Mis012 has joined #u-boot
<mirko> oops, no, nevermind the last message from me
<marex> patch is out
<mirko> it's `set` not `type` for setting the type
prabhakarlad has quit [Ping timeout: 250 seconds]
vagrantc has quit [Quit: leaving]
thopiekar has joined #u-boot
thopiekar has quit [Ping timeout: 260 seconds]
Clamor has quit [Read error: Connection reset by peer]
goliath has quit [Quit: SIGSEGV]
<Forty-Bot> but I don't think we have a "read data from a partition" command
thopiekar has joined #u-boot
<mirko> is there a way to compile the config into uboot like there's /proc/config.gz in the linux kernel?
thopiekar has quit [Ping timeout: 264 seconds]
<Tartarus> kind of, CMD_CONFIG
<mirko> perfect, thanks
thopiekar has joined #u-boot
thopiekar has quit [Ping timeout: 256 seconds]
slobodan has quit [Ping timeout: 256 seconds]
norton has joined #u-boot
ikarso has quit [Quit: Connection closed for inactivity]
Leopold has quit []
Leopold has joined #u-boot