Firefly Open Source Community

   Login   |   Register   |
New_Topic
123
New Topic
Print Previous Topic Next Topic

[Linux] will Ubuntu 18.04 image be made for RK3399

1387

Credits

0

Prestige

0

Contribution

vip

Rank: 6Rank: 6

Credits
1387
Posted at 1/17/2019 16:23:45        Only Author  11#
Reply

Use props Report

1387

Credits

0

Prestige

0

Contribution

vip

Rank: 6Rank: 6

Credits
1387
Posted at 1/17/2019 16:24:12        Only Author  12#
Jack_P Posted at 1/9/2019 23:06
Hey Penguin,
I tried installing using your steps for ROC-RK3399-PC. But the upgrade tool wasn't det ...

https://drive.google.com/drive/f ... qTpgCQiZFCmj-DUbbwb

ROC-RK3399-PC-Ubuntu18.04-SDBOOT-xxxx.img
Reply

Use props Report

173

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
173
Posted at 2/3/2019 07:04:39        Only Author  13#
Last edited by KD0OHR In 2/3/2019 07:58 Editor

Not sure if this works for the Firefly-RK3399 or if I made a mistake
Edit - made a mistake. Ended up using the built in ubuntu tool to copy the image to the SD card and works great. Thanks all!

Reply

Use props Report

173

Credits

0

Prestige

0

Contribution

registered members

Rank: 2

Credits
173
Posted at 2/17/2019 14:35:49        Only Author  14#
Last edited by KD0OHR In 2/18/2019 14:12 Editor

I have noticed here lately that it sometimes takes several reboots to get the firefly to boot the SD card, and
  1. df
Copy the code
command is showing a different mmcblkX each time. Sometimes the firefly boots to SD and emmc isn't even detected, most of the time it boots the emmc. Is there some surefire way to have it boot SD every time?

Edit - I suppose the obvious solution is to blank the emmc forcing the SD boot 100% of the time but it would be nice to have the option to fallback to emmc when the SD card is removed. Maybe this is just a quirk with my board, I can get it to boot the SD card pretty consistently with 3 reboots

Reply

Use props Report

1387

Credits

0

Prestige

0

Contribution

vip

Rank: 6Rank: 6

Credits
1387
Posted at 2/20/2019 17:05:11        Only Author  15#
Hi, @KD0OHR , do you have the serial adapter to access the log of u-boot?
That helps to identify the problem. Thanks!
Reply

Use props Report

32

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
32
Posted at 3/6/2019 03:40:50        Only Author  16#
penguin Posted at 2/20/2019 17:05
Hi, @KD0OHR , do you have the serial adapter to access the log of u-boot?
That helps to identify th ...

What seems to be happening is that the SD controller under linux isn't coming up right. What I see is the Ubuntu kernel boots, but the system ends up with the filesystem from the eMMC.

the full console logs are long, here's a diff of the two in the interesting areas:

=====

--- ubuntu_boot_worked_2_strip.txt        2019-03-05 14:18:47.228640500 -0500
+++ ubuntu_boot_right_kernel_wrong_fs_strip.txt        2019-03-05 14:12:44.554786500 -0500
@@ -1,6 +1,8 @@
+DDR Version 1.14 20180803
+In
Channel 0: DDR3, 800MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
Channel 1: DDR3, 800MHz
Bus Width=32 Col=10 Bank=8 Row=15 CS=1 Die Bus-Width=16 Size=1024MB
256B stride
ch 0 ddrconfig = 0x101, ddrsize = 0x20
@@ -16,13 +18,13 @@
FwPartOffset=2000 , 100000
mmc0:cmd5,20
SdmmcInit=0 0
BootCapSize=0
UserCapSize=30528MB
FwPartOffset=2000 , 0
-StorageInit ok = 66344
+StorageInit ok = 233290
SecureMode = 0
SecureInit read PBA: 0x4
SecureInit read PBA: 0x404
SecureInit read PBA: 0x804
SecureInit read PBA: 0xc04
SecureInit read PBA: 0x1004
@@ -509,32 +511,31 @@
  rockchip-iodomain ff770000.syscon:io-domains: Setting to 3300000 done
  mmc_host mmc0: Bus speed (slot 0) = 400000Hz (slot req 400000Hz, actual 400000HZ div = 0)
  dwmmc_rockchip fe320000.dwmmc: 1 slots initialized
  sdhci-pltfm: SDHCI platform and OF driver helper
  sdhci-arasan fe330000.sdhci: No vmmc regulator found
  sdhci-arasan fe330000.sdhci: No vqmmc regulator found
+ rockchip-iodomain ff770000.syscon:io-domains: Setting to 3300000 done
+ rockchip-iodomain ff770000.syscon:io-domains: Setting to 1800000 done
  mmc1: SDHCI controller on fe330000.sdhci [fe330000.sdhci] using ADMA
  hidraw: raw HID events driver (C) Jiri Kosina
  usbcore: registered new interface driver usbhid
  usbhid: USB HID core driver
- mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 50000000Hz, actual 50000000HZ div = 0)
- mmc0: new high speed SDHC card at address 0001
- mmcblk0: mmc0:0001 EB1QT 29.8 GiB
  inv_mpu_iio: inv_mpu_init:746
  ff100000.saradc supply vref not found, using dummy regulator
  usbcore: registered new interface driver snd-usb-audio
-  mmcblk0: p1 p2 p3 p4 p5
  Initializing XFRM netlink socket
  NET: Registered protocol family 10
  NET: Registered protocol family 17
  NET: Registered protocol family 15
  Bluetooth: RFCOMM socket layer initialized
  Bluetooth: RFCOMM ver 1.11
  Bluetooth: HIDP (Human Interface Emulation) ver 1.2
  Bluetooth: HIDP socket layer initialized
  [WLAN_RFKILL]: Enter rfkill_wlan_init
+ mmc_host mmc0: Bus speed (slot 0) = 150000000Hz (slot req 150000000Hz, actual 150000000HZ div = 0)
  [BT_RFKILL]: Enter rfkill_rk_init
  Key type dns_resolver registered
  sensor_register_slave:mpu6880_gyro,id=50
  Error: Driver 'ov4689' is already registered, aborting...
  Error: Driver 'ov13850' is already registered, aborting...
  Registered cp15_barrier emulation handler
@@ -548,50 +549,54 @@
  rockchip-drm display-subsystem: bound ff900000.vop (ops 0xffffff8008ce0b58)
  rockchip-vop ff8f0000.vop: missing rockchip,grf property
  [drm] no mcu-timing node found in /vop@ff8f0000
  rockchip-drm display-subsystem: bound ff8f0000.vop (ops 0xffffff8008ce0b58)
  i2c i2c-9: of_i2c: modalias failure on /hdmi@ff940000/ports
  dwhdmi-rockchip ff940000.hdmi: registered DesignWare HDMI I2C bus driver
+ mmc1: MAN_BKOPS_EN bit is not set
  dwhdmi-rockchip ff940000.hdmi: Detected HDMI TX controller v2.11a with HDCP (DWC HDMI 2.0 TX PHY)
  rockchip-drm display-subsystem: bound ff940000.hdmi (ops 0xffffff8008cd5ef8)
- mmc1: MAN_BKOPS_EN bit is not set
  i2c i2c-10: of_i2c: modalias failure on /dp@fec00000/ports
  cdn-dp fec00000.dp: Direct firmware load for rockchip/dptx.bin failed with error -2
  rockchip-drm display-subsystem: bound fec00000.dp (ops 0xffffff8008cd6f18)
  [drm] Supports vblank timestamp caching Rev 2 (21.10.2013).
  [drm] No driver support for vblank timestamp query.
  mmc1: new HS400 Enhanced strobe MMC card at address 0001
  mmcblk1: mmc1:0001 AJTD4R 14.6 GiB
  mmcblk1boot0: mmc1:0001 AJTD4R partition 1 4.00 MiB
  mmcblk1boot1: mmc1:0001 AJTD4R partition 2 4.00 MiB
  mmcblk1rpmb: mmc1:0001 AJTD4R partition 3 4.00 MiB
   mmcblk1: p1 p2 p3 p4 p5
+ dwmmc_rockchip fe320000.dwmmc: Successfully tuned phase to 238
+ mmc0: new ultra high speed SDR104 SDHC card at address 0001
+ mmcblk0: mmc0:0001 EB1QT 29.8 GiB
+  mmcblk0: p1 p2 p3 p4 p5
  rockchip-vop ff900000.vop: [drm:vop_crtc_enable] Update mode to 1920x1200p60, type: 11
  Freeing drm_logo memory: 616K
  Console: switching to colour frame buffer device 240x75
  rockchip-drm display-subsystem: fb0:  frame buffer device
  mali ff9a0000.gpu: GPU identified as 0x0860 r2p0 status 0
  mali ff9a0000.gpu: Protected mode not available
  mali ff9a0000.gpu: l=0 h=2147483647 hyst=5000 l_limit=0 h_limit=0
  mali ff9a0000.gpu: Using configured power model mali-simple-power-model, and fallback mali-simple-power-model
  mali ff9a0000.gpu: Probed as mali0
  xhci-hcd xhci-hcd.8.auto: xHCI Host Controller
  xhci-hcd xhci-hcd.8.auto: new USB bus registered, assigned bus number 1
+ vendor storage:20160801 ret = 0
  xhci-hcd xhci-hcd.8.auto: hcc params 0x0220fe64 hci version 0x110 quirks 0x02030010
  xhci-hcd xhci-hcd.8.auto: irq 225, io mem 0xfe800000
  usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
  usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
  usb usb1: Product: xHCI Host Controller
  usb usb1: Manufacturer: Linux 4.4.154 xhci-hcd
  usb usb1: SerialNumber: xhci-hcd.8.auto
  hub 1-0:1.0: USB hub found
  hub 1-0:1.0: 1 port detected
  xhci-hcd xhci-hcd.8.auto: xHCI Host Controller
  xhci-hcd xhci-hcd.8.auto: new USB bus registered, assigned bus number 2
  usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
- vendor storage:20160801 ret = 0
  usb usb2: New USB device found, idVendor=1d6b, idProduct=0003
  usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
  usb usb2: Product: xHCI Host Controller
  usb usb2: Manufacturer: Linux 4.4.154 xhci-hcd
  usb usb2: SerialNumber: xhci-hcd.8.auto
  hub 2-0:1.0: USB hub found
@@ -714,13 +719,13 @@
  [WLAN_RFKILL]: rockchip_wifi_get_oob_irq: rfkill-wlan driver has not Successful initialized
  usbcore: registered new interface driver rtl8188eu
  RTW: module init ret=0
  input: gpio-keys as /devices/platform/gpio-keys/input/input0
  ==gsl_ts_init==
  ret=0
- rk808-rtc rk808-rtc: setting system clock to 2013-01-18 09:04:22 UTC (1358499862)
+ rk808-rtc rk808-rtc: setting system clock to 2013-01-18 08:50:24 UTC (1358499024)
  mmc2: queuing unknown CIS tuple 0x80 (2 bytes)
  mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
  mmc2: queuing unknown CIS tuple 0x80 (3 bytes)
  mmc2: queuing unknown CIS tuple 0x80 (7 bytes)
  ret 1024
  I : [File] : drivers/gpu/arm/mali400/mali/linux/mali_kernel_linux.c; [Line] : 417; [Func] : mali_module_init(); svn_rev_string_from_arm of this mali_ko is '', rk_ko_ver is '5', built at '11:19:13', on 'Feb 16 2019'.
@@ -728,61 +733,335 @@
  ALSA device list:
    #0: rk-hdmi-dp-sound
  mmc_host mmc2: Bus speed (slot 0) = 100000000Hz (slot req 100000000Hz, actual 100000000HZ div = 0)
  dwmmc_rockchip fe310000.dwmmc: All phases work, using default phase 0.
  mmc2: queuing unknown CIS tuple 0x91 (3 bytes)
  mmc2: new ultra high speed SDR104 SDIO card at address 0001
+ EXT4-fs (mmcblk1p5): recovery complete
+ EXT4-fs (mmcblk1p5): mounted filesystem with ordered data mode. Opts: (null)
+ VFS: Mounted root (ext4 filesystem) on device 179:5.
+ devtmpfs: mounted
+ Freeing unused kernel memory: 1152K
  usb 2-1: new high-speed USB device number 2 using ehci-platform
- cdn-dp fec00000.dp: Direct firmware load for rockchip/dptx.bin failed with error -2
+ EXT4-fs (mmcblk1p5): re-mounted. Opts: data=ordered
+ng: OK
+kchip Linux SDK
+v using udev: [   20.229077] udevd[186]: starting version 3.2.5
+ random: udevd: uninitialized urandom read (16 bytes read, 60 bits of entropy available)
+ random: udevd: uninitialized urandom read (16 bytes read, 60 bits of entropy available)
+ random: udevd: uninitialized urandom read (16 bytes read, 60 bits of entropy available)
+ random: udevd: uninitialized urandom read (16 bytes read, 60 bits of entropy available)
+ random: udevd: uninitialized urandom read (16 bytes read, 60 bits of entropy available)
+ cdn-dp fec00000.dp: [drm:cdn_dp_pd_event_work] Not connected. Disabling cdn
+ usb 2-1: New USB device found, idVendor=1a40, idProduct=0201
+ udevd[187]: starting eudev-3.2.5
+ usb 2-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
+ usb 2-1: Product: USB 2.0 Hub [MTT]
+ hub 2-1:1.0: USB hub found
+ hub 2-1:1.0: 7 ports detected
+ random: udevd: uninitialized urandom read (16 bytes read, 64 bits of entropy available)
  wifi_platform_bus_enumerate device present 1
  ======== Card detection to detect SDIO card! ========
  mmc2:mmc host rescan start!
  bcmsdh_register: register client driver
- usb 2-1: New USB device found, idVendor=1a40, idProduct=0201
  bcmsdh_sdmmc_probe: Enter num=1
  bcmsdh_sdmmc_probe: Enter num=2
  bus num (host idx)=2, slot num (rca)=1
  found adapter info 'DHD generic adapter'
  sdioh_attach: set sd_f2_blocksize 256
  sdioh_attach: sd clock rate = 0
  bcmsdh_probe: Host OOB irq is not defined
  sdioh_probe: bcmsdh_probe failed
  bcmsdh_sdmmc: probe of mmc2:0001:2 failed with error -12
- usb 2-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
- usb 2-1: Product: USB 2.0 Hub [MTT]
- hub 2-1:1.0: USB hub found
- hub 2-1:1.0: 7 ports detected
- EXT4-fs (mmcblk0p5): recovery complete
- EXT4-fs (mmcblk0p5): mounted filesystem with ordered data mode. Opts: (null)
- VFS: Mounted root (ext4 filesystem) on device 179:5.
- devtmpfs: mounted
- Freeing unused kernel memory: 1152K

Reply

Use props Report

1387

Credits

0

Prestige

0

Contribution

vip

Rank: 6Rank: 6

Credits
1387
Posted at 3/6/2019 16:18:03        Only Author  17#
Hi @tek ,
From the log,  eMMC is fixed to mmcblk1 and SD card is fixed to mmcblk0. Both are correct.

The rootfs is chosen from either mmcblk0p5 or mmcblk1p5.
What's the `root=` parameter in the kernel cmdline?

plz paste result of: cat /proc/cmdline
Reply

Use props Report

32

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
32
Posted at 3/6/2019 21:20:55        Only Author  18#
Right. But what is happening is that the SD seems to intermittently not come up consistently (sometimes as 50MHz, sometimes as 150MHZ, sometimes as "high speed" and sometimes as "ultra speed") , causing the OS to use the rootfs from the eMMC.

More important: it appears that both the eMMC image (built from the "linux SDK") and the Ubuntu 18.04 SD image have the same PARTUUID (614e0000-0000-4b53-8000-1d28000054a9) - which is A Bad Thing.
Reply

Use props Report

32

Credits

0

Prestige

0

Contribution

new registration

Rank: 1

Credits
32
Posted at 3/6/2019 23:46:43        Only Author  19#
Last edited by tek In 3/6/2019 23:50 Editor

I edited partition 3 of the Ubuntu SD image to put a unique PARTUUID in the kernel command line inside that partition, and then changed the PARTUUID of partition 5 to match.

The SD now boots correctly every time.

So: the different images should be generated with different rootfs PARTUUIDs and the kernel command lines modified to match.

Reply

Use props Report

1387

Credits

0

Prestige

0

Contribution

vip

Rank: 6Rank: 6

Credits
1387
Posted at 3/7/2019 16:15:59        Only Author  20#
@tek

You are right. Using the same PARTUUID is the culprit.

SD seems to intermittently not come up consistently (sometimes as 50MHz, sometimes as 150MHZ, sometimes as "high speed" and sometimes as "ultra speed")


This needs further investigation. What sd card do you use?
Reply

Use props Report

Return to List
123
You need to log in before you can reply Login | Register

This forum Credits Rules

Quick Reply Back to top Back to list