[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Help building debian-installer for arm64



Hello Karsten,

Thanks for the help,

On 26/12/2017 22:05, Karsten Merker wrote:
> On Tue, Dec 26, 2017 at 05:13:26PM +0100, Loys Ollivier wrote:
> 
>> I would like to build a custom debian-installer. The reason being, this
>> arm64 platform has a custom PHY that I need to enable in the kernel to get
>> network access.
>>
>> I built the kernel and version is:
>> linux-image-4.14.0-00001-g8796b59b622f-dirty_4.14.0-00001-g8796b59b622f-dirty-27_arm64.deb
>>
>> >From that kernel deb package. How can I build the debian installer ? The
>> documentation mentions udeb files that I don't have. Also, I don't know how
>> to specify the target arch: arm64.
>>
>> I checked out the debian-installer source code.
> 
> Hello,
> 
> building an installer with a custom kernel is a slightly
> complicated topic.  I'll try to give you a rough overview; feel
> free to ask specific questions on this list if you get stuck
> somewhere.  I would like to propose that you first try to build
> an unmodified installer from source to get a feeling for how the
> build process works.
> 
> Regarding the target architecture: the installer is intended
> to be build natively, i.e. you need to build the installer
> on an arm64 system.
> 
> First a few links for some background information:
> - https://wiki.debian.org/DebianInstaller/CheckOut
> - https://wiki.debian.org/DebianInstaller/Build
> - http://d-i.alioth.debian.org/doc/internals/
> 
> The last one is rather old and hasn't been updated for quite a
> while, but it still provides a useful overview about which
> basic components the installer has.
> 
> For building, checkout the source with mr as described in the
> first link above.  You can then either run the normal Debian
> package building process (provided you have all dependencies
> installed, you can simply run "dpkg-buildpackage -us -uc
> -rfakeroot", but preferably use either pbuilder or sbuild), or
> you can build single installer targets such as the netboot target
> separately.  Just running make gives you a list of supported
> targets.  Taking the netboot target as an example, the following
> commands build it:
> 
>   $ fakeroot make reallyclean && fakeroot make build_netboot
> 
> The results are placed in the "dest" directory.
> 

I have been able to build the d-i natively and boot from it. Thanks for
the help with that. The problem is, my kernel is still missing some
modules.

> Regarding the kernel udebs: those are created by the Debian
> kernel package. A package built with "make deb-pkg" from within
> an upstream kernel tree only builds regular debs, but no udebs.
> To have udebs for a custom kernel, you should start from the
> Debian kernel package sources and modify them as needed for
> your custom kernel.
> 
> The Debian kernel package repository is available at
> https://anonscm.debian.org/git/kernel/linux.git.
> Please note that this repository only contains the packaging
> part, not the upstream kernel sources.
> 
> For how to use that with an upstream kernel source, please
> read
> 
>   https://anonscm.debian.org/git/kernel/linux.git/tree/debian/README.source?h=sid
> 

I have been able to build a Debian kernel using your tools. But I think
I am missing something... I followed
https://kernel-handbook.alioth.debian.org/ch-common-tasks.html#s-common-official
section 4.3.
I did "make deb-pkg" and got linux kernel deb packages but still no
udebs. I did not find in the documentation how to create those udebs.

I guess once I have them I will be able to rebuild the d-i with my
custom kernel.

> To make the installer actually use your udebs, you have to place
> them in the "localudebs" directory in the installer source tree
> and rebuild the installer.
> 
> HTH,
> Karsten
> 

Thanks,

Loys


Reply to: