mmind00 changed the topic of #linux-rockchip to: Rockchip development discussion | public log at https://libera.irclog.whitequark.org/linux-rockchip
naoki has quit [Quit: naoki]
stikonas has quit [Quit: Konversation terminated!]
Emantor has quit [Quit: ZNC - http://znc.in]
Emantor has joined #linux-rockchip
Daanct12 has joined #linux-rockchip
naoki has joined #linux-rockchip
naoki has quit [Client Quit]
paulk has quit [Read error: Connection reset by peer]
paulk has joined #linux-rockchip
Livio has joined #linux-rockchip
naoki has joined #linux-rockchip
SystemError has quit [Ping timeout: 260 seconds]
SystemError has joined #linux-rockchip
naoki has quit [Quit: naoki]
indy_ has quit [Ping timeout: 276 seconds]
Livio has quit [Ping timeout: 252 seconds]
mripard has quit [Quit: mripard]
Stat_headcrabed has joined #linux-rockchip
Stat_headcrabed has quit [Quit: Stat_headcrabed]
naoki has joined #linux-rockchip
naoki has quit [Client Quit]
psydroid2 has joined #linux-rockchip
raster has joined #linux-rockchip
urja has quit [Read error: Connection reset by peer]
urja has joined #linux-rockchip
raster has quit [Quit: Gettin' stinky!]
stikonas has joined #linux-rockchip
Stat_headcrabed has joined #linux-rockchip
stikonas has quit [Read error: Connection reset by peer]
stikonas has joined #linux-rockchip
raster has joined #linux-rockchip
warpme has joined #linux-rockchip
raster has quit [Quit: Gettin' stinky!]
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
warpme has joined #linux-rockchip
Daanct12 has quit [Quit: WeeChat 4.3.5]
krei-se has quit [Read error: Connection reset by peer]
krei-se has joined #linux-rockchip
warpme has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]
dsimic has quit [Ping timeout: 252 seconds]
dsimic has joined #linux-rockchip
<dsimic> good news, Radxa accepted my suggestion for upping the eMMC chip on ROCK 5 ITX from 8 GB to 32 GB :)
Stat_headcrabed has quit [Quit: Stat_headcrabed]
<dsimic> also, the recovery button will be changed to modify the boot selection resistor divider to LEVEL2 and make the microSD card first in boot order, instead of the button's current purpose to initiate USB-based recovery, which is nothing but pain
Livio has joined #linux-rockchip
jmabsd has joined #linux-rockchip
<jmabsd> Hi! I just did "aptitude update; aptitude upgrade" on a Rock Pi RK3588, one which boots from NVMe SSD. On boot now, the boot fails with the kernel complaining that there is no "root=" parameter. How fix?
<jmabsd> Of course this device already has the boot loader on the SPI flash.
<jmabsd> https://0bin.net/paste/JDayVVb9#S4ytbTQ13uruw+twTr7HAXJawJ+ACM-8xnABXJrR0fT
<jmabsd> As you see in the log, "U-Boot SPL 2017.09-gbf47e8171f4-220414-dirty #stephen (Jun 07 2023 - 17:56:02)" boots, and then it loads the boot loader from "MTD2"
<jmabsd> You get "U-Boot Menu" with "1: Debian GNU/Linux 11 (bullseye) 5.10.110-38-rockchip"
<jmabsd> Is it that this kernel doesn't support PCI/NVMe?????
<dsimic> it's a Rock 5B?
<jmabsd> yes
<jmabsd> dsimic: yes
<jmabsd> Was it a mistake by me to allow "aptitude update; aptitude upgrade" to do its work
<jmabsd> Does the "u-boot" console contain any "ls" function etcetra using which I can figure out what "root=" should be set from, or like, what is the issue. I am not clear
<jmabsd> I don't remember what steps I took to make the NVMe installation work in the first place.
<dsimic> the "root=..." part of the kernel command line comes from what the kernel sees as the devices
<dsimic> is there way to get the complete kernel messages from failed boot attempt?
<jmabsd> dsimic: What is your idea how I fix this now
<jmabsd> dsimic: sure, I will restart the device and paste you all of it, 1 second
<dsimic> thanks
<jmabsd> See in there, it says it found the NVMe indeed, and loads its extlinux.conf -      "
<jmabsd> Device 0: Vendor: 0x2646 Rev: SBM02103 Prod: 50026B7785732955
<jmabsd>             Type: Hard Disk
<jmabsd>             Capacity: 953869.7 MB = 931.5 GB (1953525168 x 512)
<jmabsd> ... is now current device   Scanning nvme 0:2...  Scanning nvme 0:3...  Found /boot/extlinux/extlinux.conf Retrieving file: /boot/extlinux/extlinux.conf"
<jmabsd> So u-boot indeed finds the NVMe device, indeed loads /boot/extlinux/extlinux.conf , indeed loads a kernel (not sure which) and then that kernel just halts with complaint about root= not specified lol
<jmabsd> I have one more cue
<jmabsd> dsimic: I got a backup of /etc/default/u-boot from before and after the upgrade, see here https://0bin.net/paste/PGvYaR0X#dVlHYoZe9eiwCpp4GhAcXq5DZ7K+fQgoLx1F-OsKlnu
<jmabsd> I have no idea why they left but as you see these three lines were removed:
<jmabsd> U_BOOT_TIMEOUT="10"
<jmabsd> U_BOOT_PARAMETERS="$(cat /etc/kernel/cmdline)"
<jmabsd> U_BOOT_FDT_DIR="/usr/lib/linux-image-"
<dsimic> hmm, but that's pretty much the same log as before, it show just some error messages, not all of them
<dsimic> s/it show/it shows/
<jmabsd> this is all it outputs to the serial before stopping.
<jmabsd> do you have any idea how fix
<dsimic> what's in /etc/kernel/cmdline?
<jmabsd> I have no idea because the device is bricked right now
<jmabsd> it doesn't boot
<jmabsd> this is the Radxa Rock 5 B default Debian installation
<dsimic> can you boot from a microSD card to investigate?
<jmabsd> dsimic: I could boot from an eMMC to investigate yeah
<jmabsd> dsimic: what do you suggest I do
<dsimic> see what's in /etc/kernel/cmdline :)
<jmabsd> I will boot it from eMMC soon and check.
<mps> jmabsd: could you paste content of boot/extlinux/extlinux.conf
<dsimic> good point
<mps> do you have 'append ....' in it
<jmabsd> mps,dsimic: one minute
<mps> for example 'append rw root=/dev/nvme0n1p4 rootfstype=f2fs rootwait'
<mps> f2fs could ext3/4 or other FS
<dsimic> jmabsd: just take your time
<mps> jmabsd: small note, nowadays is possible to write options/directives in lower letters in extlinux.conf
<jmabsd> hm, the eMMC maybe does not boot, I may need to re-flash it
<jmabsd> "Trying to boot from MMC1
<jmabsd> spl: partition error
<jmabsd> Trying fit image at 0x4000 sector
<jmabsd> ## Verified-boot: 0"
<jmabsd> oh no wait, it booted, yey
<jmabsd> Right so, checking what NVMe drives are there: # dmesg | grep nvme  [ 4.091929] nvme nvme0: pci function 0000:01:00.0  [ 4.091966] nvme 0000:01:00.0: enabling device (0000 -> 0002)  [ 4.524531] nvme nvme0: allocated 64 MiB host memory buffer.  [ 4.549775] nvme nvme0: 8/0/0 default/read/poll queues   [ 4.561886] nvme0n1: p1
<jmabsd> p2 p3
<jmabsd> meanwhile this boot is from the eMMC indeed, "mount" shows "/dev/mmcblk1p2 on / type ext4 (rw,relatime)".
<dsimic> what does output of lsblk look like?
<jmabsd> # lsblk
<jmabsd> NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
<jmabsd> mtdblock0 31:0 0 16M 0 disk
<jmabsd> mmcblk1 179:0 0 28.9G 0 disk
<jmabsd> ├─mmcblk1p1 179:1 0 512M 0 part
<jmabsd> └─mmcblk1p2 179:2 0 28.4G 0 part /
<jmabsd> mmcblk1boot0 179:32 0 4M 1 disk
<jmabsd> mmcblk1boot1 179:64 0 4M 1 disk
<jmabsd> nvme0n1 259:0 0 931.5G 0 disk
<jmabsd> ├─nvme0n1p1 259:1 0 16M 0 part /mnt
<jmabsd> ├─nvme0n1p2 259:2 0 300M 0 part
<jmabsd> └─nvme0n1p3 259:3 0 931.2G 0 part
<dsimic> nice, nvme0 is there
<dsimic> let's see the contents of boot/extlinux/extlinux.conf and /etc/kernel/cmdline, please
<jmabsd> okey I now did " mount /dev/nvme0n1p1 /mnt"
<jmabsd> there is only one text file in /mnt . then I did the same for p2, and it's an empty partition.   and then I did the same for p3 and that is the actual filesystem.
<mps> probably you have to add 'append root=/dev/nvme0n1p3' to extlinux.conf
<dsimic> the way I see it, /etc/kernel/cmdline should handle that... perhaps?
<jmabsd> mps,dsimic: here is extlinux.conf: https://0bin.net/paste/5bZKAQUC#z+CVR2QsMLv7IGJ112pYpqhM4m9lIXxKJ0Vk5bgXinl
<jmabsd> # cat /etc/kernel/cmdline
<jmabsd>  root=UUID=29a94882-5add-4f09-8cc5-3f43918624fa
<mps> dsimic: doesn't u-boot add content of 'append' to kernel cmdline?
<jmabsd> aha here we go. okay. right so, the machine had the root argument inside /etc/kernel/cmdline .
<dsimic> there's no "root" in extlinux.conf indeed
<jmabsd> can I fix this quickly now
<jmabsd> can I just "vim" extlinx.conf ?
<jmabsd> easy peasy
<dsimic> mps: U-Boot shouldn't add anything there
<mps> jmabsd: yes, vim is 'swiss army knife' :-)
<dsimic> jmabsd: perhaps you should regenerate the U-Boot configuration the Debian way
<jmabsd> so I just add "  root=UUID=29a94882-5add-4f09-8cc5-3f43918624fa " to *the end* of the first "append ........." line
<dsimic> FWIW, I'd rather investigate the proper way
<jmabsd> dsimic: I agree this was not cleanly done
<jmabsd> but let's see if it makes the machine boot.
<dsimic> let's se
<dsimic> let's see *
<mps> jmabsd: if you use 'UUID' you have to find it for root FS, blkid command could help
<jmabsd> Okey, now when I rebooted, I see that indeed the " root=.." command was loaded into the u-boot/boot environment. Great. And let's see if it boots..
<jmabsd> Naaah come on
<jmabsd> "[ 11.449838] rk_hdmirx fdee0000.hdmirx-controller: hdmirx_cancel_cpu_limit_freq freq qos nod add
<jmabsd> Gave up waiting for root file system device. Common problems:
<jmabsd>  - Boot args (cat /proc/cmdline)
<jmabsd>    - Check rootdelay= (did the system wait long enough?)
<jmabsd>  - Missing modules (cat /proc/modules; ls /dev)
<jmabsd> ALERT! UUID=29a94882-5add-4f09-8cc5-3f43918624fa does not exist. Dropping to a shell!
<jmabsd> "
<jmabsd> mps,dsimic: Should I reboot from the eMMC and run the "blkid" tool in the console??
<jmabsd> why this mess
<dsimic> yes, let's verify that's the right UUID
<jmabsd> (And it did not drop to a shell, it just stopped.)
<dsimic> perhaps the update failes to regenerate extlinux.conf
<jmabsd> Why would the UUID change at all
<dsimic> s/failes/failed/
<dsimic> the UUID shouldn't change, but something isn't right
<jmabsd> should I perhaps just re-flash the whole NVMe drive with their latest Debian eh. anyhow let's see if I can fix the device fast
<jmabsd> # blkid
<mps> safer method is to use /dev/$device
<jmabsd> # blkid
<jmabsd> x /dev/mtdblock0: PTUUID="6d122d5d-f523-4ba5-b1f5-f21d08267320" PTTYPE="gpt"
<jmabsd> x /dev/mmcblk1p1: LABEL_FATBOOT="boot" LABEL="boot" UUID="C3D8-FB42" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="boot" PARTUUID="2913d6d4-d377-49c4-8d7f-734c6c49d6cf"
<jmabsd> x /dev/mmcblk1p2: LABEL="rootfs" UUID="29a94882-5add-4f09-8cc5-3f43918624fa" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="rootfs" PARTUUID="9e1a9b50-bd9a-415c-b756-cf17ccbc97fd"
<jmabsd> x /dev/nvme0n1p1: LABEL_FATBOOT="config" LABEL="config" UUID="F3EB-4BAC" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="config" PARTUUID="205053a7-cb20-46da-9a6f-5bbd37d433e8"
<jmabsd> x /dev/nvme0n1p2: LABEL_FATBOOT="boot" LABEL="boot" UUID="F3ED-7DAA" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="boot" PARTUUID="1833ae1a-ed01-4b96-a5ef-21e11479b509"
<jmabsd> x /dev/nvme0n1p3: LABEL="rootfs" UUID="c0f29ae7-d9ca-428e-89d9-e5394236979e" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="rootfs" PARTUUID="3a1839b1-0e45-40a8-8845-7824bb9d5140"
<dsimic> well, you used a wrong UUID
<dsimic> c0f29ae7-d9ca-428e-89d9-e5394236979e is the right one
<mps> UUID="c0f29ae7-d9ca-428e-89d9-e5394236979e" this one should be used
<jmabsd> Weird. It's the nvme0n1p3 that is the boot device.     So the root device UUID should be c0f29ae7-d9ca-428e-89d9-e5394236979e right?
<dsimic> but why was the wrong one in /etc/kernel/cmdline, IDK
<jmabsd> oh wait wait, i think I realize my mistake
<dsimic> yes?
<jmabsd> I should have checked /mnt/etc/kernel/cmdline not /etc/kernel/cmdline  . doing. sec.
<dsimic> wrong /etc/kernel/cmdline? :)
<jmabsd> exactly
<jmabsd> ukey! it says:   # cat /mnt/etc/kernel/cmdline
<jmabsd> quiet splash loglevel=4 rw earlycon consoleblank=0 console=tty0 console=ttyFIQ0,1500000n8 console=ttyAML0,115200n8 console=ttyS2,1500000n8 console=ttyS0,1500000n8 coherent_pool=2M irqchip.gicv3_pseudo_nmi=0 cgroup_enable=cpuset cgroup_memory=1 cgroup_enable=memory swapaccount=1
<mps> hm, debian have /etc/kernel/cmdline?
SystemError has quit [Remote host closed the connection]
<dsimic> there's still no "root=..." there... weird
<jmabsd> so there was no "root=" in there, weird!
<jmabsd> should I try with c0f29ae7-d9ca-428e-89d9-e5394236979e  or  3a1839b1-0e45-40a8-8845-7824bb9d5140 ?
<dsimic> c0...
<jmabsd> blkid printed:  /dev/nvme0n1p3: LABEL="rootfs" UUID="c0f29ae7-d9ca-428e-89d9-e5394236979e" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="rootfs" PARTUUID="3a1839b1-0e45-40a8-8845-7824bb9d5140"
<jmabsd> OK
<jmabsd> thanks. trying.
<dsimic> let's see... fingers croseed :)
<jmabsd> yes crossing fingers
<jmabsd> YEY!!!
<jmabsd> it booted!!!
<jmabsd> Thank you both a ton for your help.   I will write it up on the thread.
<dsimic> woohoo, good... now investigate what went wrong with the update :)
<mps> and I have to investigate my flaky wifi link
<jmabsd> I have written up this fix in the Radxa forum thread I created above.
<jmabsd> dsimic: I think I will just leave it as it is, the installation is not important enough
<jmabsd> This was just to un-mess that aptitude update;aptitude upgrade bricked the machine.
<jmabsd> Many thanks again. I will go into the next thing now, will disconnect Internet. Have a good weekend =)
jmabsd has quit [Quit: Client closed]
<diederik> if you switch boot device, you indeed need to update the UUID of the (new) root partition ...
<mps> this was one of reasons I stopped to use debian few years ago, it thinks it is smarter than me ;-)
<diederik> blame rockchip? Because my Debian systems always do exactly what I tell them to do ... unless *I* screw up (sometimes deliberately)
<diederik> having `U_BOOT_PARAMETERS="$(cat /etc/kernel/cmdline)"` in /etc/default/u-boot is *insane*
Stat_headcrabed has joined #linux-rockchip
SystemError has joined #linux-rockchip
Stat_headcrabed has quit [Quit: Stat_headcrabed]
franoosh has joined #linux-rockchip
Livio has quit [Quit: Reconnecting]
Livio has joined #linux-rockchip
Hypfer6 has quit [Quit: The Lounge - https://thelounge.github.io]
Stat_headcrabed has joined #linux-rockchip
Hypfer6 has joined #linux-rockchip
Stat_headcrabed has quit [Quit: Stat_headcrabed]
franoosh has quit [Remote host closed the connection]
franoosh has joined #linux-rockchip
stikonas has quit [Read error: Connection reset by peer]
stikonas has joined #linux-rockchip
naoki has joined #linux-rockchip
franoosh has quit [Remote host closed the connection]
f476 has quit [Ping timeout: 248 seconds]
psydroid2 has quit [Quit: KVIrc 5.0.0 Aria http://www.kvirc.net/]
Livio has quit [Ping timeout: 265 seconds]