Jump to content

Recommended Posts

Posted

I have serious issues with the serial number being exposed in /proc/cpuinfo.

Especially when browsers have access to this information.

 

Afaik, its u-boot who passed this information on to Linux.

Any idea how to mask this from Linux?

 

Your help is appreciated

Posted (edited)

Well I tried the following, but it did "not" work unfortunately :blink:

 

apt install device-tree-compiler

 

then converted the nanopi-r6c device tree from dtb to dts

 

dtc -I dtb -O dts -o rk3588s-nanopi-r6c.dtb rk3588s-nanopi-r6c.dts

 

Inserted a  serial-number
 

/dts-v1/;

/ {
    compatible = "friendlyelec,nanopi-r6c\0rockchip,rk3588";
    interrupt-parent = <0x01>;
    #address-cells = <0x02>;
    #size-cells = <0x02>;
    model = "FriendlyElec NanoPi R6C";
    serial-number = "0000000000000000"

 

then converted the nanopi-r6c device tree from dts to dtb

 

dtc -I dts -O dtb -o rk3588s-nanopi-r6c.dts rk3588s-nanopi-r6c.dtb

 

renamed the original .bak and copied the new file into /boot/dtb:
 

sudo mv /boot/dtb/rockchip/rk3588s-nanopi-r6c.dtb /boot/dtb/rockchip/rk3588s-nanopi-r6c.dtb.bak
sudo cp rk3588s-nanopi-r6c.dtb /boot/dtb/rockchip/rk3588s-nanopi-r6c.dtb

 

/proc/cpuinfo and /sys/firmware/devicetree/base/serial-number still show the original serial. Maybe someone smarter can pick this up :P

 

 

 

 

Edited by Dantes
Posted

found serial in:
 

/proc/cpuinfo
/proc/device-tree/serial-number
/sys/firmware/devicetree/base/serial-number

 

https://community.toradex.com/t/cpu-serial-in-proc-cpuinfo-on-imx7/6390
 

The serial number available in cpuinfo is set by U-Boot from the data available in config block.

 

https://elixir.free-electrons.com/linux/v6.4-rc7/source/arch/arm/kernel/setup.c

 

function that passes serial number to kernel

 

some more info i could find:

https://forums.raspberrypi.com/viewtopic.php?t=183474

 

Posted

Booted into u-boot via the usb-c console. I have some issues with the serial setup running minicom/screen.

Used the basic settings: 1500000 8N1 and disabled hard/soft flow. But when I dump out with 'printenv' half of the settings appear.

 

Back to the topic. I tried to overwrite the serial to see if it could be done, but no :(

 

setenv serial# 0000000000000000

 

I got an error that read-only variables could not be overwritten.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines