Hi guys,
So I need to create a minimal image which is like the minimal-core-image in Yocto build to test the operation of my custom board based on the Firefly px30 board since the pre-built image is not bootable with my custom board. Because I am new to this field so I do not know how to do it. From the answer of the previous problem link I was advice to check the speed of eMMC so I did and it turns out there is not much of a difference between the two eMMC. I also tried to boot with the sd card and nothing changed. So far nothing work so I just want to create an image to boot at minimal initialization to add one device by another to identify which part of the peripherals cause the problem.
I have tried to disable some devices in device tree but it is just not working and hanged at boot. So now I think that I should build an minimal image but even though there are a yocto folder inside the SDK, I have been long deleted so I do not know how to build one with default the kernel, uboot, loader and buildroot file system. So my question is that is there any way I can make a minimal image with the sdk and how to do it.
Please help and thank you in advance
时间的蝴蝶 Posted at 5/5/2022 14:36
Maybe you want to know about this.
https://wiki.t-firefly.com/en/Core-PX30-JD4/buildroot_compile.ht …
Thank you for your answer @时间的蝴蝶
Well I have read the manual very carefully but there is a problem that I need you to verify. That is from what I know the buildroot given in the SDK is actually not building any kernel, uboot, etc but only the rootfs. And the rootfs when boot for the first time it will reset to format partition. I assume that this behavior is a part of the modification of Firefly company to buildroot rootfs. So I just want to know is my assumption correct or the reset is a part of some other element than rootfs. And can you give me a hint where I can find and modify that part in the SDK. I know my question is very vague but I do not know to correctly express it.
tuhn1995 Posted at 5/6/2022 10:26
Thank you for your answer @时间的蝴蝶
Well I have read the manual very carefully but there is a …
Yes, Buildroot just compiles rootfs.
Regarding reset, it boots from the recovery partition and then formats the userdata partition.
The build output of recovery is at buildroot/output/rockchip_px30_recovery, which conforms to the WIKI instructions at https://wiki.t-firefly.com/en/Core-PX30-JD4/buildroot_develop.html.
Sorry I think I miss that part of the Wiki, thank you for pointing that out.
The build output of recovery is at buildroot/output/rockchip_px30_recovery, which conforms to the WIKI instructions at https://wiki.t-firefly.com/en/Co ... root_develop.html.
.
So I guess if I delete the recovery part from the final upgrade img ( by changing the parameter file), the system will not reset and then boot from the recovery partition to format the user data partition, is it correct? And can you explain why it need to do a seccond reset to finally bring the board up?
tuhn1995 Posted at 5/9/2022 10:58
Sorry I think I miss that part of the Wiki, thank you for pointing that out.
.
Yes, removing the recovery and misc partitions from the parameter file can achieve your desired effect.
We need to use the userdata partition, so formatting is necessary. When the system is running, the data will be saved to the userdata partition, which actually provides a function of clearing data to restore the default state of the system.
时间的蝴蝶 Posted at 5/9/2022 14:36
Yes, removing the recovery and misc partitions from the parameter file can achieve your desired ef …
So It means that removing the recover part, I will not use userdata partition anymore and all of the remaining storage will not be partition and can not be used. Is it right? Well I think I will give it a try. Thank you very much for your support. It good to know that Firefly has such a good team. Just one more thing, Is it possible to modify the recovery and misc of the SDK? And if yes, which directory can I do such a thing?
tuhn1995 Posted at 5/10/2022 17:35
So It means that removing the recover part, I will not use userdata partition anymore and all of t …
In fact, it is difficult to describe in a few words. You can try it.
The build output of recovery is at buildroot/output/rockchip_px30_recovery, which conforms to the WIKI instructions at https://wiki.t-firefly.com/en/Co … ldroot_develop.html .
recovery.img → ../buildroot/output/rockchip_px30_recovery/images/recovery.img
For misc, misc.img → ../device/rockchip/rockimg/wipe_all-misc.img
cat device/rockchip/rockimg/wipe_all-misc.img
时间的蝴蝶 Posted at 5/12/2022 10:06
In fact, it is difficult to describe in a few words. You can try it.
The build output of recove …
Thank you for your answer, I will try it .
But there is one more thing that I want to ask is that when the kernel finish loading and the udev started to populate the /dev directory. It takes a lot of time like 40 secs, showing a promt that udevadm fail and then run a thing call ramdom number generator as can be shown below.
[ 5.210832] ALSA device list:
[ 5.214659] #0: rockchip,rk809-codec
[ 5.376868] Freeing unused kernel memory: 1024K
NAME=Buildroot
VERSION=2018.02-rc3-ga31246734b
ID=buildroot
VERSION_ID=2018.02-rc3
PRETTY_NAME="Buildroot 2018.02-rc3"
Starting logging: OK
Populating /dev using udev: [ 33.487770] udevd[160]: starting version 3.2.7
[ 36.790111] udevd[160]: specified group 'kvm' unknown
[ 41.485961] udevd[161]: starting eudev-3.2.7
udevadm settle failed</b>
done
Initializing random number generator... done.
Starting network: cmdline=storagemedia=emmc androidboot.storagemedia=emmc androidboot.mode=normal androidboot.slot_suffix= androidboot.serialno=17c5e6b3cec0121 ro rootwait earlycon=uart8250,mmio32,0xff160000 swiotlb=1 console=ttyFIQ0 root=PARTLABEL=rootfs rootfstype=ext4 overlayroot=device:dev=PARTLABEL=userdata,fstype=ext4,mkfs=1 coherent_pool=1m systemd.gpt_auto=0 cgroup_enable=memory swapaccount=1
read console from cmdline is /dev/ttyFIQ0
Starting recovery on Sat Aug 5 08:47:18 2017
Recovery System have UI defined.
failed to read font: res=-1, fall back to the compiled-in font
[ 350.000655] Freeing drm_logo memory: 1236K
rotate degree: 0 - none, 1 - right, 2 - down, 3 - left.
current rotate degree is : 0
OK
Debug: configfs_init
mkdir: can't create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uac1.gs0': No such file or directory
mkdir: can't create directory '/sys/kernel/config/usb_gadget/rockchip/functions/uac2.gs0': No such file or directory
[ 611.974801] file system registered
mkdir: can't create directory '/sys/kernel/config/usb_gadget/rockchip/functions/mtp.gs0': No such file or directory
mkdir: can't create directory '/sys/kernel/config/usb_gadget/rockchip/functions/rndis.gs0': No such file or directory
[ 622.726941] Mass Storage Function, version: 2009/09/11
[ 622.741869] LUN: removable file: (no medium)
mkdir: can't create directory '/sys/kernel/config/usb_gadget/rockchip/functions/hid.usb0': No such file or directory
[ 649.801816] read descriptors
[ 649.841781] read strings
[ 655.313572] dwc2 ff300000.usb: bound driver configfs-gadget
[ 655.626849] dwc2 ff300000.usb: new device is high-speed
[ 655.734602] dwc2 ff300000.usb: new device is high-speed
[ 655.802028] dwc2 ff300000.usb: new address 29
[ 655.841771] configfs-gadget gadget: high-speed config #1: b
[ 655.904757] android_work: sent uevent USB_STATE=CONNECTED
[ 655.937750] android_work: sent uevent USB_STATE=CONFIGURED
Starting input-event-daemon: input-event-daemon: Start parsing /etc/input-event-daemon.conf...
input-event-daemon: Adding device: /dev/input/event0...
input-event-daemon: Adding device: /dev/input/event1...
input-event-daemon: Start listening on 2 devices...
done
So when the fs is ready, I tried to use ls /dev to see if any device is listed and there are a lot of device there. So why does udevadm fail but there are still device directories in /dev.
I have tried to used another device management method in buildroot menuconfig (dynamic devtmpfs + mdev) but the result is still the same so can you make a guess why populate udev take up such a long time like this.
tuhn1995 Posted at 5/12/2022 16:49
Thank you for your answer, I will try it .
But there is one more thing that I want to ask is th …
$ cat buildroot/output/rockchip_px30_recovery/target/etc/init.d/S10udev
udevadm settle --timeout=30 || echo “udevadm settle failed”
Check which peripheral and udev rule caused the processing timeout.
Since you’re working with Yocto for a minimal image on the Firefly PX30, here are a few steps that might help get things rolling.
If you still have access to the Yocto SDK (or can re-download it), you can set up a minimal image by using core-image-minimal as a starting point, which is really lightweight and great for troubleshooting hardware issues. To do this, you’ll need to reconfigure the build environment.
First, reinstall the Yocto SDK and set up the environment variables again. You can run:
source oe-init-build-env
This sets up the default paths and configures the bitbake environment.
Once in the environment, you can build the core-image-minimal with:
bitbake core-image-minimal
For bootloaders like U-Boot and kernel, if you have customizations, add them in local.conf or bblayers.conf as layers so they get included in the build.
Since you want to test peripherals one at a time, you can try disabling drivers or components in the device tree for each peripheral and then rebuild. This could help isolate the issue without hanging the boot process. If it still hangs, check the boot logs through serial output - it often gives clues on what part might be causing issues.
I deeply appreciate your article, it was truly memorable. I reached my career goals thanks to the Valid test COF-C02 bootcamp exam, and now you can access it for free!
This article is brilliant, and I’ve gained a lot of inspiration from it. AD0-E605 test questions pdf provides amazing content, and it’s completely free.
I learned a great deal from the article. I owe my success to the Latest test DOP-C02 collection file test, and now I’m giving you access to it for free!