Hi, I am using u-boot 2016.09.01 to load a linux kernel on an embedded ARM (Zynq) board.
First, I built my kernel with the initramfs linked to it, setting CONFIG_INITRAMFS_SOURCE to my source files. The resulting kernel is then packaged as a legacy u-boot image (make uImage). This image can be booted using the 'bootm' command, passing only an FDT blob (no intramfs). Everything is fine so far. Next, I modified my kernel configuration to use an initramfs built separately (CONFIG_BLK_DEV_INITRD=y, CONFIG_INITRAMFS_SOURCE=""). The initramfs is the same as above. I then used the mkimage program to create a FIT image containing the kernel (zImage format), initramfs (cpio.gz created using 'gen_init_cpio' from the kernel), and an FDT binary blob created by dtc. This is what the result looks like: FIT description: Production Test Kernel/Initramfs/FDT Created: Wed Mar 8 09:39:47 2017 Image 0 (kernel@1) Description: ProductionTest Kernel Created: Wed Mar 8 09:39:47 2017 Type: Kernel Image Compression: uncompressed Data Size: 1203704 Bytes = 1175.49 kB = 1.15 MB Architecture: ARM OS: Linux Load Address: 0x00008000 Entry Point: 0x00008000 Hash algo: crc32 Hash value: c45cf4b5 Image 1 (ramdisk@1) Description: ramdisk Created: Wed Mar 8 09:39:47 2017 Type: RAMDisk Image Compression: uncompressed Data Size: 2835138 Bytes = 2768.69 kB = 2.70 MB Architecture: ARM OS: Linux Load Address: 0x00000000 Entry Point: 0x002b42c2 Hash algo: crc32 Hash value: bf16e40b Image 2 (fdt@1) Description: Flattened Device Tree blob Created: Wed Mar 8 09:39:47 2017 Type: Flat Device Tree Compression: uncompressed Data Size: 15526 Bytes = 15.16 kB = 0.01 MB Architecture: ARM Hash algo: crc32 Hash value: 6122026f Default Configuration: 'conf@1' Configuration 0 (conf@1) Description: Production Test Kernel: kernel@1 Init Ramdisk: ramdisk@1 FDT: fdt@1 Booting this image via the 'bootm' command seems to work at first: Devkit> bootm ${kernel_addr} ## Loading kernel from FIT Image at 03000000 ... Using 'conf@1' configuration Verifying Hash Integrity ... OK Trying 'kernel@1' kernel subimage Description: ProductionTest Kernel Type: Kernel Image Compression: uncompressed Data Start: 0x030000e0 Data Size: 1203704 Bytes = 1.1 MiB Architecture: ARM OS: Linux Load Address: 0x00008000 Entry Point: 0x00008000 Hash algo: crc32 Hash value: f057a702 Verifying Hash Integrity ... crc32+ OK ## Loading ramdisk from FIT Image at 03000000 ... Using 'conf@1' configuration Trying 'ramdisk@1' ramdisk subimage Description: ramdisk Type: RAMDisk Image Compression: uncompressed Data Start: 0x03125fac Data Size: 2835161 Bytes = 2.7 MiB Architecture: ARM OS: Linux Load Address: 0x00000000 Entry Point: unavailable Hash algo: crc32 Hash value: 2e7965c4 Verifying Hash Integrity ... crc32+ OK ## Loading fdt from FIT Image at 03000000 ... Using 'conf@1' configuration Trying 'fdt@1' fdt subimage Description: Flattened Device Tree blob Type: Flat Device Tree Compression: uncompressed Data Start: 0x033da35c Data Size: 15526 Bytes = 15.2 KiB Architecture: ARM Hash algo: crc32 Hash value: 6122026f Verifying Hash Integrity ... crc32+ OK Booting using the fdt blob at 0x33da35c Loading Kernel Image ... OK Loading Ramdisk to 1fd4b000, end 1ffff2d9 ... OK Loading Device Tree to 1fd44000, end 1fd4aca5 ... OK Starting kernel ... However, the kernel apparently fails to access the initramfs image: Failed to execute /init (error -2) Kernel panic - not syncing: No working init found. Try passing init= option to kernel. See Linux Documentation/init.txt for guidance. I verified that /init is actually present in the initramfs image and has permission 755. Can anybody help with this problem? Thomas Thomas Koeller Senior Software Developer Basler AG An der Strusbek 60-62 22926 Ahrensburg Germany Tel. +49 4102 463 390 Fax +49 4102 463 46 390 thomas.koel...@baslerweb.com www.baslerweb.com BASLER´S COMPONENTS ENHANCE YOUR VISION baslerweb.com/vision-components Management board: Dr.-Ing. Dietmar Ley (CEO) · John P. Jennings · Arndt Bake · Hardy Mehl Chairman of the supervisory board: Norbert Basler Basler AG · Amtsgericht Lübeck HRB 4090 · Ust-IdNr.: DE 135 098 121 · Steuer-Nr.: 30 292 04497 · WEEE-Reg.-Nr. DE 83888045 _______________________________________________ U-Boot mailing list U-Boot@lists.denx.de https://lists.denx.de/listinfo/u-boot