ntadmin / DGND3700v2

Custom firmware for the Netgear DGND3700v2
12 stars 4 forks source link

Get latest version of busybox working replacing existing version #10

Closed ntadmin closed 8 years ago

ntadmin commented 8 years ago

Latest stable is busybox 1.25. Be sure to add base64 to it.

ntadmin commented 8 years ago

Some work by cjlinx has made it clear that simply replacing the busybox with a newer one is a risky business. Tracking the size of the busysbox executable in the netgear "target" directory through the "make Source" process suggests that it makes busybox more than once, at least twice, possibly three times. More work needed.

Given the complexity, pushing this issue to NEWTB3

ntadmin commented 8 years ago

Not worth putting this as a release milestone as there is not (at present) a need to do this and there are risks involved.

ntadmin commented 8 years ago

Couple of things:

Positive: the latest busybox compiles and works on the device (tested by adding it into the image with a different name and keeping the original in place).

Negative: There are clearly come mods to the installed version of busybox, not least the one that make /usr/sbin/login work from the plaintext /etc/htpasswd and ignore /etc/passwd.

Need to identify all the Netgear customisations of busybox before changing things ...

ntadmin commented 8 years ago

List of source files which differ between the official busybox 1.13.4 distribution and the version that comes in the Netgear distribution (which seems to be based on 1.13.4):

busybox-1.13/include/applets.h
busybox-1.13/include/usage.h
busybox-1.13/init/init.c
busybox-1.13/libbb/bb_askpass.c
busybox-1.13/libbb/correct_password.c
busybox-1.13/loginutils/login.c
busybox-1.13/networking/ping.c
busybox-1.13/networking/traceroute.c
busybox-1.13/networking/udhcp/common.h
busybox-1.13/networking/wget.c
busybox-1.13/procps/ps.c
busybox-1.13/procps/top.c

Other files which differ, but some of this might just be configuration things ...

busybox-1.13/Makefile
busybox-1.13/Makefile.custom
busybox-1.13/miscutils/Config.in
busybox-1.13/miscutils/Kbuild
busybox-1.13/networking/Config.in
busybox-1.13/networking/Kbuild
busybox-1.13/testsuite/mdev.tests
ntadmin commented 8 years ago

diff for init.c, as this seems likely to trash boot up ...

36,37c36
< //#define INIT_SCRIPT  "/etc/init.d/rcS"      /* Default sysinit script. */
< #define INIT_SCRIPT  "/usr/etc/rcS"   /* Default sysinit script. */
---
> #define INIT_SCRIPT  "/etc/init.d/rcS"        /* Default sysinit script. */
693c692
<               new_init_action(ASKFIRST, bb_default_login_shell, "/dev/ttyS0");
---
>               new_init_action(ASKFIRST, bb_default_login_shell, "");
695,697c694,696
< //            new_init_action(ASKFIRST, bb_default_login_shell, VC_2);
< //            new_init_action(ASKFIRST, bb_default_login_shell, VC_3);
< //            new_init_action(ASKFIRST, bb_default_login_shell, VC_4);
---
>               new_init_action(ASKFIRST, bb_default_login_shell, VC_2);
>               new_init_action(ASKFIRST, bb_default_login_shell, VC_3);
>               new_init_action(ASKFIRST, bb_default_login_shell, VC_4);
699c698
<               new_init_action(SYSINIT, INIT_SCRIPT, "/dev/console");
---
>               new_init_action(SYSINIT, INIT_SCRIPT, "");
ntadmin commented 8 years ago

Created a separate milestone for this one, linking in the sub issues as we determine and resolve them.

ntadmin commented 8 years ago

Creating (slowly) one issue per file with code diff so each can be looked at without this 'headline' issue getting over messy.

ntadmin commented 8 years ago

Done, will be marked as the B4 release in the coming moments.