cpufreq-info only 800MHz but I need 1GHz

479 views
Skip to first unread message

Neil Cobbett

unread,
Jun 25, 2018, 6:53:00 PM6/25/18
to BeagleBoard
Hi folks,

I can't get 1GHz frequency out of my BBBW using 4.n kernel.  The best I can get is 800MHz.

I am running on 5V feed direct feed to P8 and P9  (from my own cape design) and not just USB power connector.  (Previous posts have shown USB powered BBB limits the speed to 500MHz due to maximum USB available current.

Any ideas on what to try?  I'm running a RT process and it needs full 1GHz speed to run without 'jitter'.  

Many thanks!
Neil

NB I had a similar problem with a BBG last year running 4.9 kernel and had to revert to 3.8 to make it work for that application.  I want to stick with 4.x kernel now...

root@beaglebone:/opt/scripts/tools# dmesg |grep freq
[    1.578637] cpufreq: cpufreq_online: CPU0: Running at unlisted freq: 1000000 KHz
[    1.578687] cpu cpu0: dev_pm_opp_set_rate: failed to find current OPP for freq 1000000000 (-34)
[    1.589712] cpufreq: cpufreq_online: CPU0: Unlisted initial frequency changed to: 800000 KHz



root@beaglebone:/home/debian# cpufreq-set -f 1000mhz
root@beaglebone:/home/debian# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpu...@vger.kernel.org, please.
analyzing CPU 0:
 driver: cpufreq-dt
 CPUs which run at the same hardware frequency: 0
 CPUs which need to have their frequency coordinated by software: 0
 maximum transition latency: 300 us.
 hardware limits: 300 MHz - 800 MHz
 available frequency steps: 300 MHz, 600 MHz, 720 MHz, 800 MHz
 available cpufreq governors: conservative, ondemand, userspace, powersave, performance
 current policy: frequency should be within 300 MHz and 800 MHz.
                 The governor "userspace" may decide which speed to use
                 within this range.
 current CPU frequency is 800 MHz (asserted by call to hardware).
 cpufreq stats: 300 MHz:0.00%, 600 MHz:0.00%, 720 MHz:0.00%, 800 MHz:100.00%



root@beaglebone:/opt/scripts/tools# ./version.sh  
git:/opt/scripts/:[31292bce1d4b35b497cc7a013d6d57e7e1f4f5c4]
]eprom:[A335BNLTBBWG3997�O
model:[TI_AM335x_BeagleBone_Black_Wireless]
dogtag:[BeagleBoard.org Debian Image 2018-06-17]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2018.03-00002-gac9cce7c6a]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2018.03-00002-gac9cce7c6a]:[location: dd MBR]
kernel:[4.14.49-ti-r54]
nodejs:[v6.14.3]
device-tree-override:[dtb=am335x-boneblack-wireless.dtb]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr0=/lib/firmware/BB-UART1-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr1=/lib/firmware/BB-UART2-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr2=/lib/firmware/BB-BONE-AUDI-01-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr3=/lib/firmware/BB-PWM2-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr4=/lib/firmware/BB-I2C1-FAST-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr5=/lib/firmware/PPS-00A0.dtbo]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.4.20180619.0-0rcnee0~stretch+20180619]
pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[roboticscape]:[0.4.4-git20180608.0-0rcnee0~stretch+20180609]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpi
o pwm eqep admin spi tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M
net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[    1.054887] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[    1.056534] gpio-of-helper ocp:cape-universal: ready
END

Robert Nelson

unread,
Jun 25, 2018, 7:31:09 PM6/25/18
to Beagle Board, Neil Cobbett
^ remove this define in /boot/uEnv.txt

Regards,

--
Robert Nelson
https://rcn-ee.com/

Robert Nelson

unread,
Jun 25, 2018, 7:32:28 PM6/25/18
to Beagle Board, Neil Cobbett
and i see why you did that, broken eeprom:


GND TP1 and run:

sudo dd if=/opt/scripts/device/bone/bbbw-eeprom.dump
of=/sys/devices/platform/ocp/44e0b000.i2c/i2c-0/0-0050/eeprom

^that's "one" line...

then run:

sudo /opt/scripts/tools/version.sh | grep eeprom

and it "should" show:

A335BNLTBWA50000BBWG0000

Then it'll work out of the box..

Neil Cobbett

unread,
Jun 26, 2018, 5:28:52 AM6/26/18
to BeagleBoard
Thanks Robert.

I did the following with tp1 tied to GND:

NB the EEPROM line is slightly different.

I rebooted (with dtb= line removed from uEnv.txt) and it seems to have worked:

With TP1 tied to GND:

debian@beaglebone:~$ sudo dd if=/opt/scripts/device/bone/bbbw-eeprom.dump of=/sys/devices/platform/ocp/44e0b000.i2c/i2c-0/0-0050/eepro
m
0+1 records in
0+1 records out
28 bytes copied, 0.149895 s, 0.2 kB/s
debian@beaglebone:~$ sudo /opt/scripts/tools/version.sh | grep eeprom  
eeprom:[A335BNLTBWA50000BBWG*]

REBOOT

debian@beaglebone:~$ cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpu...@vger.kernel.org, please.
analyzing CPU 0:
 driver: cpufreq-dt
 CPUs which run at the same hardware frequency: 0
 CPUs which need to have their frequency coordinated by software: 0
 maximum transition latency: 300 us.
 hardware limits: 300 MHz - 1000 MHz
 available frequency steps: 300 MHz, 600 MHz, 720 MHz, 800 MHz, 1000 MHz
 available cpufreq governors: conservative, ondemand, userspace, powersave, performance
 current policy: frequency should be within 300 MHz and 1000 MHz.
                 The governor "performance" may decide which speed to use
                 within this range.
 current CPU frequency is 1000 MHz.
 cpufreq stats: 300 MHz:0.00%, 600 MHz:0.00%, 720 MHz:0.00%, 800 MHz:0.00%, 1000 MHz:100.00%


THANKYOU!
;)

Neil

Yiling Cao

unread,
Jun 26, 2018, 10:47:35 PM6/26/18
to beagl...@googlegroups.com
you can set clock after linux is booted, with a c program: http://nixdev.com/?p=330

I have tested before. but 1GHz need higher MPU/CPU core voltage, details can be found with u-boot source code or ref manual.



--
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/b6c54f46-0f3f-46b4-8bff-aba07f12f4ae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--

alan....@gmail.com

unread,
Sep 19, 2018, 9:46:48 AM9/19/18
to BeagleBoard
Hi Robert,

I have the same issue of no available 1000MHz.  I have tried updating the eeprom as instructed in this post but no difference.

The output of version.sh is:
git:/opt/scripts/:[73593ebe3b7d3cc381eeb502d45ccb33a6ec5e78]
eeprom:[A335BNLTBWA50000BBWG*]
model:[TI_AM335x_BeagleBone_Black_Wireless]
dogtag:[BeagleBoard.org Debian Image 2018-08-30]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2018.03-00002-gac9cce7c6a]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2017.01-00006-g55e748eda0]:[location: dd MBR]
kernel:[4.14.69-ti-r75]
nodejs:[v6.14.4]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.4.20180914.0-0rcnee0~stretch+20180914]
pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[librobotcontrol]:[1.0.2-git20180829.0-0rcnee0~stretch+20180830]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep admin spi tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[    1.043241] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[    1.044810] gpio-of-helper ocp:cape-universal: ready
END


Have you any suggestions?  Thanks.
Alan

alan....@gmail.com

unread,
Sep 19, 2018, 9:47:04 AM9/19/18
to BeagleBoard
Hi Robert.

I'm wondering if you could help...  I have a BBBW that I can't get to run at 1000MHz.  I tried updating the eeprom as suggested but no difference.  Hardware still listed as max 800MHz.

Here is output of version.sh
git:/opt/scripts/:[73593ebe3b7d3cc381eeb502d45ccb33a6ec5e78]
eeprom:[A335BNLTBWA50000BBWG*]
model:[TI_AM335x_BeagleBone_Black_Wireless]
dogtag:[BeagleBoard.org Debian Image 2018-08-30]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2018.03-00002-gac9cce7c6a]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2017.01-00006-g55e748eda0]:[location: dd MBR]
kernel:[4.14.69-ti-r75]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade <pkg>]
pkg:[bb-cape-overlays]:[4.4.20180914.0-0rcnee0~stretch+20180914]
pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
pkg:[librobotcontrol]:[1.0.2-git20180829.0-0rcnee0~stretch+20180830]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep admin spi tisdk weston-launch xenomai]
cmdline:[console=ttyO0,115200n8 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 quiet]
dmesg | grep pinctrl-single
[    1.043845] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[    1.045079] gpio-of-helper ocp:cape-universal: ready
END


Would you have any further suggestions.

Thanks,
Alan

Robert Nelson

unread,
Sep 19, 2018, 9:55:19 AM9/19/18
to Beagle Board, alan....@gmail.com
On Wed, Sep 19, 2018 at 8:47 AM <alan....@gmail.com> wrote:
>
> Hi Robert.
>
> I'm wondering if you could help... I have a BBBW that I can't get to run at 1000MHz. I tried updating the eeprom as suggested but no difference. Hardware still listed as max 800MHz.
>
> Here is output of version.sh
> git:/opt/scripts/:[73593ebe3b7d3cc381eeb502d45ccb33a6ec5e78]
> eeprom:[A335BNLTBWA50000BBWG*]
> model:[TI_AM335x_BeagleBone_Black_Wireless]
> dogtag:[BeagleBoard.org Debian Image 2018-08-30]
> bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2018.03-00002-gac9cce7c6a]:[location: dd MBR]
> bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2017.01-00006-g55e748eda0]:[location: dd MBR]

The really old version of U-Boot in the eMMC is blocking proper
construction of the Black Wireless device tree, thus breaking the cpu
node.

Just run:

sudo dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=100

and reboot..

alan....@gmail.com

unread,
Sep 19, 2018, 3:01:50 PM9/19/18
to BeagleBoard
Wonderful!  Thanks so much Robert.  worked a charm

alan....@gmail.com

unread,
Sep 19, 2018, 3:01:53 PM9/19/18
to BeagleBoard
Hi Robert,

Having switched to uboot overlays, the kernel bot time has jumped from ~7 seconds to ~30 seconds.

It seems a lot of time is spent here:
[    3.659960] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    3.677272] random: systemd-udevd: uninitialized urandom read (16 bytes read)
[    3.688950] random: udevadm: uninitialized urandom read (16 bytes read)
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems
done.
Begin: Will now check root file system ... fsck from util-linux 2.29.2
[/sbin/fsck.ext4 (1) -- /dev/mmcblk0p1] fsck.ext4 -a -C0 /dev/mmcblk0p1
rootfs: clean, 59308/217728 files, 487239/869376 blocks
done.
[   31.794718] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
[   32.588641] ip_tables: (C) 2000-2006 Netfilter Core Team


Would you have any suggestions as to why this might be? 



On Wednesday, 19 September 2018 14:55:19 UTC+1, RobertCNelson wrote:

Robert Nelson

unread,
Sep 19, 2018, 3:24:40 PM9/19/18
to Beagle Board
On Wed, Sep 19, 2018 at 2:01 PM <alan....@gmail.com> wrote:
>
> Hi Robert,
>
> Having switched to uboot overlays, the kernel bot time has jumped from ~7 seconds to ~30 seconds.
>
> It seems a lot of time is spent here:
> [ 3.659960] random: systemd-udevd: uninitialized urandom read (16 bytes read)
> [ 3.677272] random: systemd-udevd: uninitialized urandom read (16 bytes read)
> [ 3.688950] random: udevadm: uninitialized urandom read (16 bytes read)
> Begin: Loading essential drivers ... done.
> Begin: Running /scripts/init-premount ... done.
> Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
> Begin: Running /scripts/local-premount ... Scanning for Btrfs filesystems
> done.
> Begin: Will now check root file system ... fsck from util-linux 2.29.2
> [/sbin/fsck.ext4 (1) -- /dev/mmcblk0p1] fsck.ext4 -a -C0 /dev/mmcblk0p1
> rootfs: clean, 59308/217728 files, 487239/869376 blocks
> done.
> [ 31.794718] EXT4-fs (mmcblk0p1): mounted filesystem with ordered data mode. Opts: (null)
> done.
> Begin: Running /scripts/local-bottom ... done.
> Begin: Running /scripts/init-bottom ... done.
> [ 32.588641] ip_tables: (C) 2000-2006 Netfilter Core Team
>
>
> Would you have any suggestions as to why this might be?

It's the initrd, just remove it..

sudo rm /boot/initrd*

activewh...@gmail.com

unread,
Jun 19, 2019, 10:05:54 PM6/19/19
to BeagleBoard
I ran sudo dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=100

Now my BBB will not boot. What do I do?

Thanks,
Blair

Robert Nelson

unread,
Jun 20, 2019, 10:58:53 AM6/20/19
to Beagle Board, activewh...@gmail.com
On Wed, Jun 19, 2019 at 9:05 PM <activewh...@gmail.com> wrote:
>
> I ran sudo dd if=/dev/zero of=/dev/mmcblk1 bs=1M count=100
>
> Now my BBB will not boot. What do I do?

Well you erased the bootloader on the eMMC..

So stick in a new image onto a microSD and boot it..

activewh...@gmail.com

unread,
Jun 23, 2019, 11:39:40 AM6/23/19
to BeagleBoard
Robert: Thanks for explaining it. I am learning about Linux and BB. I wanted to increase MHz, but made a mistake. It boots from microSD.

How do I re-install the bootloader to the eMMC? I don't want to write the whole image to eMMC and lose the existing data files.

How do I access the data files on the eMMC?

Thanks,

Robert Nelson

unread,
Jun 23, 2019, 11:45:51 AM6/23/19
to Beagle Board, activewh...@gmail.com
On Sun, Jun 23, 2019 at 10:39 AM <activewh...@gmail.com> wrote:
>
> Robert: Thanks for explaining it. I am learning about Linux and BB. I wanted to increase MHz, but made a mistake. It boots from microSD.
>
> How do I re-install the bootloader to the eMMC? I don't want to write the whole image to eMMC and lose the existing data files.
>
> How do I access the data files on the eMMC?

Simple, you "reflash" the eMMC.. You've nuke the first 100Mb of the
partition...

evilwulfie

unread,
Jun 23, 2019, 12:29:56 PM6/23/19
to beagl...@googlegroups.com
you can mount the emmc and get your files off before you reflash

Robert Nelson

unread,
Jun 23, 2019, 12:46:20 PM6/23/19
to Beagle Board, evilwulfie
On Sun, Jun 23, 2019 at 11:29 AM evilwulfie <evilw...@gmail.com> wrote:
>
> you can mount the emmc and get your files off before you reflash

You should re-read what he actually wrote...

The first 100Mb of the eMMC is now trashed, so no partition table.. ;)

activewh...@gmail.com

unread,
Jun 23, 2019, 7:20:06 PM6/23/19
to BeagleBoard
It looks bad, but I want to be sure. Is there any way I can access the data files on the eMMC? And to avoid rebuilding the entire BBB setup? Such as install U-Boot? Or is all BBB data lost?
Blair

Dennis Lee Bieber

unread,
Jun 24, 2019, 1:12:04 PM6/24/19
to beagl...@googlegroups.com
On Sun, 23 Jun 2019 14:25:53 -0700 (PDT),
activewh...@gmail.com declaimed the
following:

>It looks bad, but I want to be sure. Is there any way I can access the data
>files on the eMMC? And to avoid rebuilding the entire BBB setup? Such as
>install U-Boot? Or is all BBB data lost?

If you knew what the partition table had been, it might be possible to
reflash the first part of the card restoring a partition table. BUT if the
data partition starts anywhere in the 100MB region, you've lost any data
blocks that had been stored there... And likely will spend hours in fsck
rebuilding whatever is still good, followed by copying everything off and
then reflashing the eMMC with a complete system which I believe will
restore a modern u-boot too (if it didn't, there'd be no way to update old
BBBs from kernel device tree loading to u-boot device tree loading).



--
Wulfraed Dennis Lee Bieber AF6VN
wlf...@ix.netcom.com http://wlfraed.microdiversity.freeddns.org/

activewh...@gmail.com

unread,
Jun 25, 2019, 10:07:40 AM6/25/19
to BeagleBoard
Dennis, thanks for explaining an option. I have the original image on mSD. Can that be used to recreate (copy or build) the proper partition table on the eMMC? How is that done? Maybe the data will not be overwritten. If it does not work, I will lose all data anyway when reflash all. 

Based on the above dd command (I ran by mistake), maybe from mSD run:
sudo mount /dev/mmcblk1

Then remove mSD and reboot.

But I don't know if I have all the correct parameters such as block size or count or destination. Thanks for any help.

Blair

Dennis Lee Bieber

unread,
Jun 25, 2019, 12:49:41 PM6/25/19
to beagl...@googlegroups.com
On Mon, 24 Jun 2019 19:23:54 -0700 (PDT),
activewh...@gmail.com declaimed the
following:

>Dennis, thanks for explaining an option. I have the original image on mSD.
>Can that be used to recreate (copy or build) the proper partition table on
>the eMMC? How is that done? Maybe the data will not be overwritten. If it
>does not work, I will lose all data anyway when reflash all.
>

I don't know enough about what gets done when running the normal
flasher (eg: does it create partitions or rely on the eMMC already having a
partition table; if it creates a partition table then only running that
part without formatting the partitions might give access).

Copying the start of the SD card likely won't work either as a true SD
card has a reserved section (for the "secure" functions that nobody
actually uses), so is likely in a different layout.

>Based on the above dd command (I ran by mistake), maybe from mSD run:
>sudo mount /dev/mmcblk1
>
>Then remove mSD and reboot.
>

Won't work -- part of the reboot sequence is to dismount "disk" file
systems.


>But I don't know if I have all the correct parameters such as block size or
>count or destination. Thanks for any help.
>

If you had a second BBB maybe a dd command to copy the start from ITs
eMMC, put that (as a file) on the SD card, and dd command to write that
file to the bad system eMMC


I suspect short of being able to manually examine everything on the
eMMC there may not be any way to recover.

activewh...@gmail.com

unread,
Jun 26, 2019, 8:53:57 AM6/26/19
to BeagleBoard
Dennis, thanks for explaining how mount won't work. No 2nd BBB. 
Can I do cat of eMMC to read the contents of some of the files? The important files I need are c/cpp source text files. From the mSD, how do I specify the eMMC directory? 
Or somehow copy a block of the eMMC. Then search it to extract the text content. 
Blair

Dennis Lee Bieber

unread,
Jun 26, 2019, 2:07:21 PM6/26/19
to beagl...@googlegroups.com
On Wed, 26 Jun 2019 05:14:11 -0700 (PDT),
activewh...@gmail.com declaimed the
following:

>Dennis, thanks for explaining how mount won't work. No 2nd BBB.
>Can I do cat of eMMC to read the contents of some of the files? The
>important files I need are c/cpp source text files. From the mSD, how do I
>specify the eMMC directory?

With no partition table, there is no way to tell it where the
"directory" is located. It needs to know where the start of the partition
was to then locate the data structures telling it where the files are. Note
that in Linux, the "directory" is just another file

http://tldp.org/LDP/intro-linux/html/sect_03_01.html
(Lots of stuff on that page, but I'm going to quote from the end...)
"""
3.1.3.2. The file system in reality

<SNIP>

Every partition has its own file system. By imagining all those file
systems together, we can form an idea of the tree-structure of the entire
system, but it is not as simple as that. In a file system, a file is
represented by an inode, a kind of serial number containing information
about the actual data that makes up the file: to whom this file belongs,
and where is it located on the hard disk.

Every partition has its own set of inodes; throughout a system with
multiple partitions, files with the same inode number can exist.

Each inode describes a data structure on the hard disk, storing the
properties of a file, including the physical location of the file data.

<SNIP>

The only information not included in an inode, is the file name and
directory. These are stored in the special directory files. By comparing
file names and inode numbers, the system can make up a tree-structure that
the user understands. Users can display inode numbers using the -i option
to ls. The inodes have their own separate space on the disk.
"""

Information for one of my BBB (but I have no idea if it varies any from
reflash to reflash -- or based upon who provided the eMMC, mine is old
enough to have Micron chips for eMMC and SDRAM) -- use fixed width font

debian@beaglebone:~$ sudo fdisk -l
[sudo] password for debian:
Disk /dev/mmcblk1: 3.7 GiB, 3925868544 bytes, 7667712 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
Disklabel type: dos
Disk identifier: 0xc57622dd

Device Boot Start End Sectors Size Id Type
/dev/mmcblk1p1 * 8192 7667711 7659520 3.7G 83 Linux




Disk /dev/mmcblk1boot1: 1 MiB, 1048576 bytes, 2048 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 /dev/mmcblk1boot0: 1 MiB, 1048576 bytes, 2048 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
debian@beaglebone:~$

debian@beaglebone:~$ sudo parted -l
Error: /dev/mmcblk1boot0: unrecognised disk label
Model: Generic SD/MMC Storage Card (sd/mmc)
Disk /dev/mmcblk1boot0: 1049kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

Model: MMC MMC04G (sd/mmc)
Disk /dev/mmcblk1: 3926MB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number Start End Size Type File system Flags
1 4194kB 3926MB 3922MB primary ext4 boot


Error: /dev/mmcblk1rpmb: unrecognised disk label
Warning: Error fsyncing/closing /dev/mmcblk1rpmb: Input/output error
Retry/Ignore? i
Model: Generic SD/MMC Storage Card (sd/mmc)
Disk /dev/mmcblk1rpmb: 131kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

Error: /dev/mmcblk1boot1: unrecognised disk label
Model: Generic SD/MMC Storage Card (sd/mmc)
Disk /dev/mmcblk1boot1: 1049kB
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags:

debian@beaglebone:~$ sudo lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
mmcblk1 179:0 0 3.7G 0 disk
+-mmcblk1p1 179:1 0 3.7G 0 part /
mmcblk1boot0 179:8 0 1M 1 disk
mmcblk1boot1 179:16 0 1M 1 disk
mmcblk1rpmb 179:24 0 128K 0 disk
debian@beaglebone:~$

debian@beaglebone:~$ sudo blkid
/dev/mmcblk1p1: LABEL="rootfs" UUID="0983c07a-71fe-435f-b97f-f7a36e2fc3d3"
TYPE="ext4" PARTUUID="c57622dd-01"
/dev/mmcblk1: PTUUID="c57622dd" PTTYPE="dos"
debian@beaglebone:~$

>Or somehow copy a block of the eMMC. Then search it to extract the text
>content.

You /might/ be able to use "dd" to copy the raw eMMC contents to a file
on some other media, but then you will have learn how to navigate the
structure of the partition (presuming you can find it in that raw data).
Note that there is no guarantee that file contents will be contiguous --
even if the editor writes the entire contents as a new file and renames it
after deleting the original, the blocks will be allocated from a free list
of blocks, and those may be scattered.



The main take-away from above is that -- for my eMMC, the primary
partition starts at sector 8192 (or 4MB in) -- so if you zeroed 100MB,
you've also wiped out the first 96 MB of the data. If the "inodes" are
stored there, then the pointers to the files themselves have been lost.

http://www.grymoire.com/Unix/Inodes.html

activewh...@gmail.com

unread,
Jul 5, 2019, 6:51:51 AM7/5/19
to BeagleBoard
Dennis - Thank you very much for the suggestions and information. Maybe I will try dd to copy some of the eMMC. But it appears to be beyond my limited understanding, and low chance of success. 
Blair
Reply all
Reply to author
Forward
0 new messages