[OS] Debian Bullseye (11) C4

Post Reply
User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

[OS] Debian Bullseye (11) C4

Post by meveric »

This is my version of Debian Bullseye (11) for the ODROID C4

It uses Kernel 6.1.0 at the moment, but will get updates as usual from my repository.

It's a headless server image only with user root. But it has all my repositories included, which allows for easy installation and updates of packages such as Kernel and Headers and other packages.

The image has my usual setup: means on first boot it's resizing the rootfs partition and configures SSH. It will automatically reboot after the initial setup after which this image is ready to use.
Kernel and headers are already installed if you need to build your own drivers.
A few basic tools such as htop, mc, vim and bash-completion are already installed for your convenience.


Download: https://oph.mdrjr.net/meveric/images/Bu ... -C4.img.xz md5 sha512 sig

Size compressed: 165MiB
Size uncompressed: 1.3GiB

Default Login: root
Default Password: odroid

It's ready to be used as a server image.

Features:
  • Debian Bullseye (11) debootstrap image (minimal OS)
  • upstream u-boot 2022-10
  • upstream Kernel (6.1.0)
  • ext4 partitions for both bootfs and rootfs
  • unified flash-kernel config (should be fitting for all ODROID arm64 boards)
  • uses opensource drivers for GPU/VPU (Panfrost / meson-vdec)
  • device-tree-overlay support via config.ini
  • OpenGL 2.1/3.1 and OpenGL ES 2.0/3.1 support for Mali-G31 GPU (depending on MESA version)
    Image
First things first:
Since there's constantly new development for this image and ODROIDs in general the First thing you should do after the image is up and running is to install all updates:

Code: Select all

apt update && apt upgrade && apt dist-upgrade
How to convert the image into a Desktop image:
The image can easily converted into a Desktop image looking similar to this:
Image

I created a setup tool that's already preinstalled:

Code: Select all

setup-odroid
Which should easily allow you to install a Desktop Environment.

Hints:
Changing language:
If you install a Desktop environment you should already have keybord-configuration installed, it will ask upon the first installation what keyboard layout it should use.
This configuration is for your X11 Desktop so you have your desired keyboard layout.
For console you need to install console-setup to do the same, so just in case:

Code: Select all

apt install console-setup keyboard-configuration
dpkg-reconfigure keyboard-configuration
should be all that is needed to change your keyboard layout.
You probably want to set timezone as well

Code: Select all

dpkg-reconfigure tzdata
Device-Tree-Overlays:
Device-Tree-Overlays are supported by the image and handled in the config.ini on /boot/
Here you can activate overlays to support additional hardware such as 3.5" display, or RTC.
You can add multiple overlays at once, just check the description in the config.ini file.

Setting up WLAN from command line:
Edit the file /etc/network/interfaces or create a new one under /etc/network/interfaces.d/ and add the following lines

Code: Select all

auto wlan0
iface wlan0 inet dhcp
    wpa-essid <NAME-OF-YOUR-WLAN>
    wpa-psk <WLAN-PASSWORD>
If you're using a "hidden" network, please also add wpa-scan-ssid 1

Webbrowser:
Hardware accelerated web-browsing is possible both via Chromium WebBrowser as well as FireFox (version 91 or higher), but only with backport MESA drivers (MESA 21 or higher).
WebGL is also supported the same way but might have some problems.

Sadly due to the fact that GPU drivers are still somewhat in an experimental state, chromium may show some graphical glitches when using webgl.

Video Playback
While Kodi can be installed and runs both from X11 desktop as well as directly from terminal (GBM). It does not support hardware accelerated video playback.
Still since the CPU is very strong you can run Kodi to watch most videos in up to 720p without much issues in Kodi software decoded.
If you install a desktop via setup-odroid I opted for installing mpv as a video player which will support hardware accelerated video decoding of H264/MP4 files.
Image

compared to software decoding:
Image

Known Issues:
H265 decoding currently only works up to 1080p hardware accelerated
Wayland doesn't seem to work correctly.

As usual feedback is welcome.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
odroid
Site Admin
Posts: 41864
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3433 times
Been thanked: 1920 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by odroid »

Thank you for the new OS image.
meveric wrote:
Thu Dec 22, 2022 1:24 am
H265 decoding currently not working hardware accelerated
Can you please check which media codec works in hardware acceleration on the mainline kernel?
H.264? or MPEG4?

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

MPEG-1, MPEG-2, H.264, are working
H.265 / HEVC (up to 1080p), Google VP9 should work but is a bit experimental.
MPEG-4,SMPTE VC-1,On2 VP8,H.263 are not working
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
odroid
Site Admin
Posts: 41864
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3433 times
Been thanked: 1920 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by odroid »

meveric wrote:
Thu Dec 22, 2022 5:40 pm
mpeg1, mpeg2, h264 are working
h265 should work but runs into a memory allocation error for the device
mpeg4 is not working
Thank you for the answer. Glad to hear that those three HW decoders work fine at least.
Which media player did you use for H.264 hw accelerated video play testing? ffplay in FFmpeg package?

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

i prefer using mpv as it automatically tests for available hardware decoders before falling back to software decoding.
Also it's a desktop client.. double click video and it plays.
But yes I tested using ffplay to determine if it's working as well.. at least it will show you if the device is available and can be used:

Code: Select all

$ ffplay -vcodec h263_v4l2m2m jellyfish-25-mbps-hd.h263
Input #0, h263, from 'jellyfish-25-mbps-hd.h263': sq=    0B f=0/0   
  Duration: N/A, bitrate: N/A
    Stream #0:0: Video: h263, yuv420p, 1408x1152 [SAR 12:11 DAR 4:3], 29.97 fps, 29.97 tbr, 1200k tbn, 29.97 tbc
[h263_v4l2m2m @ 0xffff842c1010] Could not find a valid device
[h263_v4l2m2m @ 0xffff842c1010] can't configure decoder


$ ffplay -vcodec h264_v4l2m2m jellyfish-25-mbps-hd-h264.mkv
Input #0, matroska,webm, from 'jellyfish-25-mbps-hd-h264.mkv':0/0   
  Metadata:
    encoder         : libebml v1.2.0 + libmatroska v1.1.0
    creation_time   : 2016-02-06T04:00:52.000000Z
  Duration: 00:00:30.03, start: 0.000000, bitrate: 24896 kb/s
    Stream #0:0(eng): Video: h264 (High), yuv420p(tv, bt709, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 29.97 fps, 29.97 tbr, 1k tbn, 59.94 tbc (default)
[h264_v4l2m2m @ 0xffff4c004650] Using device /dev/video0
[h264_v4l2m2m @ 0xffff4c004650] driver 'meson-vdec' on card 'Amlogic Video Decoder' in mplane mode
[h264_v4l2m2m @ 0xffff4c004650] requesting formats: output=H264 capture=NM12

$ ffplay -vcodec mpeg4_v4l2m2m jellyfish-25-mbps-hd.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'jellyfish-25-mbps-hd.mp4': 
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf58.45.100
  Duration: 00:00:30.03, start: 0.000000, bitrate: 3163 kb/s
    Stream #0:0(eng): Video: mpeg4 (Simple Profile) (mp4v / 0x7634706D), yuv420p, 1920x1080 [SAR 1:1 DAR 16:9], 3162 kb/s, 29.97 fps, 29.97 tbr, 19001 tbn, 19001 tbc (default)
    Metadata:
      handler_name    : VideoHandler
[mpeg4_v4l2m2m @ 0xffff78014490] Could not find a valid device
[mpeg4_v4l2m2m @ 0xffff78014490] can't configure decoder

$ ffplay -vcodec vp9_v4l2m2m jellyfish-hd.webm
Input #0, matroska,webm, from 'jellyfish-hd.webm':sq=    0B f=0/0   
  Metadata:
    ENCODER         : Lavf58.76.100
  Duration: 00:00:30.03, start: 0.000000, bitrate: 8186 kb/s
    Stream #0:0(eng): Video: vp9 (Profile 0), yuv420p(tv, bt709, progressive), 1920x1080, SAR 1:1 DAR 16:9, 29.97 fps, 29.97 tbr, 1k tbn, 1k tbc (default)
    Metadata:
      ENCODER         : Lavc58.134.100 libvpx-vp9
      DURATION        : 00:00:30.030000000
[vp9_v4l2m2m @ 0xffff5c0039b0] Using device /dev/video0
[vp9_v4l2m2m @ 0xffff5c0039b0] driver 'meson-vdec' on card 'Amlogic Video Decoder' in mplane mode
[vp9_v4l2m2m @ 0xffff5c0039b0] requesting formats: output=VP90 capture=NM12

$ ffplay -vcodec hevc_v4l2m2m jellyfish-hd-h265.mp4
Input #0, mov,mp4,m4a,3gp,3g2,mj2, from 'jellyfish-hd-h265.mp4':0   
  Metadata:
    major_brand     : isom
    minor_version   : 512
    compatible_brands: isomiso2mp41
    encoder         : Lavf58.45.100
  Duration: 00:00:30.03, start: 0.000000, bitrate: 3763 kb/s
    Stream #0:0(eng): Video: hevc (Main) (hev1 / 0x31766568), yuv420p(tv, progressive), 1920x1080 [SAR 1:1 DAR 16:9], 3759 kb/s, 29.97 fps, 29.97 tbr, 19001 tbn, 29.97 tbc (default)
    Metadata:
      handler_name    : VideoHandler
[hevc_v4l2m2m @ 0xffff50004570] Using device /dev/video0
[hevc_v4l2m2m @ 0xffff50004570] driver 'meson-vdec' on card 'Amlogic Video Decoder' in mplane mode
[hevc_v4l2m2m @ 0xffff50004570] requesting formats: output=HEVC capture=NM12


$ ffplay -vcodec hevc_v4l2m2m sample-Elysium.2013.2160p.mkv
Input #0, matroska,webm, from 'sample-Elysium.2013.2160p.mkv':0/0   
  Metadata:
    title           : Elysium (2013)
    encoder         : libebml v1.3.3 + libmatroska v1.4.4
    creation_time   : 2016-01-05T22:30:41.000000Z
  Duration: 00:01:02.73, start: 0.166000, bitrate: 53638 kb/s
    Chapter #0:0: start 0.000000, end 62.896000
    Metadata:
      title           : 00:00:00.000
    Stream #0:0(eng): Video: hevc (Main 10), yuv420p10le(tv), 3840x1606, SAR 1:1 DAR 1920:803, 23.98 fps, 23.98 tbr, 1k tbn, 23.98 tbc (default)
    Metadata:
      title           : Elysium (2013) - Release for ULTRAHDCLUB
      BPS             : 51036975
      BPS-eng         : 51036975
      DURATION        : 00:01:02.604000000
      DURATION-eng    : 00:01:02.604000000
      NUMBER_OF_FRAMES: 1501
      NUMBER_OF_FRAMES-eng: 1501
      NUMBER_OF_BYTES : 399389852
      NUMBER_OF_BYTES-eng: 399389852
      _STATISTICS_WRITING_APP: mkvmerge v8.7.0 ('All of the above') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.7.0 ('All of the above') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-01-05 22:30:41
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-01-05 22:30:41
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
    Stream #0:1(eng): Audio: dts (DTS-HD MA), 48000 Hz, 7.1, s16p (default)
    Metadata:
      title           : DTS-HD MA 7.1 - Blu-ray CEE
      BPS             : 2706639
      BPS-eng         : 2706639
      DURATION        : 00:01:02.561000000
      DURATION-eng    : 00:01:02.561000000
      NUMBER_OF_FRAMES: 5865
      NUMBER_OF_FRAMES-eng: 5865
      NUMBER_OF_BYTES : 21166260
      NUMBER_OF_BYTES-eng: 21166260
      _STATISTICS_WRITING_APP: mkvmerge v8.7.0 ('All of the above') 64bit
      _STATISTICS_WRITING_APP-eng: mkvmerge v8.7.0 ('All of the above') 64bit
      _STATISTICS_WRITING_DATE_UTC: 2016-01-05 22:30:41
      _STATISTICS_WRITING_DATE_UTC-eng: 2016-01-05 22:30:41
      _STATISTICS_TAGS: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
      _STATISTICS_TAGS-eng: BPS DURATION NUMBER_OF_FRAMES NUMBER_OF_BYTES
[hevc_v4l2m2m @ 0xffff64020310] Using device /dev/video0
[hevc_v4l2m2m @ 0xffff64020310] driver 'meson-vdec' on card 'Amlogic Video Decoder' in mplane mode
[hevc_v4l2m2m @ 0xffff64020310] requesting formats: output=HEVC capture=NM12
[hevc_v4l2m2m @ 0xffff64020310] capture VIDIOC_REQBUFS failed: Cannot allocate memory
[hevc_v4l2m2m @ 0xffff64020310] can't request capture buffers
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
odroid
Site Admin
Posts: 41864
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 3433 times
Been thanked: 1920 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by odroid »

Great! Thank you for the confirmation. :)

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

well turns out H265 does work, but only up to 1080p :)
These users thanked the author meveric for the post:
odroid (Thu Dec 22, 2022 7:43 pm)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
rooted
Posts: 10485
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 816 times
Been thanked: 695 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by rooted »

meveric wrote:well turns out H265 does work, but only up to 1080p :)
Hardware decode but only up to 1080p?

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

rooted wrote:
Thu Dec 22, 2022 8:26 pm
meveric wrote:well turns out H265 does work, but only up to 1080p :)
Hardware decode but only up to 1080p?
yes looks like.. I always only tested the one H265 test video that I had, but that was a 4K one and it always failed with a mem allocation error. So I assumed H265 did generally not work.
But now I tried a 1080p one and that one works fine :)

Image
.
vs
.
Image


and for those who think, that's not a real world example:
Image

Playing Prince of Persia full movie from samba share directly, the first ever movie I had as H265 :D


BTW this all should apply to the N2 and it's variants as well.
These users thanked the author meveric for the post:
odroid (Thu Dec 22, 2022 11:11 pm)
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

User avatar
rooted
Posts: 10485
Joined: Fri Dec 19, 2014 9:12 am
languages_spoken: english
Location: Gulf of Mexico, US
Has thanked: 816 times
Been thanked: 695 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by rooted »

This is quite awesome! Merry Christmas to me.

Shorewatcher
Posts: 17
Joined: Sat Apr 22, 2023 2:48 am
languages_spoken: English, Dutch
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by Shorewatcher »

The image doesnt work for me. I have flashed it to an 8GB SD card with balenaEtcher. Put it in the C4 and booted it. I get the terminal screen with some info. But eventually hangs on the -Starting kernel- message. I have given it at least 10 minutes, but nothing happened.

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

Do you have an eMMC connected at the same time?
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Shorewatcher
Posts: 17
Joined: Sat Apr 22, 2023 2:48 am
languages_spoken: English, Dutch
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by Shorewatcher »

No, I do not have an eMMC connected. It's just the SD card. And ethernet/USB device, such as a keyboard and HDD.

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

I don't think you have an UART cable which you can use for debugging?

I'll try the image again as a fresh install to see if I can spot any issues with it.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Shorewatcher
Posts: 17
Joined: Sat Apr 22, 2023 2:48 am
languages_spoken: English, Dutch
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by Shorewatcher »

I'm afraid I don't have such a cable, no.
All I can do is redownload the image, maybe it'll work. I can try and unplug the USB devices, but I'm afraid I don't have the cable, no.
I'd love to hear what your results are, of course. It'd be curious if it did work for you and not for me.

UPDATE: I have included a photo of all the log output it shows before it freezes. I've left it on overnight, so I doubt it has anything to do with waiting.
Attachments
photo_2023-04-22_10-10-24.jpg
photo_2023-04-22_10-10-24.jpg (294.66 KiB) Viewed 4504 times

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

well, I just flashed the image on an SD card booted up and it's working fine as expected..

First boot performs some maintenance task, then it reboots and after only a few seconds I'm at the command prompt.

Since you said it's working on the first boot and shows some messages, I wonder if the resizing of thee OS causes some issues.
Which can happen if the SD card is having issues.

Do you have a different SD card you can try?
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Shorewatcher
Posts: 17
Joined: Sat Apr 22, 2023 2:48 am
languages_spoken: English, Dutch
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by Shorewatcher »

I just tried another SD card. I flashed the same image I flashed to the other SD.
I put the img.xz into balenaEtcher, selected the SD, let it uncompress, flash and validate and put it into the C4. It leads to exactly the same error as before. I also tried manually formatting the SD card. That didn't change anything.
I also tried to redownload the image from right in the download link up above. Same result.

Just in case, I tried with a 4Gb and an 8GB SD card. Does that matter at all?

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

should be fine everything from 2GB is big enough.
Although I barely have anything smaller than 16GB nowadays.

Do you have a Linux PC to access the SD card?
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Shorewatcher
Posts: 17
Joined: Sat Apr 22, 2023 2:48 am
languages_spoken: English, Dutch
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by Shorewatcher »

I have access to both WSL on Windows and I can set up a quick VM, yes.

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

So you should be able to access the SD card, that's good.
I think we can try to see if there's any log that shows a problem or if that results in nothing and the first boot seems to work.
You can try to go into /etc/rc.local and out-commend the first boot script.
That way after the first boot you end up on the command line.
If that works you can probably manually increase the partition side from the VM (one of the main part what the first boot script does).
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Shorewatcher
Posts: 17
Joined: Sat Apr 22, 2023 2:48 am
languages_spoken: English, Dutch
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by Shorewatcher »

Where can I find the logs corresponding to the first boot? I have both the boot and rootfs partitions available on my VM right now. In rc.local, which line do I comment out? All 3, or simply the 16th line: "/root/scripts/first-boot"?

UPDATE:
Peeking through the /root/resize--log.txt shows me the partition tables were indeed altered, to some degree. All the logs under /var/log appear to be empty, though.
Here is the content of the resize--log.txt file:

Code: Select all

Welcome to fdisk (util-linux 2.36.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): Disk /dev/mmcblk1: 14.68 GiB, 15758000128 bytes, 30777344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x630b0000

Device         Boot   Start     End Sectors  Size Id Type
/dev/mmcblk1p1        30720 1079295 1048576  512M 83 Linux
/dev/mmcblk1p2      1079296 2652159 1572864  768M 83 Linux

Command (m for help): Partition number (1,2, default 2): 
Partition 2 has been deleted.

Command (m for help): Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (2048-30777343, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (1079296-30777343, default 30777343): 
Created a new partition 2 of type 'Linux' and of size 14.2 GiB.
Partition #2 contains a ext4 signature.

Command (m for help): 
Disk /dev/mmcblk1: 14.68 GiB, 15758000128 bytes, 30777344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x630b0000

Device         Boot   Start      End  Sectors  Size Id Type
/dev/mmcblk1p1        30720  1079295  1048576  512M 83 Linux
/dev/mmcblk1p2      1079296 30777324 29698029 14.2G 83 Linux

Command (m for help): The partition table has been altered.
Syncing disks.


Welcome to fdisk (util-linux 2.36.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): Disk /dev/mmcblk1: 29.72 GiB, 31914983424 bytes, 62333952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x630b0000

Device         Boot   Start     End Sectors  Size Id Type
/dev/mmcblk1p1        49152 1097727 1048576  512M 83 Linux
/dev/mmcblk1p2      1097728 3194879 2097152    1G 83 Linux

Command (m for help): Partition number (1,2, default 2): 
Partition 2 has been deleted.

Command (m for help): Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (2048-62333951, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (1097728-62333951, default 62333951): 
Created a new partition 2 of type 'Linux' and of size 29.2 GiB.
Partition #2 contains a ext4 signature.

Command (m for help): 
Disk /dev/mmcblk1: 29.72 GiB, 31914983424 bytes, 62333952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x630b0000

Device         Boot   Start      End  Sectors  Size Id Type
/dev/mmcblk1p1        49152  1097727  1048576  512M 83 Linux
/dev/mmcblk1p2      1097728 62333932 61236205 29.2G 83 Linux

Command (m for help): The partition table has been altered.
Syncing disks.


Welcome to fdisk (util-linux 2.36.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): Disk /dev/mmcblk0: 29.72 GiB, 31914983424 bytes, 62333952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x630b0000

Device         Boot   Start     End Sectors  Size Id Type
/dev/mmcblk0p1        49152 1097727 1048576  512M 83 Linux
/dev/mmcblk0p2      1097728 2703359 1605632  784M 83 Linux

Command (m for help): Partition number (1,2, default 2): 
Partition 2 has been deleted.

Command (m for help): Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (2048-62333951, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (1097728-62333951, default 62333951): 
Created a new partition 2 of type 'Linux' and of size 29.2 GiB.
Partition #2 contains a ext4 signature.

Command (m for help): 
Disk /dev/mmcblk0: 29.72 GiB, 31914983424 bytes, 62333952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x630b0000

Device         Boot   Start      End  Sectors  Size Id Type
/dev/mmcblk0p1        49152  1097727  1048576  512M 83 Linux
/dev/mmcblk0p2      1097728 62333932 61236205 29.2G 83 Linux

Command (m for help): The partition table has been altered.
Syncing disks.
Additionally, commenting out line 16 of rc.local and saving the file and booting the SD card on the C4 again, leads to the exact same issue, regardless. It shows me the same issue as before. Getting stuck on "Starting kernel ..."

Perhaps unrelated, I was checking the first-boot script and noticed that after the do-resize function, there's some random characters before the EOF. This wouldn't happen to be messing something up, right..?
First boot script:

Code: Select all

#!/bin/bash
BOOT=/etc/rc.local
BOOTDEVICE=`ls -l /dev/disk/by-uuid/ | grep "e139ce78-9841-40fe-8823-96a304a09859" | awk '{print $11}' | sed "s/\.\.\/\.\.\///" | sed "s/p2//"`
if [ -f /proc/device-tree/model ]; then
	BOARD=$(tr -d '\0' < /proc/device-tree/model | sed "s/Hardkernel //")
fi

function do_resize
{
	# this takes in consideration /dev/mmcblk1p2 as the rootfs!
	rsflog=/root/resize-$DATE-log.txt
	echo "Saving the log to $rsflog"
	sleep 4

	p2_start=`fdisk -l /dev/$BOOTDEVICE | grep ${BOOTDEVICE}p2 | awk '{print $2}'`
	p2_end=$(((`fdisk -l /dev/$BOOTDEVICE | head -n1 | grep -i bytes | awk '{print $5}'`/512)-20))
	echo $p2_end

	fdisk /dev/$BOOTDEVICE <<EOF &>> $rsflog
p
d
2
n
p
2
$p2_start
$p2_end
p
w
EOF
	sync && sync
	sed -i "s/\/root\/scripts\/first-boot/\/root\/scripts\/resize/" "$BOOT"
	echo > /etc/udev/rules.d/70-persistent-net.rules
}

function fix_ssh
{
	rm -rf /etc/ssh/ssh_host_*_key
	dpkg-reconfigure openssh-server
}

function fix_sound
{
	case $BOARD in
		ODROID-C2)
			;;
		ODROID-C4|ODROID-HC4)
			;;
		ODROID-N2|ODROID-N2Plus)
			;;
		*)
			[ -f /etc/asound.conf ] && rm /etc/asound.conf
			;;
	esac
}

function remove_start
{
        sed -i "s/\/root\/scripts\/first-boot//" "$BOOT"
}

do_resize
remove_start
fix_ssh
fix_sound
sync
reboot

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

Shorewatcher wrote:
Sat Apr 22, 2023 6:39 pm
UPDATE:
Peeking through the /root/resize--log.txt shows me the partition tables were indeed altered, to some degree. All the logs under /var/log appear to be empty, though.
Here is the content of the resize--log.txt file:

Code: Select all

Welcome to fdisk (util-linux 2.36.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): Disk /dev/mmcblk1: 14.68 GiB, 15758000128 bytes, 30777344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x630b0000

Device         Boot   Start     End Sectors  Size Id Type
/dev/mmcblk1p1        30720 1079295 1048576  512M 83 Linux
/dev/mmcblk1p2      1079296 2652159 1572864  768M 83 Linux

Command (m for help): Partition number (1,2, default 2): 
Partition 2 has been deleted.

Command (m for help): Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (2048-30777343, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (1079296-30777343, default 30777343): 
Created a new partition 2 of type 'Linux' and of size 14.2 GiB.
Partition #2 contains a ext4 signature.

Command (m for help): 
Disk /dev/mmcblk1: 14.68 GiB, 15758000128 bytes, 30777344 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x630b0000

Device         Boot   Start      End  Sectors  Size Id Type
/dev/mmcblk1p1        30720  1079295  1048576  512M 83 Linux
/dev/mmcblk1p2      1079296 30777324 29698029 14.2G 83 Linux

Command (m for help): The partition table has been altered.
Syncing disks.


Welcome to fdisk (util-linux 2.36.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): Disk /dev/mmcblk1: 29.72 GiB, 31914983424 bytes, 62333952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x630b0000

Device         Boot   Start     End Sectors  Size Id Type
/dev/mmcblk1p1        49152 1097727 1048576  512M 83 Linux
/dev/mmcblk1p2      1097728 3194879 2097152    1G 83 Linux

Command (m for help): Partition number (1,2, default 2): 
Partition 2 has been deleted.

Command (m for help): Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (2048-62333951, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (1097728-62333951, default 62333951): 
Created a new partition 2 of type 'Linux' and of size 29.2 GiB.
Partition #2 contains a ext4 signature.

Command (m for help): 
Disk /dev/mmcblk1: 29.72 GiB, 31914983424 bytes, 62333952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x630b0000

Device         Boot   Start      End  Sectors  Size Id Type
/dev/mmcblk1p1        49152  1097727  1048576  512M 83 Linux
/dev/mmcblk1p2      1097728 62333932 61236205 29.2G 83 Linux

Command (m for help): The partition table has been altered.
Syncing disks.


Welcome to fdisk (util-linux 2.36.1).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): Disk /dev/mmcblk0: 29.72 GiB, 31914983424 bytes, 62333952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x630b0000

Device         Boot   Start     End Sectors  Size Id Type
/dev/mmcblk0p1        49152 1097727 1048576  512M 83 Linux
/dev/mmcblk0p2      1097728 2703359 1605632  784M 83 Linux

Command (m for help): Partition number (1,2, default 2): 
Partition 2 has been deleted.

Command (m for help): Partition type
   p   primary (1 primary, 0 extended, 3 free)
   e   extended (container for logical partitions)
Select (default p): Partition number (2-4, default 2): First sector (2048-62333951, default 2048): Last sector, +/-sectors or +/-size{K,M,G,T,P} (1097728-62333951, default 62333951): 
Created a new partition 2 of type 'Linux' and of size 29.2 GiB.
Partition #2 contains a ext4 signature.

Command (m for help): 
Disk /dev/mmcblk0: 29.72 GiB, 31914983424 bytes, 62333952 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x630b0000

Device         Boot   Start      End  Sectors  Size Id Type
/dev/mmcblk0p1        49152  1097727  1048576  512M 83 Linux
/dev/mmcblk0p2      1097728 62333932 61236205 29.2G 83 Linux

Command (m for help): The partition table has been altered.
Syncing disks.
The log looks a bit odd, according to this you would use a 32GB SD card, when you said you had a 4 or 8GB SD card, so it could be that the card is found incorrectly and when resizing the filesystem is damanged.
Shorewatcher wrote:
Sat Apr 22, 2023 6:39 pm
Additionally, commenting out line 16 of rc.local and saving the file and booting the SD card on the C4 again, leads to the exact same issue, regardless. It shows me the same issue as before. Getting stuck on "Starting kernel ..."
You would have to do this BEFORE the first boot, as the first boot already triggers the issue, so removing it afterwards does not have the desired effect.
Shorewatcher wrote:
Sat Apr 22, 2023 6:39 pm
Perhaps unrelated, I was checking the first-boot script and noticed that after the do-resize function, there's some random characters before the EOF. This wouldn't happen to be messing something up, right..?
First boot script:

Code: Select all

#!/bin/bash
BOOT=/etc/rc.local
BOOTDEVICE=`ls -l /dev/disk/by-uuid/ | grep "e139ce78-9841-40fe-8823-96a304a09859" | awk '{print $11}' | sed "s/\.\.\/\.\.\///" | sed "s/p2//"`
if [ -f /proc/device-tree/model ]; then
	BOARD=$(tr -d '\0' < /proc/device-tree/model | sed "s/Hardkernel //")
fi

function do_resize
{
	# this takes in consideration /dev/mmcblk1p2 as the rootfs!
	rsflog=/root/resize-$DATE-log.txt
	echo "Saving the log to $rsflog"
	sleep 4

	p2_start=`fdisk -l /dev/$BOOTDEVICE | grep ${BOOTDEVICE}p2 | awk '{print $2}'`
	p2_end=$(((`fdisk -l /dev/$BOOTDEVICE | head -n1 | grep -i bytes | awk '{print $5}'`/512)-20))
	echo $p2_end

	fdisk /dev/$BOOTDEVICE <<EOF &>> $rsflog
p
d
2
n
p
2
$p2_start
$p2_end
p
w
EOF
	sync && sync
	sed -i "s/\/root\/scripts\/first-boot/\/root\/scripts\/resize/" "$BOOT"
	echo > /etc/udev/rules.d/70-persistent-net.rules
}

function fix_ssh
{
	rm -rf /etc/ssh/ssh_host_*_key
	dpkg-reconfigure openssh-server
}

function fix_sound
{
	case $BOARD in
		ODROID-C2)
			;;
		ODROID-C4|ODROID-HC4)
			;;
		ODROID-N2|ODROID-N2Plus)
			;;
		*)
			[ -f /etc/asound.conf ] && rm /etc/asound.conf
			;;
	esac
}

function remove_start
{
        sed -i "s/\/root\/scripts\/first-boot//" "$BOOT"
}

do_resize
remove_start
fix_ssh
fix_sound
sync
reboot
If by "random characters you mean the

Code: Select all

p
w
EOF
then no, that is exactly what we want. That are commands it does and sends them to fdisk.
It's the last two steps before closing the input.. "p" prints the partition layout and "w" writes the changes to the partition table.
So if you remove them it wouldn't do anything at all anymore :)

As I said, probably worth trying to remove the script part in rc.local "before the first boot" so the boot script is not performed automatically on the first boot.
Still looks like it could be an issue with the SD cards.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Shorewatcher
Posts: 17
Joined: Sat Apr 22, 2023 2:48 am
languages_spoken: English, Dutch
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by Shorewatcher »

Alright, I made a brand new flash of the image to my SD card. I opened rc.local in my ubuntu VM and commented away the line /root/scripts/first-boot.
And when I put the SD with the file edited in the C4, it leads to the same error... Image in attachments shows the log, which is near identical to the issue that has kept popping up.

The rc.local script looks as follows:

Code: Select all

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

setterm --blank 0 --powerdown 0 --powersave off

#/root/scripts/first-boot

exit 0
On another note, the resize--log.txt seems to be unrelated. I extracted the image on my windows pc several times, and the blank image already contained such a log. It seems that the log after booting my odroid C4 is identical.

I would find it odd if the SD cards were faulty. Other images, as well as ones developed by you like the debian buster release, work and boot just fine.
Attachments
photo_2023-04-22_13-40-09.jpg
photo_2023-04-22_13-40-09.jpg (272.31 KiB) Viewed 4459 times

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

can you try this image instead to see if it acts any different: https://oph.mdrjr.net/meveric/images/Bu ... -C4.img.xz
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Shorewatcher
Posts: 17
Joined: Sat Apr 22, 2023 2:48 am
languages_spoken: English, Dutch
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by Shorewatcher »

Sorry for the delay! I just now got the chance to try out this image. I tried flashing it normally and booting it. And I tried commenting away the script line in rc.local again. But both attempts resulted in the same "Starting Kernel..." error again. I can try doing a proper full wipe of the SDs tomorrow and flashing them when they are blank, but I feel like it wouldn't change much. I'm very confused as to why this happens.. When for others it works out of the box.

Just to rule some things out...
How long does the starting kernel part take on a usual boot? I'm guessing it's near instant.
What software do you to flash the SD card? Do you wipe it manually beforehand? Just so I'm not missing a step..

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

it only takes a few seconds to start after you boot the image.
I normally flash directly under Linux with dd and don't wipe or anything beforehand:

Code: Select all

xzcat Debian-Bullseye64-1.5-20221221-C4.img.xz | dd of=/dev/mmcblk0 bs=1M conv=notrunc,fsync status=progress
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Shorewatcher
Posts: 17
Joined: Sat Apr 22, 2023 2:48 am
languages_spoken: English, Dutch
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by Shorewatcher »

I might just try and flash it under Linux tomorrow. I doubt it'll change much, but there's not much to lose!

Shorewatcher
Posts: 17
Joined: Sat Apr 22, 2023 2:48 am
languages_spoken: English, Dutch
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by Shorewatcher »

Apologies for the double-post. Just wanting to send an update on things.

I have tried multiple SD's with exactly the same result. Neither booting them normally, nor commenting to line in rc.local does anything. Every time it still freezes on the "Starting Kernel ..." message.
Your debian buster image boots fine, which, I checked, doesn't seem to have a very different boot sequence?

I also checked to see if connecting via SSH was possible, but it was not, which leads me to suspect it never reaches that point in the first-boot script. Which means any part before that, so in this part, the do-resize function, seems to cause issues somewhere?

Another thing I made sure was that the MD5 hash was correct, it is correct. They match with the downloaded file.

Interestingly enough, armbian bullseye has a similar issue on boot... It mentions an error along the lines of:

Code: Select all

Gave up waiting for root file system device.  Common problems:
 - Boot args (cat /proc/cmdline)
   - Check rootdelay= (did the system wait long enough?)
 - Missing modules (cat /proc/modules; ls /dev)
Perhaps these are related?

I really have no idea what else I can try, at this point.

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

Armbian does a lot of things that are hard to follow, probably using differnt version of u-boot and other things so no, I don't think that is related.

Normally all the interesting stuff happens after the Starting Kernel stage, and as I said it's working perfectly fine for me and I tried it on different C4s that I have.

The Buster and Bullseye image are sadly rather different... the first boot script is identical from what it does for both, so I doubt that's the root cause.
As you said it probably doesn't even reach the stage where it's processing the first boot script.. as by then you should see way different output.

Can you do a fsck -fy on both partitions after the flashing on your Linux VM. I wonder if it has trouble loading something, although if it gets to the stage where it says starting kernel it normally finished loading all the other stuff.
It should show output of the next stage and I wonder if that's the part that is broken for you. I can try to give you a simplified version of the boot.scr.
Or I can try giving you an updated Image with Kernel 6.2.10 to see if that changes something.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Shorewatcher
Posts: 17
Joined: Sat Apr 22, 2023 2:48 am
languages_spoken: English, Dutch
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by Shorewatcher »

Alright, I flashed a clean install of the image to my SD and loaded it into the VM. Here's the output that fsck gave on the partitions:

Code: Select all

BOOT PARTITION CHECK:

ubuntu@ubuntu:~$ sudo fsck -fy /dev/sdb1
fsck from util-linux 2.37.2
e2fsck 1.46.5 (30-Dec-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
boot: 40/109312 files (2.5% non-contiguous), 16246/131072 blocks

-----------------------------------------------------------------------
ROOTFS PARTITION CHECK:

ubuntu@ubuntu:~$ sudo fsck -fy /dev/sdb2
fsck from util-linux 2.37.2
e2fsck 1.46.5 (30-Dec-2021)
Pass 1: Checking inodes, blocks, and sizes
Pass 2: Checking directory structure
Pass 3: Checking directory connectivity
Pass 4: Checking reference counts
Pass 5: Checking group summary information
rootfs: 35254/65280 files (1.2% non-contiguous), 203332/262144 blocks
I am willing to try whatever fix you think might help cure the issue.
An updated boot.scr seems like the easiest to try. If that doesn't work, I can try and flash the updated image?

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

fsck seems fine no issues.
Give me a bit to prepare and test the boot.scr.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Shorewatcher
Posts: 17
Joined: Sat Apr 22, 2023 2:48 am
languages_spoken: English, Dutch
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by Shorewatcher »

Please, do take your time.

Shorewatcher
Posts: 17
Joined: Sat Apr 22, 2023 2:48 am
languages_spoken: English, Dutch
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by Shorewatcher »

If it helps, I might be able to borrow an UART cable from someone I know.

UPDATE: I have an UART USB cable to use for debugging.

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

Be careful you have the correct voltage. Other boards use 3 or 3.3V while ODROIDs normally run on 1.8V for the UART.
If you use the incorrect voltage you may damage the board.

In the meantime I was able to upload an updated image with latest changes and Kernel 6.2.10: https://oph.mdrjr.net/meveric/images/Bu ... -C4.img.xz
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

Shorewatcher
Posts: 17
Joined: Sat Apr 22, 2023 2:48 am
languages_spoken: English, Dutch
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by Shorewatcher »

This one seems to have a few connectors, 5V and VCC linked together. A 3v3 connector, TXD, RXD and GND. So I am guessing it is limited to 3.3V and above..
I will try the new image when I am home and able to flash it. I might also try and flash the image using different software. Might be dumb, but you never know.

Shorewatcher
Posts: 17
Joined: Sat Apr 22, 2023 2:48 am
languages_spoken: English, Dutch
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by Shorewatcher »

meveric wrote:
Tue Apr 25, 2023 10:00 pm
In the meantime I was able to upload an updated image with latest changes and Kernel 6.2.10: https://oph.mdrjr.net/meveric/images/Bu ... -C4.img.xz
I gave the new build a try on my c4. However, the issues remain the same. I tried flashing with both Etcher and Rufus, this time around. However, one thing is different. It mentions, below the usual "variant c4" a new line:

Code: Select all

...
variant c4
Unknown command 'c4' - try 'help'
75865 bytes read in 29 ms (2.5 MiB/s)
...
UPDATE:
Changing the rootfs location from the UUID to /dev/sdb2 in the config.ini on the boot partition, as ubuntu listed it, gets me past the starting kernel error. However, it leads to I/O errors and refusing to let me connect via SSH. But it does get PAST the starting kernel and to the login page.
I tried to explicitly make the config.ini use the UUID for the rootfs partition and comment away the script line in rc.local. This did get me past the first-boot script, once. Any attempts after that lead to the C4 booting to the login screen and immediately shutting down.

UPDATE 2:
Without modifying the image after flashing, it stays on the "Starting kernel ..." message for about half a minute and then reboots! And then boots right back into the first boot script, afterwards. Seems something goes right and then goes wrong..

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

/dev/sdb2 should not work, as this would point to a external harddrive like a attached USB device.

I hope you do not have an external drive connected at this stage (yet) as this could cause the same issue, if the partition on the harddrive has the same UUID as the SD card for example.

SD/eMMC are normally labeled /dev/mmcblk0 or /dev/mmcblk1 and partitions respectively /dev/mmcblk0p2 for example.
You can give that a try as it would correctly point to the SD card as well, same as UUID should do.
Maybe it's unable to find the UUID correctly. I think the HC4 had an the same problem in the past and would only work with /dev/mmcblk0p2 as a boot device and not the UUID.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

jcouzy
Posts: 1
Joined: Thu Jun 29, 2023 9:32 pm
languages_spoken: english
ODROIDs: H3+ C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by jcouzy »

Flashed the SD-Card with balenaEtcher, system boots does its stuff, but not accessible via SSH remotely.

Plant8742
Posts: 1
Joined: Fri Jun 30, 2023 5:56 am
languages_spoken: english
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by Plant8742 »

I ran into this issue as well, you need to use a keyboard and run dpkg-reconfigure openssh-server

Does anyone know how to get this setup with btrfs for rootfs? I'd love to take advantage of compression for SD card wear

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

jcouzy wrote:
Thu Jun 29, 2023 9:35 pm
Flashed the SD-Card with balenaEtcher, system boots does its stuff, but not accessible via SSH remotely.
Yes I had the script that is suppose to reconfigure the ssh server fail a few times as well, but as @Plant8742 if you do a dpkg-reconfigure openssh-server it should work fine.
Plant8742 wrote:
Fri Jun 30, 2023 6:00 am
I ran into this issue as well, you need to use a keyboard and run dpkg-reconfigure openssh-server

Does anyone know how to get this setup with btrfs for rootfs? I'd love to take advantage of compression for SD card wear
It's probably a bit complicated but you could probably do it by hand.
First reduce the SD card partition for the ext4 partition to a smaller size and create a new btrfs partition you can probably do this via external partition manager directly on the SD card.
Then use rsync to copy over all files to the btrfs partition, boot the system as usual it should still boot from the ext4 partition.
Afterwards you would need to adjust the uuid entry for the rootfs in /etc/fstab and configure /boot/config.ini to point to the correct partition for rootfs.
Last step would be to run update-initramfs -u -k all. This would recreate the initramfs environment which is required to update the rootfs during boot.

I would suggest make a backup of the initrd file in case it fails you can always go back to boot from ext4.
Once you confirmed it's working you could remove the ext4 partition completely and expand the btrfs to full size.

BTW aside from btrfs there's also F2FS https://en.wikipedia.org/wiki/F2FS which is suppose to be good for flash based devices such as USB-thumb-drives or SD cards... but I never tried it to be honest.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

turorudi
Posts: 4
Joined: Sat Nov 04, 2023 12:31 am
languages_spoken: english
ODROIDs: C4
Has thanked: 0
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by turorudi »

Hi there! I have been testing this image to upgrade from your old Buster one. Please, I would like to ask you some help with three issues:

- Is there a way I could add a boot logo to your image?
- I haven't been able to detect anything from the GPIO port, with the Ubuntu Hardkernel's image or with your Buster image, anything I connect there, it creates the /dev/ttyACM0 and from there I can work with it, with this Bullseye image, I get nothing, I have tried unsuccessfully with /dev/ttySX, but still nothing.
- If I want to change anything from /boot/boot.scr, which is the proper way to do it?

Thank you very much indeed in advance!

User avatar
meveric
Posts: 12126
Joined: Mon Feb 25, 2013 2:41 pm
languages_spoken: german, english
ODROIDs: X2, U2, U3, XU-Lite, XU3, XU3-Lite, C1, XU4, C2, C1+, XU4Q, HC1, N1, Go, H2 (N4100), N2, H2 (J4105), GoA, C4, GoA v1.1, H2+, HC4, GoS
Has thanked: 93 times
Been thanked: 675 times
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by meveric »

turorudi wrote:
Wed Nov 08, 2023 4:17 pm
Hi there! I have been testing this image to upgrade from your old Buster one. Please, I would like to ask you some help with three issues:

- Is there a way I could add a boot logo to your image?
Not quite sure, never bothered trying, I know that the u-boot probably has some code to load a boot logo, I would have to check that.
Alternatively you could try to use plymouth which might work (similar to a default x86 based Ubuntu does with their boot logo instead of debug output.
But I also haven't tried that.
turorudi wrote:
Wed Nov 08, 2023 4:17 pm
- I haven't been able to detect anything from the GPIO port, with the Ubuntu Hardkernel's image or with your Buster image, anything I connect there, it creates the /dev/ttyACM0 and from there I can work with it, with this Bullseye image, I get nothing, I have tried unsuccessfully with /dev/ttySX, but still nothing.
This image uses a completely different Kernel. By now C4 support is in the upstream Kernel and many patches done to the old 4.4 Kernel for the C4 do not apply here.
GPIOs are addressed differently in newer Kernel. I suggest reading into "gpiod" which allow an easy to use interface to interact with GPIOs.
gpioinfo for example will give you a very detailed list of available gpios and their status right now.
gpioget and gpioset can be used to interact with gpios.
turorudi wrote:
Wed Nov 08, 2023 4:17 pm
- If I want to change anything from /boot/boot.scr, which is the proper way to do it?

Thank you very much indeed in advance!
You shouldn't interact with the boot.scr directly. What exactly are you trying to do?
There is a config.ini file which allows you to alter some parameters which are loaded from the boot.scr dynamically.
The boot.scr itself can only be adjusted by changing the build script that generates the boot.scr, but I strongly advice against that, as I will overwrite this script on updates without checking for user made changes, as they are not suppose to be done this way.
Donate to support my work on the ODROID GameStation Turbo Image for U2/U3 XU3/XU4 X2 X C1 as well as many other releases.
Check out the Games and Emulators section to find some of my work or check the files in my repository to find the software i build for ODROIDs.
If you want to add my repository to your image read my HOWTO integrate my repo into your image.

asiago
Posts: 12
Joined: Tue May 03, 2016 8:48 am
languages_spoken: english
ODROIDs: C1+, C2, GO
Has thanked: 1 time
Been thanked: 0
Contact:

Re: [OS] Debian Bullseye (11) C4

Post by asiago »

for what it's worth, i am having the same issue today: bullseye image stalls on 'starting kernel'. i have tested it with three different micro-sd cards (two sandisk, a 64gb and a 256gb, and one samsung 64gb), and two different boards (one is a rev 1.0 and the other a rev 1.3). i have only intermediate experience with linux so i'm not sure how much i can help troubleshooting.

while i would definitely prefer to use your img, i'm currently using the latest armbian bookworm image since i needed to get this thing up and running today. but i'm happy to help troubleshoot if it would help you in any way - i have no pressing requirement for myself to get your image working as i can use armbian for now.

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 1 guest