Date: Sun, 28 Dec 2014 18:22:29 -0800 From: Adrian Chadd <adrian@freebsd.org> To: "freebsd-arm@freebsd.org" <freebsd-arm@freebsd.org> Subject: Re: building a raspberry pi -head image, the dirty non-root way Message-ID: <CAJ-Vmo=_uJVwnU%2BnnPTkemm93Sv4%2BT3Qe75RffBK5q8-3E3iSw@mail.gmail.com> In-Reply-To: <CAJ-Vmon7Tpcgs-OX0HT=1q9H0n4P2vXSLVYA-tsL1yehiHHDfA@mail.gmail.com> References: <CAJ-Vmon7Tpcgs-OX0HT=1q9H0n4P2vXSLVYA-tsL1yehiHHDfA@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
So, I'm 98% successful after christmas. It boots fine to a login prompt and DHCP's networking. I put the whole thing up in git for people to look at and go "god damnit adrian, what the hell!" at. https://github.com/erikarn/rpi-build So, here's my experience so far: * do we have uboot usb keyboard support? that'd be nice. * do we have ubldr usb keyboard support? that'd also be nice. * the default console is the uart; is there a way to edit that in a config file in the boot partition, or are we stuck with it being something in the FFS partition? (This made debugging quite amusing, as it took me a while to remember that although I may get /some/ kernel messages on the screen, i may be actually seeing the secondary console. Grr.) * the install-as-user thing is nice, but we don't have any simple tools to modify that whole setup post-install, but before an image is generated. My build script has an install custom target which does some dirty things to populate the changes and a new metalog. Yes, it involves some reasonably clean perl code. Only because I didn't want to learn awk. * .. and we don't have any nice way of populating packages into it without root privs and chroot. Sniffle. That would be rather nice. * We don't seem to install the dtb anywhere during installworld/installkernel. There's a builddtb target, but it only sticks it in the kernel build directory. That doesn't seem to get installed in the root filesystem when doing a make installworld/installkernel. Why is that? The bits that don't work and should likely get looked at: * Some of the suid binaries aren't - eg passwd. 'su' is fine. 'passwd' isn't. It's odd, because in METALOG: ./usr/bin/passwd type=file uname=root gname=wheel mode=04555 size=7000 The difference? adrian@test-2:~/work/freebsd/head-arm/src % cat ../root/METALOG.NEW | grep 'bin/passwd ' ./usr/bin/passwd type=file uname=root gname=wheel mode=04555 size=7000 adrian@test-2:~/work/freebsd/head-arm/src % cat ../root/METALOG.NEW | grep 'bin/su ' ./usr/bin/su type=file uname=root gname=wheel mode=04555 size=14444 flags=schg .. so I'll file a PR about that and see if it's to do with the flags field or something else. Ok, so the positives. * besides warnings and the "hm, some permissions are whack" the install-as-user bits are quite nice. * I'm using an older uboot from ian - I'm going to stop doing that soon and either use his package -or- just expect the user has installed the right cross-compiler/toolchain target and will make it that way. I'm not sure yet. * makefs is quite nice - except that symlinks are owned by adrian:wheel. I really should PR that. * mkimg is really nice - Marcel, you're wonderful. It'd be nice if it could do nested partitioning without having to call itself externally and pipe data around - but it'll do for now. I have a few things I'd like to customise as part of this build script (mostly automatically adding users/groups, adding a default IP address rather than DHCP; all the crap that i'd like out of a default image generator so I can do development) but hey, here's another build script. :-) I'm not expecting anyone but me to use this. I'm hoping this stuff gets folded into nanobsd at some point as it'd be nice to use makefs / mkimg to do lifting rather than using md's and direct calls to fdisk. I also wanted to see how far along the "Don't do stuff as root" building had come - and it's quite far, so that's quite good. What we're missing are the tools /after/ this to populate it with packages and other stuff, and to be able to customise the filesystem at the same time we're customising the metalog that we feed into makefs. -adrian
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAJ-Vmo=_uJVwnU%2BnnPTkemm93Sv4%2BT3Qe75RffBK5q8-3E3iSw>