Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

reTerminal: black screen issue #86

Open
matsujirushi opened this issue Jan 13, 2024 · 10 comments
Open

reTerminal: black screen issue #86

matsujirushi opened this issue Jan 13, 2024 · 10 comments

Comments

@matsujirushi
Copy link
Contributor

matsujirushi commented Jan 13, 2024

I am currently working on a fix.

Even after installing the driver, the screen does not appear in the following environments.

  • Raspberry Pi OS 32-bit
    • 2023-05-03-raspios-bullseye-armhf.img.xz
      • arm_64bit=1 - default
    • 2023-10-10-raspios-bookworm-armhf.img.xz
      • arm_64bit=1 - default
      • arm_64bit=0
    • 2023-12-05-raspios-bookworm-armhf.img.xz
      • arm_64bit=1 - default
      • arm_64bit=0
@matsujirushi
Copy link
Contributor Author

/scripts/reTerminal.sh flow is:

flowchart TD
    id1(Check /boot volume space)
    id2(Install dkms package)
    id3(Uninstall modules and overlays)
    id4(Upgrade kernel)
    id5(Install kernel header)
    id6(Install modules and overlays)
    id7(Modify few files)
    
    id1 --> id2
    id2 --> id3
    id3 --> id4
    id4 --> id5
    id5 --> id6
    id6 --> id7
  • The code to get the kernel version when installing a module is complicated.
    • The kernel version cannot be obtained correctly with the following OS images.
      • 2023-10-10-raspios-bookworm-armhf.img.xz + arm_64bit=0
      • 2023-12-05-raspios-bookworm-armhf.img.xz + arm_64bit=0
  • By default, upgrade the Kernel.
  • Not rebooted after upgrading Kernel.
    • Unable to get kernel version with uname -r.
  • --keep-kernel can prevent kernel upgrades, but it seems that it is not compatible with Ubuntu.

@matsujirushi
Copy link
Contributor Author

Change Strategy:

  • 1st phase
    • First, we will modify the operation for Raspberry Pi OS. Unchanged for Ubuntu.
    • For Raspberry Pi OS, --keep-kernel option recommended. (DON'T upgrade the kernel.)
    • Raspberry Pi OS 64-bit kernel + 32-bit userland is NOT supported. (Change to 32-bit kernel + 32-bit userland with arm_64bit=0)
  • 2nd phase
    • Support --keep-kernel option for Ubuntu.
  • 3rd phase
    • Enable --keep-kernel option by default

What do you think? @bigbearishappy

@matsujirushi
Copy link
Contributor Author

matsujirushi commented Jan 17, 2024

1st phase

Commands

for Raspberry Pi OS

When using a 32-bit OS, add arm_64bit=0 to /boot/config.txt (or /boot/firmware/config.txt) and reboot.

git clone -b issue86/step1 --depth 1 https://github.com/matsujirushi/seeed-linux-dtoverlays
cd seeed-linux-dtoverlays
sudo ./scripts/reTerminal.sh --keep-kernel

Tests

  • Raspberry Pi OS 32-bit
    • 2021-05-07-raspios-buster-armhf.zip : PASSED
    • 2023-02-21-raspios-bullseye-armhf.img.xz : PASSED
    • 2023-05-03-raspios-bullseye-armhf.img.xz
      • arm_64bit=1 - default : FAILED Couldn't find *** corresponding *** kernel headers with apt-get.
      • arm_64bit=0 : PASSED
    • 2023-10-10-raspios-bookworm-armhf.img.xz
      • arm_64bit=1 - default : FAILED Couldn't find *** corresponding *** kernel headers with apt-get.
      • arm_64bit=0 : PASSED
    • 2023-12-05-raspios-bookworm-armhf.img.xz
      • arm_64bit=1 - default : FAILED Couldn't find *** corresponding *** kernel headers with apt-get.
      • arm_64bit=0 : PASSED
  • Raspberry Pi OS 64-bit
    • 2021-05-07-raspios-buster-arm64.zip : PASSED
    • 2023-05-03-raspios-bullseye-arm64.img.xz : PASSED
    • 2023-10-10-raspios-bookworm-arm64.img.xz : PASSED
    • 2023-12-05-raspios-bookworm-arm64.img.xz : PASSED

@bigbearishappy
Copy link
Member

Change Strategy:

  • 1st phase

    • First, we will modify the operation for Raspberry Pi OS. Unchanged for Ubuntu.
    • For Raspberry Pi OS, --keep-kernel option recommended. (DON'T upgrade the kernel.)
    • Raspberry Pi OS 64-bit kernel + 32-bit userland is NOT supported. (Change to 32-bit kernel + 32-bit userland with arm_64bit=0)
  • 2nd phase

    • Support --keep-kernel option for Ubuntu.
  • 3rd phase

    • Enable --keep-kernel option by default

What do you think? @bigbearishappy

I don't think it's a good idea to enable the --keep-kernel by default. As the raspbian OS change a lot since bookworm. The install code should seprate with two parts:
1 For old raspbian OS version(like bulleyes, busster...)
2 For new raspbian OS version(like bookworm)
At the start of the install script, we need to determine the system environment, and then deal with them with different code.

@matsujirushi
Copy link
Contributor Author

Hi @bigbearishappy ,
Thank you for response.

enable the --keep-kernel by default

I don't think it's a good idea to enable the --keep-kernel by default.

Sorry. I don't understand why.

reTerminal.sh without --keep-kernel compiles and installs the device driver after upgrading the kernel.
I think it is better to enable --keep-kernel by default for the following reasons.

  • Kernel is upgraded unintentionally by the user.
  • The method to obtain the kernel version is unstable. (The script is not rebooting after kernel upgrade.)

Difference between old and new Raspberry Pi OS

we need to determine the system environment, and then deal with them with different code.

I see.
I'm not familiar with the Raspberry Pi OS.
Could you please tell me the differences between the old and new OS that I need to deal with in the script?

@bigbearishappy
Copy link
Member

Hi @bigbearishappy , Thank you for response.

enable the --keep-kernel by default

I don't think it's a good idea to enable the --keep-kernel by default.

Sorry. I don't understand why.

reTerminal.sh without --keep-kernel compiles and installs the device driver after upgrading the kernel. I think it is better to enable --keep-kernel by default for the following reasons.

  • Kernel is upgraded unintentionally by the user.
  • The method to obtain the kernel version is unstable. (The script is not rebooting after kernel upgrade.)

Difference between old and new Raspberry Pi OS

we need to determine the system environment, and then deal with them with different code.

I see. I'm not familiar with the Raspberry Pi OS. Could you please tell me the differences between the old and new OS that I need to deal with in the script?

According to this link. You can upgrade bullseye to bookworm. It seems like the apt source link is changed between them.

@matsujirushi
Copy link
Contributor Author

@bigbearishappy
Copy link
Member

FYI I create new script. reTerminal2.sh https://github.com/matsujirushi/seeed-linux-dtoverlays/blob/main/scripts/reTerminal2.sh https://github.com/matsujirushi/seeed-linux-dtoverlays/blob/main/doc/reTerminal_RasPiOS.md

The script reTerminal2.sh looks good. Can you try to merge it into the reTerminal.sh.It would be better for user to use it.

@bigbearishappy
Copy link
Member

I just upgraded the reTerminal.sh by refering your reTerminal2.sh.
And it works fine with the following image:

ubuntu-22.04.3-preinstalled-server-arm64+raspi.img
2023-12-05-raspios-bookworm-armhf.img
2023-12-05-raspios-bookworm-arm64.img
2023-05-03-raspios-bullseye-arm64.img
2023-05-03-raspios-bullseye-armhf.img (bootup with arm_64bit=0)

Maybe you can continue you work base on the latest code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants