LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware - ARM (https://www.linuxquestions.org/questions/slackware-arm-108/)
-   -   applied last updates to bananapi pro, doesn't boot now (https://www.linuxquestions.org/questions/slackware-arm-108/applied-last-updates-to-bananapi-pro-doesnt-boot-now-4175695142/)

glorsplitz 05-14-2021 08:06 PM

applied last updates to bananapi pro, doesn't boot now
 
I don't have time to look into all of this right now.

My log of prior updates shows
/boot/uImage-armv7, /boot/uinitrd-armv7

and now they're not there, maybe I didn't RTFM something.

I got 'trouble ahead', '/bin/sh: can't access tty; job control turned off'.

looks like root drive is not mounted

I've not had to diagnose arm boot failures, what should I look into next?

Thank you

drmozes 05-15-2021 12:59 AM

Quote:

Originally Posted by glorsplitz (Post 6250891)

My log of prior updates shows
/boot/uImage-armv7, /boot/uinitrd-armv7

The Banana Pi Hardware Model was migrated to the standard Kernel and initrd formats in 2015. Looks like you've had seamless upgrades working in a way I hadn't planned. Good going :-)

You just need to change the u-boot config and it'll boot. The installation documents provide the correct settings.

Here's what it should look like. This is the default settings from the installation documentation, so you may have /boot on a different storage device.

Code:


=> printenv bootcmd_slk
bootcmd_slk=scsi reset;scsi reset;scsi scan ; run bootcmd_dtb ; ext4load scsi 0:2 ${kernel_addr_r} /boot/zImage-armv7  ; ext4load scsi 0:2 ${ramdisk_addr_r} /boot/initrd-armv7

Copy whatever string yours has presently, substituting 'uImage' with 'zImage' and 'uinitrd' with 'initrd' and keep the rest of the string intact.
Then save the bootcmd_slk variable with the new settings (paste it into the u-boot console):

Again, this is the default so you need your own string after the setenv bootcmd_slk part.

Code:

setenv bootcmd_slk 'scsi reset;scsi reset;scsi scan ; run bootcmd_dtb ; ext4load scsi 0:2 ${kernel_addr_r} /boot/zImage-armv7  ; ext4load scsi 0:2 ${ramdisk_addr_r} /boot/initrd-armv7'
Then:
Code:

=> printenv bootcmd
bootcmd=run bootcmd_slk ; bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr} ; reset

That's the default and yours needs to look like that (but might not since you're using the older binary format with the u-boot header). However, U-Boot evaluates the strings once and stores the result, so you need to set it once again:.

If yours doesn't look like this, use this:
Code:

setenv bootcmd 'run bootcmd_slk ; bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr} ; reset'
saveenv
reset

That should do.

If it doesn't, follow the installation instructions -you might need to change more of the u-boot configuration. That documentation has been fully baked for years now but I don't know what changed since you first installed it. You don't need to reinstall the OS though, just get the u-boot settings right.
Hopefully you have a recent enough U-Boot on there too, otherwise you'll have to upgrade that. If you can get it working by changing the config, there's no need to upgrade U-Boot itself.

glorsplitz 05-15-2021 12:31 PM

2 Attachment(s)
Stuart, thank you for the prompt reply.

Quote:

Originally Posted by drmozes (Post 6250922)
The Banana Pi Hardware Model was migrated to the standard Kernel and initrd formats in 2015. Looks like you've had seamless upgrades working in a way I hadn't planned. Good going :-)

No, I'm not that clever, I followed INSTALL_AllWinner_A20.txt and tried to do what was said.

Please check out attachments, I think I have what you said to do.

This what I saw before rebooting
Quote:

-rw-r--r-- 1 root root 98176 May 13 22:29 /var/log/packages/kernel-firmware-20210503_ecdfcf8-noarch-1
-rw-r--r-- 1 root root 29376 May 13 22:30 /var/log/packages/kernel-headers-5.10.36-arm-1
-rw-r--r-- 1 root root 289835 May 13 22:33 /var/log/packages/kernel-modules-armv7-5.10.36_armv7-arm-1
-rw-r--r-- 1 root root 4856790 May 13 23:10 /var/log/packages/kernel-source-5.10.36-arm-1
-rw-r--r-- 1 root root 29303 May 13 23:11 /var/log/packages/kernel_armv7-5.10.36-arm-1
-rw-r--r-- 1 root root 4237419 May 11 11:24 /boot/System.map-armv7-5.10.36
-rw-r--r-- 1 root root 254530 May 11 10:36 /boot/config-armv7-5.10.36
-rw-r--r-- 1 root root 40203445 May 11 15:39 /boot/initrd-armv7-5.10.36
-rw-r--r-- 1 root root 5863768 May 11 11:25 /boot/zImage-armv7-5.10.36

drmozes 05-15-2021 12:52 PM

Quote:

Originally Posted by glorsplitz (Post 6251044)

This what I saw before rebooting

Ah, it's not a Banana Pi original.
After the warning message, does it boot properly?

If it fails, or works, what does this show?
Code:

strings /proc/device-tree/model
It's easy enough to fix.

drmozes 05-15-2021 01:15 PM

Quote:

Originally Posted by drmozes (Post 6251048)
Code:

strings /proc/device-tree/model

I can see it in the first screen shot from within U-Boot so it's probably "Lemaker Banana Pro"

If you can boot the machine, download this:
Code:

http://armed.slackware.com/tmp/initrd-armv7
and
Code:

cat /pathtowhereyouputit/initrd-armv7 > /boot/initrd-armv7
Reboot, and it should boot fine.

If it doesn't boot past the warning, I'll be surprised but it's easy enough to fix anyway.

glorsplitz 05-15-2021 07:51 PM

1 Attachment(s)
Stuart, thank you again for getting back with me.

Does not boot properly, boot process is stopped as in attached, usb becomes inactive, no keyboard.

What's different about http://armed.slackware.com/tmp/initrd-armv7 than what got just installed:
-rw-r--r-- 1 root root 40203445 May 11 15:39 /boot/initrd-armv7-5.10.36

like is my /boot/initrd-armv7-5.10.36 corrupt or something?

I have the OS installed on a 128G ssd, seems like I'm going to have to mount it somewhere to do what you said.

drmozes 05-17-2021 02:48 AM

Quote:

Originally Posted by glorsplitz (Post 6251111)
Stuart, thank you again for getting back with me.

Does not boot properly, boot process is stopped as in attached, usb becomes inactive, no keyboard.


What's different about http://armed.slackware.com/tmp/initrd-armv7 than what got just installed:
-rw-r--r-- 1 root root 40203445 May 11 15:39 /boot/initrd-armv7-5.10.36

like is my /boot/initrd-armv7-5.10.36 corrupt or something?

I have the OS installed on a 128G ssd, seems like I'm going to have to mount it somewhere to do what you said.

Nothing is corrupt - it's just that the new module loader only loads modules for known Hardware Models, and the Banana Pro doesn't identify as a 'Banana Pi', so it wasn't recognised.
You can check out Slackchat S02E12 for information about how it works.

I'm certain that the new version of the initrd will work because my Banana Pi surfaces the same model name within the U-Boot console as the Kernel /proc interface (as you'd expect!).
In fact you've just given me an idea. Thanks!

Let me know how the new initrd goes.

glorsplitz 05-17-2021 07:26 PM

Thank you! Good to hear I've given you hopefully a good working idea!

Really trying to get to this, working lots of hours, will let you know what happens.

glorsplitz 05-21-2021 07:51 PM

Got it!
 
Stuart, thank you!

Did what you said and here's what you asked about
Code:

/usr/bin/strings /proc/device-tree/model
LeMaker Banana Pro

I checked out Slackchat S02E12 a little and think I see what happens, will look more closely when I have more time.

When boot process gets to
Code:

if [ -z "$platform_detected" ]; then
  echo "WARNING: Unknown/unsupported $ARCH hardware platform."

and so on, can what's in /proc/device-tree/model be shown in above message?

Is "LeMaker Banana Pro" something you'll add to boot process to allow banana pro like mine to continue normal slackwarearm kernel updates?

I don't want to break it again and have to bug you some more. :)

CHEERS!

drmozes 05-22-2021 02:49 AM

Quote:

Originally Posted by glorsplitz (Post 6252774)
When boot process gets to
Code:

if [ -z "$platform_detected" ]; then
  echo "WARNING: Unknown/unsupported $ARCH hardware platform."

and so on, can what's in /proc/device-tree/model be shown in above message?

Is "LeMaker Banana Pro" something you'll add to boot process to allow banana pro like mine to continue normal slackwarearm kernel updates?

I don't want to break it again and have to bug you some more. :)

Yes. The initrd I gave you to try supports it already, and the next version I'll release will display the Hardware Model regardless of whether it's supported, as that'll have informed me immediately as to what the problem was.

glorsplitz 05-29-2021 07:29 PM

applied last updates to bananapi pro, boots once again!
 
Current (pre-release) ChangeLog for ARM Sat May 29 08:08:08 UTC 2021

it's all good!


All times are GMT -5. The time now is 11:27 AM.