[alpha] Android 13 for Odroid C4 with mainline kernel 5.15

Post Reply
User avatar
joerg
Posts: 1759
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 158 times
Been thanked: 344 times
Contact:

[alpha] Android 13 for Odroid C4 with mainline kernel 5.15

Post by joerg »

The first release of my Android build:
https://www.dropbox.com/s/zw01i8copmqt3 ... ar.gz?dl=0

It's a first version and it remains a lot of work to make it more complete and eliminate some errors.

At init process of Android the userdata partition will resize to maximum free space. On my 16GB emmc I have >12GB free space.

Works:
- audio over hdmi, over s/pdif, over usb, over bluetooth
- gpiomem and wiringPi
- logo is shown, but only for some seconds
- wifi dongle rtl8192eu based
- rooting with Magisk, but version 24.x, not 25.x

Doesn't work, or wip:
- devicetree overlays
- wifi dongles rtl8811au, rtl8188eu based, like Odroid or Edimax, and others maybe...
- gps
- spi, pwm, onewire

A lot of things are not tested:
- google apps
- video
- etc
.
Screenshot_20230129-145448.png
Screenshot_20230129-145448.png (102.55 KiB) Viewed 173 times
Last edited by joerg on Mon Jan 30, 2023 5:38 am, edited 2 times in total.
These users thanked the author joerg for the post (total 2):
odroid (Tue Jan 17, 2023 9:24 am) • voodik (Thu Jan 19, 2023 7:33 pm)

User avatar
joerg
Posts: 1759
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 158 times
Been thanked: 344 times
Contact:

Re: First impression of Android 13 with mainline kernel 5.15

Post by joerg »

HowTo Section

Install to emmc card (only!):
Be sure which device is your emmc card!

Code: Select all

#dd if=Android13-20230129-odroidc4.img of=/dev/sdX bs=1M
#sync
Or use other flashing tool.

Install Magisk:
https://github.com/topjohnwu/Magisk/rel ... -v24.3.apk

Code: Select all

adb shell
#su
#dd if=/dev/block/by-name/boot of=boot.img 
//In Magisk Manager use patch file method...
#dd if=magisk_patched-24300_xxxx.img of=/dev/block/by-name/boot
#reboot
Last edited by joerg on Mon Jan 30, 2023 12:21 am, edited 1 time in total.

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

Re: First impression of Android 13 with mainline kernel 5.15

Post by odroid »

Nice to meet UpsideDownCake on a modern Kernel 5.15 :D

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

Re: First impression of Android 13 with mainline kernel 5.15

Post by rooted »

Your work never ceases to amaze me.

User avatar
voodik
Posts: 2355
Joined: Sat Dec 07, 2013 2:36 am
languages_spoken: armenian, english, russian
Location: Armenia
Has thanked: 78 times
Been thanked: 587 times
Contact:

Re: First impression of Android 13 with mainline kernel 5.15

Post by voodik »

Great!
Can i know which mali, gralloc and hwcomposer modules you use ?
Buy me a beer ;)
https://www.paypal.me/voodikjan
BTC: 377wXjEr3QsDDzRqfMco3a41wicrsv3Sfs
--------------------------------------------------------
dump logs
(dmesg; logcat -d; lsusb) | curl -F 'f:1=<-' ix.io
--------------------------------------------------------
ADB enhanced PuTTY :!:
https://github.com/voodik/puttyadb/releases

User avatar
joerg
Posts: 1759
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 158 times
Been thanked: 344 times
Contact:

Re: First impression of Android 13 with mainline kernel 5.15

Post by joerg »

Hello voodik, I used the configuration from https://source.android.com/docs/setup/c ... m3l_boards, specially from VIM3L as this board has the same cpu architecture meson-sm1.
BTW. a lot is not working yet. I am searching for USB Bluetooth solution. Android 13 has now Gabeldorsche as Bluetooth stack and it lacks of well documentation...
More things are not working:
MTP device, USB configuration wrong
HDMI-CEC, does bootloop when is included in image.
HDMI or S/PDIF audio does not work, but USB audio yes

I was wondering that the graphics stack is working out of the box:
Gralloc is delivered with the yukawa device repo: device/amlogic/yukawa/hal/gralloc.
Midgard Mali is from kernel source: drivers/gpu/arm/midgard
Kernel sources are cloned from: git clone https://android.googlesource.com/kernel/hikey-linaro -b android-amlogic-bmeson-5.15 with the meson_defconfig and the meson-sm1-odroid-c4.dtb.
Hwcomposer is delivered with android sources in: external/drm_hwcomposer and added as hwcomposer.drm_meson
These users thanked the author joerg for the post:
odroid (Fri Jan 20, 2023 9:32 am)

User avatar
joerg
Posts: 1759
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 158 times
Been thanked: 344 times
Contact:

Re: First impression of Android 13 with mainline kernel 5.15

Post by joerg »

I made a step forward with Bluetooth. I copied the firmware of my Asus dongle, rtl8761 based, to wrong folder. Now I can enable the Bluetooth and I can find my JBL headphones, can pair, but no sound. :(
And I have this: servicemanager: Could not find android.hardware.bluetooth.IBluetoothHci/default in the VINTF manifest.. I tried already to add it to manifest.xml...

[edit]
It works! I had to pair the JBL LIVE460NC with headphone symbol, not the JBL LIVE460NC-LE LowEnergy!

User avatar
joerg
Posts: 1759
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 158 times
Been thanked: 344 times
Contact:

Re: First impression of Android 13 with mainline kernel 5.15

Post by joerg »

Now the MTP file access over the otg port is working. :)
It was a wrong symlink in the Android sources in system/core/rootdir/init.usb.configfs.rc
Must be:
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
But was:
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
As the old form is not any more present in modern kernel. There is missing f_mtd.c and config CONFIG_USB_CONFIGFS_F_MTP
I also changed the vid pid to Nexus/Pixel. After reboot my LinuxMint didn't mount the odroid-c4 and I had to change the udev rules in 51-android.rules for it to:

Code: Select all

ATTR{idProduct}=="4ee1", ENV{adb_adbfast}="yes", SYMLINK+="libmtp-%k"
ATTR{idProduct}=="4ee2", ENV{adb_adbfast}="yes", SYMLINK+="libmtp-%k"
I have searched too much time for all this. :(
Now I would like to make some install makefile to generate the GPT partition table, flash the meson mainline u-boot and all the other images as boot.img, super.img etc directly to emmc.

User avatar
voodik
Posts: 2355
Joined: Sat Dec 07, 2013 2:36 am
languages_spoken: armenian, english, russian
Location: Armenia
Has thanked: 78 times
Been thanked: 587 times
Contact:

Re: First impression of Android 13 with mainline kernel 5.15

Post by voodik »

joerg wrote:
Sun Jan 22, 2023 12:59 am
Now the MTP file access over the otg port is working. :)
It was a wrong symlink in the Android sources in system/core/rootdir/init.usb.configfs.rc
Must be:
symlink /config/usb_gadget/g1/functions/ffs.mtp /config/usb_gadget/g1/configs/b.1/f1
But was:
symlink /config/usb_gadget/g1/functions/mtp.gs0 /config/usb_gadget/g1/configs/b.1/f1
As the old form is not any more present in modern kernel. There is missing f_mtd.c and config CONFIG_USB_CONFIGFS_F_MTP
I also changed the vid pid to Nexus/Pixel. After reboot my LinuxMint didn't mount the odroid-c4 and I had to change the udev rules in 51-android.rules for it to:

Code: Select all

ATTR{idProduct}=="4ee1", ENV{adb_adbfast}="yes", SYMLINK+="libmtp-%k"
ATTR{idProduct}=="4ee2", ENV{adb_adbfast}="yes", SYMLINK+="libmtp-%k"
I have searched too much time for all this. :(
Now I would like to make some install makefile to generate the GPT partition table, flash the meson mainline u-boot and all the other images as boot.img, super.img etc directly to emmc.
What about video hw decode/encode ?
I working on almost same for N2, but for now just hdmi output is working ))) no audio, no decoders etc)
n2-5.10.png
n2-5.10.png (73.85 KiB) Viewed 355 times
Buy me a beer ;)
https://www.paypal.me/voodikjan
BTC: 377wXjEr3QsDDzRqfMco3a41wicrsv3Sfs
--------------------------------------------------------
dump logs
(dmesg; logcat -d; lsusb) | curl -F 'f:1=<-' ix.io
--------------------------------------------------------
ADB enhanced PuTTY :!:
https://github.com/voodik/puttyadb/releases

User avatar
joerg
Posts: 1759
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 158 times
Been thanked: 344 times
Contact:

Re: First impression of Android 13 with mainline kernel 5.15

Post by joerg »

As always I appreciate your work.
I never came in touch with video hw decode/encode. Pls tell me what and how I need to test for it?

User avatar
voodik
Posts: 2355
Joined: Sat Dec 07, 2013 2:36 am
languages_spoken: armenian, english, russian
Location: Armenia
Has thanked: 78 times
Been thanked: 587 times
Contact:

Re: First impression of Android 13 with mainline kernel 5.15

Post by voodik »

joerg wrote:
Sun Jan 22, 2023 7:51 am
As always I appreciate your work.
I never came in touch with video hw decode/encode. Pls tell me what and how I need to test for it?
Nothing))
Only software decoders/encoders are listed ;)
https://android.googlesource.com/device ... codecs.xml
Buy me a beer ;)
https://www.paypal.me/voodikjan
BTC: 377wXjEr3QsDDzRqfMco3a41wicrsv3Sfs
--------------------------------------------------------
dump logs
(dmesg; logcat -d; lsusb) | curl -F 'f:1=<-' ix.io
--------------------------------------------------------
ADB enhanced PuTTY :!:
https://github.com/voodik/puttyadb/releases

User avatar
joerg
Posts: 1759
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 158 times
Been thanked: 344 times
Contact:

Re: First impression of Android 13 with mainline kernel 5.15

Post by joerg »

I found the right setting for getting hdmi audio working! :)
Mixer paths have been wrong, must be (mixer_paths_hdmi_only.xml):

Code: Select all

<?xml version="1.0" encoding="ISO-8859-1"?>
<mixer>
	<!-- FIXME: This should be moved to the appropriate path -->

	<!-- Enable HDMITX Control from TDM A -->
	<ctl name="TOHDMITX Switch" value="1" />
	<ctl name="TOHDMITX I2S SRC" value="I2S B" />

	<!-- PCM0 to TDMB -->
	<ctl name="TDMOUT_B SRC SEL" value="IN 0" />
	<ctl name="FRDDR_A SINK 1 SEL" value="OUT 1" />
	<ctl name="FRDDR_A SRC 1 EN Switch" value="1" />
</mixer>
ctl name="FRDDR_A SINK 1 SEL" value="OUT 1" and ctl name="TOHDMITX I2S SRC" value="I2S B" did the trick.

Now I am searching solution for S/PDIF out. I need it for my All-In-One PC in living room connected to the Onkyo amplifier.
These users thanked the author joerg for the post:
odroid (Mon Jan 23, 2023 11:36 am)

User avatar
joerg
Posts: 1759
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 158 times
Been thanked: 344 times
Contact:

Re: First impression of Android 13 with mainline kernel 5.15

Post by joerg »

Sound over S/PDIF also working!
I had to patch the device tree to add spdifout node and add this line to mixer paths xml:

Code: Select all

	<ctl name="FRDDR_A SINK 3 SEL" value="OUT 3" />
	<ctl name="FRDDR_A SRC 3 EN Switch" value="1" />
This results in sound output at both hdmi and s/pdif connector.

User avatar
joerg
Posts: 1759
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 158 times
Been thanked: 344 times
Contact:

Re: First impression of Android 13 with mainline kernel 5.15

Post by joerg »

Now I managed also making wiringPi working and using with my app. :)
The libraries can't longer be on vendor partition at /vendor/lib64. They must be on system partition and library name must be added to public.libraries.txt also on system partition.

BTW. I was not yet able to make a functional install script.
The manual installation process is somehow complicated:
-Flash mainline u-boot to emmc.
-Boot up Odroid C4 to fastboot.
-Command fastboot oem format to make the GPT partition table and the 10 partitions.
-For partitions boot, super, cache, recovery, dtbo, userdata, odm command fastboot flash ....
-Primary GPT header resides at the same address range as u-boot. Need to remove the emmc and flash u-boot again.
-Now primary GPT isn't there anymore. U-boot is patched to accept the backup GPT header. :D
-Put emmc again and boot up Android.

My script should do this all, but in the way not to use u-boot with fastboot to make and flash the partitions. Ready to put the emmc to the C4 to boot up.
I can make the partitions and write the images to a loop device. But when I try to flash the emmc with this created whole image and flash afterwards u-boot, u-boot boots up, but the kernel is not found.
If I flash u-boot before to the loop device and flash all to emmc, it does not boot up u-boot.
These users thanked the author joerg for the post:
odroid (Wed Jan 25, 2023 9:37 am)

User avatar
joerg
Posts: 1759
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 158 times
Been thanked: 344 times
Contact:

Re: First impression of Android 13 with mainline kernel 5.15

Post by joerg »

I make progress with my script to flash whole Android image included u-boot to emmc. But I need to figure out, how to resize the userdata partition at first start.
I have some options: Use u-boot, use recovery or use Android init process.
Once I am ready with it, I would like to publish the image, so others could give it a try.
What would be the best and free file host service for this about 1GB image?

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

Re: First impression of Android 13 with mainline kernel 5.15

Post by rooted »

@mdrjr will provide you with the necessary storage I bet, or even Hardkernel
These users thanked the author rooted for the post:
joerg (Sun Jan 29, 2023 6:18 am)

User avatar
joerg
Posts: 1759
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 158 times
Been thanked: 344 times
Contact:

Re: First impression of Android 13 with mainline kernel 5.15

Post by joerg »

I have ready a first image that can be flashed to emmc. If someone like to try it out, stay tuned. Need to upload it to a file host service...

User avatar
voodik
Posts: 2355
Joined: Sat Dec 07, 2013 2:36 am
languages_spoken: armenian, english, russian
Location: Armenia
Has thanked: 78 times
Been thanked: 587 times
Contact:

Re: First impression of Android 13 with mainline kernel 5.15

Post by voodik »

joerg wrote:
Sun Jan 29, 2023 10:30 pm
I have ready a first image that can be flashed to emmc. If someone like to try it out, stay tuned. Need to upload it to a file host service...
Google drive?))
Buy me a beer ;)
https://www.paypal.me/voodikjan
BTC: 377wXjEr3QsDDzRqfMco3a41wicrsv3Sfs
--------------------------------------------------------
dump logs
(dmesg; logcat -d; lsusb) | curl -F 'f:1=<-' ix.io
--------------------------------------------------------
ADB enhanced PuTTY :!:
https://github.com/voodik/puttyadb/releases

User avatar
joerg
Posts: 1759
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 158 times
Been thanked: 344 times
Contact:

Re: [alpha] Android 13 for Odroid C4 with mainline kernel 5.15

Post by joerg »

Dropbox, pls see first post.

User avatar
joerg
Posts: 1759
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 158 times
Been thanked: 344 times
Contact:

Re: [alpha] Android 13 for Odroid C4 with mainline kernel 5.15

Post by joerg »

I have already integrated the driver for VU7 touch devices dwav-usb-mt and it is running ok with my VU7+ with pid 0705. But I have also one with pid 0703. I guess it's an older one. The behavior of this is not ok. I just don't know if it is defective or does it need another driver or another setting in driver code?
@odroid, do you know?

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

Re: [alpha] Android 13 for Odroid C4 with mainline kernel 5.15

Post by odroid »

I've never seen 0703.
According to our wiki pages https://wiki.odroid.com/accessory/displ ... /vu_series

Code: Select all

ODROID-Vu5 : 16B4:0704 (obsolete)
ODROID-Vu5A : 16B4:0705
ODROID-Vu7: 0EEF:0005 (obsolete)
ODROID-Vu7+: 16B4:0705 (obsolete)
ODROID-Vu7A+: 16B4:0705
ODROID-Vu8 : 18D1:4E12 (obsolete)
Therefore, I believe you can forget about 0703. ;)

User avatar
voodik
Posts: 2355
Joined: Sat Dec 07, 2013 2:36 am
languages_spoken: armenian, english, russian
Location: Armenia
Has thanked: 78 times
Been thanked: 587 times
Contact:

Re: [alpha] Android 13 for Odroid C4 with mainline kernel 5.15

Post by voodik »

@joerg

:D :D funny hacks you made with u-boot and gpt)) respect !
As can i understand you modify gpt cmd and "gpt write mmc ${mmcdev} ${partitions}" doesn't write (at least GPT header) to not overwrite u-boot ?

Just for info, if you flash u-boot into emmc hardware partition (mmcblk1boot0) you can have working GPT ;)
Buy me a beer ;)
https://www.paypal.me/voodikjan
BTC: 377wXjEr3QsDDzRqfMco3a41wicrsv3Sfs
--------------------------------------------------------
dump logs
(dmesg; logcat -d; lsusb) | curl -F 'f:1=<-' ix.io
--------------------------------------------------------
ADB enhanced PuTTY :!:
https://github.com/voodik/puttyadb/releases

User avatar
joerg
Posts: 1759
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 158 times
Been thanked: 344 times
Contact:

Re: [alpha] Android 13 for Odroid C4 with mainline kernel 5.15

Post by joerg »

@voodik
I use the mainline meson u-boot and create bin and flash it as it is described there. I use:

Code: Select all

DEV=/dev/sdh
./build-fip.sh odroid-c4 ../u-boot-amlogic/u-boot.bin ../fip_out
dd if=../fip_out/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
dd if=../fip_out/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444
But I found also one mistake in my partition table, already some days ago. I had only 1M offset for first partition, but u-boot bin is 1.7M. This way I destroyed also the first partition logo, flashing u-boot. Now I use 2M offset and everything is well. No need to change something as it works now. ;)

User avatar
voodik
Posts: 2355
Joined: Sat Dec 07, 2013 2:36 am
languages_spoken: armenian, english, russian
Location: Armenia
Has thanked: 78 times
Been thanked: 587 times
Contact:

Re: [alpha] Android 13 for Odroid C4 with mainline kernel 5.15

Post by voodik »

joerg wrote:
Thu Feb 02, 2023 7:18 pm
@voodik
I use the mainline meson u-boot and create bin and flash it as it is described there. I use:

Code: Select all

DEV=/dev/sdh
./build-fip.sh odroid-c4 ../u-boot-amlogic/u-boot.bin ../fip_out
dd if=../fip_out/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=512 skip=1 seek=1
dd if=../fip_out/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444
But I found also one mistake in my partition table, already some days ago. I had only 1M offset for first partition, but u-boot bin is 1.7M. This way I destroyed also the first partition logo, flashing u-boot. Now I use 2M offset and everything is well. No need to change something as it works now. ;)
So you don't made gpt hacks ? Can you show me a branch of u-boot you used ?) I'm working with mainline u-boot on last three days, and finding solution to keep both u-boot and GPT.
Genuine u-boot gpt write command writes GPT header at offset 512 so overwrites u-boot. On your image you don't keep partition table, instead bind partitions via kernel cmdline.
So i want understand is it made by you or i missing some branches ?))

P.S.
We are just doing almost similar work, so i just want to share with you some solutions I made.
Also investigating your work to get other view(maybe better) to same solutions )))

P.S.P.S
Today after lot of debugging found
set in kernel config
CONFIG_REGULATOR_GPIO=y
to fix sd-card port ))
These users thanked the author voodik for the post:
joerg (Thu Feb 02, 2023 9:55 pm)
Buy me a beer ;)
https://www.paypal.me/voodikjan
BTC: 377wXjEr3QsDDzRqfMco3a41wicrsv3Sfs
--------------------------------------------------------
dump logs
(dmesg; logcat -d; lsusb) | curl -F 'f:1=<-' ix.io
--------------------------------------------------------
ADB enhanced PuTTY :!:
https://github.com/voodik/puttyadb/releases

User avatar
joerg
Posts: 1759
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 158 times
Been thanked: 344 times
Contact:

Re: [alpha] Android 13 for Odroid C4 with mainline kernel 5.15

Post by joerg »

Yes I made some hacks!
Mainly that u-boot not fails at verify GPT primary header and for fastboot oem format that u-boot does not write GPT primary header.
Branch is: u-boot-amlogic https://source.denx.de/u-boot/custodian ... logic.git
disk/part_efi.c#write_gpt_table:

Code: Select all

#if !(CONFIG_IS_ENABLED(GPT_ONLY_BACKUP_HEADER))
	/* Write the First GPT to the block right after the Legacy MBR */
	if (blk_dwrite(dev_desc, 1, 1, gpt_h) != 1)
		goto err;

	if (blk_dwrite(dev_desc, le64_to_cpu(gpt_h->partition_entry_lba),
		       pte_blk_cnt, gpt_e) != pte_blk_cnt)
		goto err;
#endif
disk/part_efi.c#gpt_verify_headers:

Code: Select all

#if !(CONFIG_IS_ENABLED(GPT_ONLY_BACKUP_HEADER))
	if (is_gpt_valid(dev_desc,
			 GPT_PRIMARY_PARTITION_TABLE_LBA,
			 gpt_head, gpt_pte) != 1) {
		log_debug("Invalid GPT\n");
		return -1;
	}
#endif
And I made one more config at disk/Kconfig:

Code: Select all

config GPT_ONLY_BACKUP_HEADER
       bool "Enable support of broken primary header"
       depends on EFI_PARTITION
       default n
CONFIG_REGULATOR_GPIO=y
Interesting, I will try that.
These users thanked the author joerg for the post:
voodik (Thu Feb 02, 2023 10:36 pm)

User avatar
joerg
Posts: 1759
Joined: Tue Apr 01, 2014 2:14 am
languages_spoken: german, english, español
ODROIDs: C1, C1+, C2, N1, N2, C4
Location: Germany
Has thanked: 158 times
Been thanked: 344 times
Contact:

Re: [alpha] Android 13 for Odroid C4 with mainline kernel 5.15

Post by joerg »

PS. I added this to bootargs in include/configs/meson64_android.h:

Code: Select all

"setenv bootargs \"$bootargs blkdevparts=mmcblk1:2m@2m(logo),512k(misc),8m(dtbo),512k(vbmeta),32m(boot),48m(recovery),256M(cache),1792m(super),64m(odm),-(userdata) \";"\

Post Reply

Return to “Android”

Who is online

Users browsing this forum: No registered users and 1 guest