[yocto] uImage instead of zImage
hello all, I am trying to get a uImage instead of zImage My beagleboard before created a uImage now with dora I get a zImage. in the mega-manual I see the following . KERNEL_IMAGETYPE The type of kernel to build for a device, usually set by the machine configuration files and defaults to "zImage". This variable is used when building the kernel and is passed to make as the target to build. . /home/vidal/POKY/build101613_dora/poky/meta/conf/machine/include/arm/arch-arm.inc I have tried KERNEL_IMAGETYPE ?= "uImage" KERNEL_IMAGETYPE = "uImage" and nothing changes I still get a zImage. Also tried in local.conf Any and all help will be appreciated. Thanks ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] uimage instead of zImage
Hello all, I made some changes to my uEnv.txt mpurate=auto bootcmd="mmc rescan 0; fatload mmc 0:1 0x8030 uImage; bootm 0x8030" dvimode="hd720 omapfb.vram=0:8M,1:4M,2:4M" vram=16M optargs="consoleblank=0" console="ttyO2 console=tty0,115200n8" chgs uImage to zImage in the bootcmd line above. Still would not boot? setenv bootcmd "mmc rescan 0; fatload mmc 0:1 0x8020 zImage; bootz 0x8020" setenv vram "16M" setenv bootfile "zImage" printenv echo $vram echo $bootfile echo $bootcmd run bootcmd If I make the above setenv at the u-boot prompt I get the kernel to boot, but get a kernel panic. VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19 Please append a correct "root=" boot option; here are the available partitions: VFS: Unable to mount root fs on unknown-block(0,0) User configuration error - no valid root filesystem found Kernel panic - not syncing: Invalid configuration from end user prevents continu ing CPU: 0 PID: 1 Comm: swapper Not tainted 3.10.11-yocto-standard #1 [] (unwind_backtrace+0x0/0xec) from [] (show_stack+0x20/0x24 ) [] (show_stack+0x20/0x24) from [] (dump_stack+0x20/0x28) [] (dump_stack+0x20/0x28) from [] (panic+0x84/0x1c0) [] (panic+0x84/0x1c0) from [] (mount_block_root+0x1fc/0x244) [] (mount_block_root+0x1fc/0x244) from [] (prepare_namespace +0x94/0x1c4) [] (prepare_namespace+0x94/0x1c4) from [] (kernel_init_freea ble+0x1e8/0x238) [] (kernel_init_freeable+0x1e8/0x238) from [] (kernel_init+0 x1c/0xf4) [] (kernel_init+0x1c/0xf4) from [] (ret_from_fork+0x14/0x20) zImage-omap3-beagle.dtb is the name of my dtb file. This is a new file that I had seen before in my beagleboard until dora build. I had seen in my zedboard build. Any and all help will be appreciated. Thanks ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] uimage instead of zImage
Hello, Still struggling with zImage not booting on my beagleboard. Any help with this issue will be appreciated. With a zImage the follow was the error I was getting. VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19 Please append a correct "root=" boot option; here are the available partitions: VFS: Unable to mount root fs on unknown-block(0,0) User configuration error - no valid root filesystem found Kernel panic - not syncing: Invalid configuration from end user prevents continu ing I did a Search for Image zImage uImage http://chaitutechbits.blogspot.com/2010/12/what-is-difference-between-zimage-bz.html the difference between bz image and z image is in compression mode not only compression mode there are many differnces A uImage file is a kernel with a modified header for u-boot. A tool called mkimage is used to convert a zImage (regular kernel compressed image) to a uImage file. And No, zImage files, as they are, are not compatible with U-Boot. You must convert them make zImage - Creates a gzip’d kernel image that must be installed manually. make bzImage - Creates a bzip2’d kernel image that must be installed manual fdisk /dev/sdb Welcome to fdisk (util-linux 2.22.2). Changes will remain in memory only, until you decide to write them. Be careful before using the write command. Command (m for help): p Disk /dev/sdb: 3904 MB, 3904897024 bytes, 7626752 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk identifier: 0x0008bd36 Device Boot Start End Blocks Id System /dev/sdb1 *2048 63487 30720c W95 FAT32 (LBA) /dev/sdb2 63488 7626751 3781632 83 Linux mkfs.vfat -F 16 -n "boot" /dev/sdb1 mke2fs -j -L "rootfs" /dev/sdb2 Go to location where zImage is located. cd /home/vidal/img_beagleboard102113/beagleboard I found this by doing a grep on my build that had a uImage. mkimage -A arm -O linux -T kernel -C gzip -a 8020 -e 8020 -n myuImage -d zImage uImage Image Name: myuImage Created: Wed Oct 23 09:31:11 2013 Image Type: ARM Linux Kernel Image (gzip compressed) Data Size:4642760 Bytes = 4533.95 kB = 4.43 MB Load Address: 8020 Entry Point: 8020 Transfer files to DOS partition. cp /home/vidal/img_beagleboard102113/beagleboard/MLO /run/media/vidal/BOOT/ cp /home/vidal/img_beagleboard102113/beagleboard/u-boot.img /run/media/vidal/BOOT/ cp /home/vidal/img_beagleboard102113/beagleboard/uImage /run/media/vidal/BOOT/ uEnv.txt mpurate=auto bootcmd="mmc rescan 0; fatload mmc 0:1 0x8020 uImage; bootm 0x8020" dvimode="hd720 omapfb.vram=0:8M,1:4M,2:4M" vram=16M optargs="consoleblank=0" console="ttyO2 console=tty0,115200n8" cp /home/vidal/img_beagleboard102113/uEnv.txt /run/media/vidal/BOOT/uEnv.txt ls -la /run/media/vidal/BOOT/ total 4942 drwx--. 2 vidal users 16384 Dec 31 1969 . drwxr-x---+ 3 root root 60 Oct 23 09:40 .. -rw-r--r--. 1 vidal users 47932 Oct 23 06:35 MLO -rw-r--r--. 1 vidal users 346220 Oct 23 06:36 u-boot.img -rw-r--r--. 1 vidal users 206 Oct 23 09:26 uEnv.txt -rw-r--r--. 1 vidal users 4642824 Oct 23 09:33 uImage cd ../rootfs/ Extract rootfs on Linux partition. tar jxvf /home/vidal/img_beagleboard102113/beagleboard/core-image-sato-sdk-ex-beagleboard-20131021212900.rootfs.tar.bz2 Hit any key to stop autoboot: 3 2 1 0 mmc0 is current device gpio: pin 173 (gpio 173) value is 0 gpio: pin 4 (gpio 4) value is 0 SD/MMC found on device 0 reading uEnv.txt 206 bytes read in 3 ms (66.4 KiB/s) Loaded environment from uEnv.txt Importing environment from mmc ... 4642824 bytes read in 315 ms (14.1 MiB/s) Booting from mmc ... ## Booting kernel from Legacy Image at 8020 ... Image Name: myuImage Image Type: ARM Linux Kernel Image (gzip compressed) Data Size:4642760 Bytes = 4.4 MiB Load Address: 8020 Entry Point: 8020 Verifying Checksum ... OK Uncompressing Kernel Image ... Error: Bad gzipped data GUNZIP: uncompress, out-of-mem or overwrite error - must RESET board to recover resetting ... thanks ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] uImage instead of zImage
On Fri, 18 Oct 2013, Edward Vidal wrote: > hello all, > I am trying to get a uImage instead of zImage > My beagleboard before created a uImage now with dora I get a zImage. > > in the mega-manual I see the following . > > KERNEL_IMAGETYPE > > The type of kernel to build for a device, usually set by the machine > configuration files and defaults to "zImage". This variable is used when > building the kernel > and is passed to make as the target to build. is there a specific reason you want a uImage, given that a zImage is, these days, a better choice? after all, the current u-boot now, by default, will try to boot a zImage for the beaglebone. rday -- Robert P. J. Day Ottawa, Ontario, CANADA http://crashcourse.ca Twitter: http://twitter.com/rpjday LinkedIn: http://ca.linkedin.com/in/rpjday ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] uimage instead of zImage
Edward, Your zImage is booting fine. The kernel starts and then tries to mount the root file system. But it cannot find it. It's looking for a UBIFS but cannot find it: . > VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19 > Please append a correct "root=" boot option; here are the available > partitions: > VFS: Unable to mount root fs on unknown-block(0,0) > User configuration error - no valid root filesystem found > Kernel panic - not syncing: Invalid configuration from end user prevents > continu > ing > You may have had additional error messages before the ones above that you copied into your e-mail such as: UBIFS error (pid 1): ubifs_check_node: bad CRC: calculated 0xdfca80ed, read 0x7b7c0f6b UBIFS error (pid 1): ubifs_check_node: bad node at LEB 0:0 UBIFS error (pid 1): ubifs_read_node: expected node type 6 That would be an indicator that the UBIFS root file system was not created correctly on your flash device. How did you create it? Rudi ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] uimage instead of zImage
Hello, I see some values when I do printenv These are the files on my dos partition MLO u-boot.img uEnv.txtzImage zImage-omap3-beagle-xm.dtb This is what I have in the uEnv.txt file bootcmd="" bootfile="zImage" ethact="" loadaddr="" nandboot="" nandroot="" nandrootfstype="" nandargs="" loaduimage="" loaduimagefat="" nandboot="" mpurate="auto" bootcmd="mmc rescan ; fatload mmc 0:1 0x8030 zImage; bootz 0x8030" dvimode="hd720 omapfb.vram=0:8M,1:4M,2:4M" optargs="consoleblank=0" console="ttyO2 console=tty0,115200n8" vram=16M saveenv printenv It appears that some of variable get written with other data ie vram I am setting to 16M but sometimes I see it set to 12M see at the end I have tried setting the variables manually and executing saveenv All the ones I don't want set setenv name and then saveenv still see the same values when I was using uImage and no this is what I used for my uEnv.txt mpurate=auto bootcmd="mmc rescan 0; fatload mmc 0:1 0x8030 uImage; bootm 0x8030" dvimode="hd720 omapfb.vram=0:8M,1:4M,2:4M" vram=16M optargs="consoleblank=0" console="ttyO2 console=tty0,115200n8" These were the file on the dos partition MLO u-boot.img uEnv.txtuImage This was on a build on 09/21/13 Any and all help will be appreciated. Thanks U-Boot SPL 2013.07 (Oct 19 2013 - 09:14:36) OMAP SD/MMC: 0 reading u-boot.img reading u-boot.img U-Boot 2013.07 (Oct 19 2013 - 09:14:36) OMAP3630/3730-GP ES1.2, CPU-OPP2, L3-165MHz, Max CPU Clock 1 Ghz OMAP3 Beagle board + LPDDR/NAND I2C: ready DRAM: 512 MiB NAND: 0 MiB MMC: OMAP SD/MMC: 0 *** Warning - readenv() failed, using default environment In:serial Out: serial Err: serial Beagle xM Rev C No EEPROM on expansion board Die ID #15829ff80160a7450b02602d musb-hdrc: ConfigData=0xde (UTMI-8, dyn FIFOs, bulk combine, bulk split, HB-ISO Rx, HB-ISO Tx, SoftConn) musb-hdrc: MHDRC RTL version 1.800 musb-hdrc: setup fifo_mode 4 musb-hdrc: 28/31 max ep, 16384/16384 memory USB Peripheral mode controller at 480ab000 using PIO, IRQ 0 Net: usb_ether Hit any key to stop autoboot: 3 2 1 0 OMAP3 beagleboard.org # l printenv baudrate=115200 beaglerev=xMC bootcmd=mmc dev ${mmcdev}; if mmc rescan; then if run userbutton; then setenv bo otenv uEnv.txt;else setenv bootenv user.txt;fi;echo SD/MMC found on device ${mmc dev};if run loadbootenv; then echo Loaded environment from ${bootenv};run import bootenv;fi;if test -n $uenvcmd; then echo Running uenvcmd ...;run uenvcmd;fi;if run loaduimage; then run mmcboot;fi;fi;run nandboot; bootdelay=3 bootenv=uEnv.txt bootfile=uImage.beagle buddy=none camera=none console=ttyO2,115200n8 defaultdisplay=dvi dieid#=15829ff80160a7450b02602d dvimode=640x480MR-16@60 ethact=usb_ether importbootenv=echo Importing environment from mmc ...; env import -t $loadaddr $ filesize loadaddr=0x8020 loadbootenv=fatload mmc ${mmcdev} ${loadaddr} ${bootenv} loadramdisk=fatload mmc ${mmcdev} ${rdaddr} ramdisk.gz loaduimage=ext2load mmc ${mmcdev}:2 ${loadaddr} /boot/uImage loaduimagefat=fatload mmc ${mmcdev} ${loadaddr} uImage mmcargs=setenv bootargs console=${console} ${optargs} mpurate=${mpurate} buddy=$ {buddy} camera=${camera} vram=${vram} omapfb.mode=dvi:${dvimode} omapdss.def_dis p=${defaultdisplay} root=${mmcroot} rootfstype=${mmcrootfstype} mmcboot=echo Booting from mmc ...; run mmcargs; bootm ${loadaddr} mmcdev=0 mmcroot=/dev/mmcblk0p2 rw mmcrootfstype=ext3 rootwait mpurate=auto nandargs=setenv bootargs console=${console} ${optargs} mpurate=${mpurate} buddy= ${buddy} camera=${camera} vram=${vram} omapfb.mode=dvi:${dvimode} omapdss.def_di sp=${defaultdisplay} root=${nandroot} rootfstype=${nandrootfstype} nandboot=echo Booting from nand ...; run nandargs; nand read ${loadaddr} 28 40; bootm ${loadaddr} nandroot=ubi0:rootfs ubi.mtd=4 nandrootfstype=ubifs ramargs=setenv bootargs console=${console} ${optargs} mpurate=${mpurate} buddy=$ {buddy} vram=${vram} omapfb.mode=dvi:${dvimode} omapdss.def_disp=${defaultdispla y} root=${ramroot} rootfstype=${ramrootfstype} ramboot=echo Booting from ramdisk ...; run ramargs; bootm ${loadaddr} ramroot=/dev/ram0 rw ramdisk_size=65536 initrd=0x8100,64M ramrootfstype=ext2 rdaddr=0x8100 stderr=serial stdin=serial stdout=serial usbtty=cdc_acm userbutton=if gpio input 173; then run userbutton_xm; else run userbutton_nonxm; fi; userbutton_nonxm=gpio input 7; userbutton_xm=gpio input 4; vram=12M Environment size: 2359/131068 bytes OMAP3 beagleboard.org # * - * Qodem 0.1.2 Capture Generated Sun, 20 Oct 2013 10:59:54 -0600 END * - * On Sat, Oct 19, 2013 at 1:09 PM, Rudolf Streif wrote: > Edward, > > Your zImage is booting fine. The kernel starts and then tries to mount the > root file system. But it cannot find it. It's looking for a UBIFS but > cannot find it: > > > . >> VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error >> -19 >> Please append a correct "root=" boot option; here are the available >> partitions: >> VFS: Unable to mount root
Re: [yocto] uimage instead of zImage
Hi Edward, This is what I have in the uEnv.txt file > > > bootcmd="" > bootfile="zImage" > ethact="" > loadaddr="" > nandboot="" > nandroot="" > nandrootfstype="" > nandargs="" > loaduimage="" > loaduimagefat="" > nandboot="" > mpurate="auto" > bootcmd="mmc rescan ; fatload mmc 0:1 0x8030 zImage; bootz 0x8030" > > Why are you setting all the variables to "". You really only have to overwrite the ones you need to change. > dvimode="hd720 omapfb.vram=0:8M,1:4M,2:4M" > optargs="consoleblank=0" > console="ttyO2 console=tty0,115200n8" > vram=16M > saveenv > printenv > > It appears that some of variable get written with other data ie vram I am > setting to 16M but sometimes I see it set to 12M see at the end > I have tried setting the variables manually and executing saveenv > All the ones I don't want set setenv name and then saveenv > still see the same values > when I was using uImage and no > this is what I used for my uEnv.txt > > mpurate=auto > > Are you still trying to solve the problem with the rootfs or is that another problem? > mmcroot=/dev/mmcblk0p2 rw > mmcrootfstype=ext3 rootwait > According to these settings your kernel is passed information to look for an ext3 root file system on the second partition of the an SD card on /dev/mmcblk0. Are you booting from an SD card? However, in your first boot it seems to look for an ubifs. I am not sure what you are looking for. Maybe you can attach an new boot log. :rjs ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] uimage instead of zImage
Hello, My 2nd partition on the mmc is linux ext3. This is what I have been using to transfer the rootfs to my mmc tar jxvf beagleboard/core-image-minimal-beagleboard-20131024171447.rootfs.tar.bz2 Did something change since the 21 st of last month. Testing dora which was not part of dylan? No matter what I do when i the kernel to start it is always is looking for UBIFS my mmcrootfstype=ext3 rootwait and mmcroot/dev/mmcblk0p2 rw bootcmd="mmc rescan 0 ; fatload mmc 0:1 0x80008000 zImage; bootz 0x80008000" when I execute manually it does seem to like mmc rescan 0 sometimes mmc rescan 0 mmc - MMC sub system Usage: mmc read addr blk# cnt mmc write addr blk# cnt mmc erase blk# cnt mmc rescan mmc part - lists available partition oncurrentmmc device mmc dev[dev] [part] - show or set current mmc device [partition] mmc list - lists available devices mmc rescan works okay. ThumbEE CPU extension supported. VDVI: incomplete constraints, leaving on VDAC: incomplete constraints, leaving on UBI error: ubi_init: UBI error:cannot initialize UBI, error -19 console [netcon0] enabled netconsole: network logging started twl_rtctwl_rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800) ALSA device list: #0: omap3beagle VFS: Cannot open root device "ubi0:rootfs" or unknown-block(0,0): error -19 Please append acorrect "root=" boot option; here are the available partitions: VFS: Unable to mount root fs onunknown-block(0,0) User configuration error - no valid root filesystem found Kernel panic - not syncing: Invalid configuration from end userprevents continu ing Thanks On Wed, Oct 23, 2013 at 10:09 AM, Rudolf Streif wrote: > Hi Edward, > > > This is what I have in the uEnv.txt file >> >> >> bootcmd="" >> bootfile="zImage" >> ethact="" >> loadaddr="" >> nandboot="" >> nandroot="" >> nandrootfstype="" >> nandargs="" >> loaduimage="" >> loaduimagefat="" >> nandboot="" >> mpurate="auto" >> bootcmd="mmc rescan ; fatload mmc 0:1 0x8030 zImage; bootz 0x8030" >> >> Why are you setting all the variables to "". You really only have to > overwrite the ones you need to change. > > > >> dvimode="hd720 omapfb.vram=0:8M,1:4M,2:4M" >> optargs="consoleblank=0" >> console="ttyO2 console=tty0,115200n8" >> vram=16M >> saveenv >> printenv >> >> It appears that some of variable get written with other data ie vram I am >> setting to 16M but sometimes I see it set to 12M see at the end >> I have tried setting the variables manually and executing saveenv >> All the ones I don't want set setenv name and then saveenv >> still see the same values >> when I was using uImage and no >> this is what I used for my uEnv.txt >> >> mpurate=auto >> >> Are you still trying to solve the problem with the rootfs or is that > another problem? > > > >> mmcroot=/dev/mmcblk0p2 rw >> mmcrootfstype=ext3 rootwait >> > > According to these settings your kernel is passed information to look for > an ext3 root file system on the second partition of the an SD card on > /dev/mmcblk0. Are you booting from an SD card? However, in your first boot > it seems to look for an ubifs. > > I am not sure what you are looking for. Maybe you can attach an new boot > log. > > :rjs > ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] uimage instead of zImage
Dear Edward, In message you wrote: > > A uImage file is a kernel with a modified header for u-boot. A tool called No header gets modified. Instead, a new header gets prepended. > mkimage is used to convert a zImage (regular kernel compressed image) to a Actually it's pretty stupid to use a zImage inside an uImage. It is much better to use normal (uncompressed) kernel image, compress it using just gzip, and use this as poayload for mkimage. This way U-Boot does the uncompresiong instead of including yet another uncompressor with each kernel image. > uImage file. And No, zImage files, as they are, are not compatible with > U-Boot. You must convert them You can boot zImage files directly with U-Boot. That's what the "bootz" command is for. Best regards, Wolfgang Denk -- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: w...@denx.de Hacking's just another word for nothing left to kludge. ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto