initrd.img not detected

125 views
Skip to first unread message

richa...@yahoo.com

unread,
Jul 1, 2016, 8:01:09 PM7/1/16
to BeagleBoard
Hi,

Using Robert Nelson's eewiki site, I'm running 4.4.11-bone10.1 (single parition) on my BBB via SD; initrd.img-4.4.11-bone10.1 in built and in /boot. I don't see evidence that the initrd.img was detected/mounted. A previous version built earlier this year (4.4.1-bone5) (two partitions) shows ...

[    3.484281] Unpacking initramfs...                                                                                              
[    3.821276] Freeing initrd memory: 5196K (c8080000 - c8593000)                                                                  

I sprinkled some debug statements in the kernel ... at line #625 in init/main.c, the following lines indicates initrd_start and initrd_below_start_ok as 0.

    locking_selftest();
    pr_notice("RSF!! initrd_start:%d  initrd_below_start_ok:%d\n", initrd_start, initrd_below_start_ok);


/uEnv.txt has the line to install the file ..
loadxrd=load mmc 0:1 ${rdaddr} /boot/initrd.img-${uname_r}; setenv rdsize ${filesize}
Diagnostics shows this file being read into memory

Should these values be > 0? Am I missing a command line options? Is there a way to track progress of the mount in kernel via pr_debug()?


thx for the help ..

richa...@yahoo.com

unread,
Jul 2, 2016, 9:18:51 AM7/2/16
to BeagleBoard
Hi,

Per Robert Nelson's eewiki site, I have a running BBB running 4.4.11-bone10.1 version (single partition model); initrd.img-4.4.11-bone10.1 is in /boot. A previous version, 4.4.1-bone5, indicated that initramfs was installed (two partition model)---


[    3.484281] Unpacking initramfs...                                                                                              
[    3.821276] Freeing initrd memory: 5196K (c8080000 - c8593000)                                                                  

I don't see those lines now. uEnv.txt in root has  ...

"loadxrd=load mmc
0:1 ${rdaddr} /boot/initrd.img-${uname_r}; setenv rdsize ${filesize}"

Diagnostics shows that the file is read into memory OK.

I sprinkled pr_debug() diagnostics in kernel to track progress -- in start_kernel(void) located in init/main.c
I added around line #625..

       locking_selftest();
       pr_notice("initrd_start:%d  initrd_below_start_ok:%d\n", initrd_start, initrd_below_start_ok);

Both initrd_start and initrd_below_start_ok were 0 ... should these value be >0? Am I missing a configuration parameter? Are there any
other areas in the kernel to track progress?


thx for any help


richa...@yahoo.com

unread,
Jul 6, 2016, 8:09:22 AM7/6/16
to BeagleBoard
By adding this argument pair to 'bootargs', the kernel 'found' the initramfs file..

            initrd=${rdaddr},0x${rdsize}

where rdaddr is 0x88080000 and rdsize is the size of the initramfs file. I don't know why it had to be explicitly set where it was not necessary before.
---------------------------------
Also I found that this line
         loadxfdt=load mmc 0:1 ${fdtaddr} /boot/dtbs/${uname_r}/${fdtfile}

needed to be changed to:
                   loadxfdt=load mmc 0:1 ${fdtaddr} /boot/dtbs/${uname_r}/${dtb

to access the proper overlay device tree blob. (dtb set in /boot/uEnv.txt)

William Hermans

unread,
Jul 6, 2016, 1:33:12 PM7/6/16
to beagl...@googlegroups.com
Here are proper stage 1, and stage 2 uEnv.txt files. From:

debian@beaglebone:~$ cat /etc/dogtag
BeagleBoard.org Debian Image 2016-06-19


debian@beaglebone:~$ cat /uEnv.txt
/* stage 1*/
##These are needed to be compliant with Angstrom's 2013.06.20 u-boot.

loadaddr=0x82000000
fdtaddr=0x88000000
rdaddr=0x88080000

initrd_high=0xffffffff
fdt_high=0xffffffff

##These are needed to be compliant with Debian 2014-05-14 u-boot.

loadximage=echo debug: [/boot/vmlinuz-${uname_r}] ... ; load mmc 0:1 ${loadaddr} /boot/vmlinuz-${uname_r}
loadxfdt=echo debug: [/boot/dtbs/${uname_r}/${fdtfile}] ... ;load mmc 0:1 ${fdtaddr} /boot/dtbs/${uname_r}/${fdtfile}
loadxrd=echo debug: [/boot/initrd.img-${uname_r}] ... ; load mmc 0:1 ${rdaddr} /boot/initrd.img-${uname_r}; setenv rdsize ${filesize}
loaduEnvtxt=load mmc 0:1 ${loadaddr} /boot/uEnv.txt ; env import -t ${loadaddr} ${filesize};
check_dtb=if test -n ${dtb}; then setenv fdtfile ${dtb};fi;
loadall=run loaduEnvtxt; run check_dtb; run loadximage; run loadxrd; run loadxfdt;

mmcargs=setenv bootargs console=tty0 console=${console} ${optargs} ${cape_disable} ${cape_enable} root=/dev/mmcblk0p1 rootfstype=${mmcrootfstype} ${cmdline}

uenvcmd=run loadall; run mmcargs; echo debug: [${bootargs}] ... ; echo debug: [bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr}] ... ; bootz ${loadaddr} ${rdaddr}:${rdsize} ${fdtaddr};

debian@beaglebone:~$ cat /boot/uEnv.txt /* stage 2*/
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=4.1.17-bone-rt-r18
#uuid=
#dtb=

##BeagleBone Black/Green dtb's for v4.1.x (BeagleBone White just works..)

##BeagleBone Black: HDMI (Audio/Video) disabled:
dtb=am335x-boneblack-emmc-overlay.dtb

##BeagleBone Black: eMMC disabled:
#dtb=am335x-boneblack-hdmi-overlay.dtb

##BeagleBone Black: HDMI Audio/eMMC disabled:
#dtb=am335x-boneblack-nhdmi-overlay.dtb

##BeagleBone Black: HDMI (Audio/Video)/eMMC disabled:
#dtb=am335x-boneblack-overlay.dtb

##BeagleBone Black: wl1835
#dtb=am335x-boneblack-wl1835mod.dtb

##BeagleBone Green: eMMC disabled
#dtb=am335x-bonegreen-overlay.dtb

cmdline=coherent_pool=1M quiet cape_universal=enable ipv6.disable=1
#cmdline=ipv6.disable=1
#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M quiet cape_universal=enable video=HDMI-A-1:1024x768@60e

##Example v3.8.x
#cape_disable=capemgr.disable_partno=
#cape_enable=capemgr.enable_partno=

##Example v4.1.x
#cape_disable=bone_capemgr.disable_partno=
cape_enable=bone_capemgr.enable_partno=univ-all

##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh




--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/c276f7d9-3a34-4c4a-83e2-b69e2d14cb57%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

richa...@yahoo.com

unread,
Jul 7, 2016, 2:56:11 PM7/7/16
to BeagleBoard
Hi William,

Thanks a lot for the reply -- very helpful.

It does bring up another question -- are there environmental variables set up (by default) by U-boot which may (or may not) be over written by uEnv.txt stage 1 or 2?

regards, Rich..



On Friday, July 1, 2016 at 8:01:09 PM UTC-4, richa...@yahoo.com wrote:

William Hermans

unread,
Jul 7, 2016, 7:21:51 PM7/7/16
to beagl...@googlegroups.com
Some are set by default in uboot source.

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages