Community
cancel
Showing results for 
Search instead for 
Did you mean: 
sk23
New Contributor II
2,284 Views

unable to set setenv on u-boot configuration for Linux kernel on Intel Edison

Hi ,I followed the below steps base on this links.https://edison.internet-share.com/wiki/Using_a_vanilla_Linux_kernel_with_Intel_Edison https://edison.internet-share.com/wiki/Using_a_vanilla_Linux_kernel_with_Intel_Edison https://habrahabr.ru/post/254247/ Запускаем свежайшее ядро Linux на Intel Edison / Хабрахабр

*** Ready to receive application ***

U-Boot 2014.04 (Jun 06 2016 - 14:40:07)

Watchdog enabled

DRAM: 980.6 MiB

MMC: tangier_sdhci: 0

In: serial

Out: serial

Err: serial

Hit any key to stop autoboot: 0

boot >

boot >

boot > setenv boot_edsboot 'zboot 0x100000 0 0x800000 0x800000'

boot > setenv bootargs_edsboot 'console=tty1 console=ttyS2,115200n8 root=/dev/ram0 rw initrd=0x800000,8M'

boot > setenv bootcmd_edsboot 'setenv bootargs ${bootargs_edsboot}; run load_edsboot; run boot_edsboot'

boot > setenv load_edsboot 'load mmc 0:9 0x100000 vmlinuz.efi; load mmc 0:9 0x800000 initrd'

boot > saveenv

Saving Environment to MMC...

Writing to redundant MMC(0)... done

boot > run bootcmd_edsboot

ERROR

run bootcmd_edsboot

reading vmlinuz.efi

** Unable to read file vmlinuz.efi **

reading initrd

** Unable to read file initrd **

Error: Invalid Boot Flag (found 0xffef, expected 0xaa55)

# Kernel loading failed ...

zboot - Boot bzImage

Usage:

zboot [addr] [size] [initrd addr] [initrd size]

addr - The optional starting address of the bzimage.

If not set it defaults to the environment

variable "fileaddr".

size - The optional size of the bzimage. Defaults to

zero.

initrd addr - The address of the initrd image to use, if any.

initrd size - The size of the initrd image to use, if any.

I was unable to find the issue.could you please help me.

0 Kudos
17 Replies
asss
Valued Contributor II
465 Views

Hi,

it seems vmlinuz.efi and initrd are not available for U-boot to read.

1. May you provide an output of

boot > mmc part

boot > fatls mmc 0:9

boot > fatinfo mmc 0:9

boot > mmcinfo

?

2. Where have you placed vmlinuz.efi and initrd ?

BR,

xbolshe

idata
Community Manager
465 Views

Hi,

 

 

Have you followed the previous steps of the guide and build the kernel before attempting to change the environmental variables?

 

 

-Sergio

 

sk23
New Contributor II
465 Views

Hi Sergio ,

@

Thank you for support.

I build the kernel and build root and copied both files into emm 0:9 using below links.

$cp linux-next/arch/x86/boot/bzImage //vmlinuz.efi

$ cp buildroot/output/images/rootfs.cpio.bz2 //initrd

lsblk on Host

NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT

sda 8:0 0 931.5G 0 disk

├─sda1 8:1 0 100M 0 part

├─sda2 8:2 0 217.5G 0 part

├─sda3 8:3 0 247.9G 0 part

├─sda4 8:4 0 1K 0 part

├─sda5 8:5 0 458.1G 0 part /

└─sda6 8:6 0 7.9G 0 part [SWAP]

sdb 8:16 0 768M 0 disk /media/srinivas/5776-0E2F

sr0 11:0 1 1024M 0 rom

mmc part

1 0x00000800 0x000017ff "u-boot0"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: d117f98e-6f2c-d04b-a5b2-331a19f91cb2

2 0x00001800 0x00001fff "u-boot-env0"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: 25718777-d0ad-7443-9e60-02cb591c9737

3 0x00002000 0x00002fff "u-boot1"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: 8a4bb8b4-e304-ae48-8536-aff5c9c495b1

4 0x00003000 0x000037ff "u-boot-env1"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: 08992135-13c6-084b-9322-3391ff571e19

5 0x00003800 0x00003fff "factory"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: 333a128e-d3e3-b94d-92f4-d3ebd9b3224f

6 0x00004000 0x0000ffff "panic"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: f20aa902-1c5d-294a-9177-97a513e3cae4

7 0x00010000 0x0001ffff "boot"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: db88503d-34a5-3e41-836d-c757cb682814

8 0x00020000 0x0031ffff "rootfs"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: 012b3303-34ac-284d-99b4-34e03a2335f4

9 0x00320000 0x0049ffff "update"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: faec2ecf-8544-e241-b19d-757e796da607

10 0x004a0000 0x00747fde "home"

attrs: 0x0000000000000000

type: ebd0a0a2-b9e5-4433-87c0-68b6b72699c7

guid: f13a0978-b1b5-1a4e-8821-39438e24b627

fatls mmc 0:9

6516048 vmlinuz.efi

1692950 initrd

2 file(s), 0 dir(s)

boot > fatinfo mmc 0:9

Interface: MMC

Device 0: Vendor: Man 000090 Snr 018d33a8 Rev: 0.3 Prod: H4G1d

Type: Removable Hard Disk

Capacity: 3728.0 MB = 3.6 GB (7634944 x 512)

Filesystem: FAT32

boot > mmcinfo

Device: tangier_sdhci

Manufacturer ID: 90

OEM: 14a

Name: H4G1d

Tran Speed: 52000000

Rd Block Len: 512

MMC version 4.5

High Capacity: Yes

Capacity: 3.6 GiB

Bus Width: 8-bit

Still i was unable to load new kernel and build root into device.

Here is the crashfile logs on device

EVENT=HWWDG

Manufacturer : Intel Corporation

Product name :

Version :

Serial Number : FZED445D0206G501

Linux version : Linux edison 3.10.98-poky-edison+ # 2 SMP PREEMPT Mon Jul 4 12:36:35 IST 2016 i686 GNU/Linux

Build version : 201607041232

Date : Fri Jul 1 06:08:33 UTC 2016

Wake source : HWWDT reset SC

Could you please suggest/provide the details. what is wrong in my process ?

sk23
New Contributor II
465 Views

Hi Sergio ,

Thank you for support.

Any idea about below issue ?

While run bootcmd_edsboot on u-boot prompt kernel version is 4.7.0 but unable load the this kernel.

On target

uname -r

3.10.98-poky-edison+

root@edison:~# uname -a

Linux edison 3.10.98-poky-edison+ # 1 SMP PREEMPT Wed Jul 6 18:03:37 IST 2016 i686 GNU/Linux

I was unable to load the latest kernel. Please do need full.

idata
Community Manager
465 Views

It seems from that last picture that the new kernel was build but is not loading. After the "Starting kernel…" message is there any more output from the console? After seeing this message the kernel should start booting and at the end of the process you should see a Welcome to Buildroot. Are you not seeing this?

 

 

There's also a note in the guide that says that after you configure the variables, it will be possible to boot the new system if the normal boot is interrupted by pressing a key during boot (at the right time). You can see this note in the U-boot section of the guide.

 

 

-Sergio

 

sk23
New Contributor II
465 Views

Hi Sergio ,

Thank you for support.

I was doing same steps but unable load new kernel image.

I have given the steps and logs on my previous thread.

I short i am running this command after setting the image and env variables.

boot > run bootcmd_edsboot

Please do need full

idata
Community Manager
465 Views

Hi,

 

 

From the screenshot of your console, just after you typed run bootcmd_edsboot there's a line that says "Linux kernel version 4.7.0-rc6-next-20160708" and the guide you're following has "Linux kernel version 4.1.0-rc6+". Which file have you cloned in the first step of the guide?

 

 

What happens after that screenshot? Does the log continue or does it just freezes there?

 

 

-Sergio

 

sk23
New Contributor II
465 Views

Screen shoot for you reference. I was unable boot new kernel.

is there any other command need to perform ?

idata
Community Manager
465 Views

What I meant was if you cloned the same kernel as in the guide https://edison.internet-share.com/wiki/Using_a_vanilla_Linux_kernel_with_Intel_Edison https://edison.internet-share.com/wiki/Using_a_vanilla_Linux_kernel_with_Intel_Edison or if you used another kernel. I ask this because the kernel on the guide differs from the one in your console log.

 

 

-Sergio

 

Andriy_S_Intel
Employee
465 Views

I can add to the above answers that I run linux-next on Intel Edison board more often than once per week. I don't do that for stable kernel so frequently.

sk23
New Contributor II
465 Views

Hi Sergio ,

I was using same kernel.still i was getting same issue.

Regards,

Srinivas

Andriy_S_Intel
Employee
465 Views

Just tried kernel from

https://github.com/andy-shev/linux/tree/eds https://github.com/andy-shev/linux/tree/eds

Welcome to Buildroot

buildroot login: root

# uname -a

Linux buildroot 4.7.0-rc7+ # 21 SMP Mon Jul 18 16:22:37 MSK 2016 x86_64 GNU/Linux

# lspci -nk | tail -n10

Kernel driver in use: intel_scu_ipc

00:14.0 0b40: 8086:11a1 (rev 01)

Kernel driver in use: intel_mid_pwr

00:15.0 0880: 8086:11a2 (rev 01)

Kernel driver in use: dw_dmac_pci

00:16.0 0b40: 8086:11a3 (rev 01)

00:16.1 0b40: 8086:11a4 (rev 01)

00:17.0 0880: 8086:11a5 (rev 01)

Kernel driver in use: pwm-lpss

00:18.0 0380: 8086:11a6 (rev 01)

Andriy_S_Intel
Employee
465 Views

One more thing, be sure that you have enough memory between vmlinuz.efi and initrd to be able to decompress them. It might be that one of your images (initrd or vmlinuz.efi) overlaps the other when being decompressed.

idata
Community Manager
465 Views

Do you still need help with this thread?

 

 

-Sergio

 

Andriy_S_Intel
Employee
465 Views

Okay, I tried to follow my instructions for v4.7, and found you are right. They do not apply anymore for newest kernels. What you need to change is:

boot > setenv boot_edsboot 'zboot 0x100000 0 0xc00000'

(Note you have to replace 0x800000 by 0xc00000 in the rest of custom U-Boot variables as well)

The second issue is that kernel unable to mount initrd. I'm looking into it right now.

RAtlu1
New Contributor II
465 Views

Andy

I am gonna try out a custom u-boot build 2015 v and your latest kernel with a custom initramfs and report back. On the side note, initramfs never ever worked on edison board (could be u-boot issue)

Andriy_S_Intel
Employee
465 Views

I found a root cause. To resolve the issue just use an updated example of U-Boot variables:

setenv boot_edsboot 'zboot 0x100000 0 0x3000000 0x800000'

setenv bootargs_edsboot 'console=tty1 console=ttyS2,115200n8 rootfstype=ramfs rw'

setenv bootcmd_edsboot 'setenv bootargs ${bootargs_edsboot}; run load_edsboot; run boot_edsboot'

setenv load_edsboot 'load mmc 0:9 0x100000 vmlinuz.efi; load mmc 0:9 0x3000000 initrd'

# uname -a

Linux buildroot 4.8.0-rc2-next-20160818+ # 1 SMP Thu Aug 18 19:47:15 EEST 2016 i686 GNU/Linux

And do not forget to use proper initrd file size in zboot 4th parameter.

Reply