initrd.img not detected

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 …

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.

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

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…

Some are set by default in uboot source.