[SOLVED] C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does not

Post Reply
roarking
Posts: 30
Joined: Thu Jan 30, 2020 11:57 am
languages_spoken: english
ODROIDs: H2 H2+ H3+ C4 HC4 M1 M1S N2 SmartPower3
Has thanked: 22 times
Been thanked: 6 times
Contact:

[SOLVED] C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does not

Post by roarking »

When installing Debian Buster 10 (buster) on Odroid C4/HC4, I get a working serial console on ttyAML0 and Petitboot menu entries for each kernel installed. Excellent! However, for Debian 11 (bullseye) both features are missing. The installation is done with a custom script using debootstrap, which supports PC and Odroid C4/HC4. The packages installed from http://ppa.linuxfactory.or.kr are shown below. For both installations of buster and bullseye the same kernel "6.1.0-odroid-arm64 #1 SMP PREEMPT Wed, 10 Jan 2024" is used, so I assume the missing features may be caused by another package. How to enable these features for Debian 11 (bullseye)?

Petitboot shows menu entries for each kernel installed for Debian 10 (buster) only, not for Debian 11 (bullseye):

Code: Select all

Petitboot (dev.20220317)                                 Hardkernel ODROID-HC4
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
  [Disk: sda1 / 5f812959-6179-4054-be4f-03dbc5914b2a]        
 *  Debian GNU/Linux 11 (bullseye)                           
  [Disk: mmcblk1p1 / 8ac0e28a-6dae-4b74-badc-559cb3c9fc0d]
    Debian GNU/Linux 10 (buster)                             
    GNU/Linux, with Linux 4.19.0-21-arm64 (recovery mode)    
    GNU/Linux, with Linux 4.19.0-21-arm64                    
    GNU/Linux, with Linux 6.1.0-odroid-arm64 (recovery mode) 
    GNU/Linux, with Linux 6.1.0-odroid-arm64                 
    GNU/Linux

  System information
  System configuration
  System status log
  Language
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
 Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help

Serial console ttyAML0 show boot messages and login prompt on Debian 10 (buster), while Debian 11 (bullseye) has no output on the serial console:

Code: Select all

...
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.

Debian GNU/Linux 10 odroidhc4 ttyAML0

                                                   
odroidhc4 login:

Both Debian releases were installed with the same kernel:

Code: Select all

roarking@odroidhc4:~$ uname -ar
Linux odroidhc4 6.1.0-odroid-arm64 #1 SMP PREEMPT Wed, 10 Jan 2024 06:24:38 +0000 aarch64 GNU/Linu
x
roarking@odroidhc4:~$

This excerpt from the custom install script shows the support for Odroid C4/HC4 and the packages installed from ppa.linuxfactory.or.kr:

Code: Select all

...
if [ \$OPT_ODROIDARM64 -ne 0 ]; then
    wget http://ppa.linuxfactory.or.kr/ppa-gpg.asc
    gpg --output linuxfactory.key --dearmor ppa-gpg.asc
    mkdir /usr/local/share/keyrings || true
    mv linuxfactory.key /usr/local/share/keyrings

    echo deb [signed-by=/usr/local/share/keyrings/linuxfactory.key] http://ppa.linuxfactory.or.kr \$RELEASE main contrib non-free | sudo tee /etc/apt/sources.list.d/ppa_linuxfactory_or_kr.list
    apt-get -y update
    apt-get -y install bootscript-odroidc4 cpufrequtils figlet flash-kernel linux-image-6.1.0-odroid-arm64 odroid-alsa odroid-base odroid-grub2 u-boot-odroid u-boot-odroidc4
    apt-get -y upgrade
    apt-cache policy
fi
...
Edit: Marked [SOLVED]
Last edited by roarking on Sat Jan 20, 2024 11:50 pm, edited 1 time in total.

User avatar
tobetter
Posts: 12975
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 983 times
Been thanked: 2249 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by tobetter »

If you mean the missing feature is this, not showing boot entries start with GNU/Linux, with ..., you need to install a package odroid-grub2.

Code: Select all

  [Disk: sda1 / 5f812959-6179-4054-be4f-03dbc5914b2a]        
 *  Debian GNU/Linux 11 (bullseye)                           
  [Disk: mmcblk1p1 / 8ac0e28a-6dae-4b74-badc-559cb3c9fc0d]
    Debian GNU/Linux 10 (buster)                             
    GNU/Linux, with Linux 4.19.0-21-arm64 (recovery mode)    
    GNU/Linux, with Linux 4.19.0-21-arm64                    
    GNU/Linux, with Linux 6.1.0-odroid-arm64 (recovery mode) 
    GNU/Linux, with Linux 6.1.0-odroid-arm64                 
    GNU/Linux
EDIT: I realised that your script have odroid-grub2 already, then it might be required to run update-grub2 such that it creates /boot/grub.cfg which will be loaded by Petitboot.

roarking
Posts: 30
Joined: Thu Jan 30, 2020 11:57 am
languages_spoken: english
ODROIDs: H2 H2+ H3+ C4 HC4 M1 M1S N2 SmartPower3
Has thanked: 22 times
Been thanked: 6 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by roarking »

tobetter wrote:
Thu Jan 18, 2024 3:34 pm
EDIT: I realised that your script have odroid-grub2 already, then it might be required to run update-grub2 such that it creates /boot/grub.cfg which will be loaded by Petitboot.
I tried this suggestion now:

On Debian 11 (bullseye) update-grub2 is executed successfully, but Petitboot still does not show any kernel entries. Also there is no output on the serial console.

On Debian 10 (buster) both features (Petitboot menu and serial console) work fine after running update-grub.

User avatar
tobetter
Posts: 12975
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 983 times
Been thanked: 2249 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by tobetter »

roarking wrote:
Thu Jan 18, 2024 4:03 pm
tobetter wrote:
Thu Jan 18, 2024 3:34 pm
EDIT: I realised that your script have odroid-grub2 already, then it might be required to run update-grub2 such that it creates /boot/grub.cfg which will be loaded by Petitboot.
I tried this suggestion now:

On Debian 11 (bullseye) update-grub2 is executed successfully, but Petitboot still does not show any kernel entries. Also there is no output on the serial console.
Do you have /boot/boot.cfg?
What's the current output of cat /proc/cmdline and cat /boot/config.ini?

roarking
Posts: 30
Joined: Thu Jan 30, 2020 11:57 am
languages_spoken: english
ODROIDs: H2 H2+ H3+ C4 HC4 M1 M1S N2 SmartPower3
Has thanked: 22 times
Been thanked: 6 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by roarking »

tobetter wrote:
Thu Jan 18, 2024 4:41 pm
Do you have /boot/boot.cfg?
What's the current output of cat /proc/cmdline and cat /boot/config.ini?
Debian 10 (buster): Serial console working and Petitboot menu with kernel entries

Code: Select all

root@hc4buster:~# ls -l /boot/boot.cfg
ls: cannot access '/boot/boot.cfg': No such file or directory

root@hc4buster:~# cat /proc/cmdline
root=/dev/mapper/vgm-root ro net.ifnames=0 

root@hc4buster:~# cat /boot/config.ini
[generic]
#default_console=ttyAML0,115200n8
overlay_resize=16384
overlay_profile=""
overlays=""
root@hc4buster:~#
Debian 11 (bullseye): Serial console not working and Petitboot menu without kernel entries

Code: Select all

root@hc4bullseye:~# ls -l /boot/boot.cfg
ls: cannot access '/boot/boot.cfg': No such file or directory

root@hc4bullseye:~# cat /proc/cmdline
quiet console=tty1 cma=800M clk_ignore_unused fsck.mode=force fsck.repair=yes console=ttyS0,115200n8 

root@hc4bullseye:~# cat /boot/config.ini
[generic]
#default_console=ttyAML0,115200n8
overlay_resize=16384
overlay_profile=""
overlays=""
root@hc4bullseye:~#

User avatar
tobetter
Posts: 12975
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 983 times
Been thanked: 2249 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by tobetter »

roarking wrote:
Fri Jan 19, 2024 1:06 am
Debian 11 (bullseye): Serial console not working and Petitboot menu without kernel entries

Code: Select all

root@hc4bullseye:~# ls -l /boot/boot.cfg
ls: cannot access '/boot/boot.cfg': No such file or directory

root@hc4bullseye:~# cat /proc/cmdline
quiet console=tty1 cma=800M clk_ignore_unused fsck.mode=force fsck.repair=yes console=ttyS0,115200n8 

root@hc4bullseye:~# cat /boot/config.ini
[generic]
#default_console=ttyAML0,115200n8
overlay_resize=16384
overlay_profile=""
overlays=""
root@hc4bullseye:~#
Can you try to reboot after uncomment the line #default_console=ttyAML0,115200n8 in /boot/config.ini?

And, sorry, not /boot/boot.cfg for Petitboot boot entry. Please check if you have /boot/grub/grub.cfg. If you do not have this, you would run update-grub2 again since Petitboot loads it and shows boot entries from there.

Code: Select all

sudo mkdir -p /boot/grub
sudo update-grub2

roarking
Posts: 30
Joined: Thu Jan 30, 2020 11:57 am
languages_spoken: english
ODROIDs: H2 H2+ H3+ C4 HC4 M1 M1S N2 SmartPower3
Has thanked: 22 times
Been thanked: 6 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by roarking »

Can you try to reboot after uncomment the line #default_console=ttyAML0,115200n8 in /boot/config.ini?
After uncommenting the line and rebooting "Debian GNU/Linux 11 (bullseye)", I get some output on the serial console, but not the entire messages of the boot process as on Debian 10 (buster). I have included the limited output below. I do get a login on the serial console. The line was also commented out (=inactive) on Debian 10 (buster), but still all boot messages appeared on the serial console with this release.

Code: Select all

 Petitboot (dev.20220317)                                 Hardkernel ODROID-HC4
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
  [Disk: sda1 / e853851a-7b4b-48fe-bc74-4f0dfce9da91]        
 *  Debian GNU/Linux 11 (bullseye)                           
  [Disk: sdb1 / 8b852986-ea96-46e8-ad63-a36306c758e9]
    Debian GNU/Linux 10 (buster)                             
    GNU/Linux, with Linux 5.14.0-odroid-arm64 (recovery mode)
    GNU/Linux, with Linux 5.14.0-odroid-arm64                
    GNU/Linux
  [Disk: mmcblk1p1 / 8d0333ed-4bd6-4190-95fa-3de4195e396c]
    Debian GNU/Linux 10 (buster)                             
    GNU/Linux, with Linux 6.1.0-odroid-arm64 (recovery mode) 
    GNU/Linux, with Linux 6.1.0-odroid-arm64                 
    GNU/Linux

  System information
  System configuration
  System status log
  Language
  Rescan devices
  Retrieve config from URL
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
 Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help
 Performing kexec reboot[    0.809184] dw-pcie fc000000.pcie: error -ENXIO: IRQ index 1 not foun
d
[    0.854974] meson-pcie fc000000.pcie: error: wait linkup timeout
IP-Config: eth0 hardware address 00:1e:06:49:15:ee mtu 1500 DHCP
IP-Config: no response after 2 secs - giving up
IP-Config: eth0 hardware address 00:1e:06:49:15:ee mtu 1500 DHCP
  Volume group "vgx" not found
  Cannot process volume group vgx
  Volume group "vgx" not found
  Cannot process volume group vgx
Please unlock disk pv0: IP-Config: no response after 3 secs - giving up
IP-Config: eth0 hardware address 00:1e:06:49:15:ee mtu 1500 DHCP
IP-Config: no response after 4 secs - giving up
IP-Config: eth0 hardware address 00:1e:06:49:15:ee mtu 1500 DHCP
IP-Config: eth0 complete (dhcp from 10.98.160.1):
 address: 10.98.160.180    broadcast: 10.98.160.255    netmask: 255.255.255.0   
 gateway: 10.98.160.1      dns0     : 10.98.160.1      dns1   : 0.0.0.0         
 host   : odroidhc4                                                       
 domain : lan                                                             
 rootserver: 10.98.160.1 rootpath: 
 filename  : 
[934] Jan 18 16:25:24 Forced command set to '/bin/cryptroot-unlock'
[934] Jan 18 16:25:24 Not backgrounding

cryptsetup: pv0: set up successfully
e2fsck 1.46.2 (28-Feb-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                                     
/dev/mapper/vgx-root: 61324/1048576 files (0.2% non-contiguous), 525418/4194304 blocks
[934] Jan 18 16:26:12 Early exit: Terminated by signal
SELinux:  Could not open policy file <= /etc/selinux/targeted/policy/policy.33:  No such file or
 directory
[   61.928942] panfrost ffe40000.gpu: error -ENODEV: _opp_set_regulators: no regulator (mali) fo
und
[FAILED] Failed to start Raise network interfaces.

Debian GNU/Linux 11 hc4bullseye ttyAML0

hc4bullseye login:
Please check if you have /boot/grub/grub.cfg. If you do not have this, you would run update-grub2 again since Petitboot loads it and shows boot entries from there.
I do have /boot/grub/grub.cfg. However, no entries are displayed in Petitboot (see serial console output above). This remains so even after running update-grub2. I include the entire /boot/grub/grub.cfg below which does have entries for different kernels, but they are not displayed:

Code: Select all

root@hc4bullseye:~# update-grub2
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.2.0-odroid-arm64
Found initrd image: /boot/initrd.img-6.2.0-odroid-arm64
Found linux image: /boot/vmlinuz-6.1.0-odroid-arm64
Found initrd image: /boot/initrd.img-6.1.0-odroid-arm64
Warning: os-prober will be executed to detect other bootable partitions.
Its output will be used to detect bootable binaries on them and create new boot entries.
Found Debian GNU/Linux 10 (buster) on /dev/sdb2
done
root@hc4bullseye:~#

Code: Select all

root@hc4bullseye:~# cat /boot/grub/grub.cfg
#
# DO NOT EDIT THIS FILE
#
# It is automatically generated by grub-mkconfig using templates
# from /etc/grub.d and settings from /etc/default/grub
#

### BEGIN /etc/grub.d/00_header ###
if [ -s $prefix/grubenv ]; then
  set have_grubenv=true
  load_env
fi
if [ "${next_entry}" ] ; then
   set default="${next_entry}"
   set next_entry=
   save_env next_entry
   set boot_once=true
else
   set default="0"
fi

if [ x"${feature_menuentry_id}" = xy ]; then
  menuentry_id_option="--id"
else
  menuentry_id_option=""
fi

export menuentry_id_option

if [ "${prev_saved_entry}" ]; then
  set saved_entry="${prev_saved_entry}"
  save_env saved_entry
  set prev_saved_entry=
  save_env prev_saved_entry
  set boot_once=true
fi

function savedefault {
  if [ -z "${boot_once}" ]; then
    saved_entry="${chosen}"
    save_env saved_entry
  fi
}
function load_video {
  if [ x$feature_all_video_module = xy ]; then
    insmod all_video
  else
    insmod efi_gop
    insmod efi_uga
    insmod ieee1275_fb
    insmod vbe
    insmod vga
    insmod video_bochs
    insmod video_cirrus
  fi
}

terminal_input console
terminal_output console
if [ "${recordfail}" = 1 ] ; then
  set timeout=30
else
  if [ x$feature_timeout_style = xy ] ; then
    set timeout_style=menu
    set timeout=5
  # Fallback normal timeout code in case the timeout_style feature is
  # unavailable.
  else
    set timeout=5
  fi
fi
### END /etc/grub.d/00_header ###

### BEGIN /etc/grub.d/05_debian_theme ###
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
### END /etc/grub.d/05_debian_theme ###

### BEGIN /etc/grub.d/10_linux ###
function gfxmode {
	set gfxpayload="${1}"
}
set linux_gfx_mode=
export linux_gfx_mode
menuentry 'GNU/Linux' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-398dc821-fa69-4127-a71d-bea2a5693f60' {
	load_video
	insmod gzio
	if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
	insmod part_gpt
	insmod ext2
	set root='hd0,gpt1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  e853851a-7b4b-48fe-bc74-4f0dfce9da91
	else
	  search --no-floppy --fs-uuid --set=root e853851a-7b4b-48fe-bc74-4f0dfce9da91
	fi
	echo	'Loading Linux 6.2.0-odroid-arm64 ...'
	linux	/vmlinuz-6.2.0-odroid-arm64 root=/dev/mapper/vgx-root ro net.ifnames=0 
	echo	'Loading initial ramdisk ...'
	initrd	/initrd.img-6.2.0-odroid-arm64
}
submenu 'Advanced options for GNU/Linux' $menuentry_id_option 'gnulinux-advanced-398dc821-fa69-4127-a71d-bea2a5693f60' {
	menuentry 'GNU/Linux, with Linux 6.2.0-odroid-arm64' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.2.0-odroid-arm64-advanced-398dc821-fa69-4127-a71d-bea2a5693f60' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  e853851a-7b4b-48fe-bc74-4f0dfce9da91
		else
		  search --no-floppy --fs-uuid --set=root e853851a-7b4b-48fe-bc74-4f0dfce9da91
		fi
		echo	'Loading Linux 6.2.0-odroid-arm64 ...'
		linux	/vmlinuz-6.2.0-odroid-arm64 root=/dev/mapper/vgx-root ro net.ifnames=0 
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-6.2.0-odroid-arm64
	}
	menuentry 'GNU/Linux, with Linux 6.2.0-odroid-arm64 (recovery mode)' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.2.0-odroid-arm64-recovery-398dc821-fa69-4127-a71d-bea2a5693f60' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  e853851a-7b4b-48fe-bc74-4f0dfce9da91
		else
		  search --no-floppy --fs-uuid --set=root e853851a-7b4b-48fe-bc74-4f0dfce9da91
		fi
		echo	'Loading Linux 6.2.0-odroid-arm64 ...'
		linux	/vmlinuz-6.2.0-odroid-arm64 root=/dev/mapper/vgx-root ro single net.ifnames=0
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-6.2.0-odroid-arm64
	}
	menuentry 'GNU/Linux, with Linux 6.1.0-odroid-arm64' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-odroid-arm64-advanced-398dc821-fa69-4127-a71d-bea2a5693f60' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  e853851a-7b4b-48fe-bc74-4f0dfce9da91
		else
		  search --no-floppy --fs-uuid --set=root e853851a-7b4b-48fe-bc74-4f0dfce9da91
		fi
		echo	'Loading Linux 6.1.0-odroid-arm64 ...'
		linux	/vmlinuz-6.1.0-odroid-arm64 root=/dev/mapper/vgx-root ro net.ifnames=0 
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-6.1.0-odroid-arm64
	}
	menuentry 'GNU/Linux, with Linux 6.1.0-odroid-arm64 (recovery mode)' --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.1.0-odroid-arm64-recovery-398dc821-fa69-4127-a71d-bea2a5693f60' {
		load_video
		insmod gzio
		if [ x$grub_platform = xxen ]; then insmod xzio; insmod lzopio; fi
		insmod part_gpt
		insmod ext2
		set root='hd0,gpt1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,gpt1' --hint-bios=hd0,gpt1 --hint-efi=hd0,gpt1 --hint-baremetal=ahci0,gpt1  e853851a-7b4b-48fe-bc74-4f0dfce9da91
		else
		  search --no-floppy --fs-uuid --set=root e853851a-7b4b-48fe-bc74-4f0dfce9da91
		fi
		echo	'Loading Linux 6.1.0-odroid-arm64 ...'
		linux	/vmlinuz-6.1.0-odroid-arm64 root=/dev/mapper/vgx-root ro single net.ifnames=0
		echo	'Loading initial ramdisk ...'
		initrd	/initrd.img-6.1.0-odroid-arm64
	}
}

### END /etc/grub.d/10_linux ###

### BEGIN /etc/grub.d/20_linux_xen ###

### END /etc/grub.d/20_linux_xen ###

### BEGIN /etc/grub.d/30_os-prober ###
menuentry 'Debian GNU/Linux 10 (buster) (on /dev/sdb2)' --class debian --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-simple-32aeeec5-719b-495b-916a-272be987b4fb' {
	insmod part_msdos
	insmod ext2
	set root='hd1,msdos1'
	if [ x$feature_platform_search_hint = xy ]; then
	  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos1' --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  8b852986-ea96-46e8-ad63-a36306c758e9
	else
	  search --no-floppy --fs-uuid --set=root 8b852986-ea96-46e8-ad63-a36306c758e9
	fi
	linux /vmlinuz-5.14.0-odroid-arm64 root=UUID=32aeeec5-719b-495b-916a-272be987b4fb ro console=tty1 cma=800M clk_ignore_unused console=ttyS0,115200n8 net.ifnames=0
	initrd /initrd.img-5.14.0-odroid-arm64
}
submenu 'Advanced options for Debian GNU/Linux 10 (buster) (on /dev/sdb2)' $menuentry_id_option 'osprober-gnulinux-advanced-32aeeec5-719b-495b-916a-272be987b4fb' {
	menuentry 'GNU/Linux (on /dev/sdb2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-5.14.0-odroid-arm64--32aeeec5-719b-495b-916a-272be987b4fb' {
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos1' --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  8b852986-ea96-46e8-ad63-a36306c758e9
		else
		  search --no-floppy --fs-uuid --set=root 8b852986-ea96-46e8-ad63-a36306c758e9
		fi
		linux /vmlinuz-5.14.0-odroid-arm64 root=UUID=32aeeec5-719b-495b-916a-272be987b4fb ro console=tty1 cma=800M clk_ignore_unused console=ttyS0,115200n8 net.ifnames=0
		initrd /initrd.img-5.14.0-odroid-arm64
	}
	menuentry 'GNU/Linux, with Linux 5.14.0-odroid-arm64 (on /dev/sdb2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-5.14.0-odroid-arm64--32aeeec5-719b-495b-916a-272be987b4fb' {
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos1' --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  8b852986-ea96-46e8-ad63-a36306c758e9
		else
		  search --no-floppy --fs-uuid --set=root 8b852986-ea96-46e8-ad63-a36306c758e9
		fi
		linux /vmlinuz-5.14.0-odroid-arm64 root=UUID=32aeeec5-719b-495b-916a-272be987b4fb ro console=tty1 cma=800M clk_ignore_unused console=ttyS0,115200n8 net.ifnames=0
		initrd /initrd.img-5.14.0-odroid-arm64
	}
	menuentry 'GNU/Linux, with Linux 5.14.0-odroid-arm64 (recovery mode) (on /dev/sdb2)' --class gnu-linux --class gnu --class os $menuentry_id_option 'osprober-gnulinux-/vmlinuz-5.14.0-odroid-arm64-root=UUID=32aeeec5-719b-495b-916a-272be987b4fb ro single console=tty1 cma=800M clk_ignore_unused console=ttyS0,115200n8 net.ifnames=0-32aeeec5-719b-495b-916a-272be987b4fb' {
		insmod part_msdos
		insmod ext2
		set root='hd1,msdos1'
		if [ x$feature_platform_search_hint = xy ]; then
		  search --no-floppy --fs-uuid --set=root --hint-ieee1275='ieee1275//disk@0,msdos1' --hint-bios=hd1,msdos1 --hint-efi=hd1,msdos1 --hint-baremetal=ahci1,msdos1  8b852986-ea96-46e8-ad63-a36306c758e9
		else
		  search --no-floppy --fs-uuid --set=root 8b852986-ea96-46e8-ad63-a36306c758e9
		fi
		linux /vmlinuz-5.14.0-odroid-arm64 root=UUID=32aeeec5-719b-495b-916a-272be987b4fb ro single console=tty1 cma=800M clk_ignore_unused console=ttyS0,115200n8 net.ifnames=0
		initrd /initrd.img-5.14.0-odroid-arm64
	}
}

### END /etc/grub.d/30_os-prober ###

### BEGIN /etc/grub.d/30_uefi-firmware ###
### END /etc/grub.d/30_uefi-firmware ###

### BEGIN /etc/grub.d/40_custom ###
# This file provides an easy way to add custom menu entries.  Simply type the
# menu entries you want to add after this comment.  Be careful not to change
# the 'exec tail' line above.
### END /etc/grub.d/40_custom ###

### BEGIN /etc/grub.d/41_custom ###
if [ -f  ${config_directory}/custom.cfg ]; then
  source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f  $prefix/custom.cfg ]; then
  source $prefix/custom.cfg
fi
### END /etc/grub.d/41_custom ###
root@hc4bullseye:~#

User avatar
tobetter
Posts: 12975
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 983 times
Been thanked: 2249 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by tobetter »

roarking wrote:
Fri Jan 19, 2024 1:52 am
Can you try to reboot after uncomment the line #default_console=ttyAML0,115200n8 in /boot/config.ini?
After uncommenting the line and rebooting "Debian GNU/Linux 11 (bullseye)", I get some output on the serial console, but not the entire messages of the boot process as on Debian 10 (buster). I have included the limited output below. I do get a login on the serial console. The line was also commented out (=inactive) on Debian 10 (buster), but still all boot messages appeared on the serial console with this release.

Code: Select all

 Petitboot (dev.20220317)                                 Hardkernel ODROID-HC4
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
  [Disk: sda1 / e853851a-7b4b-48fe-bc74-4f0dfce9da91]        
 *  Debian GNU/Linux 11 (bullseye)                           
  [Disk: sdb1 / 8b852986-ea96-46e8-ad63-a36306c758e9]
    Debian GNU/Linux 10 (buster)                             
    GNU/Linux, with Linux 5.14.0-odroid-arm64 (recovery mode)
    GNU/Linux, with Linux 5.14.0-odroid-arm64                
    GNU/Linux
  [Disk: mmcblk1p1 / 8d0333ed-4bd6-4190-95fa-3de4195e396c]
    Debian GNU/Linux 10 (buster)                             
    GNU/Linux, with Linux 6.1.0-odroid-arm64 (recovery mode) 
    GNU/Linux, with Linux 6.1.0-odroid-arm64                 
    GNU/Linux

  System information
  System configuration
  System status log
  Language
  Rescan devices
  Retrieve config from URL
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
 Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help
 Performing kexec reboot[    0.809184] dw-pcie fc000000.pcie: error -ENXIO: IRQ index 1 not foun
d
[    0.854974] meson-pcie fc000000.pcie: error: wait linkup timeout
IP-Config: eth0 hardware address 00:1e:06:49:15:ee mtu 1500 DHCP
IP-Config: no response after 2 secs - giving up
IP-Config: eth0 hardware address 00:1e:06:49:15:ee mtu 1500 DHCP
  Volume group "vgx" not found
  Cannot process volume group vgx
  Volume group "vgx" not found
  Cannot process volume group vgx
Please unlock disk pv0: IP-Config: no response after 3 secs - giving up
IP-Config: eth0 hardware address 00:1e:06:49:15:ee mtu 1500 DHCP
IP-Config: no response after 4 secs - giving up
IP-Config: eth0 hardware address 00:1e:06:49:15:ee mtu 1500 DHCP
IP-Config: eth0 complete (dhcp from 10.98.160.1):
 address: 10.98.160.180    broadcast: 10.98.160.255    netmask: 255.255.255.0   
 gateway: 10.98.160.1      dns0     : 10.98.160.1      dns1   : 0.0.0.0         
 host   : odroidhc4                                                       
 domain : lan                                                             
 rootserver: 10.98.160.1 rootpath: 
 filename  : 
[934] Jan 18 16:25:24 Forced command set to '/bin/cryptroot-unlock'
[934] Jan 18 16:25:24 Not backgrounding

cryptsetup: pv0: set up successfully
e2fsck 1.46.2 (28-Feb-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                                     
/dev/mapper/vgx-root: 61324/1048576 files (0.2% non-contiguous), 525418/4194304 blocks
[934] Jan 18 16:26:12 Early exit: Terminated by signal
SELinux:  Could not open policy file <= /etc/selinux/targeted/policy/policy.33:  No such file or
 directory
[   61.928942] panfrost ffe40000.gpu: error -ENODEV: _opp_set_regulators: no regulator (mali) fo
und
[FAILED] Failed to start Raise network interfaces.

Debian GNU/Linux 11 hc4bullseye ttyAML0

hc4bullseye login:
Please check if you have /boot/grub/grub.cfg. If you do not have this, you would run update-grub2 again since Petitboot loads it and shows boot entries from there.
Please refer to link below.
https://docs.linuxfactory.or.kr/guides/kernel_log.html

roarking
Posts: 30
Joined: Thu Jan 30, 2020 11:57 am
languages_spoken: english
ODROIDs: H2 H2+ H3+ C4 HC4 M1 M1S N2 SmartPower3
Has thanked: 22 times
Been thanked: 6 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by roarking »

tobetter wrote:
Thu Jan 18, 2024 3:34 pm
..., then it might be required to run update-grub2 such that it creates /boot/grub.cfg which will be loaded by Petitboot.
Using my custom Debian install script, I did identical installs for Debian 10 (buster) and 11 (bullseye) and then compared the file /boot/grub/grub.cfg. The result is that each GRUB menuentry contains the following two lines in buster but they are missing in bullseye:

Code: Select all

 	echo	'Loading device tree blob...'
 	devicetree	/dtb-6.1.0-odroid-arm64
A screenshot of meld shows the position of the lines in each menuentry in green colour:

Image

If I manually add the missing lines and reboot Debian 11 (bullseye), Petitboot shows the menuentry for each kernel correctly and serial console also works for boot messages and login prompt without the need to change any other configuration file.

What needs to be changed to make Debian 11 (bullseye) behave like Debian 10 (buster) and include these lines automatically when /boot/grub/grub.cfg is generated?

User avatar
tobetter
Posts: 12975
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 983 times
Been thanked: 2249 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by tobetter »

roarking wrote:
Fri Jan 19, 2024 12:22 pm
What needs to be changed to make Debian 11 (bullseye) behave like Debian 10 (buster) and include these lines automatically when /boot/grub/grub.cfg is generated?
Not sure as of now, please let me know what's the output of dpkg -l | grep grub in your Bullseye. Also apt policy grub-common?

roarking
Posts: 30
Joined: Thu Jan 30, 2020 11:57 am
languages_spoken: english
ODROIDs: H2 H2+ H3+ C4 HC4 M1 M1S N2 SmartPower3
Has thanked: 22 times
Been thanked: 6 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by roarking »

Code: Select all

root@hc4bullseye:~# dpkg -l | grep grub
ii  grub-common                    2.06-3~deb11u5                  arm64        GRand Unified Bootloader (common files)
ii  grub2-common                   2.06-3~deb11u5                  arm64        GRand Unified Bootloader (common files for version 2)
ii  odroid-grub2                   5:23.11+202401091153~bullseye   arm64        GRUB2 base package for ODROID with mainline kernel
root@hc4bullseye:~# 

Code: Select all

root@hc4bullseye:~# apt policy grub-common
grub-common:
  Installed: 2.06-3~deb11u5
  Candidate: 2.06-3~deb11u5
  Version table:
 *** 2.06-3~deb11u5 500
        500 http://ftp.de.debian.org/debian bullseye/main arm64 Packages
        100 /var/lib/dpkg/status
root@hc4bullseye:~# 

User avatar
tobetter
Posts: 12975
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 983 times
Been thanked: 2249 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by tobetter »

roarking wrote:
Fri Jan 19, 2024 12:38 pm

Code: Select all

root@hc4bullseye:~# dpkg -l | grep grub
ii  grub-common                    2.06-3~deb11u5                  arm64        GRand Unified Bootloader (common files)
ii  grub2-common                   2.06-3~deb11u5                  arm64        GRand Unified Bootloader (common files for version 2)
ii  odroid-grub2                   5:23.11+202401091153~bullseye   arm64        GRUB2 base package for ODROID with mainline kernel
root@hc4bullseye:~# 

Code: Select all

root@hc4bullseye:~# apt policy grub-common
grub-common:
  Installed: 2.06-3~deb11u5
  Candidate: 2.06-3~deb11u5
  Version table:
 *** 2.06-3~deb11u5 500
        500 http://ftp.de.debian.org/debian bullseye/main arm64 Packages
        100 /var/lib/dpkg/status
root@hc4bullseye:~# 
Thanks...hmm....
Can you please do run the same command on your Buster, please?
I am looking into the source code of Grub and seeing that I don't see any difference that cause missing "Loading device tree" in between the branch for Buster and Bullseye.

roarking
Posts: 30
Joined: Thu Jan 30, 2020 11:57 am
languages_spoken: english
ODROIDs: H2 H2+ H3+ C4 HC4 M1 M1S N2 SmartPower3
Has thanked: 22 times
Been thanked: 6 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by roarking »

Code: Select all

root@hc4buster:~# dpkg -l | grep grub
ii  grub-common                    5:2.04-1ubuntu46+202108012125~buster arm64        GRand Unified Bootloader (common files)
ii  grub2-common                   5:2.04-1ubuntu46+202108012125~buster arm64        GRand Unified Bootloader (common files for version 2)
ii  odroid-grub2                   5:23.11+202401091153~buster          arm64        GRUB2 base package for ODROID with mainline kernel
root@hc4buster:~# 

Code: Select all

root@hc4buster:~# apt policy grub-common
grub-common:
  Installed: 5:2.04-1ubuntu46+202108012125~buster
  Candidate: 5:2.04-1ubuntu46+202108012125~buster
  Version table:
 *** 5:2.04-1ubuntu46+202108012125~buster 500
        500 http://ppa.linuxfactory.or.kr buster/main arm64 Packages
        100 /var/lib/dpkg/status
     2.06-3~deb10u1 500
        500 http://ftp.de.debian.org/debian buster/main arm64 Packages
root@hc4buster:~#

User avatar
tobetter
Posts: 12975
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 983 times
Been thanked: 2249 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by tobetter »

roarking wrote:
Fri Jan 19, 2024 1:07 pm

Code: Select all

root@hc4buster:~# dpkg -l | grep grub
ii  grub-common                    5:2.04-1ubuntu46+202108012125~buster arm64        GRand Unified Bootloader (common files)
ii  grub2-common                   5:2.04-1ubuntu46+202108012125~buster arm64        GRand Unified Bootloader (common files for version 2)
ii  odroid-grub2                   5:23.11+202401091153~buster          arm64        GRUB2 base package for ODROID with mainline kernel
root@hc4buster:~# 

Code: Select all

root@hc4buster:~# apt policy grub-common
grub-common:
  Installed: 5:2.04-1ubuntu46+202108012125~buster
  Candidate: 5:2.04-1ubuntu46+202108012125~buster
  Version table:
 *** 5:2.04-1ubuntu46+202108012125~buster 500
        500 http://ppa.linuxfactory.or.kr buster/main arm64 Packages
        100 /var/lib/dpkg/status
     2.06-3~deb10u1 500
        500 http://ftp.de.debian.org/debian buster/main arm64 Packages
root@hc4buster:~#
Ah...I see...Thank you. I think I know why and I can try to fix the issue of it.
Please let me have a day to fix it.

Out of curiosity, why do you need many boot entries for different OS distros?

roarking
Posts: 30
Joined: Thu Jan 30, 2020 11:57 am
languages_spoken: english
ODROIDs: H2 H2+ H3+ C4 HC4 M1 M1S N2 SmartPower3
Has thanked: 22 times
Been thanked: 6 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by roarking »

tobetter wrote:
Fri Jan 19, 2024 1:26 pm
Ah...I see...Thank you. I think I know why and I can try to fix the issue of it.
Please let me have a day to fix it.
Thank you! I look forward to a solution that supports boot menu and serial console on Debian bullseye 8-)
tobetter wrote:
Fri Jan 19, 2024 1:26 pm
Out of curiosity, why do you need many boot entries for different OS distros?
I have two HC4 in productive use with Debian bullseye that so far do not have serial console support. While improving my custom Debian install script and running a buster test install on a third HC4, I noticed that the serial console suddenly came alive. So I started to investigate what causes the difference.

In general I will not need multiple boot entries for different OS distros, but I want my install script to be compatible with different Debian releases and PC and C4/HC4 alike. And it is useful if the Petitboot/GRUB menu lists all kernel versions installed and to be able to select one.
These users thanked the author roarking for the post:
tobetter (Fri Jan 19, 2024 1:49 pm)

User avatar
tobetter
Posts: 12975
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 983 times
Been thanked: 2249 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by tobetter »

roarking wrote:
Fri Jan 19, 2024 1:43 pm
tobetter wrote:
Fri Jan 19, 2024 1:26 pm
Ah...I see...Thank you. I think I know why and I can try to fix the issue of it.
Please let me have a day to fix it.
Thank you! I look forward to a solution that supports boot menu and serial console on Debian bullseye 8-)
New package for grub are uploaded, you would need to update and test if it works with Petitboot after building by your script. The packages installed would be the version like this or later, the version number must be started with 5:, this will add device tree lines to /boot/grub/grub.cfg.

Code: Select all

$ dpkg -l | grep grub
ii  grub-common                      5:2.06-2ubuntu7+202401192331~bullseye arm64        GRand Unified Bootloader (common files)
ii  grub2-common                     5:2.06-2ubuntu7+202401192331~bullseye arm64        GRand Unified Bootloader (common files for version 2)
ii  odroid-grub2                     5:23.11+202401091153~bullseye         arm64        GRUB2 base package for ODROID with mainline kernel
These users thanked the author tobetter for the post (total 2):
odroid (Sat Jan 20, 2024 10:27 pm) • roarking (Sat Jan 20, 2024 10:45 pm)

roarking
Posts: 30
Joined: Thu Jan 30, 2020 11:57 am
languages_spoken: english
ODROIDs: H2 H2+ H3+ C4 HC4 M1 M1S N2 SmartPower3
Has thanked: 22 times
Been thanked: 6 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by roarking »

tobetter wrote:
Sat Jan 20, 2024 1:02 am
New package for grub are uploaded, you would need to update and test if it works with Petitboot after building by your script. The packages installed would be the version like this or later, the version number must be started with 5:, this will add device tree lines to /boot/grub/grub.cfg.
Success! Thank you for uploading the new package. Debian 11 (bullseye) now supports Petitboot menu and serial console for boot messages and login in the same way as Debian 10 (buster). I appreciate your excellent support!

Do you currently recommend kernel 6.1 or 6.2?

Code: Select all

Petitboot (dev.20220317)                                 Hardkernel ODROID-HC4
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
  [Disk: sda1 / c7ecc64d-617c-4a2f-8f9a-3d6b41871aee]        
 *  Debian GNU/Linux 11 (bullseye)                           
    GNU/Linux, with Linux 6.1.0-odroid-arm64 (recovery mode) 
    GNU/Linux, with Linux 6.1.0-odroid-arm64                 
    GNU/Linux, with Linux 6.2.0-odroid-arm64 (recovery mode) 
    GNU/Linux, with Linux 6.2.0-odroid-arm64                 
    GNU/Linux

  System information
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
 Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help

Code: Select all

...
[  OK  ] Finished Permit User Sessions.
         Starting Hold until boot process finishes up...
         Starting Terminate Plymouth Boot Screen...
[  OK  ] Started Network Time Service.
[  OK  ] Started uptime record daemon.

Debian GNU/Linux 11 hc4bullseye ttyAML0

hc4bullseye login: 

Code: Select all

root@hc4bullseye:~# cat /boot/grub/grub.cfg | grep dtb
	devicetree	/dtb-6.2.0-odroid-arm64
		devicetree	/dtb-6.2.0-odroid-arm64
		devicetree	/dtb-6.2.0-odroid-arm64
		devicetree	/dtb-6.1.0-odroid-arm64
		devicetree	/dtb-6.1.0-odroid-arm64
root@hc4bullseye:~# 

User avatar
tobetter
Posts: 12975
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 983 times
Been thanked: 2249 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by tobetter »

roarking wrote:
Sat Jan 20, 2024 10:57 pm
tobetter wrote:
Sat Jan 20, 2024 1:02 am
New package for grub are uploaded, you would need to update and test if it works with Petitboot after building by your script. The packages installed would be the version like this or later, the version number must be started with 5:, this will add device tree lines to /boot/grub/grub.cfg.
Success! Thank you for uploading the new package. Debian 11 (bullseye) now supports Petitboot menu and serial console for boot messages and login in the same way as Debian 10 (buster). I appreciate your excellent support!

Do you currently recommend kernel 6.1 or 6.2?

Code: Select all

Petitboot (dev.20220317)                                 Hardkernel ODROID-HC4
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
  [Disk: sda1 / c7ecc64d-617c-4a2f-8f9a-3d6b41871aee]        
 *  Debian GNU/Linux 11 (bullseye)                           
    GNU/Linux, with Linux 6.1.0-odroid-arm64 (recovery mode) 
    GNU/Linux, with Linux 6.1.0-odroid-arm64                 
    GNU/Linux, with Linux 6.2.0-odroid-arm64 (recovery mode) 
    GNU/Linux, with Linux 6.2.0-odroid-arm64                 
    GNU/Linux

  System information
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
 Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help

Code: Select all

...
[  OK  ] Finished Permit User Sessions.
         Starting Hold until boot process finishes up...
         Starting Terminate Plymouth Boot Screen...
[  OK  ] Started Network Time Service.
[  OK  ] Started uptime record daemon.

Debian GNU/Linux 11 hc4bullseye ttyAML0

hc4bullseye login: 

Code: Select all

root@hc4bullseye:~# cat /boot/grub/grub.cfg | grep dtb
	devicetree	/dtb-6.2.0-odroid-arm64
		devicetree	/dtb-6.2.0-odroid-arm64
		devicetree	/dtb-6.2.0-odroid-arm64
		devicetree	/dtb-6.1.0-odroid-arm64
		devicetree	/dtb-6.1.0-odroid-arm64
root@hc4bullseye:~# 
If your packages are updated from my package server ppa.linuxfactory.or.kr, LInux kernel v6.1 is good since v6.2 is not being updated.
These users thanked the author tobetter for the post:
roarking (Sun Jan 21, 2024 12:02 am)

roarking
Posts: 30
Joined: Thu Jan 30, 2020 11:57 am
languages_spoken: english
ODROIDs: H2 H2+ H3+ C4 HC4 M1 M1S N2 SmartPower3
Has thanked: 22 times
Been thanked: 6 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by roarking »

tobetter wrote:
Sat Jan 20, 2024 11:53 pm
..., LInux kernel v6.1 is good since v6.2 is not being updated.
Two kernels are installed: 6.1.0-odroid and 6.2.0-odroid. I tried to select a default kernel by setting GRUB_DEFAULT, followed by calling update-grub. So far no success. Always kernel 6.2 is booted, unless I select 6.1 in the Petitboot menu manually. Does Petitboot support GRUB_DEFAULT at all?

Edit: I just learned about /boot/boot.scr in viewtopic.php?p=348693#p348693 and that it creates the first menu entry "Debian GNU/Linux 11 (bullseye)". If I select this one, I do not get any output on the serial console.

Code: Select all

Petitboot (dev.20220317)                                 Hardkernel ODROID-HC4
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
  [Disk: sda1 / 2545d3c6-62dd-4ed5-87d1-dc6e7e145361]        
 *  Debian GNU/Linux 11 (bullseye)                           
    GNU/Linux, with Linux 6.1.0-odroid-arm64 (recovery mode)
    GNU/Linux, with Linux 6.1.0-odroid-arm64
    GNU/Linux, with Linux 6.2.0-odroid-arm64 (recovery mode)
    GNU/Linux, with Linux 6.2.0-odroid-arm64
    GNU/Linux

  System information
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
 Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help
 Performing kexec reboot

Code: Select all

root@hc4bullseye:~# cat /etc/default/grub
GRUB_CMDLINE_LINUX="net.ifnames=0"
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_TERMINAL="console"
GRUB_DEFAULT="GNU/Linux, with Linux 6.1.0-odroid-arm64"
root@hc4bullseye:~# 

Code: Select all

root@hc4bullseye:~# cat /boot/grub/grub.cfg | grep default
# from /etc/grub.d and settings from /etc/default/grub
   set default="${next_entry}"
   set default="GNU/Linux, with Linux 6.1.0-odroid-arm64"
function savedefault {
          set prev_entry="${default}"
if [ "x$default" = 'GNU/Linux, with Linux 6.1.0-odroid-arm64' ]; then default='Advanced options for GNU/Linux>GNU/Linux, with Linux 6.1.0-odroid-arm64'; fi;
root@hc4bullseye:~# 

Code: Select all

root@hc4bullseye:~# head -n 36  /boot/boot.scr
'V��`�e�]�3��boot scriptz
#
# flash-kernel: bootscr.odroid-g12
#

# Bootscript using the new unified bootcmd handling
#
# Expects to be called with the following environment variables set:
#
#  devtype              e.g. mmc/scsi etc
#  devnum               The device number of the given type
#  bootpart             The partition containing the boot files
#  distro_bootpart      The partition containing the boot files
#                       (introduced in u-boot mainline 2016.01)
#  prefix               Prefix within the boot partiion to the boot files
#  kernel_addr_r        Address to load the kernel to
#  fdt_addr_r           Address to load the FDT to
#  ramdisk_addr_r       Address to load the initrd to.
#
# The uboot must support the booti and generic filesystem load commands.

setenv bootargs " ${bootargs} quiet"
setenv overlay_resize 8192

setenv bootlabel "Debian GNU/Linux 11 (bullseye)"

# Default serial console
# setenv console "ttyAML0,115200n8"

# Default TTY console
setenv bootargs "${bootargs} console=tty1"
setenv fdt_addr_r "0x20000000"
setenv bootargs "${bootargs} cma=800M"
setenv bootargs "${bootargs} clk_ignore_unused"
setenv bootargs "${bootargs} fsck.mode=force fsck.repair=yes"

root@hc4bullseye:~# 

User avatar
tobetter
Posts: 12975
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 983 times
Been thanked: 2249 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by tobetter »

roarking wrote:
Sun Jan 21, 2024 3:52 am
tobetter wrote:
Sat Jan 20, 2024 11:53 pm
..., LInux kernel v6.1 is good since v6.2 is not being updated.
Two kernels are installed: 6.1.0-odroid and 6.2.0-odroid. I tried to select a default kernel by setting GRUB_DEFAULT, followed by calling update-grub. So far no success. Always kernel 6.2 is booted, unless I select 6.1 in the Petitboot menu manually. Does Petitboot support GRUB_DEFAULT at all?
As you noted below, the first boot entry comes from /boot/boot.scr and it's independent boot script to GRUB. The contents in the file are composed by several files in /etc/default/flash-kernel and /usr/share/flash-kernel/ubootenv.d/*.
Edit: I just learned about /boot/boot.scr in viewtopic.php?p=348693#p348693 and that it creates the first menu entry "Debian GNU/Linux 11 (bullseye)". If I select this one, I do not get any output on the serial console.
In order to enable boot kernel message, you must remove quiet from the line start with LINUX_KERNEL_CMDLINE in /etc/default/flash-kernel and run sudo update-bootscript before rebooting.

roarking
Posts: 30
Joined: Thu Jan 30, 2020 11:57 am
languages_spoken: english
ODROIDs: H2 H2+ H3+ C4 HC4 M1 M1S N2 SmartPower3
Has thanked: 22 times
Been thanked: 6 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by roarking »

tobetter wrote:
Sun Jan 21, 2024 12:08 pm
In order to enable boot kernel message, you must remove quiet from the line start with LINUX_KERNEL_CMDLINE in /etc/default/flash-kernel and run sudo update-bootscript before rebooting.
I have now installed the maintained kernel linux-image-6.1.0-odroid-arm64 only.

In /etc/default/flash-kernel I removed quiet from LINUX_KERNEL_CMDLINE and ran sudo update-bootscript. After that:

1) A fully automatic boot without any user intervention in the Petitboot menu results in a working serial console..
2) Manually selecting Petitboot's first menu entry Debian GNU/Linux 11 (bullseye) results in an inactive serial console.
3) Manually selecting one of the entrys that Petitboot reads from /boot/grub/grub.cfg results in a working serial console.

Code: Select all

root@hc4bullseye:~# cat /etc/default/flash-kernel
LINUX_KERNEL_CMDLINE="quiet"
LINUX_KERNEL_CMDLINE_DEFAULTS=""
root@hc4bullseye:~# nano /etc/default/flash-kernel
root@hc4bullseye:~# cat /etc/default/flash-kernel
LINUX_KERNEL_CMDLINE=""
LINUX_KERNEL_CMDLINE_DEFAULTS=""
root@hc4bullseye:~# update-bootscript
Generating boot script u-boot image... done.
Taking backup of boot.scr.
Installing new boot.scr.
root@hc4bullseye:~#

Code: Select all

Petitboot (dev.20220317)                                 Hardkernel ODROID-HC4
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
  [Disk: sda1 / 5ce690ee-9e0b-437c-b694-54e94c736215]        
 *  Debian GNU/Linux 11 (bullseye)                           
    GNU/Linux, with Linux 6.1.0-odroid-arm64 (recovery mode)
    GNU/Linux, with Linux 6.1.0-odroid-arm64
    GNU/Linux

  System information
  System configuration
  System status log
 qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqq
 Enter=accept, e=edit, n=new, x=exit, l=language, g=log, h=help

User avatar
tobetter
Posts: 12975
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 983 times
Been thanked: 2249 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by tobetter »

roarking wrote:
Sun Jan 21, 2024 4:02 pm
1) A fully automatic boot without any user intervention in the Petitboot menu results in a working serial console..
This is not an issue at all, right?
2) Manually selecting Petitboot's first menu entry Debian GNU/Linux 11 (bullseye) results in an inactive serial console.
What's the output of cat /proc/cmdline when you do not have serial console output?

roarking
Posts: 30
Joined: Thu Jan 30, 2020 11:57 am
languages_spoken: english
ODROIDs: H2 H2+ H3+ C4 HC4 M1 M1S N2 SmartPower3
Has thanked: 22 times
Been thanked: 6 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by roarking »

tobetter wrote:
Sun Jan 21, 2024 4:29 pm
This is not an issue at all, right?
Not an issue at all. I am very happy when the serial console is working! 8-)
tobetter wrote:
Sun Jan 21, 2024 4:29 pm
What's the output of cat /proc/cmdline when you do not have serial console output?
1) Automatic boot - Serial console is working for boot message and login prompt.

Code: Select all

root@hc4bullseye:~# cat /proc/cmdline
root=/dev/mapper/vgx-root ro net.ifnames=0 
root@hc4bullseye:~# 
2) Manually select first Petitboot menuentry "Debian GNU/Linux 11 (bullseye)" - Serial console is inactive.

Code: Select all

root@hc4bullseye:~# cat /proc/cmdline
quiet console=tty1 cma=800M clk_ignore_unused fsck.mode=force fsck.repair=yes console=ttyS0,115200n8 
root@hc4bullseye:~# 
3) Manually select other Petitboot menuentrIes that are read from /boot/grub/grub.cfg - Serial console is working fine for boot message and login prompt.

Code: Select all

root@hc4bullseye:~# cat /proc/cmdline
root=/dev/mapper/vgx-root ro net.ifnames=0 
root@hc4bullseye:~# 

User avatar
tobetter
Posts: 12975
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 983 times
Been thanked: 2249 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by tobetter »

roarking wrote:
Sun Jan 21, 2024 5:05 pm
2) Manually select first Petitboot menuentry "Debian GNU/Linux 11 (bullseye)" - Serial console is inactive.

Code: Select all

root@hc4bullseye:~# cat /proc/cmdline
quiet console=tty1 cma=800M clk_ignore_unused fsck.mode=force fsck.repair=yes console=ttyS0,115200n8 
root@hc4bullseye:~# 
You have quiet in the command line.

roarking
Posts: 30
Joined: Thu Jan 30, 2020 11:57 am
languages_spoken: english
ODROIDs: H2 H2+ H3+ C4 HC4 M1 M1S N2 SmartPower3
Has thanked: 22 times
Been thanked: 6 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by roarking »

tobetter wrote:
Sun Jan 21, 2024 7:56 pm
You have quiet in the command line.
I am trying to understand how update-bootscript generates /boot/boot.scr: Some of the parameters originate from /usr/share/flash-kernel/ubootenv.d/upstream/90-misc, but I was unable to find the origin of quiet and console=tty1. My /etc/default/grub does not contain them:

Code: Select all

root@hc4buster:~# cat /proc/cmdline
quiet console=tty1 cma=800M clk_ignore_unused fsck.mode=force fsck.repair=yes console=ttyS0,115200n8 
root@hc4buster:~# 

Code: Select all

root@hc4buster:~# cat /usr/share/flash-kernel/ubootenv.d/upstream/90-misc
setenv bootargs "${bootargs} cma=800M"
setenv bootargs "${bootargs} clk_ignore_unused"
setenv bootargs "${bootargs} fsck.mode=force fsck.repair=yes"
root@hc4buster:~# 

Code: Select all

root@hc4buster:~# cat /etc/default/grub
GRUB_CMDLINE_LINUX="net.ifnames=0"
GRUB_CMDLINE_LINUX_DEFAULT=""
GRUB_TERMINAL="console"
root@hc4buster:~# 

User avatar
tobetter
Posts: 12975
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 983 times
Been thanked: 2249 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by tobetter »

roarking wrote:
Mon Jan 22, 2024 1:49 am
tobetter wrote:
Sun Jan 21, 2024 7:56 pm
You have quiet in the command line.
I am trying to understand how update-bootscript generates /boot/boot.scr: Some of the parameters originate from /usr/share/flash-kernel/ubootenv.d/upstream/90-misc, but I was unable to find the origin of quiet and console=tty1. My /etc/default/grub does not contain them:
Not in /etc/default/flash-kernel?

roarking
Posts: 30
Joined: Thu Jan 30, 2020 11:57 am
languages_spoken: english
ODROIDs: H2 H2+ H3+ C4 HC4 M1 M1S N2 SmartPower3
Has thanked: 22 times
Been thanked: 6 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by roarking »

tobetter wrote:
Mon Jan 22, 2024 1:57 am
Not in /etc/default/flash-kernel?
Thanks, I find quiet in /etc/default/flash-kernel. Where does console=tty1 originate from?

Code: Select all

root@hc4buster:~# cat /etc/default/flash-kernel
LINUX_KERNEL_CMDLINE="quiet"
LINUX_KERNEL_CMDLINE_DEFAULTS=""
root@hc4buster:~# 

User avatar
tobetter
Posts: 12975
Joined: Mon Feb 25, 2013 10:55 am
languages_spoken: Korean, English
ODROIDs: Many
Location: Paju, South Korea
Has thanked: 983 times
Been thanked: 2249 times
Contact:

Re: ODROID-C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does n

Post by tobetter »

roarking wrote:
Mon Jan 22, 2024 2:01 am
tobetter wrote:
Mon Jan 22, 2024 1:57 am
Not in /etc/default/flash-kernel?
Thanks, I find quiet in /etc/default/flash-kernel. Where does console=tty1 originate from?

Code: Select all

root@hc4buster:~# cat /etc/default/flash-kernel
LINUX_KERNEL_CMDLINE="quiet"
LINUX_KERNEL_CMDLINE_DEFAULTS=""
root@hc4buster:~# 
viewtopic.php?p=380967#p380967
These users thanked the author tobetter for the post:
roarking (Mon Jan 22, 2024 2:19 am)

roarking
Posts: 30
Joined: Thu Jan 30, 2020 11:57 am
languages_spoken: english
ODROIDs: H2 H2+ H3+ C4 HC4 M1 M1S N2 SmartPower3
Has thanked: 22 times
Been thanked: 6 times
Contact:

Re: [SOLVED] C4/HC4: Debian 10 (buster) supports serial console and Petitboot kernel list, but Debian 11 (bullseye) does

Post by roarking »

Thanks. I found it in /usr/share/flash-kernel/ubootenv.d/10-console.

Post Reply

Return to “Other OS”

Who is online

Users browsing this forum: No registered users and 1 guest