lanefu changed the topic of #armbian-rockchip to: Armbian - Linux for ARM development boards | Rockchip SoC | www.armbian.com | This channel is relayed to the equivalent Discord channel | this channel is logged
<DC-IRC>
<Robin> I get this after a fresh build of armbian gor the rock5b, any idea what is going on? And how I can fix this?
<DC-IRC>
<monkaBlyat> more information's could be very useful like are you booting from nvme,emmc or sd card and what's on your spi flash
<DC-IRC>
<Robin> When I use the armbian build that is on the website and flash it, it works, when I use the build tool with the same setup (except for the .img) file, then I get that initramfs error.
<DC-IRC>
<amazingfate> These two patches seem to be useful:
<DC-IRC>
<Robin> is it possible that the UUID being generated in the build does not match the one that the boot tries to do? Or am I missing some other wizzarding stuff?
<DC-IRC>
<amazingfate> You may try to clean the storage and reflash the image.
<DC-IRC>
<Robin> I have tried that multiple times already. I never am able to boot from the self-compiled image. If I use the one on the website, it works..
<DC-IRC>
<monkaBlyat> you can check if the UUID match with your rootfs on /boot/armbianEnv.txt
<DC-IRC>
<amazingfate> My uuid from the armbianEnv.txt and the disk matches.
<DC-IRC>
<monkaBlyat> another thing you might licke to check is /etc/fstab
<DC-IRC>
<monkaBlyat> another thing you might like to check is /etc/fstab
<DC-IRC>
<IgorPec> no, its just cosmetics
<DC-IRC>
<IgorPec> re: for that patches
<DC-IRC>
<IgorPec> supressing some debug, well, ok
<DC-IRC>
<Robin> How can I check that if I even can't boot into it?
<DC-IRC>
<amazingfate> You can insert your tf card to another linux machine.
<DC-IRC>
<Robin> It's EMMC, no sd card
<DC-IRC>
<IgorPec> it is possible that there is a bug in installer, i found and fix some, but perhaps not all. In case this is a bug, its better to proceed this way https://www.armbian.com/bugs/ provide all info, logs, how to recreate ... to forum, not to live chat. Bugs are resolved when possible, not if you run into them.
<DC-IRC>
<Tenkawa> if its a emmc then what are you using to flash it with? the Rock5 doesn't have "onboard emmc" its a socketed chi
<DC-IRC>
<Tenkawa> if its a emmc then what are you using to flash it with? the Rock5 doesn't have "onboard emmc" its a socketed chip
<DC-IRC>
<Tenkawa> use that same reader to mount the emmc on another machine to check its uuid/contents
<DC-IRC>
<Robin> Via USB-c you can use the RKDdevtool to flash to the EMMC directly that is been attached (as clip-on) to the board
<DC-IRC>
<amazingfate> You can insert a tf card to boot into the system.
<DC-IRC>
<amazingfate> Maybe that's a bug related to the emmc module. A friend of mine has encountered the same issue.
<DC-IRC>
<Robin> Interesting. Allright, I'll try and find out what the issue might be, any ideas where to start looking? Would speed up the process 😄
<DC-IRC>
<amazingfate> You can try booting from tf card, and see if there is emmc blk. Then try to boot the rootfs on emmc from the kernel on tf card.
<DC-IRC>
<Tenkawa> sounds like he has no flash media to use
<DC-IRC>
<Robin> works just fine with the image on the website
<DC-IRC>
<Robin> not when I build myself
<DC-IRC>
<Tenkawa> Are you using an x86 and cross building or an arm box and native building?
<DC-IRC>
<IgorPec> i think you can flash directly from build framework
<DC-IRC>
<Tenkawa> @IgorPec Do you want me to test the current build state on one of my units?
<DC-IRC>
<IgorPec> if you got time, sure. i am still not sure installer is working bug free
<DC-IRC>
<Tenkawa> I have one sitting here I can test the rk install method on
<DC-IRC>
<IgorPec> all possible variants you can come up and lets fix what it needs to be fixed
<DC-IRC>
<Tenkawa> Ok. I'll use his build line
<DC-IRC>
<Robin> I'm using an ubuntu server on amazon to build on then I download that image and flash it from my windows pc.
<DC-IRC>
<IgorPec> rk install method might work with khadas edge 2 - i assume it has eMMC?
<DC-IRC>
<Tenkawa> @IgorPec I've got 2 R5's sitting here I can use
<DC-IRC>
<IgorPec> or that
<DC-IRC>
<Robin> Tried adge and legacy
<DC-IRC>
<Robin> Tried edge and legacy
<DC-IRC>
<Tenkawa> About to run the build now
<DC-IRC>
<Robin> So this right? `./compile.sh BOARD=rock-5b BRANCH=edge RELEASE=jammy BUILD_MINIMAL=no BUILD_DESKTOP=no KERNEL_CONFIGURE=no COMPRESS_OUTPUTIMAGE=sha,img`
<DC-IRC>
<Tenkawa> I'll run it that way
<DC-IRC>
<Robin> Allright
<DC-IRC>
<Robin> Running a build now too
<DC-IRC>
<Tenkawa> I'm going to try using a flash to emmc first... see if its something rk tools specific
<DC-IRC>
<Tenkawa> (this is easier to isolate)
<DC-IRC>
<Tenkawa> I also don't use a display so everything I do is remote
<DC-IRC>
<Tenkawa> its a headless box
<DC-IRC>
<Robin> I have a server on aws, so I don't have a display either
<DC-IRC>
<Tenkawa> @rpardini any thoughts?
<DC-IRC>
<rpardini> I just merged `ENABLE_EXTENSIONS=rkdevflash` if you're on Linux; it builds image then enters loop waiting for rkdevtool in recovery mode
<DC-IRC>
<rpardini> it's nothing magic, just builds rkdevtool for you and sends the loader bin then writes image.
<DC-IRC>
<rpardini> but ofc you need the rk device usb-c-plugged-in to the build host.
<DC-IRC>
<Robin> Problem is that I don't build on an accessible host
<DC-IRC>
<rpardini> yeah in that case you can just use regular rkdeveloptool somewhere else.
<DC-IRC>
<Robin> Yep, is what I do 🙂
<DC-IRC>
<rpardini> now, why would a DL'ed image work and one you just built doesn't?
<DC-IRC>
<rpardini> can you get UART bootlogs @Robin ?
<DC-IRC>
<Tenkawa> I have a theory but wont know until I see this image finish
<DC-IRC>
<Tenkawa> I think its extlinux goofyness
<DC-IRC>
<rpardini> Hmm, looking at `rock-5b.wip` there's no extlinux. there is a separate (ext4) `/boot` partition though
<DC-IRC>
<rpardini> no idea, my rk3588 (meko) doesnt require that.
<DC-IRC>
<rpardini> and I'm using the rock-5a u-boot from radxa, so I can't see why radxa's 5b would require a separate /boot.
<DC-IRC>
<Tenkawa> my r5's are extlinux
<DC-IRC>
<Robin> I don't know, It's a Rovk5B
<DC-IRC>
<Robin> I don't know, It's a Rock5B
<DC-IRC>
<Tenkawa> but they aren't radxa or armbian builds
<DC-IRC>
<Tenkawa> Ok image done.. let me mount it and look at something real quick
<DC-IRC>
<rpardini> you gonna find: a separate /boot, ext4, with a bootscript (not extlinux) on it
<DC-IRC>
<rpardini> that hasn't changed in months
<DC-IRC>
<Tenkawa> not sure if it matters but the part types dont match between my working gpt system
<DC-IRC>
<Tenkawa> and this image
<DC-IRC>
<Robin> Allright then... Well, this is going to be fun, since I don't have my serial to USB adaptor with me 🙈
<DC-IRC>
<rpardini> It's well worth the couple bucks it costs. Booting "blind" is really... guesswork
<DC-IRC>
<Robin> I have one, but not with me.. So the fastest I could look into that would be... tomorrow
<DC-IRC>
<Tenkawa> the boot part on the working one is /dev/nvme0n1p1 32768 524287 491520 240M Microsoft basic data vs Armbian_23.05.0-trunk_Rock-5b_jammy_edge_6.2.12.img1 32768 557055 524288 256M Linux extended boot which shouldn't matter
<DC-IRC>
<rpardini> yeah that's not it. let Robin get a bootlog and all will be revealed
<DC-IRC>
<Tenkawa> he already has one
<DC-IRC>
<Tenkawa> its about 10 pages up
<DC-IRC>
<Tenkawa> it says clearly uuid not found
<DC-IRC>
<Tenkawa> its the normal uuid mismatch in bootloader
<DC-IRC>
<rpardini> oh, that's not the bootlog, it's the initrd failing to mount root after kernel booted
<DC-IRC>
<rpardini> run `blkid` there
<DC-IRC>
<rpardini> also `lsblk`
<DC-IRC>
<Tenkawa> @rpardini shouldn't it be using root=PARTUUID=2da4a987-9f48-48f1-abad-d12e738138b4 not UUID
<DC-IRC>
<Tenkawa> its using UUID in the file not PARTUUID
<DC-IRC>
<rpardini> then follow in /boot, there's boot.cmd and armbianEnv.txt, see if they match blkid/lsblk
<DC-IRC>
<rpardini> oh also check `/proc/cmdline` to see what the hell
<DC-IRC>
<rpardini> but yeah, do it on `BRANCH=legacy`, I've no idea what's the status of edge, it's been a few months rotting there
<DC-IRC>
<rpardini> oh and ofc @Robin run `dmesg | less` on the initramfs prompt, and check for storage failures. it might be failing to bringup the emmc in the kernel, so tht's why it cant find the UUID.
<DC-IRC>
<Robin> Currently building the legacy image and will flash it
<DC-IRC>
<Robin> Flashing...
<DC-IRC>
<Robin> @rpardini `blkid` is empty (nothing returned)
<DC-IRC>
<Robin> `lsblk` gives me a command not found
<DC-IRC>
<Robin> the cmdline incomming
<DC-IRC>
<rpardini> yeah answer lies in `dmesg` then.
<DC-IRC>
<rpardini> yeah somehow kernel's failing to bringup emmc. get a UART bootlog and paste it in full... but again, I would not know how to fix this. Seems like what amazingfate said, might be some emmc bug.
<DC-IRC>
<rpardini> still doesnt make any sense ref DL'ed image vs built-image
<DC-IRC>
<Robin> Yeah, I don't know what the difference is between those two..
<DC-IRC>
<Robin> Sucks it doesn't work, since I do customize some things like splash and such
<DC-IRC>
<amazingfate> I thought single small boot partition may let kernel load faster. I don't know if that guess is right.
<DC-IRC>
<rpardini> Hmm i've no idea, could be. For the Meko's I skipped the `/boot`
<DC-IRC>
<rpardini> when we first started it required a fat32 /boot & extlinux indeed... but was patched in soon after
<DC-IRC>
<amazingfate> Rock5b need faster kernel load. I thought as the system disk usage goes up loading kernel from the root partition will get slower.
<DC-IRC>
<c0rnelius> Why would it matter where its getting loaded from? As long as you aren't using some old POS sdcard or something, that sounds kind of like nonsense.
<DC-IRC>
<rpardini> I think it _might_ matter when you get to nanosecond precision, and have shuffled the ext4 containing the kernel enough.
<DC-IRC>
<c0rnelius> k sure
<DC-IRC>
<amazingfate> Well we can remove that if it doesn't matter.
<DC-IRC>
<rpardini> it really shouldn't make any difference, except for armbian-install
<DC-IRC>
<rpardini> I guess this was all trying to make PD power supplies work. It really requires a fast kernel boot, lol