WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: PiCore busybox snapshot build  (Read 2323 times)

Offline snecker

  • Newbie
  • *
  • Posts: 11
PiCore busybox snapshot build
« on: December 17, 2020, 06:03:10 PM »
I'm currently attempting to run:

hwclock -s

on a Pi Zero however I get the error:

hwclock: settimeofday: Invalid argument

This is due to a breaking change earlier in the year.

The fix seems to have landed yesterday in busybox but I only have access to armv7 builders and I just get

Illegal Instruction

when I attempt to run this build on the PiCore, understandably.

If someone can point me in the right direction to get an armv6 version built that would be appreciated.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11590
Re: PiCore busybox snapshot build
« Reply #1 on: December 17, 2020, 07:55:20 PM »
Hi snecker
Welcome to the forum.

I see in PiCore 12.x  util-linux.tcz  contains  /usr/local/sbin/hwclock:
http://tinycorelinux.net/12.x/armv6/tcz/util-linux.tcz.list
You don't mention which version of PiCore you are running, but it's also available in 11.x. 10.x, and 9.x too.

Offline snecker

  • Newbie
  • *
  • Posts: 11
Re: PiCore busybox snapshot build
« Reply #2 on: December 18, 2020, 06:22:30 AM »
Hi snecker
Welcome to the forum.

Thank you, good to be here!

I see in PiCore 12.x  util-linux.tcz  contains  /usr/local/sbin/hwclock:
http://tinycorelinux.net/12.x/armv6/tcz/util-linux.tcz.list
You don't mention which version of PiCore you are running, but it's also available in 11.x. 10.x, and 9.x too.

Sorry, its the latest 12.x release which includes BusyBox 1.31.1

Thank you for the advice about util-linux, I am just attempting to compile this now.

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11590
Re: PiCore busybox snapshot build
« Reply #3 on: December 18, 2020, 08:57:33 AM »
Hi snecker
... Thank you for the advice about util-linux, I am just attempting to compile this now.
No need to compile. util-linux.tcz is a prebuilt extension you can install. If your Pi is connected to the network, then:
Code: [Select]
tce-load -wi util-linux

Offline snecker

  • Newbie
  • *
  • Posts: 11
Re: PiCore busybox snapshot build
« Reply #4 on: December 18, 2020, 09:11:59 AM »
Hi snecker
... Thank you for the advice about util-linux, I am just attempting to compile this now.
No need to compile. util-linux.tcz is a prebuilt extension you can install. If your Pi is connected to the network, then:
Code: [Select]
tce-load -wi util-linux

Ok, I realise now I was trying to do:

Code: [Select]
hwclock -s
as a regular user and the error was misleading.

So currently the busybox 1.31.1 version of hwclock is broken, util-linux version is not.

Thanks!

Offline Rich

  • Administrator
  • Hero Member
  • *****
  • Posts: 11590
Re: PiCore busybox snapshot build
« Reply #5 on: December 18, 2020, 09:22:00 AM »
Hi snecker
... Ok, I realise now I was trying to do:

Code: [Select]
hwclock -s
as a regular user and the error was misleading. ...
Since the  busybox hwclock  is in  /sbin, I would expect it needs to be run as root. Does this work:
Code: [Select]
sudo busybox hwclock -s

Offline snecker

  • Newbie
  • *
  • Posts: 11
Re: PiCore busybox snapshot build
« Reply #6 on: December 20, 2020, 05:38:27 PM »
Hi Rich

Hi snecker
... Ok, I realise now I was trying to do:

Code: [Select]
hwclock -s
as a regular user and the error was misleading. ...
Since the  busybox hwclock  is in  /sbin, I would expect it needs to be run as root. Does this work:
Code: [Select]
sudo busybox hwclock -s

No, this doesn't work but util-linux from the repository does, thanks!